From 426125249197919e8385e109d9a4b78946c9bd30 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 21 Dec 2020 16:39:40 +0800 Subject: [PATCH 001/175] prepare 6.0.0 snapshot release --- modules/openapi-generator-cli/pom.xml | 2 +- modules/openapi-generator-core/pom.xml | 2 +- modules/openapi-generator-gradle-plugin/gradle.properties | 2 +- modules/openapi-generator-gradle-plugin/pom.xml | 2 +- modules/openapi-generator-maven-plugin/examples/java-client.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/non-java-invalid-spec.xml | 2 +- modules/openapi-generator-maven-plugin/examples/non-java.xml | 2 +- modules/openapi-generator-maven-plugin/pom.xml | 2 +- modules/openapi-generator-online/pom.xml | 2 +- modules/openapi-generator/pom.xml | 2 +- pom.xml | 2 +- samples/client/petstore/R/.openapi-generator/VERSION | 2 +- samples/client/petstore/apex/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-qt5/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restsdk/client/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-restsdk/client/ApiClient.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiClient.h | 2 +- samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h | 2 +- samples/client/petstore/cpp-restsdk/client/ApiException.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiException.h | 2 +- samples/client/petstore/cpp-restsdk/client/HttpContent.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/HttpContent.h | 2 +- samples/client/petstore/cpp-restsdk/client/IHttpBody.h | 2 +- samples/client/petstore/cpp-restsdk/client/JsonBody.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/JsonBody.h | 2 +- samples/client/petstore/cpp-restsdk/client/ModelBase.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ModelBase.h | 2 +- .../client/petstore/cpp-restsdk/client/MultipartFormData.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/MultipartFormData.h | 2 +- samples/client/petstore/cpp-restsdk/client/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/Object.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/PetApi.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/StoreApi.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/UserApi.h | 2 +- .../client/petstore/cpp-restsdk/client/model/ApiResponse.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Category.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Category.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Order.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Order.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Pet.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Pet.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Tag.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Tag.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/User.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/User.h | 2 +- .../OpenAPIClient-net47/.openapi-generator/VERSION | 2 +- .../csharp-netcore/OpenAPIClient/.openapi-generator/VERSION | 2 +- .../csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/.openapi-generator/VERSION | 2 +- .../dart-dio/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../flutter_petstore/openapi/.openapi-generator/VERSION | 2 +- .../flutter_proto_petstore/openapi/.openapi-generator/VERSION | 2 +- .../petstore/dart-jaguar/openapi/.openapi-generator/VERSION | 2 +- .../dart-jaguar/openapi_proto/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 2 +- samples/client/petstore/elixir/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/groovy/.openapi-generator/VERSION | 2 +- .../petstore/haskell-http-client/.openapi-generator/VERSION | 2 +- .../petstore/java/feign-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/feign/.openapi-generator/VERSION | 2 +- .../petstore/java/google-api-client/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/jersey1/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../java/microprofile-rest-client/.openapi-generator/VERSION | 2 +- .../petstore/java/native-async/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/native/.openapi-generator/VERSION | 2 +- .../okhttp-gson-dynamicOperations/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-parcelableModel/.openapi-generator/VERSION | 2 +- .../client/petstore/java/okhttp-gson/.openapi-generator/VERSION | 2 +- .../java/rest-assured-jackson/.openapi-generator/VERSION | 2 +- .../petstore/java/rest-assured/.openapi-generator/VERSION | 2 +- .../client/petstore/java/resteasy/.openapi-generator/VERSION | 2 +- .../java/resttemplate-withXml/.openapi-generator/VERSION | 2 +- .../petstore/java/resttemplate/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2-play26/.openapi-generator/VERSION | 2 +- .../client/petstore/java/retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx3/.openapi-generator/VERSION | 2 +- .../petstore/java/vertx-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/vertx/.openapi-generator/VERSION | 2 +- .../client/petstore/java/webclient/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise-es6/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-gson/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-jackson/.openapi-generator/VERSION | 2 +- .../kotlin-json-request-string/.openapi-generator/VERSION | 2 +- .../kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-multiplatform/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin/.openapi-generator/VERSION | 2 +- samples/client/petstore/lua/.openapi-generator/VERSION | 2 +- samples/client/petstore/nim/.openapi-generator/VERSION | 2 +- .../client/petstore/objc/core-data/.openapi-generator/VERSION | 2 +- samples/client/petstore/objc/default/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/ApiException.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Configuration.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php | 2 +- .../lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/powershell/.openapi-generator/VERSION | 2 +- .../client/petstore/python-asyncio/.openapi-generator/VERSION | 2 +- .../client/petstore/python-legacy/.openapi-generator/VERSION | 2 +- .../client/petstore/python-tornado/.openapi-generator/VERSION | 2 +- samples/client/petstore/python/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-faraday/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-faraday/lib/petstore.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/default_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb | 2 +- .../ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/store_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/configuration.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/animal.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/api_response.rb | 2 +- .../lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/array_test.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/category.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/class_model.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/client.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_test.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/file.rb | 2 +- .../ruby-faraday/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/format_test.rb | 2 +- .../ruby-faraday/lib/petstore/models/has_only_read_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/health_check_result.rb | 2 +- .../ruby-faraday/lib/petstore/models/inline_response_default.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/list.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../ruby-faraday/lib/petstore/models/model200_response.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/model_return.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/name.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/nullable_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/number_only.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/order.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/outer_enum.rb | 2 +- .../lib/petstore/models/outer_enum_default_value.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb | 2 +- .../ruby-faraday/lib/petstore/models/read_only_first.rb | 2 +- .../ruby-faraday/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby-faraday/petstore.gemspec | 2 +- samples/client/petstore/ruby-faraday/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/spec_helper.rb | 2 +- samples/client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/another_fake_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/default_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/store_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_error.rb | 2 +- samples/client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/animal.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/api_response.rb | 2 +- .../ruby/lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/array_of_number_only.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/category.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/class_model.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/file.rb | 2 +- .../petstore/ruby/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/foo.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/format_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/health_check_result.rb | 2 +- .../ruby/lib/petstore/models/inline_response_default.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/list.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/model200_response.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/model_return.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/name.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/nullable_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/number_only.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/order.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb | 2 +- .../ruby/lib/petstore/models/outer_enum_default_value.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/read_only_first.rb | 2 +- .../petstore/ruby/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- samples/client/petstore/ruby/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby/spec/spec_helper.rb | 2 +- .../petstore/rust/hyper/petstore/.openapi-generator/VERSION | 2 +- .../rust/reqwest/petstore-async/.openapi-generator/VERSION | 2 +- .../petstore/rust/reqwest/petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-akka/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-sttp/.openapi-generator/VERSION | 2 +- .../petstore/spring-cloud-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-no-nullable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/client/petstore/spring-stubs/.openapi-generator/VERSION | 2 +- .../spring-stubs/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/single-request-parameter/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/with-prefixed-module-name/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../typescript-aurelia/default/.openapi-generator/VERSION | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../typescript-axios/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-complex-headers/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../with-single-request-parameters/.openapi-generator/VERSION | 2 +- .../builds/default-v3.0/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/default/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/enum/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/multiple-parameters/.openapi-generator/VERSION | 2 +- .../prefix-parameter-interfaces/.openapi-generator/VERSION | 2 +- .../builds/typescript-three-plus/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/without-runtime-checks/.openapi-generator/VERSION | 2 +- .../petstore/typescript-inversify/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-jquery/npm/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/npm/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../typescript-rxjs/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/with-progress-subscriber/.openapi-generator/VERSION | 2 +- .../config/petstore/protobuf-schema/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- samples/meta-codegen/usage/.openapi-generator/VERSION | 2 +- samples/openapi3/client/elm/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/go-experimental/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/python/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/python/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/dynamic_servers.gemspec | 2 +- .../client/features/dynamic-servers/ruby/lib/dynamic_servers.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_client.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/configuration.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/version.rb | 2 +- .../features/dynamic-servers/ruby/spec/api_client_spec.rb | 2 +- .../features/dynamic-servers/ruby/spec/configuration_spec.rb | 2 +- .../client/features/dynamic-servers/ruby/spec/spec_helper.rb | 2 +- .../ruby-client/.openapi-generator/VERSION | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore.rb | 2 +- .../ruby-client/lib/petstore/api/usage_api.rb | 2 +- .../ruby-client/lib/petstore/api_client.rb | 2 +- .../ruby-client/lib/petstore/api_error.rb | 2 +- .../ruby-client/lib/petstore/configuration.rb | 2 +- .../ruby-client/lib/petstore/models/array_alias.rb | 2 +- .../ruby-client/lib/petstore/models/map_alias.rb | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore/version.rb | 2 +- .../generate-alias-as-model/ruby-client/petstore.gemspec | 2 +- .../generate-alias-as-model/ruby-client/spec/api_client_spec.rb | 2 +- .../ruby-client/spec/configuration_spec.rb | 2 +- .../generate-alias-as-model/ruby-client/spec/spec_helper.rb | 2 +- .../dart-dio/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- .../jersey2-java8-special-characters/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../client/petstore/java/native/.openapi-generator/VERSION | 2 +- .../client/petstore/python-legacy/.openapi-generator/VERSION | 2 +- .../openapi3/client/petstore/python/.openapi-generator/VERSION | 2 +- .../typescript/builds/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript/builds/deno/.openapi-generator/VERSION | 2 +- .../typescript/builds/inversify/.openapi-generator/VERSION | 2 +- .../typescript/builds/jquery/.openapi-generator/VERSION | 2 +- .../typescript/builds/object_params/.openapi-generator/VERSION | 2 +- samples/schema/petstore/mysql/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.0/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.1/.openapi-generator/VERSION | 2 +- samples/server/petstore/aspnetcore/.openapi-generator/VERSION | 2 +- .../cpp-qt5-qhttpengine-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-api-server/.openapi-generator/VERSION | 2 +- .../petstore/go-gin-api-server/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-msf4j/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-async/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-no-interface/.openapi-generator/VERSION | 2 +- .../java-play-framework-no-nullable/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/java-play-framework/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-non-spring-app/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/default/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap-java8/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-spec-interface/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey1/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey2/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server/ktor/README.md | 2 +- .../kotlin-springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/kotlin/org/openapitools/api/PetApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/UserApi.kt | 2 +- .../kotlin-springboot-reactive/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-laravel/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-lumen/.openapi-generator/VERSION | 2 +- .../server/petstore/php-mezzio-ph/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-slim4/.openapi-generator/VERSION | 2 +- .../php-symfony/SymfonyBundle-php/.openapi-generator/VERSION | 2 +- .../python-aiohttp-srclayout/.openapi-generator/VERSION | 2 +- .../server/petstore/python-aiohttp/.openapi-generator/VERSION | 2 +- .../petstore/python-blueplanet/.openapi-generator/VERSION | 2 +- samples/server/petstore/python-flask/.openapi-generator/VERSION | 2 +- .../rust-server/output/multipart-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/no-example-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/openapi-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/ops-v3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../output/rust-server-test/.openapi-generator/VERSION | 2 +- .../petstore/spring-mvc-j8-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-j8-localdatetime/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-mvc-no-nullable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/server/petstore/spring-mvc/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-beanvalidation/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate-j8/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-reactive/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-useoptional/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-virtualan/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/virtualan/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/FakeApi.java | 2 +- .../org/openapitools/virtualan/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/UserApi.java | 2 +- samples/server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/UserApi.java | 2 +- 593 files changed, 593 insertions(+), 593 deletions(-) diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index fe3ebb4d5216..77d64fdaceec 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.0.0 + 6.0.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index 1e455032c0cb..8ce06d6f4456 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -6,7 +6,7 @@ openapi-generator-project org.openapitools - 5.0.0 + 6.0.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index cb2aeda07a34..aa47d751bc55 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,5 +1,5 @@ # RELEASE_VERSION -openApiGeneratorVersion=5.0.0 +openApiGeneratorVersion=6.0.0-SNAPSHOT # /RELEASE_VERSION # BEGIN placeholders diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 3258af64ff47..4369c20c5e62 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.0.0 + 6.0.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 63d92e385ad5..d7c733c85c68 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.0.0 + 6.0.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index 5ec66f131fb2..f7e9ed0f5b9d 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -19,7 +19,7 @@ org.openapitools openapi-generator-maven-plugin - 5.0.0 + 6.0.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 670d250dd39d..9c99f1d674e9 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.0.0 + 6.0.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 373de4c8c097..6af688a00322 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.0.0 + 6.0.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 0c442861ce3a..f57ca1bb6e4b 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.openapitools openapi-generator-project - 5.0.0 + 6.0.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index 62581d3d8fdd..247d72f21e4c 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.0.0 + 6.0.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 36ce4b53cd26..66ef9fc0ec97 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.0.0 + 6.0.0-SNAPSHOT ../.. diff --git a/pom.xml b/pom.xml index 9a6b684cc25a..4f6414b90458 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ pom openapi-generator-project - 5.0.0 + 6.0.0-SNAPSHOT https://github.com/openapitools/openapi-generator diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp index a42bd11e5f05..9ec1a3c1291e 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h index 813d5796595c..a6f0ad08b3ab 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp index 9f283f5bb46c..2be29a96b9a6 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h index 959ce3b8998a..791d5fbc12ea 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp index 4db8b7ccc1e6..9df267c0181f 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h index 7210e09620b4..665ee4f62a99 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp index e071f759b7f7..e21d136df251 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h index 804178ca0f6e..28cb37a8fe55 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h index 64ca13f1f734..7ce2577f5bec 100644 --- a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp index fe10329775d7..5d03753cfff5 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h index f5b70b8ae3cf..7700434e8c33 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp index 8251b045aec7..2e542efd6a74 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h index 5277bec3dde2..33f1f0977ac9 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp index 3c94c6b6848d..7af87c42e377 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h index d40b8c49bebc..0e25caef84b9 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp index 50e438308c0a..620e9e30e806 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h index fcc0826c3807..8dc027cb4df1 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.h +++ b/samples/client/petstore/cpp-restsdk/client/Object.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp index c8bea4ce1ec0..7c7b63f18042 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h index a44a88851fc8..52d616884824 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp index 5e8915cac498..7d347ca96d9b 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h index 5e1f3d6d0def..89ccea78d061 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp index 991c6aad75bb..1ad3d50f0d50 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h index 105eaea1d65b..943d13757ea2 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp index 8634d8743288..240b8ca16823 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h index 9c15d5761144..aa992da17713 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp index 4bffbdc5287b..2cbfe4ed64da 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h index 3f072d64cd35..7a0e66e8538b 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp index fa6e91372fae..0533c250bd7a 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h index a48148bc42c4..f6fa17a75d59 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp index dd5fc140b35b..8a52519bd6a8 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h index ec0648d08072..581042fa91db 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp index c22a02670474..f7cec46aa438 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h index ff0e5467238a..3dac8f1f790c 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp index b37b01a0389a..d0981f41ccd5 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h index 7ee2061cc63a..757a48ae8a7c 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.h +++ b/samples/client/petstore/cpp-restsdk/client/model/User.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0. + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native-async/.openapi-generator/VERSION b/samples/client/petstore/java/native-async/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/native-async/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native/.openapi-generator/VERSION b/samples/client/petstore/java/native/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient/.openapi-generator/VERSION b/samples/client/petstore/java/webclient/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/nim/.openapi-generator/VERSION b/samples/client/petstore/nim/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/nim/.openapi-generator/VERSION +++ b/samples/client/petstore/nim/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 23b2da67c346..827e56d07489 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index cd2309da18fd..185458f4ef8c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index bd6650a6f1a3..27cb8b90a2f0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 0f7892e6cc51..3b6cd23129bc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 803fff388ab0..5b7594568aa8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index e4c1f169ddb1..761ef2bcda39 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index dc150a8bc2e5..f17f78651539 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index a5bfaec096aa..059be811a123 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index c2a1de88e31e..b3cb665f389a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 1385718b506e..17b0bac8f070 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 495aa85b0314..9b3988712000 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 88c046728a9a..1397284bc4d2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 aeba7ef47909..dedaca7ff2cb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 339d7df761b1..c1b776542894 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 a6b2e5ccd43c..8e12fb5bbc0a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 e339d82c17ab..c945088db2ca 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 b6b692b43f6c..48a2290218d6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 5dc9cb03381e..6db88ac34ce2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 2b6863892788..9e27ac756c49 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 c12f5f49bb7d..acd8e93dfd36 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 f74cedd8f074..bbc97200e0d1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 6842d8c0cd8e..f87d4b484cb1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 f08750c2f5cd..28c8b1b54fb5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 e9c9be9599a7..486ca9bc5565 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 15e761584af5..2988ab28efa5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 929f16435f30..d6ef09bef770 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 ccfc0c7fc3be..ed716c59a1dc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 762abcc1533f..8225bcee0707 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 20cde9555bd5..d672e75894c2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 06ba0c54d6d1..3296c9f7da8a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 99679c411510..363ca62605cf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 fc3fecdea19d..fd2a58fb6971 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 06631d2841f5..d8ea8dc9d5f3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index 04a87a98225c..c373c62491cd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 ba1d9e2757f2..dd2d852217af 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 454404d5e2fe..72da7cbf4991 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 23b80c313ac9..463c72a60711 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index f27ea9de78be..bb072ab8a0e4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 251090be9036..35752e54d0ef 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 7e0275c8bdab..b134a942e58a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 361991d49b13..20c1eb86a85c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 46a5eb0d30f4..197dfca0d7d0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 bd7e3dccc996..c0712035b12d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 a69c1af2f3c7..51e28bf107ac 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 edb22a89ad7e..290f7142116f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index c6aedbf67dfc..a60e4be9e836 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php index 39bc8885377b..650b9ccd34f5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php index 2e5c81e9d7ba..17bf8b8a7ac9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php index 946932a17567..99066c00ec63 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 6e839da6beb8..372cac4e0499 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 f714596228e6..3f81f6d45352 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 bf624d62946a..b823b53bb516 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 5483a03b0bd2..a14ada1cacef 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 6299a869d6e8..0412c37653f2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 41080eb7b462..5be30c8e533d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0 + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/client/petstore/python-legacy/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index 4955ed5ca047..a8429acce5ad 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb index 2995f4f218fc..1b9b12972729 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb index 088bd19e111d..2d2b7da307e8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index ca5a5866fd0f..be1060ef9386 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb index 0edcf47e87ce..a0f686867d99 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb index ddbdb38aa054..26394638556a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end 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 331b919569f4..f462790c3f32 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb index e49f1e326754..b6827f6fc5cd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end 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 938ce4505939..4c115e759eac 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =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 fde7fb53f1c2..85b3bd9da064 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index f6df84b514a8..55c92a3e7902 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index 35d9f5764952..ef7cdf93d9dd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index c165b3b06b0d..7e22de93da57 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb index 366bc2e5e8f9..031565289a0e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb index 0483f7d434dc..659e25306ceb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb index 81661afdaea7..c495716c1184 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index 936f3a8145d8..d55b87a140e5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb index fb455f540907..a89f96935010 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb index 3536a792cdbb..57cfa8343d09 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb index 675e0005465b..10be8ec0a086 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb index bfd5d76a1cf2..ea966f177bce 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb index 861bfb314163..b73022da326a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb index dcc5060d63ed..e874ebe700f4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb index d4494817e981..7d692a46b61a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb index ab57a726afa3..7e9649319fbd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb index 0bb97638ef1a..23580e86e680 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb index 2f14b703e2e0..9913a456cdcd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb index 14fb1ddbdbd9..a972cfdb8858 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb index 8b26fb0bc828..adbf1b367563 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb index bc74dc3c5059..b99cf2a5305c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb index 9862c79aa4cc..9361c7a52d33 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index b293f262d96e..78da1ead1f86 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb index 6b65604d88c7..121251962cb6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb index e3bb6474fad4..1d3d86c54969 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb index 8d901102e1b1..605524a3dcda 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb index fb34df8e52ce..86bd8d8cc3f2 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb index 69964e3a08f1..1c7c233056aa 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 7012d55a4a4d..ba61734af036 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb index cbfa5151ab7b..813d434348ee 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb index c423763c41b5..9b6cb8a81743 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb index c1a7ab152652..260193852528 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb index e598f6cff7c5..b33d22daadbe 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb index 2bfa7a31c6de..28148b318869 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb index e76bb09ab640..374e7e85aff6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb index b62556577f65..e0776697e635 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb index 953e3f1d7460..91902de42c81 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb index 9424a21f42e7..78ea44493688 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb index e147570446a9..ed9af6f2c468 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb index 4bf4fc28ff84..f6a263dfe9db 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index 166ff83239de..18408dea0c9d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb index 8143a9fe3213..6c18c4ea29c6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb index 098dc4afaa32..a2e8925d2cea 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb index b804ab530e9e..a9958f7d2136 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb index 6f4be870da1d..f59454450b24 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb index 301036417fd2..59c7e87806f6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index 0be14e3aeb61..814f96b310d3 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb index 8d227b6a841f..bfc71e435977 100644 --- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb index 1a1425b7dbdb..785eebfe6d69 100644 --- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb index 3e01c3245d5e..d4a79a9a5be7 100644 --- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index 4955ed5ca047..a8429acce5ad 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 2995f4f218fc..1b9b12972729 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb index 088bd19e111d..2d2b7da307e8 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index ca5a5866fd0f..be1060ef9386 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 0edcf47e87ce..a0f686867d99 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 1d2d271de2b8..ce4639d99fc4 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 60846d11d278..2fdcbb1e8938 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 32f64b6f77c1..ab73c19e3ff8 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index b91c5af736a4..02f080cdf98d 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index fde7fb53f1c2..85b3bd9da064 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 7404507e998f..7868843bc609 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index 35d9f5764952..ef7cdf93d9dd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index c165b3b06b0d..7e22de93da57 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 366bc2e5e8f9..031565289a0e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 0483f7d434dc..659e25306ceb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 81661afdaea7..c495716c1184 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index 936f3a8145d8..d55b87a140e5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index fb455f540907..a89f96935010 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 3536a792cdbb..57cfa8343d09 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index 675e0005465b..10be8ec0a086 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index bfd5d76a1cf2..ea966f177bce 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index 861bfb314163..b73022da326a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index dcc5060d63ed..e874ebe700f4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index d4494817e981..7d692a46b61a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index ab57a726afa3..7e9649319fbd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index 0bb97638ef1a..23580e86e680 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 2f14b703e2e0..9913a456cdcd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index 14fb1ddbdbd9..a972cfdb8858 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index 8b26fb0bc828..adbf1b367563 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index bc74dc3c5059..b99cf2a5305c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb index 9862c79aa4cc..9361c7a52d33 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index b293f262d96e..78da1ead1f86 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 6b65604d88c7..121251962cb6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb index e3bb6474fad4..1d3d86c54969 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb index 8d901102e1b1..605524a3dcda 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index fb34df8e52ce..86bd8d8cc3f2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 69964e3a08f1..1c7c233056aa 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 7012d55a4a4d..ba61734af036 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index cbfa5151ab7b..813d434348ee 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index c423763c41b5..9b6cb8a81743 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index c1a7ab152652..260193852528 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb index e598f6cff7c5..b33d22daadbe 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index 2bfa7a31c6de..28148b318869 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index e76bb09ab640..374e7e85aff6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index b62556577f65..e0776697e635 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index 953e3f1d7460..91902de42c81 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb index 9424a21f42e7..78ea44493688 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb index e147570446a9..ed9af6f2c468 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb index 4bf4fc28ff84..f6a263dfe9db 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 166ff83239de..18408dea0c9d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index 8143a9fe3213..6c18c4ea29c6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index 098dc4afaa32..a2e8925d2cea 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index b804ab530e9e..a9958f7d2136 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 6f4be870da1d..f59454450b24 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 301036417fd2..59c7e87806f6 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 4691f6a17f41..0d15140ae09c 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index 406dad1efee2..17a12f2b635a 100644 --- a/samples/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index 1a1425b7dbdb..785eebfe6d69 100644 --- a/samples/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index 3e01c3245d5e..d4a79a9a5be7 100644 --- a/samples/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/client/petstore/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 3bac2c9db3ca..7e9cbdb17838 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 86de75e7852e..4e7fd8c5af30 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index fbc69f874c3b..a20c88df0371 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 2abdbf72b983..307db14461cd 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 6e0c5eff316a..14289c1c72f9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java index df5916f199d8..67472400a58b 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index e0b0d8a74c15..2d65fad5b161 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 cfc87b568306..3b4915491d33 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index eaccc0906e43..b5e2bcc0597c 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 2abdbf72b983..307db14461cd 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 6e0c5eff316a..14289c1c72f9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index df5916f199d8..67472400a58b 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 83466fd2e9c0..9b62af8cdabf 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 75e047b4bb3f..533ef0ddcb81 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index e70bdda2252a..17e63b3a3225 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION +++ b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index fd90b069f05c..5d82299e91bc 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,7 @@ UTF-8 - 5.0.0 + 6.0.0-SNAPSHOT 1.0.0 4.8.1 diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index d99e7162d01f..5f68295fc196 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/elm/.openapi-generator/VERSION b/samples/openapi3/client/elm/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/elm/.openapi-generator/VERSION +++ b/samples/openapi3/client/elm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 0fa6ded304c2..dfe7d45dedcc 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec +++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb index c0e3d8e6c71b..ac81bc658753 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb index 9b88674708ac..44ad371b1df0 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb index eb388ff5b1ca..35b15271b504 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =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 cce218345bf0..427280386024 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb index d759a51b7471..3076f31ae613 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb index ad15995f5ca5..0498388e6c29 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb index ff8a4e303132..f370745a6a5d 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb index e385e7d30e5d..0cf4da3cbc24 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb index 46bfc11bd147..2c425b59e559 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb index 2edeb80a4dcb..df98be30e1d7 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb index 5749d09f07c8..af0e5cba9a7a 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb index 6f52d448c4af..ed48e9085949 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =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 c865608d1f99..da466010b4ef 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb index 2991df8c1f3c..cfd6b5a920c5 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb index 72dc1cf3843e..c72355b506ce 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb index 3ad947530369..cf7fc57d9bbb 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb index 412cdb399e43..df2dd7ae50a2 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end 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 a67113163bb5..8a19b1bfcda1 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 @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb index 8919bb176ec0..1d6dbf9b5ac9 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb index 8a70975d089f..9e5aa7b6f4a4 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb index f638e39341b5..f4974f981a36 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0 +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100755 --- a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION b/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index b9ceaa7ae74f..91f55b2101f7 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 5.0.0. +Generated by OpenAPI Generator 6.0.0-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 8757bd72a8b5..3249c1995880 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 86c226bc38d3..63a1dfe5d9e1 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index c129310e5e72..237efa3f58c3 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-laravel/.openapi-generator/VERSION b/samples/server/petstore/php-laravel/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/VERSION +++ b/samples/server/petstore/php-laravel/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim4/.openapi-generator/VERSION b/samples/server/petstore/php-slim4/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION +++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/VERSION +++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 69a61093cfae..9437003c0a71 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 95e0d879d70c..a388f816eadd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5acbf467c6a1..6c16447e2667 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 8b62119dba26..2aa15a2ed3f4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index fc9134687252..1dc3e96a2fd9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 91f2847d6036..8460baa431d5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 300f660e2a5f..48c6eda84525 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index ae6d83a88fec..fe0192504ddc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5338ab7c4948..f6bc044bb2ee 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 4b1d8a1e2a28..6f0b26014c0a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 820b8d3a1330..49aac6acf45d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index cc3d4568653d..12a39faa1c60 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 300f660e2a5f..48c6eda84525 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 8e846a3795ac..261234b15e1a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5338ab7c4948..f6bc044bb2ee 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 4b1d8a1e2a28..6f0b26014c0a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 820b8d3a1330..49aac6acf45d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index cc3d4568653d..12a39faa1c60 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 300f660e2a5f..48c6eda84525 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 0f432ec41b6a..7d5c3bd1acd3 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5338ab7c4948..f6bc044bb2ee 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index c05e216a659a..cb45826eabb9 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 820b8d3a1330..49aac6acf45d 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index cc3d4568653d..12a39faa1c60 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 300f660e2a5f..48c6eda84525 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 8e846a3795ac..261234b15e1a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5338ab7c4948..f6bc044bb2ee 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 4b1d8a1e2a28..6f0b26014c0a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 820b8d3a1330..49aac6acf45d 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index cc3d4568653d..12a39faa1c60 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index cd16fbef8022..d59d92357ca6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 92f09271e11f..1a99f552a06e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 0a9911cbe721..babd27db6ba8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 9f62f15a49d5..42bc37ccb59d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ff5444e8e818..4e987ea8d57f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index b1e31c18119d..5c68191b9556 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 300f660e2a5f..48c6eda84525 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 8e846a3795ac..261234b15e1a 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5338ab7c4948..f6bc044bb2ee 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 4b1d8a1e2a28..6f0b26014c0a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 820b8d3a1330..49aac6acf45d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index cc3d4568653d..12a39faa1c60 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index e0c9017c0801..a1a2c94527f8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 bb6bd3eb1ff8..5d3ffd7451a6 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 844cb9e88471..5064e9ff378a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 9d1af3526834..557663656812 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 e3f94dea454a..c3802d261cf0 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 05fcb71845ae..0d8e503ab845 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index e0c9017c0801..a1a2c94527f8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 bb6bd3eb1ff8..5d3ffd7451a6 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 844cb9e88471..5064e9ff378a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 9d1af3526834..557663656812 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 e3f94dea454a..c3802d261cf0 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 05fcb71845ae..0d8e503ab845 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index df677d4cdf3b..a56113ba6424 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ffe2105bad88..2011d24abafc 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7fd2b06ec943..f3eaa5241a7a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index c9a868648b05..11bcb9ff451e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 9500fd8817b5..9bd28f42c856 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 0d43956181b4..c1428adbb9ca 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 498aa862624f..3602f0c5c21c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a34218d1ab97..56b1066e6397 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a9b01a1f9090..82acea307dc4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 5ee29d654b21..1483a1192592 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 04e8a9734c60..d8fcfa612c62 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 45d0b27a0358..7a83876a8344 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index cd16fbef8022..d59d92357ca6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ba53ca2bb47b..6dbce1f00bff 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 0a9911cbe721..babd27db6ba8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 6e5db7ccffd9..8ba9abf380a2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ff5444e8e818..4e987ea8d57f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index b1e31c18119d..5c68191b9556 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index e0c9017c0801..a1a2c94527f8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 fc1e1b080162..e987aa9e512f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 844cb9e88471..5064e9ff378a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 408cdc91aacf..03326cc57f74 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 e3f94dea454a..c3802d261cf0 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 05fcb71845ae..0d8e503ab845 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index cd16fbef8022..d59d92357ca6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ba53ca2bb47b..6dbce1f00bff 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 0a9911cbe721..babd27db6ba8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 6e5db7ccffd9..8ba9abf380a2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ff5444e8e818..4e987ea8d57f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index b1e31c18119d..5c68191b9556 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 300f660e2a5f..48c6eda84525 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 0f432ec41b6a..7d5c3bd1acd3 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5338ab7c4948..f6bc044bb2ee 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index c05e216a659a..cb45826eabb9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 820b8d3a1330..49aac6acf45d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index cc3d4568653d..12a39faa1c60 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 300f660e2a5f..48c6eda84525 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 b900bf427df1..fedd8aa1c41c 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5338ab7c4948..f6bc044bb2ee 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 21903581e4bd..863a7895b5b0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 820b8d3a1330..49aac6acf45d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index cc3d4568653d..12a39faa1c60 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 2bac6f9795e9..d75ebdde17d2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 fb2c7fca9850..d304032eaa62 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 492c069cb2c2..d158c658f034 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 8b036b1620b2..345eb4927aac 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 65d26082a76a..c8dbe841e61f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 91c67b94e830..8f4159fb722f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index 28cbf7c0aae3..5f68295fc196 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 300f660e2a5f..48c6eda84525 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 8e846a3795ac..261234b15e1a 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5338ab7c4948..f6bc044bb2ee 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 4b1d8a1e2a28..6f0b26014c0a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 820b8d3a1330..49aac6acf45d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index cc3d4568653d..12a39faa1c60 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ From 5e1aa98bb098d2ffd7152f9a32c2212c3b5414fb Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 9 Jan 2021 00:50:37 +0800 Subject: [PATCH 002/175] fix merge conflicts --- modules/openapi-generator-gradle-plugin/gradle.properties | 5 ----- .../openapi-generator-maven-plugin/examples/java-client.xml | 4 ---- .../examples/non-java-invalid-spec.xml | 4 ---- modules/openapi-generator-maven-plugin/examples/non-java.xml | 4 ---- 4 files changed, 17 deletions(-) diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 67caca57dd00..aa47d751bc55 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,10 +1,5 @@ # RELEASE_VERSION -<<<<<<< HEAD openApiGeneratorVersion=6.0.0-SNAPSHOT -======= -openApiGeneratorVersion=5.1.0-SNAPSHOT ->>>>>>> origin/master ->>>>>>> origin/5.1.x # /RELEASE_VERSION # BEGIN placeholders diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 68255cb736f3..d7c733c85c68 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -13,11 +13,7 @@ org.openapitools openapi-generator-maven-plugin -<<<<<<< HEAD 6.0.0-SNAPSHOT -======= - 5.1.0-SNAPSHOT ->>>>>>> origin/5.1.x diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 25b7c1144f71..9c99f1d674e9 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -13,11 +13,7 @@ org.openapitools openapi-generator-maven-plugin -<<<<<<< HEAD 6.0.0-SNAPSHOT -======= - 5.1.0-SNAPSHOT ->>>>>>> origin/5.1.x diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 022c455cb084..6af688a00322 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -13,11 +13,7 @@ org.openapitools openapi-generator-maven-plugin -<<<<<<< HEAD 6.0.0-SNAPSHOT -======= - 5.1.0-SNAPSHOT ->>>>>>> origin/5.1.x From a96febaba8cd61925178430a60402756b7cd6599 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 28 Jan 2021 17:41:48 +0800 Subject: [PATCH 003/175] update samples --- .../OpenAPIClient-net5.0/.openapi-generator/VERSION | 2 +- .../petstore/swift5/alamofireLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/combineLibrary/.openapi-generator/VERSION | 2 +- .../client/petstore/swift5/default/.openapi-generator/VERSION | 2 +- .../petstore/swift5/deprecated/.openapi-generator/VERSION | 2 +- .../petstore/swift5/nonPublicApi/.openapi-generator/VERSION | 2 +- .../petstore/swift5/objcCompatible/.openapi-generator/VERSION | 2 +- .../swift5/promisekitLibrary/.openapi-generator/VERSION | 2 +- .../swift5/readonlyProperties/.openapi-generator/VERSION | 2 +- .../petstore/swift5/resultLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION | 2 +- .../swift5/urlsessionLibrary/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../server/petstore/java-undertow/.openapi-generator/VERSION | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-undertow/.openapi-generator/VERSION b/samples/server/petstore/java-undertow/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/server/petstore/java-undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/java-undertow/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 0fdb003e57ae5204b171af695e505b7724701ec5 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 2 Feb 2021 22:16:35 +0800 Subject: [PATCH 004/175] update samples --- .../java/jersey2-java8-localdatetime/.openapi-generator/VERSION | 2 +- .../output/ping-bearer-auth/.openapi-generator/VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 6ff5fe4495a0361f942ac4d0755f421076adfc1e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 12 Feb 2021 20:21:39 +0800 Subject: [PATCH 005/175] update samples --- samples/client/petstore/c/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-uppercase-enum/.openapi-generator/VERSION | 2 +- .../server/petstore/java-vertx-web/.openapi-generator/VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/c/.openapi-generator/VERSION b/samples/client/petstore/c/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/c/.openapi-generator/VERSION +++ b/samples/client/petstore/c/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 2b3b5a71cf60cd44770392a4940adec381cec4da Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 3 Mar 2021 16:29:52 +0800 Subject: [PATCH 006/175] update samples --- .../OpenAPIClient-httpclient/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-5.0/.openapi-generator/VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION index c30f0ec2be7f..5f68295fc196 100644 --- a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From ad137ec84acde1ddd06e2572b67476725b926581 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 13 Mar 2021 23:38:17 +0800 Subject: [PATCH 007/175] update samples --- .../OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php | 2 +- .../lib/petstore/models/outer_object_with_enum_property.rb | 2 +- .../ruby/lib/petstore/models/outer_object_with_enum_property.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 f735350238cf..963054b24342 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.1.0-SNAPSHOT + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 f130abc9be35..a304dc9b46cc 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.1.0-SNAPSHOT +OpenAPI Generator version: 6.0.0-SNAPSHOT =end 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 f130abc9be35..a304dc9b46cc 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.1.0-SNAPSHOT +OpenAPI Generator version: 6.0.0-SNAPSHOT =end From b63d735312d7ace7ff8b169400c36948e24066f5 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 28 Apr 2021 21:14:23 +0800 Subject: [PATCH 008/175] update samples --- samples/client/petstore/bash/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../server/petstore/go-echo-server/.openapi-generator/VERSION | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index 6555596f9311..5f68295fc196 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION index 6555596f9311..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION index 6555596f9311..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION index 6555596f9311..5f68295fc196 100644 --- a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 702e27465912674bf6ca5760d24e05b1be308efd Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 13 May 2021 18:51:38 +0800 Subject: [PATCH 009/175] update samples --- samples/server/petstore/cpp-pistache/.openapi-generator/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 6555596f9311..5f68295fc196 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 05e4c3cf641b353cac40f69cd48d9d9dcbf83197 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 12 Jul 2021 17:15:22 +0800 Subject: [PATCH 010/175] update samples --- samples/client/petstore/R/.openapi-generator/VERSION | 6 +----- samples/client/petstore/apex/.openapi-generator/VERSION | 6 +----- samples/client/petstore/bash/.openapi-generator/VERSION | 6 +----- samples/client/petstore/c/.openapi-generator/VERSION | 6 +----- samples/client/petstore/cpp-qt/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restsdk/client/.openapi-generator/VERSION | 6 +----- samples/client/petstore/cpp-restsdk/client/ApiClient.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/ApiClient.h | 4 ---- .../client/petstore/cpp-restsdk/client/ApiConfiguration.cpp | 4 ---- .../client/petstore/cpp-restsdk/client/ApiConfiguration.h | 4 ---- samples/client/petstore/cpp-restsdk/client/ApiException.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/ApiException.h | 4 ---- samples/client/petstore/cpp-restsdk/client/HttpContent.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/HttpContent.h | 4 ---- samples/client/petstore/cpp-restsdk/client/IHttpBody.h | 4 ---- samples/client/petstore/cpp-restsdk/client/JsonBody.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/JsonBody.h | 4 ---- samples/client/petstore/cpp-restsdk/client/ModelBase.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/ModelBase.h | 4 ---- .../petstore/cpp-restsdk/client/MultipartFormData.cpp | 4 ---- .../client/petstore/cpp-restsdk/client/MultipartFormData.h | 4 ---- samples/client/petstore/cpp-restsdk/client/Object.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/Object.h | 4 ---- samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/api/PetApi.h | 4 ---- samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/api/StoreApi.h | 4 ---- samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/api/UserApi.h | 4 ---- .../petstore/cpp-restsdk/client/model/ApiResponse.cpp | 4 ---- .../client/petstore/cpp-restsdk/client/model/ApiResponse.h | 4 ---- .../client/petstore/cpp-restsdk/client/model/Category.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/model/Category.h | 4 ---- samples/client/petstore/cpp-restsdk/client/model/Order.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/model/Order.h | 4 ---- samples/client/petstore/cpp-restsdk/client/model/Pet.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/model/Pet.h | 4 ---- samples/client/petstore/cpp-restsdk/client/model/Tag.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/model/Tag.h | 4 ---- samples/client/petstore/cpp-restsdk/client/model/User.cpp | 4 ---- samples/client/petstore/cpp-restsdk/client/model/User.h | 4 ---- samples/client/petstore/cpp-tiny/.openapi-generator/VERSION | 2 +- samples/client/petstore/crystal/.openapi-generator/VERSION | 6 +----- samples/client/petstore/crystal/.travis.yml | 4 ---- samples/client/petstore/crystal/spec/spec_helper.cr | 4 ---- samples/client/petstore/crystal/src/petstore.cr | 4 ---- samples/client/petstore/crystal/src/petstore/api/pet_api.cr | 4 ---- .../client/petstore/crystal/src/petstore/api/store_api.cr | 4 ---- .../client/petstore/crystal/src/petstore/api/user_api.cr | 4 ---- samples/client/petstore/crystal/src/petstore/api_client.cr | 4 ---- samples/client/petstore/crystal/src/petstore/api_error.cr | 4 ---- .../client/petstore/crystal/src/petstore/configuration.cr | 4 ---- .../petstore/crystal/src/petstore/models/api_response.cr | 4 ---- .../client/petstore/crystal/src/petstore/models/category.cr | 4 ---- .../client/petstore/crystal/src/petstore/models/order.cr | 4 ---- samples/client/petstore/crystal/src/petstore/models/pet.cr | 4 ---- samples/client/petstore/crystal/src/petstore/models/tag.cr | 4 ---- samples/client/petstore/crystal/src/petstore/models/user.cr | 4 ---- .../.openapi-generator/VERSION | 2 +- .../OpenAPIClient-httpclient/.openapi-generator/VERSION | 6 +----- .../OpenAPIClient-net47/.openapi-generator/VERSION | 6 +----- .../OpenAPIClient-net5.0/.openapi-generator/VERSION | 6 +----- .../csharp-netcore/OpenAPIClient/.openapi-generator/VERSION | 6 +----- .../OpenAPIClientCore/.openapi-generator/VERSION | 6 +----- .../OpenAPIClientCoreAndNet47/.openapi-generator/VERSION | 6 +----- .../csharp/OpenAPIClient/.openapi-generator/VERSION | 6 +----- samples/client/petstore/elixir/.openapi-generator/VERSION | 6 +----- .../petstore/go/go-petstore/.openapi-generator/VERSION | 6 +----- samples/client/petstore/groovy/.openapi-generator/VERSION | 6 +----- .../petstore/haskell-http-client/.openapi-generator/VERSION | 6 +----- .../java/feign-no-nullable/.openapi-generator/VERSION | 6 +----- .../client/petstore/java/feign/.openapi-generator/VERSION | 6 +----- .../java/google-api-client/.openapi-generator/VERSION | 6 +----- .../client/petstore/java/jersey1/.openapi-generator/VERSION | 6 +----- .../jersey2-java8-localdatetime/.openapi-generator/VERSION | 6 +----- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 6 +----- .../microprofile-rest-client/.openapi-generator/VERSION | 6 +----- .../petstore/java/native-async/.openapi-generator/VERSION | 6 +----- .../client/petstore/java/native/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../okhttp-gson-parcelableModel/.openapi-generator/VERSION | 6 +----- .../petstore/java/okhttp-gson/.openapi-generator/VERSION | 6 +----- .../java/rest-assured-jackson/.openapi-generator/VERSION | 6 +----- .../petstore/java/rest-assured/.openapi-generator/VERSION | 6 +----- .../petstore/java/resteasy/.openapi-generator/VERSION | 6 +----- .../java/resttemplate-withXml/.openapi-generator/VERSION | 6 +----- .../petstore/java/resttemplate/.openapi-generator/VERSION | 6 +----- .../java/retrofit2-play26/.openapi-generator/VERSION | 6 +----- .../petstore/java/retrofit2/.openapi-generator/VERSION | 6 +----- .../petstore/java/retrofit2rx2/.openapi-generator/VERSION | 6 +----- .../petstore/java/retrofit2rx3/.openapi-generator/VERSION | 6 +----- .../java/vertx-no-nullable/.openapi-generator/VERSION | 6 +----- .../client/petstore/java/vertx/.openapi-generator/VERSION | 6 +----- .../petstore/java/webclient/.openapi-generator/VERSION | 6 +----- .../petstore/javascript-es6/.openapi-generator/VERSION | 6 +----- .../javascript-promise-es6/.openapi-generator/VERSION | 6 +----- .../client/petstore/kotlin-gson/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-jackson/.openapi-generator/VERSION | 6 +----- .../kotlin-json-request-string/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../kotlin-moshi-codegen/.openapi-generator/VERSION | 6 +----- .../kotlin-multiplatform/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-nonpublic/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-nullable/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-okhttp3/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../kotlin-retrofit2-rx3/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-retrofit2/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-string/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 6 +----- .../kotlin-uppercase-enum/.openapi-generator/VERSION | 6 +----- samples/client/petstore/kotlin/.openapi-generator/VERSION | 6 +----- samples/client/petstore/lua/.openapi-generator/VERSION | 6 +----- samples/client/petstore/nim/.openapi-generator/VERSION | 6 +----- .../petstore/objc/core-data/.openapi-generator/VERSION | 6 +----- .../client/petstore/objc/default/.openapi-generator/VERSION | 6 +----- samples/client/petstore/perl/.openapi-generator/VERSION | 6 +----- .../php/OpenAPIClient-php/.openapi-generator/VERSION | 6 +----- .../php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 4 ---- .../OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/ApiException.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Configuration.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 4 ---- .../lib/Model/AdditionalPropertiesClass.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/ApiResponse.php | 4 ---- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/Capitalization.php | 4 ---- .../client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/Client.php | 4 ---- .../client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/File.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 4 ---- .../client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 4 ---- .../OpenAPIClient-php/lib/Model/InlineResponseDefault.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 4 ---- .../Model/MixedPropertiesAndAdditionalPropertiesClass.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/ModelInterface.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/ModelReturn.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/Name.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/NullableClass.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/Order.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/OuterComposite.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php | 4 ---- .../OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php | 4 ---- .../lib/Model/OuterEnumIntegerDefaultValue.php | 4 ---- .../lib/Model/OuterObjectWithEnumProperty.php | 4 ---- .../client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 4 ---- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 4 ---- .../client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/Model/User.php | 4 ---- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 4 ---- .../client/petstore/powershell/.openapi-generator/VERSION | 6 +----- .../petstore/python-asyncio/.openapi-generator/VERSION | 6 +----- .../petstore/python-legacy/.openapi-generator/VERSION | 6 +----- .../petstore/python-tornado/.openapi-generator/VERSION | 6 +----- samples/client/petstore/python/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../client/petstore/ruby-faraday/.openapi-generator/VERSION | 6 +----- samples/client/petstore/ruby-faraday/lib/petstore.rb | 4 ---- .../ruby-faraday/lib/petstore/api/another_fake_api.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/api/default_api.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/api/fake_api.rb | 4 ---- .../lib/petstore/api/fake_classname_tags123_api.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/api/pet_api.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/api/store_api.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/api/user_api.rb | 4 ---- .../client/petstore/ruby-faraday/lib/petstore/api_client.rb | 4 ---- .../client/petstore/ruby-faraday/lib/petstore/api_error.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/configuration.rb | 4 ---- .../lib/petstore/models/additional_properties_class.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/animal.rb | 4 ---- .../ruby-faraday/lib/petstore/models/api_response.rb | 4 ---- .../lib/petstore/models/array_of_array_of_number_only.rb | 4 ---- .../lib/petstore/models/array_of_number_only.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/array_test.rb | 4 ---- .../ruby-faraday/lib/petstore/models/capitalization.rb | 4 ---- .../client/petstore/ruby-faraday/lib/petstore/models/cat.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/category.rb | 4 ---- .../ruby-faraday/lib/petstore/models/class_model.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/client.rb | 4 ---- .../client/petstore/ruby-faraday/lib/petstore/models/dog.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb | 4 ---- .../ruby-faraday/lib/petstore/models/enum_arrays.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/enum_class.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/enum_test.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/file.rb | 4 ---- .../lib/petstore/models/file_schema_test_class.rb | 4 ---- .../client/petstore/ruby-faraday/lib/petstore/models/foo.rb | 4 ---- .../ruby-faraday/lib/petstore/models/format_test.rb | 4 ---- .../ruby-faraday/lib/petstore/models/has_only_read_only.rb | 4 ---- .../ruby-faraday/lib/petstore/models/health_check_result.rb | 4 ---- .../lib/petstore/models/inline_response_default.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/list.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/map_test.rb | 4 ---- .../mixed_properties_and_additional_properties_class.rb | 4 ---- .../ruby-faraday/lib/petstore/models/model200_response.rb | 4 ---- .../ruby-faraday/lib/petstore/models/model_return.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/name.rb | 4 ---- .../ruby-faraday/lib/petstore/models/nullable_class.rb | 4 ---- .../ruby-faraday/lib/petstore/models/number_only.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/order.rb | 4 ---- .../ruby-faraday/lib/petstore/models/outer_composite.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/outer_enum.rb | 4 ---- .../lib/petstore/models/outer_enum_default_value.rb | 4 ---- .../ruby-faraday/lib/petstore/models/outer_enum_integer.rb | 4 ---- .../lib/petstore/models/outer_enum_integer_default_value.rb | 4 ---- .../lib/petstore/models/outer_object_with_enum_property.rb | 4 ---- .../client/petstore/ruby-faraday/lib/petstore/models/pet.rb | 4 ---- .../ruby-faraday/lib/petstore/models/read_only_first.rb | 4 ---- .../ruby-faraday/lib/petstore/models/special_model_name.rb | 4 ---- .../client/petstore/ruby-faraday/lib/petstore/models/tag.rb | 4 ---- .../petstore/ruby-faraday/lib/petstore/models/user.rb | 4 ---- .../client/petstore/ruby-faraday/lib/petstore/version.rb | 4 ---- samples/client/petstore/ruby-faraday/petstore.gemspec | 4 ---- .../client/petstore/ruby-faraday/spec/api_client_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/configuration_spec.rb | 4 ---- samples/client/petstore/ruby-faraday/spec/spec_helper.rb | 4 ---- samples/client/petstore/ruby/.openapi-generator/VERSION | 6 +----- samples/client/petstore/ruby/lib/petstore.rb | 4 ---- .../petstore/ruby/lib/petstore/api/another_fake_api.rb | 4 ---- .../client/petstore/ruby/lib/petstore/api/default_api.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/api/fake_api.rb | 4 ---- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/api/pet_api.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/api/store_api.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/api/user_api.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/api_client.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/api_error.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/configuration.rb | 4 ---- .../ruby/lib/petstore/models/additional_properties_class.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/animal.rb | 4 ---- .../petstore/ruby/lib/petstore/models/api_response.rb | 4 ---- .../lib/petstore/models/array_of_array_of_number_only.rb | 4 ---- .../ruby/lib/petstore/models/array_of_number_only.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/array_test.rb | 4 ---- .../petstore/ruby/lib/petstore/models/capitalization.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/cat.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/cat_all_of.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/category.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/class_model.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/client.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/dog.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/dog_all_of.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/enum_arrays.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/enum_class.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/enum_test.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/file.rb | 4 ---- .../ruby/lib/petstore/models/file_schema_test_class.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/foo.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/format_test.rb | 4 ---- .../petstore/ruby/lib/petstore/models/has_only_read_only.rb | 4 ---- .../ruby/lib/petstore/models/health_check_result.rb | 4 ---- .../ruby/lib/petstore/models/inline_response_default.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/list.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/map_test.rb | 4 ---- .../mixed_properties_and_additional_properties_class.rb | 4 ---- .../petstore/ruby/lib/petstore/models/model200_response.rb | 4 ---- .../petstore/ruby/lib/petstore/models/model_return.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/name.rb | 4 ---- .../petstore/ruby/lib/petstore/models/nullable_class.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/number_only.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/order.rb | 4 ---- .../petstore/ruby/lib/petstore/models/outer_composite.rb | 4 ---- .../client/petstore/ruby/lib/petstore/models/outer_enum.rb | 4 ---- .../ruby/lib/petstore/models/outer_enum_default_value.rb | 4 ---- .../petstore/ruby/lib/petstore/models/outer_enum_integer.rb | 4 ---- .../lib/petstore/models/outer_enum_integer_default_value.rb | 4 ---- .../lib/petstore/models/outer_object_with_enum_property.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/pet.rb | 4 ---- .../petstore/ruby/lib/petstore/models/read_only_first.rb | 4 ---- .../petstore/ruby/lib/petstore/models/special_model_name.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/tag.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/models/user.rb | 4 ---- samples/client/petstore/ruby/lib/petstore/version.rb | 4 ---- samples/client/petstore/ruby/petstore.gemspec | 4 ---- samples/client/petstore/ruby/spec/api_client_spec.rb | 4 ---- samples/client/petstore/ruby/spec/configuration_spec.rb | 4 ---- samples/client/petstore/ruby/spec/spec_helper.rb | 4 ---- .../petstore/rust/hyper/petstore/.openapi-generator/VERSION | 6 +----- .../rust/reqwest/petstore-async/.openapi-generator/VERSION | 6 +----- .../rust/reqwest/petstore/.openapi-generator/VERSION | 6 +----- .../client/petstore/scala-akka/.openapi-generator/VERSION | 6 +----- .../scala-httpclient-deprecated/.openapi-generator/VERSION | 2 +- .../client/petstore/scala-sttp/.openapi-generator/VERSION | 6 +----- .../petstore/spring-cloud-async/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../spring-cloud-no-nullable/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../spring-cloud-spring-pageable/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../client/petstore/spring-cloud/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../client/petstore/spring-stubs/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../swift5/alamofireLibrary/.openapi-generator/VERSION | 6 +----- .../swift5/combineLibrary/.openapi-generator/VERSION | 6 +----- .../petstore/swift5/default/.openapi-generator/VERSION | 6 +----- .../petstore/swift5/deprecated/.openapi-generator/VERSION | 6 +----- .../petstore/swift5/nonPublicApi/.openapi-generator/VERSION | 6 +----- .../swift5/objcCompatible/.openapi-generator/VERSION | 6 +----- .../client/petstore/swift5/oneOf/.openapi-generator/VERSION | 2 +- .../swift5/promisekitLibrary/.openapi-generator/VERSION | 6 +----- .../swift5/readonlyProperties/.openapi-generator/VERSION | 6 +----- .../swift5/resultLibrary/.openapi-generator/VERSION | 6 +----- .../swift5/rxswiftLibrary/.openapi-generator/VERSION | 6 +----- .../swift5/urlsessionLibrary/.openapi-generator/VERSION | 6 +----- .../petstore/swift5/vaporLibrary/.openapi-generator/VERSION | 2 +- .../swift5/x-swift-hashable/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/with-npm/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/with-npm/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/with-npm/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/with-npm/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/with-npm/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/with-npm/.openapi-generator/VERSION | 6 +----- .../single-request-parameter/.openapi-generator/VERSION | 6 +----- .../builds/with-npm/.openapi-generator/VERSION | 6 +----- .../with-prefixed-module-name/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/with-npm/.openapi-generator/VERSION | 6 +----- .../typescript-aurelia/default/.openapi-generator/VERSION | 6 +----- .../builds/composed-schemas/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/es6-target/.openapi-generator/VERSION | 6 +----- .../builds/with-complex-headers/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../builds/with-interfaces/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../builds/with-npm-version/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../builds/default-v3.0/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../typescript-fetch/builds/enum/.openapi-generator/VERSION | 6 +----- .../builds/es6-target/.openapi-generator/VERSION | 6 +----- .../builds/multiple-parameters/.openapi-generator/VERSION | 6 +----- .../prefix-parameter-interfaces/.openapi-generator/VERSION | 6 +----- .../builds/sagas-and-records/.openapi-generator/VERSION | 2 +- .../builds/typescript-three-plus/.openapi-generator/VERSION | 6 +----- .../builds/with-interfaces/.openapi-generator/VERSION | 6 +----- .../builds/with-npm-version/.openapi-generator/VERSION | 6 +----- .../without-runtime-checks/.openapi-generator/VERSION | 6 +----- .../typescript-inversify/.openapi-generator/VERSION | 6 +----- .../typescript-jquery/default/.openapi-generator/VERSION | 6 +----- .../typescript-jquery/npm/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../typescript-node/default/.openapi-generator/VERSION | 6 +----- .../petstore/typescript-node/npm/.openapi-generator/VERSION | 6 +----- .../builds/with-npm-version/.openapi-generator/VERSION | 6 +----- .../builds/default/.openapi-generator/VERSION | 6 +----- .../builds/es6-target/.openapi-generator/VERSION | 6 +----- .../builds/with-npm-version/.openapi-generator/VERSION | 6 +----- .../with-progress-subscriber/.openapi-generator/VERSION | 6 +----- .../petstore/protobuf-schema/.openapi-generator/VERSION | 6 +----- samples/meta-codegen/lib/pom.xml | 4 ---- samples/meta-codegen/usage/.openapi-generator/VERSION | 6 +----- samples/openapi3/client/elm/.openapi-generator/VERSION | 6 +----- .../go-experimental/.openapi-generator/VERSION | 6 +----- .../java/jersey2-java8/.openapi-generator/VERSION | 6 +----- .../x-auth-id-alias/python/.openapi-generator/VERSION | 6 +----- .../x-auth-id-alias/ruby-client/.openapi-generator/VERSION | 6 +----- .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb | 4 ---- .../ruby-client/lib/x_auth_id_alias/api/usage_api.rb | 4 ---- .../ruby-client/lib/x_auth_id_alias/api_client.rb | 4 ---- .../ruby-client/lib/x_auth_id_alias/api_error.rb | 4 ---- .../ruby-client/lib/x_auth_id_alias/configuration.rb | 4 ---- .../ruby-client/lib/x_auth_id_alias/version.rb | 4 ---- .../x-auth-id-alias/ruby-client/spec/api_client_spec.rb | 4 ---- .../x-auth-id-alias/ruby-client/spec/configuration_spec.rb | 4 ---- .../x-auth-id-alias/ruby-client/spec/spec_helper.rb | 4 ---- .../x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec | 4 ---- .../dynamic-servers/python/.openapi-generator/VERSION | 6 +----- .../dynamic-servers/ruby/.openapi-generator/VERSION | 6 +----- .../features/dynamic-servers/ruby/dynamic_servers.gemspec | 4 ---- .../features/dynamic-servers/ruby/lib/dynamic_servers.rb | 4 ---- .../ruby/lib/dynamic_servers/api/usage_api.rb | 4 ---- .../dynamic-servers/ruby/lib/dynamic_servers/api_client.rb | 4 ---- .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb | 4 ---- .../ruby/lib/dynamic_servers/configuration.rb | 4 ---- .../dynamic-servers/ruby/lib/dynamic_servers/version.rb | 4 ---- .../features/dynamic-servers/ruby/spec/api_client_spec.rb | 4 ---- .../dynamic-servers/ruby/spec/configuration_spec.rb | 4 ---- .../features/dynamic-servers/ruby/spec/spec_helper.rb | 4 ---- .../ruby-client/.openapi-generator/VERSION | 6 +----- .../generate-alias-as-model/ruby-client/lib/petstore.rb | 4 ---- .../ruby-client/lib/petstore/api/usage_api.rb | 4 ---- .../ruby-client/lib/petstore/api_client.rb | 4 ---- .../ruby-client/lib/petstore/api_error.rb | 4 ---- .../ruby-client/lib/petstore/configuration.rb | 4 ---- .../ruby-client/lib/petstore/models/array_alias.rb | 4 ---- .../ruby-client/lib/petstore/models/map_alias.rb | 4 ---- .../ruby-client/lib/petstore/version.rb | 4 ---- .../generate-alias-as-model/ruby-client/petstore.gemspec | 4 ---- .../ruby-client/spec/api_client_spec.rb | 4 ---- .../ruby-client/spec/configuration_spec.rb | 4 ---- .../generate-alias-as-model/ruby-client/spec/spec_helper.rb | 4 ---- .../petstore_client_lib_fake/.openapi-generator/VERSION | 6 +----- .../dart-dio/petstore_client_lib/.openapi-generator/VERSION | 6 +----- .../petstore_client_lib_fake/.openapi-generator/VERSION | 6 +----- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 6 +----- .../petstore_client_lib_fake/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../petstore/go/go-petstore/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 6 +----- .../client/petstore/java/native/.openapi-generator/VERSION | 6 +----- .../petstore/python-legacy/.openapi-generator/VERSION | 6 +----- .../client/petstore/python/.openapi-generator/VERSION | 6 +----- .../typescript/builds/default/.openapi-generator/VERSION | 6 +----- .../typescript/builds/deno/.openapi-generator/VERSION | 6 +----- .../typescript/builds/inversify/.openapi-generator/VERSION | 6 +----- .../typescript/builds/jquery/.openapi-generator/VERSION | 6 +----- .../builds/object_params/.openapi-generator/VERSION | 6 +----- samples/schema/petstore/ktorm/.openapi-generator/VERSION | 6 +----- samples/schema/petstore/mysql/.openapi-generator/VERSION | 6 +----- .../schema/petstore/wsdl-schema/.openapi-generator/VERSION | 2 +- .../petstore/aspnetcore-3.0/.openapi-generator/VERSION | 6 +----- .../petstore/aspnetcore-3.1/.openapi-generator/VERSION | 6 +----- .../petstore/aspnetcore-5.0/.openapi-generator/VERSION | 6 +----- .../server/petstore/aspnetcore/.openapi-generator/VERSION | 6 +----- .../server/petstore/cpp-pistache/.openapi-generator/VERSION | 6 +----- .../cpp-qt-qhttpengine-server/.openapi-generator/VERSION | 2 +- .../petstore/erlang-server/.openapi-generator/VERSION | 2 +- .../petstore/go-api-server/.openapi-generator/VERSION | 6 +----- .../petstore/go-chi-server/.openapi-generator/VERSION | 2 +- .../petstore/go-echo-server/.openapi-generator/VERSION | 6 +----- .../petstore/go-gin-api-server/.openapi-generator/VERSION | 6 +----- .../petstore/haskell-servant/.openapi-generator/VERSION | 2 +- .../server/petstore/java-msf4j/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../java-play-framework-async/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../petstore/java-play-framework/.openapi-generator/VERSION | 6 +----- .../petstore/java-undertow/.openapi-generator/VERSION | 6 +----- .../petstore/java-vertx-web/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION | 6 +----- .../petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION | 6 +----- .../jaxrs-cxf-non-spring-app/.openapi-generator/VERSION | 6 +----- .../server/petstore/jaxrs-cxf/.openapi-generator/VERSION | 6 +----- .../petstore/jaxrs-datelib-j8/.openapi-generator/VERSION | 6 +----- .../server/petstore/jaxrs-jersey/.openapi-generator/VERSION | 6 +----- .../jaxrs-resteasy/default-value/.openapi-generator/VERSION | 6 +----- .../jaxrs-resteasy/default/.openapi-generator/VERSION | 6 +----- .../jaxrs-resteasy/eap-java8/.openapi-generator/VERSION | 6 +----- .../jaxrs-resteasy/eap-joda/.openapi-generator/VERSION | 6 +----- .../petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION | 6 +----- .../petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION | 6 +----- .../jaxrs-spec-interface/.openapi-generator/VERSION | 6 +----- .../server/petstore/jaxrs-spec/.openapi-generator/VERSION | 6 +----- .../jaxrs/jersey1-useTags/.openapi-generator/VERSION | 6 +----- .../petstore/jaxrs/jersey1/.openapi-generator/VERSION | 6 +----- .../jaxrs/jersey2-useTags/.openapi-generator/VERSION | 6 +----- .../petstore/jaxrs/jersey2/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-server/ktor/.openapi-generator/VERSION | 6 +----- samples/server/petstore/kotlin-server/ktor/README.md | 4 ---- .../kotlin-springboot-delegate/.openapi-generator/VERSION | 6 +----- .../src/main/kotlin/org/openapitools/api/PetApi.kt | 4 ---- .../src/main/kotlin/org/openapitools/api/StoreApi.kt | 4 ---- .../src/main/kotlin/org/openapitools/api/UserApi.kt | 4 ---- .../kotlin-springboot-reactive/.openapi-generator/VERSION | 6 +----- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 6 +----- .../server/petstore/php-laravel/.openapi-generator/VERSION | 6 +----- .../server/petstore/php-lumen/.openapi-generator/VERSION | 6 +----- .../php-mezzio-ph-modern/.openapi-generator/VERSION | 2 +- .../petstore/php-mezzio-ph/.openapi-generator/VERSION | 6 +----- .../server/petstore/php-slim4/.openapi-generator/VERSION | 6 +----- .../SymfonyBundle-php/.openapi-generator/VERSION | 6 +----- .../python-aiohttp-srclayout/.openapi-generator/VERSION | 6 +----- .../petstore/python-aiohttp/.openapi-generator/VERSION | 6 +----- .../petstore/python-blueplanet/.openapi-generator/VERSION | 6 +----- .../petstore/python-fastapi/.openapi-generator/VERSION | 2 +- .../server/petstore/python-flask/.openapi-generator/VERSION | 6 +----- .../output/multipart-v3/.openapi-generator/VERSION | 6 +----- .../output/no-example-v3/.openapi-generator/VERSION | 6 +----- .../output/openapi-v3/.openapi-generator/VERSION | 6 +----- .../rust-server/output/ops-v3/.openapi-generator/VERSION | 6 +----- .../.openapi-generator/VERSION | 6 +----- .../output/ping-bearer-auth/.openapi-generator/VERSION | 6 +----- .../output/rust-server-test/.openapi-generator/VERSION | 6 +----- .../spring-mvc-default-value/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/TestHeadersApi.java | 4 ---- .../main/java/org/openapitools/api/TestQueryParamsApi.java | 4 ---- .../petstore/spring-mvc-j8-async/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../spring-mvc-j8-localdatetime/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../spring-mvc-no-nullable/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../spring-mvc-spring-pageable/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../server/petstore/spring-mvc/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../springboot-beanvalidation/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../springboot-delegate-j8/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../petstore/springboot-delegate/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../springboot-implicitHeaders/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../petstore/springboot-reactive/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../springboot-spring-pageable/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../springboot-useoptional/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- .../springboot-virtualan/.openapi-generator/VERSION | 6 +----- .../java/org/openapitools/virtualan/api/AnotherFakeApi.java | 4 ---- .../main/java/org/openapitools/virtualan/api/FakeApi.java | 4 ---- .../openapitools/virtualan/api/FakeClassnameTestApi.java | 4 ---- .../main/java/org/openapitools/virtualan/api/PetApi.java | 4 ---- .../main/java/org/openapitools/virtualan/api/StoreApi.java | 4 ---- .../main/java/org/openapitools/virtualan/api/UserApi.java | 4 ---- .../server/petstore/springboot/.openapi-generator/VERSION | 6 +----- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 4 ---- .../src/main/java/org/openapitools/api/FakeApi.java | 4 ---- .../java/org/openapitools/api/FakeClassnameTestApi.java | 4 ---- .../src/main/java/org/openapitools/api/PetApi.java | 4 ---- .../src/main/java/org/openapitools/api/StoreApi.java | 4 ---- .../src/main/java/org/openapitools/api/UserApi.java | 4 ---- 656 files changed, 268 insertions(+), 2828 deletions(-) diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/c/.openapi-generator/VERSION b/samples/client/petstore/c/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/c/.openapi-generator/VERSION +++ b/samples/client/petstore/c/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/cpp-qt/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp index b4b88d752fed..9ec1a3c1291e 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h index 35591953b2a6..a6f0ad08b3ab 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp index 520c42757ab8..2be29a96b9a6 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h index acaa0d25ab54..791d5fbc12ea 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp index 876f07591721..9df267c0181f 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h index 7972c97aa1ef..665ee4f62a99 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp index c5be624f16e5..e21d136df251 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h index 1e5ed53d2cbd..28cb37a8fe55 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h index 7fe675d8ff2b..7ce2577f5bec 100644 --- a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp index ee3bf94e2e23..5d03753cfff5 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h index 5384d885c99d..7700434e8c33 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp index ec8be5072afb..9f19e054e5af 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h index bec272866c9d..33f1f0977ac9 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp index 5d6d39ffa9af..7af87c42e377 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h index 0b2773b91d81..0e25caef84b9 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp index 649af998f242..620e9e30e806 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h index 3b318b8b69b5..8dc027cb4df1 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.h +++ b/samples/client/petstore/cpp-restsdk/client/Object.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp index ce2ea7e76292..7c7b63f18042 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h index a6b5d6cbe2f4..52d616884824 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp index 9a83aaca40db..7d347ca96d9b 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h index e11d78a4967c..89ccea78d061 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp index a82924ffef0e..1ad3d50f0d50 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h index 40e4cd6debac..943d13757ea2 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp index 4538885e5e2f..240b8ca16823 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h index 9073577a1446..aa992da17713 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp index 1fadd278e6e9..2cbfe4ed64da 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h index e5640bd46641..7a0e66e8538b 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp index 5312c11f010e..0533c250bd7a 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h index f14b2bbf49f7..f6fa17a75d59 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp index 57af78e51cd8..8a52519bd6a8 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h index 4ce48bb628a5..581042fa91db 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp index 6ea4ce4f37af..f7cec46aa438 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h index 0cd036a86f37..3dac8f1f790c 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp index e686817a29f2..d0981f41ccd5 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h index b2e8acb922d6..757a48ae8a7c 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.h +++ b/samples/client/petstore/cpp-restsdk/client/model/User.h @@ -4,11 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. -======= - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION b/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/crystal/.openapi-generator/VERSION b/samples/client/petstore/crystal/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/crystal/.openapi-generator/VERSION +++ b/samples/client/petstore/crystal/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/crystal/.travis.yml b/samples/client/petstore/crystal/.travis.yml index c94f5891df2d..572732b4a5bf 100644 --- a/samples/client/petstore/crystal/.travis.yml +++ b/samples/client/petstore/crystal/.travis.yml @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # language: crystal diff --git a/samples/client/petstore/crystal/spec/spec_helper.cr b/samples/client/petstore/crystal/spec/spec_helper.cr index 6728fcac6f29..dddb173a2211 100644 --- a/samples/client/petstore/crystal/spec/spec_helper.cr +++ b/samples/client/petstore/crystal/spec/spec_helper.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # # load modules diff --git a/samples/client/petstore/crystal/src/petstore.cr b/samples/client/petstore/crystal/src/petstore.cr index 765503bdf7a6..437668994c47 100644 --- a/samples/client/petstore/crystal/src/petstore.cr +++ b/samples/client/petstore/crystal/src/petstore.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # # Dependencies diff --git a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr index 1c8ad8d1565c..320d12fd421e 100644 --- a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "uri" 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 310b1035d80b..101bfd48d630 100644 --- a/samples/client/petstore/crystal/src/petstore/api/store_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/store_api.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api/user_api.cr b/samples/client/petstore/crystal/src/petstore/api/user_api.cr index 8eb232d68a59..f015319ddf53 100644 --- a/samples/client/petstore/crystal/src/petstore/api/user_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/user_api.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api_client.cr b/samples/client/petstore/crystal/src/petstore/api_client.cr index 50e5933b80bc..3d512d32aea3 100644 --- a/samples/client/petstore/crystal/src/petstore/api_client.cr +++ b/samples/client/petstore/crystal/src/petstore/api_client.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/api_error.cr b/samples/client/petstore/crystal/src/petstore/api_error.cr index f58acc52a2a4..03555af9b6a5 100644 --- a/samples/client/petstore/crystal/src/petstore/api_error.cr +++ b/samples/client/petstore/crystal/src/petstore/api_error.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # module Petstore diff --git a/samples/client/petstore/crystal/src/petstore/configuration.cr b/samples/client/petstore/crystal/src/petstore/configuration.cr index 5226ca95cbd3..4a1b84a4902b 100644 --- a/samples/client/petstore/crystal/src/petstore/configuration.cr +++ b/samples/client/petstore/crystal/src/petstore/configuration.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "log" diff --git a/samples/client/petstore/crystal/src/petstore/models/api_response.cr b/samples/client/petstore/crystal/src/petstore/models/api_response.cr index 1bd454ff570e..3359594145f7 100644 --- a/samples/client/petstore/crystal/src/petstore/models/api_response.cr +++ b/samples/client/petstore/crystal/src/petstore/models/api_response.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/category.cr b/samples/client/petstore/crystal/src/petstore/models/category.cr index 4a5b2b176add..0fb84faf74bf 100644 --- a/samples/client/petstore/crystal/src/petstore/models/category.cr +++ b/samples/client/petstore/crystal/src/petstore/models/category.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/order.cr b/samples/client/petstore/crystal/src/petstore/models/order.cr index 8e782ea72fd5..656c61b86b7b 100644 --- a/samples/client/petstore/crystal/src/petstore/models/order.cr +++ b/samples/client/petstore/crystal/src/petstore/models/order.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/pet.cr b/samples/client/petstore/crystal/src/petstore/models/pet.cr index 3e3f8fde44d2..c6471d5672a2 100644 --- a/samples/client/petstore/crystal/src/petstore/models/pet.cr +++ b/samples/client/petstore/crystal/src/petstore/models/pet.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/tag.cr b/samples/client/petstore/crystal/src/petstore/models/tag.cr index f2b81f2f6d25..ab09edc3291f 100644 --- a/samples/client/petstore/crystal/src/petstore/models/tag.cr +++ b/samples/client/petstore/crystal/src/petstore/models/tag.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/user.cr b/samples/client/petstore/crystal/src/petstore/models/user.cr index acfc1431f590..8c0fbfde5dca 100644 --- a/samples/client/petstore/crystal/src/petstore/models/user.cr +++ b/samples/client/petstore/crystal/src/petstore/models/user.cr @@ -5,11 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -<<<<<<< HEAD #OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -#OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x # require "json" diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native-async/.openapi-generator/VERSION b/samples/client/petstore/java/native-async/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/native-async/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native-async/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native/.openapi-generator/VERSION b/samples/client/petstore/java/native/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient/.openapi-generator/VERSION b/samples/client/petstore/java/webclient/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/nim/.openapi-generator/VERSION b/samples/client/petstore/nim/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/nim/.openapi-generator/VERSION +++ b/samples/client/petstore/nim/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index fc90624b4dfe..e274c49defda 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index 50c39e12a577..c34fe66e69ee 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 61f7633e2021..320300ad0386 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 4ca760e83334..3a839b441951 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index e04bb2687948..20a126194bc7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index f0a660d67058..b69d2fcad456 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 6fbfe0531cb0..621d0ae7e48a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index 8a36b3919171..dbf0b74a5de2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 858ade0a135f..4b7cde6f6517 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 2753d49f2ca7..b581653f899b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -16,11 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 a81b16b161fa..c683523db47d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 face35903735..72f96cc82ef2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 089f017d0a10..578f3dcf4fd9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 7f8483a01438..b34e160fe4ad 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 fd62de9d9442..b6c852835fa3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 5f43ff209463..926094ca886a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 497a311f92ed..f7529adcd395 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 bc612bfeec9a..1942a63cc90d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 3659234edfdf..6d34416801bb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 dbb76598cf69..80fd93f22980 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 64383103d1dd..7248264909b4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 acc198833325..5cab06ef8807 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 ab8b1aa9fa7d..ca6a91fb50e9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 6b70a19af97f..2c833dfd94a2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 3a24aadf25d9..cce2b822f17b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 4b886dd3a37e..e73d0a55fe0e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 5fb886860065..a9eaba5ffc39 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 a42239cecf34..e24d5cd20d38 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 904a48737cb8..a93f493e584c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 49f6dcc28de1..ca94f9283809 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 699c545750c2..11945dd803f9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 a274cde05d81..104d77da1503 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 d2177e059b4a..b5d373d06e93 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index e62630cb581d..31094c88e47f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 32291a7b9565..43b66104acdb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 34aeb340cc60..eb612fdcbcb5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 17f6f79c100b..0a31e0354bdd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index 18961c5d195f..272493d1ab66 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 bd2798889065..2ab8188521d2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 d5a94f4a277d..f1b432b5afa1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 949eb0b77354..97b77d52ce27 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 566e042e7eb9..7664b5b7db83 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 91875f73c43c..eb69c865e06c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 b855a520c6b4..330f85538637 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 666ea542fab9..f107d19892e6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 9d55484163d3..dce8fcf54829 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php index 20be3cbb9cbb..d8a1f0d00c00 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php index 8dc1a5411744..dda213945d6d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php index 7d46a63ed672..e0e9334622da 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 f4543fcb4339..798cacdf1665 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 957dcdde2f51..aced8e0837fd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 e05a3116b659..0e23abd34f84 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 b2e810da3721..7ac47a8b4f93 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 ef81ed203e1d..5911b10ec154 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** 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 5e046821f514..11b01b255f77 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index d684f740fefd..7afe22cafe3f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -17,11 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 6.0.0-SNAPSHOT -======= - * OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x */ /** diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/client/petstore/python-legacy/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index df4c5ad38e7d..1c0389beacd5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb index 3a1ebebc3dfe..1b9b12972729 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb index c7faf16f2af2..2d2b7da307e8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index 6b23171fd359..313b60375227 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb index da10052dd2ac..a0f686867d99 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb index 9915beefb239..26394638556a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end 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 255fa743e755..f462790c3f32 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 @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb index d0d07779c902..b6827f6fc5cd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end 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 cc95a404d693..59c530b18c64 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =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 37f6d8fc29ff..85b3bd9da064 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index b892a310af0a..e90211cfa179 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index 6d5e77e7d75a..ef7cdf93d9dd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index be16e3cf5f44..7e22de93da57 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb index c20d63af0e46..031565289a0e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb index cf2dbfc87515..659e25306ceb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb index 3162510675f8..c495716c1184 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index 5cee2b933253..c6ec6c1a90f4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb index e17c007ec1b3..a89f96935010 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb index 37f256a4c8a4..57cfa8343d09 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb index b440220a2edf..10be8ec0a086 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb index 7a49cdcda2f6..ea966f177bce 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb index fb821398573f..b73022da326a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb index 36d48682205c..e874ebe700f4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb index 9787bc82bcf9..7d692a46b61a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb index 646d4b556d1c..7e9649319fbd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb index c19bc78f979e..23580e86e680 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb index d1d43400c592..9913a456cdcd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb index 7ed6d4b365bf..a972cfdb8858 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb index 856ec3e41ea5..adbf1b367563 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb index 235390c32dab..b99cf2a5305c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb index 1727a09fdaa3..9361c7a52d33 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index 32adcdca86f8..78da1ead1f86 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb index 90c0ce27f0bd..121251962cb6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb index 5d81c3a4a702..1d3d86c54969 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb index 589ec6fd11cf..605524a3dcda 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb index ec03a9ba040f..86bd8d8cc3f2 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb index 415b006f7ab1..1c7c233056aa 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index ad0a4256f381..ba61734af036 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb index ebe17766a379..813d434348ee 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb index 00e71d0b8052..9b6cb8a81743 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb index c5dcdb3c6af1..260193852528 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb index ca9ec495b5bd..b33d22daadbe 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb index 48b8d2d279fc..28148b318869 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb index 40b0a9bffd9d..374e7e85aff6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb index 68e655cfb1f0..e0776697e635 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb index e6b496b2bf9b..91902de42c81 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb index 915f78a0f666..78ea44493688 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb index 9a9c9a03694d..ed9af6f2c468 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb index 334b0598136e..f6a263dfe9db 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end 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 f5ff813d2b00..a304dc9b46cc 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 @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index 35cbe40f4302..68c3343d1d3a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb index de94c54c4ef0..6c18c4ea29c6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb index 6adc47d9b5aa..a2e8925d2cea 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb index a90d22c5ff1e..a9958f7d2136 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb index b08062f32dbd..f59454450b24 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb index 460e6134857f..59c7e87806f6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index 1e38980d8c4e..814f96b310d3 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -8,11 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb index 7183b5e9bab8..bfc71e435977 100644 --- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb index b76b6cbee30e..785eebfe6d69 100644 --- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb index f85cbfd73734..d4a79a9a5be7 100644 --- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index df4c5ad38e7d..1c0389beacd5 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 3a1ebebc3dfe..1b9b12972729 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb index c7faf16f2af2..2d2b7da307e8 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 6b23171fd359..313b60375227 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index da10052dd2ac..a0f686867d99 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 76c9117ada78..ce4639d99fc4 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index db3ff6bc8624..2fdcbb1e8938 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index c239ff1d9a9f..ab73c19e3ff8 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index faa7f88a8bd3..8b67459b3f4d 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 37f6d8fc29ff..85b3bd9da064 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 620e49b7a9ab..e76708b33a3d 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index 6d5e77e7d75a..ef7cdf93d9dd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index be16e3cf5f44..7e22de93da57 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index c20d63af0e46..031565289a0e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index cf2dbfc87515..659e25306ceb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 3162510675f8..c495716c1184 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index 5cee2b933253..c6ec6c1a90f4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index e17c007ec1b3..a89f96935010 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 37f256a4c8a4..57cfa8343d09 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index b440220a2edf..10be8ec0a086 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 7a49cdcda2f6..ea966f177bce 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index fb821398573f..b73022da326a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index 36d48682205c..e874ebe700f4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 9787bc82bcf9..7d692a46b61a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index 646d4b556d1c..7e9649319fbd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index c19bc78f979e..23580e86e680 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index d1d43400c592..9913a456cdcd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index 7ed6d4b365bf..a972cfdb8858 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index 856ec3e41ea5..adbf1b367563 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index 235390c32dab..b99cf2a5305c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb index 1727a09fdaa3..9361c7a52d33 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index 32adcdca86f8..78da1ead1f86 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 90c0ce27f0bd..121251962cb6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb index 5d81c3a4a702..1d3d86c54969 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb index 589ec6fd11cf..605524a3dcda 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index ec03a9ba040f..86bd8d8cc3f2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 415b006f7ab1..1c7c233056aa 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index ad0a4256f381..ba61734af036 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index ebe17766a379..813d434348ee 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 00e71d0b8052..9b6cb8a81743 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index c5dcdb3c6af1..260193852528 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb index ca9ec495b5bd..b33d22daadbe 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index 48b8d2d279fc..28148b318869 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 40b0a9bffd9d..374e7e85aff6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index 68e655cfb1f0..e0776697e635 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index e6b496b2bf9b..91902de42c81 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb index 915f78a0f666..78ea44493688 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb index 9a9c9a03694d..ed9af6f2c468 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb index 334b0598136e..f6a263dfe9db 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end 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 f5ff813d2b00..a304dc9b46cc 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 @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 35cbe40f4302..68c3343d1d3a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index de94c54c4ef0..6c18c4ea29c6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index 6adc47d9b5aa..a2e8925d2cea 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index a90d22c5ff1e..a9958f7d2136 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index b08062f32dbd..f59454450b24 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 460e6134857f..59c7e87806f6 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 60bacbe7d49b..0d15140ae09c 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,11 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index f487e3eb58b4..17a12f2b635a 100644 --- a/samples/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby/spec/api_client_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index b76b6cbee30e..785eebfe6d69 100644 --- a/samples/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/configuration_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index f85cbfd73734..d4a79a9a5be7 100644 --- a/samples/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/client/petstore/ruby/spec/spec_helper.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION b/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index e52921530eea..c677ea9ac0d0 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 d6891577a1f6..d6a4be0e7c12 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 46bdca806be0..f2a54b8b12d2 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java index b97e3113c7f4..89decbf82eac 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 00e115beae3b..c6ce94145ab9 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 2bc17cffa3de..f237b4d08664 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 0dd8dfabef1c..2c7192cf68d7 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 f558be7f66a6..7ae36b7b13cc 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 777302ffa21b..1eb79e642e71 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index b97e3113c7f4..89decbf82eac 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 00e115beae3b..c6ce94145ab9 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 2bc17cffa3de..f237b4d08664 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index c568685ec206..6b2cb5666f49 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 aca7bc440646..a002e4728536 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index f057e05f8c6a..225a00aa60a1 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION b/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION +++ b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index c13096b0a830..5d82299e91bc 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,11 +121,7 @@ UTF-8 -<<<<<<< HEAD 6.0.0-SNAPSHOT -======= - 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x 1.0.0 4.8.1 diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/elm/.openapi-generator/VERSION b/samples/openapi3/client/elm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/elm/.openapi-generator/VERSION +++ b/samples/openapi3/client/elm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb index 6b0cd8c3f24f..6d6964932aa6 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb index faa5b134f3f1..4dc01f94637a 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb index 2e38f9a7aa31..18182705e432 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =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 2d72fa803454..90a45186eead 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 @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb index ddb0210f483e..bb9d76c3d638 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb index a8ca97a68c78..66381103e771 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb index 7ff16c42a040..558b77058c77 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb index 34ae878d3d12..c011e31b2224 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb index 46f1c4b68fba..1f191e8eb0e9 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end 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 376e985a3346..007ed6031796 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 @@ -8,11 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file 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 5f9398cd7d01..dfe7d45dedcc 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec +++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec @@ -8,11 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb index 3f3de89c19f0..ac81bc658753 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb index aca35586cf5c..44ad371b1df0 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb index fcd2eca8f2b5..d61333491f55 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =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 6051e3abf411..427280386024 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 @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb index 3c20866303cd..f157fa0714ae 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb index 8338974e2119..0498388e6c29 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb index e07d9e42019c..f370745a6a5d 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb index 873083eddda7..0cf4da3cbc24 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb index 8d5d7e541b23..2c425b59e559 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb index db7c52d5e383..65857baeb0c3 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb index 2026f9330217..af0e5cba9a7a 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb index 80aba24f320d..18b8ee414ea4 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =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 0c743fb9bb8b..da466010b4ef 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 @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb index 802ccad1482d..c71bc79af69a 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb index 98fa01b05662..c72355b506ce 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb index 88b9d58c0fa9..cf7fc57d9bbb 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb index 57e7a26260f8..df2dd7ae50a2 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end 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 f7eb2a72666d..8a19b1bfcda1 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 @@ -8,11 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb index dd5ab8976993..1d6dbf9b5ac9 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb index 63ad61990566..9e5aa7b6f4a4 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb index 8744501e48ef..f4974f981a36 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb @@ -6,11 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 6.0.0-SNAPSHOT -======= -OpenAPI Generator version: 5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x =end diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100755 --- a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/ktorm/.openapi-generator/VERSION b/samples/schema/petstore/ktorm/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/schema/petstore/ktorm/.openapi-generator/VERSION +++ b/samples/schema/petstore/ktorm/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION b/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION +++ b/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION b/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/erlang-server/.openapi-generator/VERSION b/samples/server/petstore/erlang-server/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/server/petstore/erlang-server/.openapi-generator/VERSION +++ b/samples/server/petstore/erlang-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-chi-server/.openapi-generator/VERSION b/samples/server/petstore/go-chi-server/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/server/petstore/go-chi-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-chi-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-undertow/.openapi-generator/VERSION b/samples/server/petstore/java-undertow/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/java-undertow/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index 6a324199804f..453c47e553ba 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,11 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -<<<<<<< HEAD Generated by OpenAPI Generator 6.0.0-SNAPSHOT. -======= -Generated by OpenAPI Generator 5.3.0-SNAPSHOT. ->>>>>>> origin/5.3.x ## Requires diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 2b3942eb2a83..3249c1995880 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 847d715ffdc2..63a1dfe5d9e1 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index cd6f99e4ca77..237efa3f58c3 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-laravel/.openapi-generator/VERSION b/samples/server/petstore/php-laravel/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/VERSION +++ b/samples/server/petstore/php-laravel/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim4/.openapi-generator/VERSION b/samples/server/petstore/php-slim4/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION +++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-fastapi/.openapi-generator/VERSION b/samples/server/petstore/python-fastapi/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/server/petstore/python-fastapi/.openapi-generator/VERSION +++ b/samples/server/petstore/python-fastapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/VERSION +++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java index e81001ded170..85e2db8065be 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java index 5a11043a6ae7..8bb61fd16e12 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 96322995115f..aec668984f03 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 69fd1de78b5a..a22c4668657d 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a7d623dfc063..1f859ad07445 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 87c2bf62e1a6..dab68aed8b18 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index d68594abde25..126b9e38c233 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index bedad994840f..b54f4d061957 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ee84f0dcc32..67df1501f09a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index b37b2a56ce84..efc20852e165 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f4bbfdc593a1..7adfddb01e74 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 90b15210bc8e..f4f5c97755ff 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index c3534db4fe8d..a12dc1250c26 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index c231313c77fd..da836caf4bf5 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ee84f0dcc32..67df1501f09a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index fa4d1f4009b7..4227fb26a506 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f4bbfdc593a1..7adfddb01e74 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 90b15210bc8e..f4f5c97755ff 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index c3534db4fe8d..a12dc1250c26 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index c231313c77fd..da836caf4bf5 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ee84f0dcc32..67df1501f09a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 25b8b894ed07..cdf16fc14a7e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f4bbfdc593a1..7adfddb01e74 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 99609959e7ad..c4f0ea452d12 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index c3534db4fe8d..a12dc1250c26 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index c231313c77fd..da836caf4bf5 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ee84f0dcc32..67df1501f09a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index fa4d1f4009b7..4227fb26a506 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f4bbfdc593a1..7adfddb01e74 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 90b15210bc8e..f4f5c97755ff 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index c3534db4fe8d..a12dc1250c26 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index c231313c77fd..da836caf4bf5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6c2e7b60bdd7..9e8eda9066f9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 b9ec57fc660a..d9119ee3ba4f 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 780881750bc4..980ac9450f3e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index e4df95143d95..c4dcefbba25e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 a550834adb8e..afad5769803c 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 74963cebcf6d..20446a44497c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ee84f0dcc32..67df1501f09a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 fa4d1f4009b7..4227fb26a506 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f4bbfdc593a1..7adfddb01e74 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 90b15210bc8e..f4f5c97755ff 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 c3534db4fe8d..a12dc1250c26 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index c231313c77fd..da836caf4bf5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6d74f1f29288..c95e8d5ae7a6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 f5fe4e2947dd..19a5ac37fbf9 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6fc8b7f87ba6..30fb4866522a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 33df790a66a1..74eea454d7f9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 71184e1fbab2..cf465fac207d 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 3b02594b37ff..27833c4ef164 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6d74f1f29288..c95e8d5ae7a6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 f5fe4e2947dd..19a5ac37fbf9 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6fc8b7f87ba6..30fb4866522a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 33df790a66a1..74eea454d7f9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 71184e1fbab2..cf465fac207d 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 3b02594b37ff..27833c4ef164 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index a2c54553dd4c..75bdb0b85396 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 f014549bf12e..1cebeb454b4b 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c7faab93552b..d92c57b392a4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index c9d16545968f..68efcd6434fc 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 5f0e4db290a7..f3a868e4b3d1 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 2194adce4c55..d9fda863c7d2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index c7526b2b31d5..bdf4300d6365 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 856dbdfce15f..c34d973f3305 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8e60df9d8246..5307e824fff3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 9f0bff4f857f..ce0a1a318819 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 92716796c808..62f6b2da0f54 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index b1fd2d37dd37..35b75fe3e681 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6c2e7b60bdd7..9e8eda9066f9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 8f6590220dcb..70a9f1aebc2c 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 780881750bc4..980ac9450f3e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 6260b18265ab..4822e83b42a6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 a550834adb8e..afad5769803c 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 74963cebcf6d..20446a44497c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6d74f1f29288..c95e8d5ae7a6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 a9bf8cdbe14c..34dcbf602e49 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6fc8b7f87ba6..30fb4866522a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index efd513205e3b..26a898381615 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 71184e1fbab2..cf465fac207d 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 3b02594b37ff..27833c4ef164 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6c2e7b60bdd7..9e8eda9066f9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 8f6590220dcb..70a9f1aebc2c 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 780881750bc4..980ac9450f3e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 6260b18265ab..4822e83b42a6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 a550834adb8e..afad5769803c 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 74963cebcf6d..20446a44497c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ee84f0dcc32..67df1501f09a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 25b8b894ed07..cdf16fc14a7e 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f4bbfdc593a1..7adfddb01e74 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 99609959e7ad..c4f0ea452d12 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 c3534db4fe8d..a12dc1250c26 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index c231313c77fd..da836caf4bf5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ee84f0dcc32..67df1501f09a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 e4e555de5347..1d0a086cada0 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f4bbfdc593a1..7adfddb01e74 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 8e22d83cb320..e1569c5d992d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 c3534db4fe8d..a12dc1250c26 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index c231313c77fd..da836caf4bf5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file 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 800ca008b560..a214e7eb3694 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 e1fae24730ac..dcbf03c7152b 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 608754260109..a844ea2c160c 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 43e4dd5a3982..14564c051ffa 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 008abad61ac3..884a34a4f85a 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 9e4d04d36beb..57c7e4624ce1 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index e8415097f3ae..5f68295fc196 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.0-SNAPSHOT ->>>>>>> origin/5.3.x +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ee84f0dcc32..67df1501f09a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 fa4d1f4009b7..4227fb26a506 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f4bbfdc593a1..7adfddb01e74 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 90b15210bc8e..f4f5c97755ff 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ 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 c3534db4fe8d..a12dc1250c26 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 @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index c231313c77fd..da836caf4bf5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). ->>>>>>> origin/5.3.x * https://openapi-generator.tech * Do not edit the class manually. */ From ab5ab94bf2b13404250db210a5843f9772f04754 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 27 Jul 2021 11:58:05 +0800 Subject: [PATCH 011/175] update samples --- .../php/OpenAPIClient-php/lib/Model/DeprecatedObject.php | 2 +- .../OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php | 2 +- .../ruby-faraday/lib/petstore/models/deprecated_object.rb | 2 +- .../lib/petstore/models/object_with_deprecated_fields.rb | 2 +- .../petstore/ruby/lib/petstore/models/deprecated_object.rb | 2 +- .../ruby/lib/petstore/models/object_with_deprecated_fields.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) 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 05ebe28d3274..6d719cd76edf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.0-SNAPSHOT + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** 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 d64b074d2b0a..06fd790881ad 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.0-SNAPSHOT + * OpenAPI Generator version: 6.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb index a887b33e9559..ee7d5d3e0b0c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0-SNAPSHOT +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb index f5e2442561e5..ba7e2c9393fe 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0-SNAPSHOT +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb index a887b33e9559..ee7d5d3e0b0c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0-SNAPSHOT +OpenAPI Generator version: 6.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb index f5e2442561e5..ba7e2c9393fe 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0-SNAPSHOT +OpenAPI Generator version: 6.0.0-SNAPSHOT =end From ff6ff6e81a85a9322a5dcf1908474aa8e38ad75c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 1 Sep 2021 14:25:22 +0800 Subject: [PATCH 012/175] update samples --- samples/client/petstore/cpp-ue4/.openapi-generator/VERSION | 2 +- .../petstore/java/apache-httpclient/.openapi-generator/VERSION | 2 +- .../server/petstore/haskell-yesod/.openapi-generator/VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION b/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION b/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From a447df04bdbd648e2f607ae89b0019410bf7f9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Wed, 1 Sep 2021 21:15:00 +0200 Subject: [PATCH 013/175] [typescript-axios] Properly emit module as ES6 instead of commonJS when using ES6 (#10308) --- .../src/main/resources/typescript-axios/tsconfig.mustache | 4 ++-- .../petstore/typescript-axios/builds/es6-target/tsconfig.json | 4 ++-- .../tsconfig.json | 4 ++-- .../typescript-axios/builds/with-npm-version/tsconfig.json | 4 ++-- .../petstore/typescript-axios/tests/default/tsconfig.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache index c4a4cc771e74..f550c084ae16 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache @@ -1,8 +1,8 @@ { "compilerOptions": { "declaration": true, - "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", - "module": "commonjs", + "target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", + "module": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", "noImplicitAny": true, "outDir": "dist", "rootDir": ".", diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/tsconfig.json b/samples/client/petstore/typescript-axios/builds/es6-target/tsconfig.json index 2e9a191f8d32..1d9d883877a8 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/tsconfig.json +++ b/samples/client/petstore/typescript-axios/builds/es6-target/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "declaration": true, - "target": "es6", - "module": "commonjs", + "target": "ES6", + "module": "ES6", "noImplicitAny": true, "outDir": "dist", "rootDir": ".", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json index 2f27acb9fd94..22c0342c1e4a 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "declaration": true, - "target": "es5", - "module": "commonjs", + "target": "ES5", + "module": "ES5", "noImplicitAny": true, "outDir": "dist", "rootDir": ".", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json index 2f27acb9fd94..22c0342c1e4a 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "declaration": true, - "target": "es5", - "module": "commonjs", + "target": "ES5", + "module": "ES5", "noImplicitAny": true, "outDir": "dist", "rootDir": ".", diff --git a/samples/client/petstore/typescript-axios/tests/default/tsconfig.json b/samples/client/petstore/typescript-axios/tests/default/tsconfig.json index 19ec18e2a45b..e7958b132138 100644 --- a/samples/client/petstore/typescript-axios/tests/default/tsconfig.json +++ b/samples/client/petstore/typescript-axios/tests/default/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "moduleResolution": "node", - "module": "commonjs", - "target": "es5", + "module": "ES5", + "target": "ES5", "noImplicitAny": true, "sourceMap": false, "outDir": "dist", From b01e3c961361e0dbe7ba61fa178d339bdc834e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Fri, 3 Sep 2021 13:33:54 +0200 Subject: [PATCH 014/175] [typescript-axios] Use CommonJS when using ES5 as target as per Typescript docs (#10316) * [typescript-axios] Use CommonJS when using ES5 as target as per Typescript docs * [typescript-axios] Restore original identation --- .../src/main/resources/typescript-axios/tsconfig.mustache | 2 +- .../with-npm-version-and-separate-models-and-api/tsconfig.json | 2 +- .../typescript-axios/builds/with-npm-version/tsconfig.json | 2 +- .../petstore/typescript-axios/tests/default/tsconfig.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache index f550c084ae16..bf5018dba8b6 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/tsconfig.mustache @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", - "module": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", + "module": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}CommonJS{{/supportsES6}}", "noImplicitAny": true, "outDir": "dist", "rootDir": ".", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json index 22c0342c1e4a..383a290d8b6e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "target": "ES5", - "module": "ES5", + "module": "CommonJS", "noImplicitAny": true, "outDir": "dist", "rootDir": ".", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json index 22c0342c1e4a..383a290d8b6e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "target": "ES5", - "module": "ES5", + "module": "CommonJS", "noImplicitAny": true, "outDir": "dist", "rootDir": ".", diff --git a/samples/client/petstore/typescript-axios/tests/default/tsconfig.json b/samples/client/petstore/typescript-axios/tests/default/tsconfig.json index e7958b132138..ef11535e3404 100644 --- a/samples/client/petstore/typescript-axios/tests/default/tsconfig.json +++ b/samples/client/petstore/typescript-axios/tests/default/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "moduleResolution": "node", - "module": "ES5", + "module": "CommonJS", "target": "ES5", "noImplicitAny": true, "sourceMap": false, From a55f8afc81fdf06537692113da0af147f6c0f4ac Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 22 Sep 2021 14:09:54 +0800 Subject: [PATCH 015/175] update samples --- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 59ddcc31abf4b25601fb26c7352cb40d5bba9a82 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 6 Oct 2021 12:13:24 +0800 Subject: [PATCH 016/175] update samples --- .../swift5/asyncAwaitLibrary/.openapi-generator/VERSION | 2 +- .../builds/test-petstore/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION index 4b448de535c7..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 5b1b74e48d89c7ebc84d9f961772a6b0135d3d87 Mon Sep 17 00:00:00 2001 From: agilob Date: Fri, 8 Oct 2021 03:47:17 +0100 Subject: [PATCH 017/175] Dart-jaguar: remove (#10534) --- .github/.test/samples.json | 8 +- .gitignore | 3 - docs/generators.md | 1 - docs/generators/README.md | 1 - docs/generators/dart-jaguar.md | 232 ------------------ .../org.openapitools.codegen.CodegenConfig | 1 - .../resources/dart-jaguar/README.mustache | 141 ----------- .../dart-jaguar/analysis_options.mustache | 1 - .../main/resources/dart-jaguar/api.mustache | 78 ------ .../resources/dart-jaguar/api_doc.mustache | 86 ------- .../resources/dart-jaguar/api_test.mustache | 28 --- .../resources/dart-jaguar/apilib.mustache | 100 -------- .../dart-jaguar/auth/api_key_auth.mustache | 33 --- .../resources/dart-jaguar/auth/auth.mustache | 23 -- .../dart-jaguar/auth/basic_auth.mustache | 34 --- .../resources/dart-jaguar/auth/oauth.mustache | 25 -- .../main/resources/dart-jaguar/class.mustache | 41 ---- .../main/resources/dart-jaguar/enum.mustache | 37 --- .../dart-jaguar/git_push.sh.mustache | 57 ----- .../resources/dart-jaguar/gitignore.mustache | 27 -- .../main/resources/dart-jaguar/model.mustache | 12 - .../resources/dart-jaguar/model_test.mustache | 26 -- .../resources/dart-jaguar/object_doc.mustache | 16 -- .../resources/dart-jaguar/pubspec.mustache | 20 -- .../resources/dart-jaguar/travis.mustache | 11 - 25 files changed, 1 insertion(+), 1041 deletions(-) delete mode 100644 docs/generators/dart-jaguar.md delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/analysis_options.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/auth/api_key_auth.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/auth/auth.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/auth/basic_auth.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/auth/oauth.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache delete mode 100755 modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/model.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/pubspec.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/travis.mustache diff --git a/.github/.test/samples.json b/.github/.test/samples.json index d756cc45dfd4..b1ee2dac99ec 100644 --- a/.github/.test/samples.json +++ b/.github/.test/samples.json @@ -145,12 +145,6 @@ "Documentation: Cwiki" ] }, - { - "input": "dart-jaguar-petstore.sh", - "matches": [ - "Client: Dart" - ] - }, { "input": "dart-dio-petstore.sh", "matches": [ @@ -1401,4 +1395,4 @@ "matches": [] } ] -} \ No newline at end of file +} diff --git a/.gitignore b/.gitignore index 728a1667834f..8787a3b77024 100644 --- a/.gitignore +++ b/.gitignore @@ -249,9 +249,6 @@ samples/server/petstore/erlang-server/rebar.lock **/dart*/**/pubspec.lock # Dart dio **/dart*/**/*.g.dart -# Dart jaguar -**/dart*/**/*.jser.dart -**/dart*/**/*.jretro.dart # JS samples/client/petstore/javascript-es6/package-lock.json diff --git a/docs/generators.md b/docs/generators.md index ed80e860e490..41df7176c118 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -24,7 +24,6 @@ The following generators are available: * [dart](generators/dart.md) * [dart-dio](generators/dart-dio.md) * [dart-dio-next (experimental)](generators/dart-dio-next.md) -* [dart-jaguar (deprecated)](generators/dart-jaguar.md) * [eiffel](generators/eiffel.md) * [elixir](generators/elixir.md) * [elm](generators/elm.md) diff --git a/docs/generators/README.md b/docs/generators/README.md index b9e8926f6647..f729a7121c4f 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -15,7 +15,6 @@ The following generators are available: * [csharp-netcore](csharp-netcore.md) * [dart](dart.md) * [dart-dio](dart-dio.md) -* [dart-jaguar](dart-jaguar.md) * [eiffel](eiffel.md) * [elixir](elixir.md) * [elm](elm.md) diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md deleted file mode 100644 index 068b5728f02e..000000000000 --- a/docs/generators/dart-jaguar.md +++ /dev/null @@ -1,232 +0,0 @@ ---- -title: Config Options for dart-jaguar -sidebar_label: dart-jaguar ---- - -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. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|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| -|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| -|nullableFields|Is the null fields should be in the JSON payload| |null| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|serialization|Choose serialization format JSON or PROTO is supported| |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| -|sourceFolder|Source folder for generated code| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | - - -## LANGUAGE PRIMITIVES - -
    -
  • String
  • -
  • bool
  • -
  • double
  • -
  • int
  • -
  • num
  • -
- -## RESERVED WORDS - -
    -
  • abstract
  • -
  • as
  • -
  • assert
  • -
  • async
  • -
  • await
  • -
  • break
  • -
  • case
  • -
  • catch
  • -
  • class
  • -
  • const
  • -
  • continue
  • -
  • covariant
  • -
  • default
  • -
  • deferred
  • -
  • do
  • -
  • dynamic
  • -
  • else
  • -
  • enum
  • -
  • export
  • -
  • extends
  • -
  • extension
  • -
  • external
  • -
  • factory
  • -
  • false
  • -
  • final
  • -
  • finally
  • -
  • for
  • -
  • function
  • -
  • get
  • -
  • hide
  • -
  • if
  • -
  • implements
  • -
  • import
  • -
  • in
  • -
  • inout
  • -
  • interface
  • -
  • is
  • -
  • late
  • -
  • library
  • -
  • mixin
  • -
  • native
  • -
  • new
  • -
  • null
  • -
  • of
  • -
  • on
  • -
  • operator
  • -
  • out
  • -
  • part
  • -
  • patch
  • -
  • required
  • -
  • rethrow
  • -
  • return
  • -
  • set
  • -
  • show
  • -
  • source
  • -
  • static
  • -
  • super
  • -
  • switch
  • -
  • sync
  • -
  • this
  • -
  • throw
  • -
  • true
  • -
  • try
  • -
  • typedef
  • -
  • var
  • -
  • void
  • -
  • while
  • -
  • with
  • -
  • yield
  • -
- -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✗|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✗|OAS2,OAS3 -|PROTOBUF|✓|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 78855ce50adb..3d743829ad8e 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -26,7 +26,6 @@ org.openapitools.codegen.languages.CSharpNancyFXServerCodegen org.openapitools.codegen.languages.DartClientCodegen org.openapitools.codegen.languages.DartDioClientCodegen org.openapitools.codegen.languages.DartDioNextClientCodegen -org.openapitools.codegen.languages.DartJaguarClientCodegen org.openapitools.codegen.languages.EiffelClientCodegen org.openapitools.codegen.languages.ElixirClientCodegen org.openapitools.codegen.languages.ElmClientCodegen diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache deleted file mode 100644 index 9296cc859046..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache +++ /dev/null @@ -1,141 +0,0 @@ -# {{pubName}} -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} - -This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project: - -- API version: {{appVersion}} -{{#artifactVersion}} -- Package version: {{.}} -{{/artifactVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} -For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - -## Requirements - -Dart 2 or later OR Flutter 0.7.0 or later. - -Once your code is generated, you need to run the build_runner command to let Jaguar implement your API: - -```sh -flutter packages pub run build_runner build -or -pub run build_runner build -``` - -## Installation & Usage - -### Github -If this Dart package is published to Github, please include the following in pubspec.yaml -``` -name: {{pubName}} -version: {{pubVersion}} -description: {{pubDescription}} -dependencies: - {{pubName}}: - git: https://{{gitHost}}/{{gitUserId}}/{{gitRepoId}}.git - version: 'any' -``` - -### Local -To use the package in your local drive, please include the following in pubspec.yaml -``` -dependencies: - {{pubName}}: - path: /path/to/{{pubName}} -``` - -## Tests - -TODO - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:{{pubName}}/api.dart'; -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} -{{#hasAuthMethods}} -{{#authMethods}} -{{#isBasic}} -// TODO Configure HTTP basic authorization: {{{name}}} -//{{pubName}}.api.Configuration.username = 'YOUR_USERNAME'; -//{{pubName}}.api.Configuration.password = 'YOUR_PASSWORD'; -{{/isBasic}} -{{#isApiKey}} -// TODO Configure API key authorization: {{{name}}} -//{{pubName}}.api.Configuration.apiKey{'{{{keyParamName}}}'} = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//{{pubName}}.api.Configuration.apiKeyPrefix{'{{{keyParamName}}}'} = "Bearer"; -{{/isApiKey}} -{{#isOAuth}} -// TODO Configure OAuth2 access token for authorization: {{{name}}} -//{{pubName}}.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - -final jaguarApiGen = {{clientName}}(); -var api_instance = jaguarApiGen.get{{classname}}(); -{{#allParams}} -var {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} -{{/allParams}} - -try { - {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{#returnType}} - print(result); - {{/returnType}} -} catch (e) { - print("Exception when calling {{classname}}->{{operationId}}: $e\n"); -} -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} -``` - -## Documentation for API Endpoints - -All URIs are relative to *{{basePath}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - -## Documentation For Models - -{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}/{{{classname}}}.md) -{{/model}}{{/models}} - -## Documentation For Authorization - -{{^authMethods}} All endpoints do not require authorization. -{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} -{{#authMethods}}## {{{name}}} - -{{#isApiKey}}- **Type**: API key -- **API key parameter name**: {{{keyParamName}}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasic}}- **Type**: HTTP basic authentication -{{/isBasic}} -{{#isOAuth}}- **Type**: OAuth -- **Flow**: {{{flow}}} -- **Authorization URL**: {{{authorizationUrl}}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - **{{{scope}}}**: {{{description}}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} - -## Author - -{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} -{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/analysis_options.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/analysis_options.mustache deleted file mode 100644 index 655cb67bd888..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/analysis_options.mustache +++ /dev/null @@ -1 +0,0 @@ -analyzer: \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache deleted file mode 100644 index 7aef336eda4b..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:jaguar_retrofit/annotations/annotations.dart'; -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; -import 'package:jaguar_serializer/jaguar_serializer.dart'; -import 'package:jaguar_mimetype/jaguar_mimetype.dart'; -import 'dart:async'; - -{{#operations}} -{{#modelImports}}import 'package:{{pubName}}/model/{{.}}{{#protoFormat}}.pb{{/protoFormat}}.dart'; -{{/modelImports}} -{{#fullImports}}import '{{.}}'; -{{/fullImports}} - -part '{{classFilename}}.jretro.dart'; - -@GenApiClient() -class {{classname}} extends ApiClient with _${{classname}}Client { - final Route base; - final Map converters; - final Duration timeout; - - {{classname}}({this.base, this.converters, this.timeout = const Duration(minutes: 2)}); - - {{#operation}} - /// {{summary}} - /// - /// {{notes}} - @{{httpMethod}}Req(path: "{{path}}"{{#hasAuthMethods}}, metadata: {"auth": [{{#authMethods}} {"type": "{{type}}", "name": "{{name}}"{{#isApiKey}}, "keyName": "{{keyParamName}}", "where": "{{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}"{{/isApiKey}} }{{^-last}}, {{/-last}}{{/authMethods}}]}{{/hasAuthMethods}}) - Future<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{nickname}}( - {{#pathParams}} - @PathParam("{{baseName}}") {{dataType}} {{paramName}}{{^-last}}, {{/-last}} - {{/pathParams}} - {{#headerParams}} - {{#-first}}{{#hasPathParams}},{{/hasPathParams}}{{/-first}} - @Header("{{baseName}}") {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}} - {{/headerParams}} - {{#queryParams}} - {{#-first}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/-first}} - @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}} - {{/queryParams}} - {{#vendorExtensions}} - {{#formParams}} - {{#-first}}{{#hasQueryParams}},{{/hasQueryParams}}{{^hasQueryParams}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{/hasQueryParams}}{{^hasQueryParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/hasQueryParams}}{{/-first}} - {{#x-is-json}}@AsJson() {{/x-is-json}}{{#x-is-form}}@AsFormField() {{/x-is-form}}{{#x-is-multipart}}@AsMultipartField() {{/x-is-multipart}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}} - {{/formParams}} - {{#bodyParam}} - {{#hasFormParams}},{{/hasFormParams}}{{^hasFormParams}}{{#hasQueryParams}},{{/hasQueryParams}}{{/hasFormParams}}{{^hasFormParams}}{{^hasQueryParams}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{/hasQueryParams}}{{/hasFormParams}}{{^hasFormParams}}{{^hasQueryParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/hasQueryParams}}{{/hasFormParams}} - {{^x-is-proto}}{{^x-is-json}}{{^x-is-form}}{{^x-is-multipart}}@AsBody(){{/x-is-multipart}}{{/x-is-form}}{{/x-is-json}}{{/x-is-proto}} {{#x-is-proto}}@Serialized(MimeTypes.binary) {{/x-is-proto}}{{#x-is-json}}@AsJson() {{/x-is-json}}{{#x-is-form}}@AsForm() {{/x-is-form}}{{#x-is-multipart}}@AsMultipart() {{/x-is-multipart}}{{{dataType}}} {{paramName}} - {{/bodyParam}} - {{/vendorExtensions}} - ) { - return super.{{nickname}}( - {{#pathParams}} - {{paramName}}{{^-last}}, {{/-last}} - {{/pathParams}} - {{#headerParams}} - {{#-first}}{{#hasPathParams}},{{/hasPathParams}}{{/-first}} - {{paramName}}{{^-last}}, {{/-last}} - {{/headerParams}} - {{#queryParams}} - {{#-first}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/-first}} - {{paramName}}{{^-last}}, {{/-last}} - {{/queryParams}} - - {{#formParams}} - {{#-first}}{{#hasQueryParams}},{{/hasQueryParams}}{{^hasQueryParams}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{/hasQueryParams}}{{^hasQueryParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/hasQueryParams}}{{/-first}} - {{paramName}}{{^-last}}, {{/-last}} - {{/formParams}} - {{#bodyParam}} - {{#hasFormParams}},{{/hasFormParams}}{{^hasFormParams}}{{#hasQueryParams}},{{/hasQueryParams}}{{/hasFormParams}}{{^hasFormParams}}{{^hasQueryParams}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{/hasQueryParams}}{{/hasFormParams}}{{^hasFormParams}}{{^hasQueryParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/hasQueryParams}}{{/hasFormParams}} - {{paramName}} - {{/bodyParam}} - ).timeout(timeout); - } - - {{/operation}} - -} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache deleted file mode 100644 index ad0c61a6673f..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache +++ /dev/null @@ -1,86 +0,0 @@ -# {{pubName}}.api.{{classname}}{{#description}} -{{.}}{{/description}} - -## Load the API package -```dart -import 'package:{{pubName}}/api.dart'; -``` - -All URIs are relative to *{{basePath}}* - -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} -# **{{{operationId}}}** -> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) - -{{{summary}}}{{#notes}} - -{{{.}}}{{/notes}} - -### Example -```dart -import 'package:{{pubName}}/api.dart'; -{{#hasAuthMethods}} -{{#authMethods}} -{{#isBasic}} -// TODO Configure HTTP basic authorization: {{{name}}} -//{{pubName}}.api.Configuration.username = 'YOUR_USERNAME'; -//{{pubName}}.api.Configuration.password = 'YOUR_PASSWORD'; -{{/isBasic}} -{{#isApiKey}} -// TODO Configure API key authorization: {{{name}}} -//{{pubName}}.api.Configuration.apiKey{'{{{keyParamName}}}'} = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//{{pubName}}.api.Configuration.apiKeyPrefix{'{{{keyParamName}}}'} = "Bearer"; -{{/isApiKey}} -{{#isOAuth}} -// TODO Configure OAuth2 access token for authorization: {{{name}}} -//{{pubName}}.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - -var api_instance = new {{classname}}(); -{{#allParams}} -var {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} -{{/allParams}} - -try { - {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{#returnType}} - print(result); - {{/returnType}} -} catch (e) { - print("Exception when calling {{classname}}->{{operationId}}: $e\n"); -} -``` - -### Parameters -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} -{{/allParams}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} - -### HTTP request headers - - - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -{{/operation}} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache deleted file mode 100644 index d44b5bdef2f2..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:{{pubName}}/api.dart'; -import 'package:test/test.dart'; - -{{#operations}} - -/// tests for {{classname}} -void main() { - var instance = new {{classname}}(); - - group('tests for {{classname}}', () { - {{#operation}} - {{#summary}} - // {{{.}}} - // - {{/summary}} - {{#notes}} - // {{{.}}} - // - {{/notes}} - //{{#returnType}}Future<{{{.}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{operationId}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async - test('test {{operationId}}', () async { - // TODO - }); - - {{/operation}} - }); -} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache deleted file mode 100644 index b162a53ad4b4..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache +++ /dev/null @@ -1,100 +0,0 @@ -library {{pubName}}.api; - -import 'package:http/http.dart' as http; -import 'package:jaguar_serializer/jaguar_serializer.dart'; -{{#protoFormat}} -import 'package:jaguar_serializer_protobuf/proto_repo.dart'; -{{/protoFormat}} -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; -import 'package:{{pubName}}/auth/api_key_auth.dart'; -import 'package:{{pubName}}/auth/basic_auth.dart'; -import 'package:{{pubName}}/auth/oauth.dart'; -import 'package:jaguar_mimetype/jaguar_mimetype.dart'; - -{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/api/{{classFilename}}.dart'; -{{/apis}}{{/apiInfo}} -{{#models}}{{#model}}import 'package:{{pubName}}/model/{{classFilename}}{{#protoFormat}}.pb{{/protoFormat}}.dart'; -{{/model}}{{/models}} - - -{{#jsonFormat}} -final _jsonJaguarRepo = JsonRepo() -{{#models}}{{#model}}{{^isEnum}}..add({{classname}}Serializer()){{/isEnum}} -{{/model}}{{/models}}; -final Map defaultConverters = { - MimeTypes.json: _jsonJaguarRepo, -}; -{{/jsonFormat}} - -{{#protoFormat}} -final _protoJaguarRepo = ProtoCodecRepo() -{{#models}}{{#model}}..add((data) => {{classname}}.fromBuffer(List.from(data))) -{{/model}}{{/models}}; -final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true) -{{#models}}{{#model}}..add((data) => {{classname}}.fromBuffer(List.from(data))) -{{/model}}{{/models}}; -final Map defaultConverters = { - MimeTypes.json: _jsonJaguarRepo, - MimeTypes.binary: _protoJaguarRepo, -}; -{{/protoFormat}} - - -final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; - -class {{clientName}} { - List interceptors; - String basePath = "{{basePath}}"; - Route _baseRoute; - final Duration timeout; - - /** - * Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added) - */ - {{clientName}}({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) { - _baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? http.Client()); - if(interceptors == null) { - this.interceptors = _defaultInterceptors; - } - else if(overrideInterceptors){ - this.interceptors = interceptors; - } - else { - this.interceptors = List.from(_defaultInterceptors)..addAll(interceptors); - } - - this.interceptors.forEach((interceptor) { - _baseRoute.before(interceptor.before); - _baseRoute.after(interceptor.after); - }); - } - - void setOAuthToken(String name, String token) { - (_defaultInterceptors[0] as OAuthInterceptor).tokens[name] = token; - } - - void setBasicAuth(String name, String username, String password) { - (_defaultInterceptors[1] as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password); - } - - void setApiKey(String name, String apiKey) { - (_defaultInterceptors[2] as ApiKeyAuthInterceptor).apiKeys[name] = apiKey; - } - - {{#apiInfo}}{{#apis}} - /** - * Get {{classname}} instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - {{classname}} get{{classname}}({Route base, Map converters}) { - if(base == null) { - base = _baseRoute; - } - if(converters == null) { - converters = defaultConverters; - } - return {{classname}}(base: base, converters: converters, timeout: timeout); - } - - {{/apis}}{{/apiInfo}} -} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/auth/api_key_auth.mustache deleted file mode 100644 index feb0ba65712b..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/api_key_auth.mustache +++ /dev/null @@ -1,33 +0,0 @@ -import 'dart:async'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; - -class ApiKeyAuthInterceptor extends AuthInterceptor { - Map apiKeys = {}; - - @override - FutureOr before(RouteBase route) { - final authInfo = getAuthInfo(route, "apiKey"); - for (var info in authInfo) { - final authName = info["name"]; - final authKeyName = info["keyName"]; - final authWhere = info["where"]; - final apiKey = apiKeys[authName]; - if(apiKey != null) { - if(authWhere == 'query'){ - route.query(authKeyName, apiKey); - } - else { - route.header(authKeyName, apiKey); - } - break; - } - } - return super.before(route); - } - - @override - FutureOr after(StringResponse response) { - return Future.value(response); - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/auth.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/auth/auth.mustache deleted file mode 100644 index 477fbbf83743..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/auth.mustache +++ /dev/null @@ -1,23 +0,0 @@ -import 'dart:async'; - -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; - -abstract class AuthInterceptor extends Interceptor { - /* - * Get auth information on given route for the given type - * Can return null if type is not present on auth data or if route doesn't need authentication - */ - List> getAuthInfo(RouteBase route, String type) { - if (route.metadataMap.containsKey("auth")) { - final auth = route.metadataMap["auth"]; - List> results = []; - for (var info in auth) { - if(info["type"] == type) { - results.add(info); - } - } - return results; - } - return []; - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/auth/basic_auth.mustache deleted file mode 100644 index 962be36d664a..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/basic_auth.mustache +++ /dev/null @@ -1,34 +0,0 @@ -import 'dart:async'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; - -class BasicAuthInfo { - final String username; - final String password; - - const BasicAuthInfo(this.username, this.password); - -} - -class BasicAuthInterceptor extends AuthInterceptor { - Map authInfo = {}; - - @override - FutureOr before(RouteBase route) { - final metadataAuthInfo = getAuthInfo(route, "basic"); - for (var info in metadataAuthInfo) { - final authName = info["name"]; - final basicAuthInfo = authInfo[authName]; - if(basicAuthInfo != null) { - route.basicAuth(basicAuthInfo.username, basicAuthInfo.password); - break; - } - } - return super.before(route); - } - - @override - FutureOr after(StringResponse response) { - return Future.value(response); - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/auth/oauth.mustache deleted file mode 100644 index f12a63c45b50..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/oauth.mustache +++ /dev/null @@ -1,25 +0,0 @@ -import 'dart:async'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; - -class OAuthInterceptor extends AuthInterceptor { - Map tokens = {}; - - @override - FutureOr before(RouteBase route) { - final authInfo = getAuthInfo(route, "oauth"); - for (var info in authInfo) { - final token = tokens[info["name"]]; - if(token != null) { - route.header("Authorization", "Bearer ${token}"); - break; - } - } - return super.before(route); - } - - @override - FutureOr after(StringResponse response) { - return Future.value(response); - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache deleted file mode 100644 index 6178bba374fb..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache +++ /dev/null @@ -1,41 +0,0 @@ -{{#protoFormat}} -message {{classname}} { - {{#vars}} - {{#vendorExtensions}}{{{x-proto-type}}} {{name}} = {{x-index}}{{/vendorExtensions}}; - {{/vars}} -} -{{/protoFormat}} -{{#jsonFormat}} -part '{{classFilename}}.jser.dart'; - -class {{classname}} { - {{#vars}}{{#description}} /* {{{.}}} */{{/description}} - @Alias('{{{baseName}}}', isNullable:{{#isNullable}} true{{/isNullable}}{{^isNullable}} false{{/isNullable}},{{#allowableValues}} - {{^enumVars.empty}}{{^isString}}{{! isString because inline enums are not handled for now }} - processor: const {{{datatype}}}FieldProcessor(), - {{/isString}}{{/enumVars.empty}} - {{/allowableValues}} - ) - final {{{datatype}}} {{name}}; - {{#allowableValues}}{{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{{/allowableValues}}{{/vars}} - - {{classname}}( - {{#vars}}{{^defaultValue}}{{#required}} this.{{name}}, {{/required}}{{/defaultValue}}{{/vars}} - -{{#vendorExtensions}}{{#x-has-vars}}{ - {{#vars}}{{^required}} this.{{name}}{{#defaultValue}} = {{{defaultValue}}}{{^-last}}, {{/-last}} {{/defaultValue}}{{/required}} - {{#required}} {{#defaultValue}}this.{{name}} = {{{defaultValue}}}{{^-last}}, {{/-last}} {{/defaultValue}}{{/required}}{{/vars}} - }{{/x-has-vars}}{{/vendorExtensions}} - ); - - @override - String toString() { - return '{{classname}}[{{#vars}}{{name}}=${{name}}, {{/vars}}]'; - } -} - -@GenSerializer(nullableFields: {{nullableFields}}) -class {{classname}}Serializer extends Serializer<{{classname}}> with _${{classname}}Serializer { - -} -{{/jsonFormat}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache deleted file mode 100644 index da8322afbe9f..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache +++ /dev/null @@ -1,37 +0,0 @@ - -{{#jsonFormat}} -class {{classname}} { - /// The underlying value of this enum member. - final {{dataType}} value; - - const {{classname}}._internal(this.value); - - {{#allowableValues}} - {{#enumVars}} - {{#description}} - /// {{.}} - {{/description}} - static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}}); - {{/enumVars}} - {{/allowableValues}} -} - -class {{classname}}FieldProcessor implements FieldProcessor<{{classname}}, {{dataType}}> { - const {{classname}}FieldProcessor(); - - {{classname}} deserialize({{dataType}} data) { - switch (data) { - {{#allowableValues}} - {{#enumVars}} - case {{{value}}}: return {{classname}}.{{{name}}}; - {{/enumVars}} - {{/allowableValues}} - default: throw('Unknown enum value to decode: $data'); - } - } - - {{dataType}} serialize({{classname}} item) { - return item.value; - } -} -{{/jsonFormat}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache deleted file mode 100755 index 0e3776ae6dd4..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-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="{{{gitHost}}}" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - 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/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache deleted file mode 100644 index 8b7331fd822c..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache +++ /dev/null @@ -1,27 +0,0 @@ -# See https://www.dartlang.org/tools/private-files.html - -# Files and directories created by pub -.buildlog -.packages -.project -.pub/ -build/ -**/packages/ - -# Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these -# rules if you intend to use dart2js directly -# Convention is to use extension '.dart.js' for Dart compiled to Javascript to -# differentiate from explicit Javascript files) -*.dart.js -*.part.js -*.js.deps -*.js.map -*.info.json - -# Directory created by dartdoc -doc/api/ - -# Don't commit pubspec lock file -# (Library packages only! Remove pattern if developing an application package) -pubspec.lock diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/model.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/model.mustache deleted file mode 100644 index f3e3f22b3c44..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/model.mustache +++ /dev/null @@ -1,12 +0,0 @@ -{{#jsonFormat}}import 'package:jaguar_serializer/jaguar_serializer.dart';{{/jsonFormat}} -{{#protoFormat}}syntax = "proto3";{{/protoFormat}} - -{{#models}} -{{#model}} -{{#imports}} -{{#jsonFormat}}import 'package:{{pubName}}/model/{{.}}.dart';{{/jsonFormat}} -{{#protoFormat}}import "{{.}}.proto";{{/protoFormat}} -{{/imports}} -{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}} -{{/model}} -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache deleted file mode 100644 index 8e36f3df9a2f..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{{#models}} -{{#model}} -import 'package:{{pubName}}/api.dart'; -import 'package:test/test.dart'; - -// tests for {{classname}} -void main() { - var instance = new {{classname}}(); - - group('test {{classname}}', () { - {{#vars}} - {{#description}} - // {{{.}}} - {{/description}} - // {{{dataType}}} {{name}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} - test('to test the property `{{name}}`', () async { - // TODO - }); - - {{/vars}} - - }); - -} -{{/model}} -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache deleted file mode 100644 index ee17fcd02274..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache +++ /dev/null @@ -1,16 +0,0 @@ -{{#models}}{{#model}}# {{pubName}}.model.{{classname}} - -## Load the model package -```dart -import 'package:{{pubName}}/api.dart'; -``` - -## 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}} -{{/vars}} - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - -{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/pubspec.mustache deleted file mode 100644 index 2f33bb93d3fa..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/pubspec.mustache +++ /dev/null @@ -1,20 +0,0 @@ -name: {{pubName}} -version: {{pubVersion}} -description: {{pubDescription}} -environment: - sdk: ">=2.0.0 <3.0.0" -dependencies: - jaguar_retrofit: ^2.8.8 -{{#jsonFormat}} - jaguar_serializer: ^2.2.12 -{{/jsonFormat}} -{{#protoFormat}} - jaguar_serializer_protobuf: ^2.2.2 - jaguar_mimetype: ^1.0.1 -{{/protoFormat}} -dev_dependencies: - jaguar_retrofit_gen: ^2.8.10 -{{#jsonFormat}} - jaguar_serializer_cli: ^2.2.8 -{{/jsonFormat}} - build_runner: ^1.6.5 diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/travis.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/travis.mustache deleted file mode 100644 index 82b19541fa43..000000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/travis.mustache +++ /dev/null @@ -1,11 +0,0 @@ -# https://docs.travis-ci.com/user/languages/dart/ -# -language: dart -dart: -# Install a specific stable release -- "1.24.3" -install: -- pub get - -script: -- pub run test From c2186a0b0d66c1f558831221fe7b70a668f3f64f Mon Sep 17 00:00:00 2001 From: agilob Date: Sat, 9 Oct 2021 08:51:45 +0100 Subject: [PATCH 018/175] Flash: remove (#10535) --- .github/.test/samples.json | 6 - .github/auto-labeler.yml | 3 - bin/configs/other/openapi3/flash.yaml | 7 - docs/generators.md | 1 - docs/generators/README.md | 1 - docs/generators/flash-deprecated.md | 182 -------- .../codegen/languages/FlashClientCodegen.java | 413 ------------------ .../org.openapitools.codegen.CodegenConfig | 1 - website/i18n/en.json | 4 - 9 files changed, 618 deletions(-) delete mode 100644 bin/configs/other/openapi3/flash.yaml delete mode 100644 docs/generators/flash-deprecated.md delete mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java diff --git a/.github/.test/samples.json b/.github/.test/samples.json index b1ee2dac99ec..3d25312fa1bf 100644 --- a/.github/.test/samples.json +++ b/.github/.test/samples.json @@ -217,12 +217,6 @@ "Server: Scala" ] }, - { - "input": "flash-petstore.sh", - "matches": [ - "Client: Flash/ActionScript" - ] - }, { "input": "go-gin-petstore-server.sh", "matches": [ diff --git a/.github/auto-labeler.yml b/.github/auto-labeler.yml index 5bff51d5cec0..98e2ae377ddc 100644 --- a/.github/auto-labeler.yml +++ b/.github/auto-labeler.yml @@ -62,9 +62,6 @@ labels: - '\s*?-[gl] erlang(-.*)?-client\s*?' - '\s*?\[erlang-proper\]\s*?' - '\s*?-[gl] erlang-proper\s*?' - 'Client: Flash/ActionScript': - - '\s*?\[flash\]\s*?' - - '\s*?-[gl] flash(?!-)\b' 'Client: Go': - '\s*?\[go\]\s*?' - '\s*?-[gl] go(?!-)\b' diff --git a/bin/configs/other/openapi3/flash.yaml b/bin/configs/other/openapi3/flash.yaml deleted file mode 100644 index 52ed771332dc..000000000000 --- a/bin/configs/other/openapi3/flash.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: flash -outputDir: samples/client/petstore/flash -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml -templateDir: modules/openapi-generator/src/main/resources/flash -additionalProperties: - invokerPackage: org.openapitools - packageName: org.openapitools diff --git a/docs/generators.md b/docs/generators.md index 41df7176c118..2432d6f0b29c 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -29,7 +29,6 @@ The following generators are available: * [elm](generators/elm.md) * [erlang-client](generators/erlang-client.md) * [erlang-proper](generators/erlang-proper.md) -* [flash-deprecated (deprecated)](generators/flash-deprecated.md) * [go](generators/go.md) * [go-deprecated (deprecated)](generators/go-deprecated.md) * [groovy](generators/groovy.md) diff --git a/docs/generators/README.md b/docs/generators/README.md index f729a7121c4f..174de387640e 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -20,7 +20,6 @@ The following generators are available: * [elm](elm.md) * [erlang-client](erlang-client.md) * [erlang-proper](erlang-proper.md) -* [flash](flash.md) * [go](go.md) * [go-experimental (experimental)](go-experimental.md) * [groovy](groovy.md) diff --git a/docs/generators/flash-deprecated.md b/docs/generators/flash-deprecated.md deleted file mode 100644 index 5330b928fa4a..000000000000 --- a/docs/generators/flash-deprecated.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -title: Config Options for flash-deprecated -sidebar_label: flash-deprecated ---- - -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. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|invokerPackage|root package for generated code| |null| -|packageName|flash package name (convention: package.name)| |org.openapitools| -|packageVersion|flash package version| |1.0.0| -|sourceFolder|source folder for generated code. e.g. flash| |null| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | -|File|flash.filesystem.File| - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | - - -## LANGUAGE PRIMITIVES - -
    -
  • Array
  • -
  • Boolean
  • -
  • Date
  • -
  • Dictionary
  • -
  • Number
  • -
  • String
  • -
- -## RESERVED WORDS - -
    -
  • add
  • -
  • and
  • -
  • break
  • -
  • continue
  • -
  • delete
  • -
  • do
  • -
  • else
  • -
  • eq
  • -
  • for
  • -
  • function
  • -
  • ge
  • -
  • gt
  • -
  • if
  • -
  • ifframeloaded
  • -
  • in
  • -
  • le
  • -
  • lt
  • -
  • ne
  • -
  • new
  • -
  • not
  • -
  • on
  • -
  • onclipevent
  • -
  • or
  • -
  • return
  • -
  • telltarget
  • -
  • this
  • -
  • typeof
  • -
  • var
  • -
  • void
  • -
  • while
  • -
  • with
  • -
- -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✗|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✓|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✗|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✗|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✓|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java deleted file mode 100644 index 2dfcbfcafbe8..000000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * 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.languages; - -import io.swagger.v3.oas.models.media.Schema; -import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.*; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; -import org.openapitools.codegen.meta.features.*; -import org.openapitools.codegen.utils.ModelUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.util.Arrays; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Locale; - -import static org.openapitools.codegen.utils.StringUtils.camelize; -import static org.openapitools.codegen.utils.StringUtils.underscore; - -public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig { - private final Logger LOGGER = LoggerFactory.getLogger(FlashClientCodegen.class); - - protected String packageName = "org.openapitools"; - protected String packageVersion; - - protected String invokerPackage = "org.openapitools"; - protected String sourceFolder = "flash"; - - public FlashClientCodegen() { - super(); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.DEPRECATED).build(); - - modifyFeatureSet(features -> features - .includeDocumentationFeatures(DocumentationFeature.Readme) - .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) - .securityFeatures(EnumSet.of( - SecurityFeature.ApiKey - )) - .excludeGlobalFeatures( - GlobalFeature.XMLStructureDefinitions, - GlobalFeature.Callbacks, - GlobalFeature.LinkObjects, - GlobalFeature.ParameterStyling - ) - .excludeSchemaSupportFeatures( - SchemaSupportFeature.Polymorphism - ) - .excludeParameterFeatures( - ParameterFeature.Cookie - ) - .includeClientModificationFeatures( - ClientModificationFeature.BasePath - ) - ); - - modelPackage = "org.openapitools.client.model"; - apiPackage = "org.openapitools.client.api"; - outputFolder = "generated-code" + File.separatorChar + "flash"; - modelTemplateFiles.put("model.mustache", ".as"); - modelTemplateFiles.put("modelList.mustache", "List.as"); - apiTemplateFiles.put("api.mustache", ".as"); - embeddedTemplateDir = templateDir = "flash"; - - languageSpecificPrimitives.clear(); - languageSpecificPrimitives.add("Number"); - languageSpecificPrimitives.add("Boolean"); - languageSpecificPrimitives.add("String"); - languageSpecificPrimitives.add("Date"); - languageSpecificPrimitives.add("Array"); - languageSpecificPrimitives.add("Dictionary"); - - typeMapping.clear(); - typeMapping.put("integer", "Number"); - typeMapping.put("float", "Number"); - typeMapping.put("long", "Number"); - typeMapping.put("double", "Number"); - typeMapping.put("array", "Array"); - typeMapping.put("map", "Dictionary"); - typeMapping.put("boolean", "Boolean"); - typeMapping.put("string", "String"); - typeMapping.put("date", "Date"); - typeMapping.put("DateTime", "Date"); - typeMapping.put("object", "Object"); - typeMapping.put("file", "File"); - typeMapping.put("UUID", "String"); - typeMapping.put("URI", "String"); - typeMapping.put("binary", "File"); - - importMapping = new HashMap(); - importMapping.put("File", "flash.filesystem.File"); - - // from - setReservedWordsLowerCase(Arrays.asList("add", "for", "lt", "tellTarget", "and", - "function", "ne", "this", "break", "ge", "new", "typeof", "continue", "gt", "not", - "var", "delete", "if", "on", "void", "do", "ifFrameLoaded", "onClipEvent", "while", - "else", "in", "or", "with", "eq", "le", "return")); - - cliOptions.clear(); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "flash package name (convention:" + - " package.name)").defaultValue("org.openapitools")); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "flash package version") - .defaultValue("1.0.0")); - cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC)); - cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, "source folder for generated " + - "code. e.g. flash")); - - } - - @Override - public void processOpts() { - super.processOpts(); - - if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) { - this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE)); - } else { - //not set, use default to be passed to template - additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); - } - - if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { - this.setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER)); - } - - if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { - setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME)); - apiPackage = packageName + ".client.api"; - modelPackage = packageName + ".client.model"; - } else { - setPackageName("org.openapitools"); - } - - if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { - setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION)); - } else { - setPackageVersion("1.0.0"); - } - - additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); - additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion); - - //modelPackage = invokerPackage + File.separatorChar + "client" + File.separatorChar + "model"; - //apiPackage = invokerPackage + File.separatorChar + "client" + File.separatorChar + "api"; - - final String invokerFolder = (sourceFolder + File.separator + "src" + File.separator + invokerPackage + File.separator).replace(".", File.separator).replace('.', File.separatorChar); - - supportingFiles.add(new SupportingFile("ApiInvoker.as", invokerFolder + "common", "ApiInvoker.as")); - supportingFiles.add(new SupportingFile("ApiUrlHelper.as", invokerFolder + "common", "ApiUrlHelper.as")); - supportingFiles.add(new SupportingFile("ApiUserCredentials.as", invokerFolder + "common", "ApiUserCredentials.as")); - supportingFiles.add(new SupportingFile("ListWrapper.as", invokerFolder + "common", "ListWrapper.as")); - supportingFiles.add(new SupportingFile("OpenApi.as", invokerFolder + "common", "OpenApi.as")); - supportingFiles.add(new SupportingFile("XMLWriter.as", invokerFolder + "common", "XMLWriter.as")); - supportingFiles.add(new SupportingFile("ApiError.as", invokerFolder + "exception", "ApiError.as")); - supportingFiles.add(new SupportingFile("ApiErrorCodes.as", invokerFolder + "exception", "ApiErrorCodes.as")); - supportingFiles.add(new SupportingFile("ApiClientEvent.as", invokerFolder + "event", "ApiClientEvent.as")); - supportingFiles.add(new SupportingFile("Response.as", invokerFolder + "event", "Response.as")); - supportingFiles.add(new SupportingFile("build.properties", sourceFolder, "build.properties")); - supportingFiles.add(new SupportingFile("build.xml", sourceFolder, "build.xml")); - supportingFiles.add(new SupportingFile("README.txt", sourceFolder, "README.txt")); - //supportingFiles.add(new SupportingFile("AirExecutorApp-app.xml", sourceFolder + File.separatorChar - // + "bin", "AirExecutorApp-app.xml")); - supportingFiles.add(new SupportingFile("ASAXB-0.1.1.swc", sourceFolder + File.separatorChar - + "lib", "ASAXB-0.1.1.swc")); - supportingFiles.add(new SupportingFile("as3corelib.swc", sourceFolder + File.separatorChar - + "lib", "as3corelib.swc")); - supportingFiles.add(new SupportingFile("flexunit-4.1.0_RC2-28-flex_3.5.0.12683.swc", sourceFolder - + File.separator + "lib" + File.separator + "ext", "flexunit-4.1.0_RC2-28-flex_3.5.0.12683.swc")); - supportingFiles.add(new SupportingFile("flexunit-aircilistener-4.1.0_RC2-28-3.5.0.12683.swc", sourceFolder - + File.separator + "lib" + File.separator + "ext", "flexunit-aircilistener-4.1.0_RC2-28-3.5.0.12683.swc")); - supportingFiles.add(new SupportingFile("flexunit-cilistener-4.1.0_RC2-28-3.5.0.12683.swc", sourceFolder - + File.separator + "lib" + File.separator + "ext", "flexunit-cilistener-4.1.0_RC2-28-3.5.0.12683.swc")); - supportingFiles.add(new SupportingFile("flexunit-core-flex-4.0.0.2-sdk3.5.0.12683.swc", sourceFolder - + File.separator + "lib" + File.separator + "ext", "flexunit-core-flex-4.0.0.2-sdk3.5.0.12683.swc")); - supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); - supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); - } - - private static String dropDots(String str) { - return str.replaceAll("\\.", "_"); - } - - @Override - public CodegenType getTag() { - return CodegenType.CLIENT; - } - - @Override - public String getName() { - return "flash-deprecated"; - } - - @Override - public String getHelp() { - return "Generates a Flash (ActionScript) client library (beta). IMPORTANT: this generator has been deprecated in v5.x"; - } - - @Override - public String escapeReservedWord(String name) { - if (this.reservedWordsMappings().containsKey(name)) { - return this.reservedWordsMappings().get(name); - } - return "_" + name; - } - - @Override - public String apiFileFolder() { - return outputFolder + File.separatorChar + sourceFolder + File.separatorChar + ("src/" - + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar); - } - - @Override - public String modelFileFolder() { - return outputFolder + File.separatorChar + sourceFolder + File.separatorChar + ("src/" - + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar); - } - - @Override - public String getTypeDeclaration(Schema p) { - if (ModelUtils.isArraySchema(p) || ModelUtils.isMapSchema(p)) { - return getSchemaType(p); - } - return super.getTypeDeclaration(p); - } - - @Override - public String getSchemaType(Schema p) { - String schemaType = super.getSchemaType(p); - String type = null; - if (typeMapping.containsKey(schemaType)) { - type = typeMapping.get(schemaType); - if (languageSpecificPrimitives.contains(type)) { - return type; - } - } else { - type = toModelName(schemaType); - } - return type; - } - - @Override - public String toDefaultValue(Schema p) { - if (ModelUtils.isBooleanSchema(p)) { - return "false"; - } else if (ModelUtils.isDateSchema(p)) { - return "null"; - } else if (ModelUtils.isDateTimeSchema(p)) { - return "null"; - } else if (ModelUtils.isNumberSchema(p)) { - if (p.getDefault() != null) { - return p.getDefault().toString(); - } - return "0.0"; - } else if (ModelUtils.isIntegerSchema(p)) { - if (p.getDefault() != null) { - return p.getDefault().toString(); - } - return "0"; - } else if (ModelUtils.isMapSchema(p)) { - return "new Dictionary()"; - } else if (ModelUtils.isArraySchema(p)) { - return "new Array()"; - } else if (ModelUtils.isStringSchema(p)) { - return "null"; - } else { - return "NaN"; - } - } - - @Override - public String toVarName(String name) { - // replace - with _ e.g. created-at => created_at - name = name.replaceAll("-", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. - - // if it's all upper case, convert to lower case - if (name.matches("^[A-Z_]*$")) { - name = name.toLowerCase(Locale.ROOT); - } - - // underscore the variable name - // petId => pet_id - name = camelize(dropDots(name), true); - - // for reserved word or word starting with number, append _ - if (isReservedWord(name) || name.matches("^\\d.*")) { - name = escapeReservedWord(name); - } - - return name; - } - - @Override - public String toParamName(String name) { - // should be the same as variable name - return toVarName(name); - } - - @Override - public String toModelName(String name) { - if (!StringUtils.isEmpty(modelNamePrefix)) { - name = modelNamePrefix + "_" + name; - } - - if (!StringUtils.isEmpty(modelNameSuffix)) { - name = name + "_" + modelNameSuffix; - } - - name = sanitizeName(name); - - // model name cannot use reserved keyword, e.g. return - if (isReservedWord(name)) { - LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, camelize("model_" + name)); - name = "model_" + name; // e.g. return => ModelReturn (after camelize) - } - - // camelize the model name - // phone_number => PhoneNumber - return camelize(name); - } - - @Override - public String toModelFilename(String name) { - // leverage toModelName - return dropDots(toModelName(name)); - } - - @Override - public String toApiFilename(String name) { - // replace - with _ e.g. created-at => created_at - name = name.replaceAll("-", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. - - // e.g. PhoneNumberApi.rb => phone_number_api.rb - return camelize(name) + "Api"; - } - - @Override - public String toApiName(String name) { - if (name.length() == 0) { - return "DefaultApi"; - } - // e.g. phone_number_api => PhoneNumberApi - return camelize(name) + "Api"; - } - - @Override - public String toApiVarName(String name) { - if (name.length() == 0) { - return "DefaultApi"; - } - return camelize(name) + "Api"; - } - - @Override - public String toOperationId(String operationId) { - // throw exception if method name is empty - if (StringUtils.isEmpty(operationId)) { - throw new RuntimeException("Empty method name (operationId) not allowed"); - } - - // method name cannot use reserved keyword, e.g. return - if (isReservedWord(operationId)) { - LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, underscore(sanitizeName("call_" + operationId))); - operationId = "call_" + operationId; - } - - return underscore(operationId); - } - - public void setPackageName(String packageName) { - this.packageName = packageName; - } - - public void setPackageVersion(String packageVersion) { - this.packageVersion = packageVersion; - } - - public void setInvokerPackage(String invokerPackage) { - this.invokerPackage = invokerPackage; - } - - public void setSourceFolder(String sourceFolder) { - this.sourceFolder = sourceFolder; - } - - @Override - public String escapeQuotationMark(String input) { - // remove " to avoid code injection - return input.replace("\"", ""); - } - - @Override - public String escapeUnsafeCharacters(String input) { - return input.replace("*/", "*_/").replace("/*", "/_*"); - } -} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 3d743829ad8e..605605c53032 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -32,7 +32,6 @@ org.openapitools.codegen.languages.ElmClientCodegen org.openapitools.codegen.languages.ErlangClientCodegen org.openapitools.codegen.languages.ErlangProperCodegen org.openapitools.codegen.languages.ErlangServerCodegen -org.openapitools.codegen.languages.FlashClientCodegen org.openapitools.codegen.languages.FsharpFunctionsServerCodegen org.openapitools.codegen.languages.FsharpGiraffeServerCodegen org.openapitools.codegen.languages.GoClientCodegen diff --git a/website/i18n/en.json b/website/i18n/en.json index 5011d1b3c554..6a41385357c8 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -171,10 +171,6 @@ "title": "Config Options for erlang-server", "sidebar_label": "erlang-server" }, - "generators/flash": { - "title": "Config Options for flash", - "sidebar_label": "flash" - }, "generators/fsharp-functions": { "title": "Config Options for fsharp-functions", "sidebar_label": "fsharp-functions" From 681578d1b57582426ef9d30b7209e8f024ae901d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 22 Oct 2021 09:26:48 +0800 Subject: [PATCH 019/175] rename enum constants (#10631) --- .../Java/libraries/jersey2/auth/OAuth.mustache | 12 ++++++------ .../Java/libraries/jersey2/auth/OAuthFlow.mustache | 8 +++++++- .../java/org/openapitools/client/auth/OAuth.java | 12 ++++++------ .../java/org/openapitools/client/auth/OAuthFlow.java | 8 +++++++- .../java/org/openapitools/client/auth/OAuth.java | 12 ++++++------ .../java/org/openapitools/client/auth/OAuthFlow.java | 8 +++++++- .../java/org/openapitools/client/auth/OAuth.java | 12 ++++++------ .../java/org/openapitools/client/auth/OAuthFlow.java | 8 +++++++- 8 files changed, 52 insertions(+), 28 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuth.mustache index 62b573a66c07..30060cc2701a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuth.mustache @@ -26,7 +26,7 @@ public class OAuth implements Authentication { private String tokenUrl; private String absoluteTokenUrl; - private OAuthFlow flow = OAuthFlow.application; + private OAuthFlow flow = OAuthFlow.APPLICATION; private OAuth20Service service; private DefaultApi20 authApi; private String scope; @@ -103,18 +103,18 @@ public class OAuth implements Authentication { } try { switch (flow) { - case password: + case PASSWORD: if (username != null && password != null) { accessToken = service.getAccessTokenPasswordGrant(username, password, scope); } break; - case accessCode: + case ACCESS_CODE: if (code != null) { accessToken = service.getAccessToken(code); code = null; } break; - case application: + case APPLICATION: accessToken = service.getAccessTokenClientCredentialsGrant(scope); break; default: @@ -159,14 +159,14 @@ public class OAuth implements Authentication { } public OAuth usePasswordFlow(String username, String password) { - this.flow = OAuthFlow.password; + this.flow = OAuthFlow.PASSWORD; this.username = username; this.password = password; return this; } public OAuth useAuthorizationCodeFlow(String code) { - this.flow = OAuthFlow.accessCode; + this.flow = OAuthFlow.ACCESS_CODE; this.code = code; return this; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuthFlow.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuthFlow.mustache index 002e9572f33f..190781fb1264 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuthFlow.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuthFlow.mustache @@ -2,6 +2,12 @@ package {{invokerPackage}}.auth; +/** + * OAuth flows that are supported by this client + */ public enum OAuthFlow { - accessCode, implicit, password, application + ACCESS_CODE, + IMPLICIT, + PASSWORD, + APPLICATION } diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/auth/OAuth.java index 8a468063c987..005911308d96 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/auth/OAuth.java @@ -37,7 +37,7 @@ public class OAuth implements Authentication { private String tokenUrl; private String absoluteTokenUrl; - private OAuthFlow flow = OAuthFlow.application; + private OAuthFlow flow = OAuthFlow.APPLICATION; private OAuth20Service service; private DefaultApi20 authApi; private String scope; @@ -114,18 +114,18 @@ public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) thr } try { switch (flow) { - case password: + case PASSWORD: if (username != null && password != null) { accessToken = service.getAccessTokenPasswordGrant(username, password, scope); } break; - case accessCode: + case ACCESS_CODE: if (code != null) { accessToken = service.getAccessToken(code); code = null; } break; - case application: + case APPLICATION: accessToken = service.getAccessTokenClientCredentialsGrant(scope); break; default: @@ -170,14 +170,14 @@ public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) } public OAuth usePasswordFlow(String username, String password) { - this.flow = OAuthFlow.password; + this.flow = OAuthFlow.PASSWORD; this.username = username; this.password = password; return this; } public OAuth useAuthorizationCodeFlow(String code) { - this.flow = OAuthFlow.accessCode; + this.flow = OAuthFlow.ACCESS_CODE; this.code = code; return this; } diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/auth/OAuthFlow.java index b2d11ff0c4f0..dab6bf989ea7 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,6 +13,12 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ public enum OAuthFlow { - accessCode, implicit, password, application + ACCESS_CODE, + IMPLICIT, + PASSWORD, + APPLICATION } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java index 8a468063c987..005911308d96 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java @@ -37,7 +37,7 @@ public class OAuth implements Authentication { private String tokenUrl; private String absoluteTokenUrl; - private OAuthFlow flow = OAuthFlow.application; + private OAuthFlow flow = OAuthFlow.APPLICATION; private OAuth20Service service; private DefaultApi20 authApi; private String scope; @@ -114,18 +114,18 @@ public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) thr } try { switch (flow) { - case password: + case PASSWORD: if (username != null && password != null) { accessToken = service.getAccessTokenPasswordGrant(username, password, scope); } break; - case accessCode: + case ACCESS_CODE: if (code != null) { accessToken = service.getAccessToken(code); code = null; } break; - case application: + case APPLICATION: accessToken = service.getAccessTokenClientCredentialsGrant(scope); break; default: @@ -170,14 +170,14 @@ public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) } public OAuth usePasswordFlow(String username, String password) { - this.flow = OAuthFlow.password; + this.flow = OAuthFlow.PASSWORD; this.username = username; this.password = password; return this; } public OAuth useAuthorizationCodeFlow(String code) { - this.flow = OAuthFlow.accessCode; + this.flow = OAuthFlow.ACCESS_CODE; this.code = code; return this; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuthFlow.java index b2d11ff0c4f0..dab6bf989ea7 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,6 +13,12 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ public enum OAuthFlow { - accessCode, implicit, password, application + ACCESS_CODE, + IMPLICIT, + PASSWORD, + APPLICATION } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java index 8a468063c987..005911308d96 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java @@ -37,7 +37,7 @@ public class OAuth implements Authentication { private String tokenUrl; private String absoluteTokenUrl; - private OAuthFlow flow = OAuthFlow.application; + private OAuthFlow flow = OAuthFlow.APPLICATION; private OAuth20Service service; private DefaultApi20 authApi; private String scope; @@ -114,18 +114,18 @@ public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) thr } try { switch (flow) { - case password: + case PASSWORD: if (username != null && password != null) { accessToken = service.getAccessTokenPasswordGrant(username, password, scope); } break; - case accessCode: + case ACCESS_CODE: if (code != null) { accessToken = service.getAccessToken(code); code = null; } break; - case application: + case APPLICATION: accessToken = service.getAccessTokenClientCredentialsGrant(scope); break; default: @@ -170,14 +170,14 @@ public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) } public OAuth usePasswordFlow(String username, String password) { - this.flow = OAuthFlow.password; + this.flow = OAuthFlow.PASSWORD; this.username = username; this.password = password; return this; } public OAuth useAuthorizationCodeFlow(String code) { - this.flow = OAuthFlow.accessCode; + this.flow = OAuthFlow.ACCESS_CODE; this.code = code; return this; } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuthFlow.java index b2d11ff0c4f0..dab6bf989ea7 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,6 +13,12 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ public enum OAuthFlow { - accessCode, implicit, password, application + ACCESS_CODE, + IMPLICIT, + PASSWORD, + APPLICATION } From 7b7d7db0c781fb95b59112c8923f8132a700d724 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 23 Oct 2021 10:15:30 +0800 Subject: [PATCH 020/175] [Java][okhttp] rename enum (#10642) * rename java enum with uppercase * add tests for snake case lambda * update file header * update feign templates with new enum names * update okhttp template wth lambda * fix tests --- .../src/main/resources/Java/auth/OAuthFlow.mustache | 11 +++++++---- .../resources/Java/libraries/feign/ApiClient.mustache | 6 +++--- .../feign/auth/OauthClientCredentialsGrant.mustache | 2 +- .../libraries/feign/auth/OauthPasswordGrant.mustache | 4 ++-- .../Java/libraries/okhttp-gson/ApiClient.mustache | 2 +- .../libraries/okhttp-gson/auth/RetryingOAuth.mustache | 8 ++++---- .../Java/libraries/retrofit/auth/OAuth.mustache | 8 ++++---- .../Java/libraries/retrofit2/ApiClient.mustache | 2 +- .../Java/libraries/retrofit2/auth/OAuth.mustache | 8 ++++---- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../main/java/org/openapitools/client/ApiClient.java | 6 +++--- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../client/auth/OauthClientCredentialsGrant.java | 2 +- .../openapitools/client/auth/OauthPasswordGrant.java | 4 ++-- .../main/java/org/openapitools/client/ApiClient.java | 6 +++--- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../client/auth/OauthClientCredentialsGrant.java | 2 +- .../openapitools/client/auth/OauthPasswordGrant.java | 4 ++-- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../main/java/org/openapitools/client/ApiClient.java | 2 +- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../org/openapitools/client/auth/RetryingOAuth.java | 8 ++++---- .../main/java/org/openapitools/client/ApiClient.java | 2 +- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../org/openapitools/client/auth/RetryingOAuth.java | 8 ++++---- .../main/java/org/openapitools/client/ApiClient.java | 2 +- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../org/openapitools/client/auth/RetryingOAuth.java | 8 ++++---- .../openapitools/client/auth/RetryingOAuthTest.java | 2 +- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../main/java/org/openapitools/client/ApiClient.java | 2 +- .../main/java/org/openapitools/client/auth/OAuth.java | 8 ++++---- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../main/java/org/openapitools/client/ApiClient.java | 2 +- .../main/java/org/openapitools/client/auth/OAuth.java | 8 ++++---- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../main/java/org/openapitools/client/ApiClient.java | 2 +- .../main/java/org/openapitools/client/auth/OAuth.java | 8 ++++---- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- 39 files changed, 147 insertions(+), 111 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache b/modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache index 05bbf28dd3b1..7a4252662f58 100644 --- a/modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache +++ b/modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache @@ -2,10 +2,13 @@ package {{invokerPackage}}.auth; +/** + * OAuth flows that are supported by this client + */ {{>generatedAnnotation}} public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } 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 5c4e78970ea9..ed8f2302eb82 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 @@ -91,7 +91,7 @@ public class ApiClient { auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); {{/isApiKey}} {{#isOAuth}} - auth = buildOauthRequestInterceptor(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}"); + auth = buildOauthRequestInterceptor(OAuthFlow.{{#lambda.uppercase}}{{#lambda.snakecase}}{{flow}}{{/lambda.snakecase}}{{/lambda.uppercase}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}"); {{/isOAuth}} } else {{/authMethods}}{ throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); @@ -179,9 +179,9 @@ public class ApiClient { {{#hasOAuthMethods}} private RequestInterceptor buildOauthRequestInterceptor(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { switch (flow) { - case password: + case PASSWORD: return new OauthPasswordGrant(tokenUrl, scopes); - case application: + case APPLICATION: return new OauthClientCredentialsGrant(authorizationUrl, tokenUrl, scopes); default: throw new RuntimeException("Oauth flow \"" + flow + "\" is not implemented"); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OauthClientCredentialsGrant.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OauthClientCredentialsGrant.mustache index ef22c2116379..2180273d0e9e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OauthClientCredentialsGrant.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OauthClientCredentialsGrant.mustache @@ -21,7 +21,7 @@ public class OauthClientCredentialsGrant extends OAuth { @Override protected OAuthFlow getFlow() { - return OAuthFlow.application; + return OAuthFlow.APPLICATION; } /** diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OauthPasswordGrant.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OauthPasswordGrant.mustache index 870c3755a8b9..522afa08eadf 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OauthPasswordGrant.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OauthPasswordGrant.mustache @@ -24,7 +24,7 @@ public class OauthPasswordGrant extends OAuth { @Override protected OAuthFlow getFlow() { - return OAuthFlow.password; + return OAuthFlow.PASSWORD; } /** @@ -45,4 +45,4 @@ public class OauthPasswordGrant extends OAuth { .defaultScope(scopes) .build(new DefaultApi20Impl(authorizationUrl, tokenUrl)); } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache index ba47040542d1..82daacc705fc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache @@ -177,7 +177,7 @@ public class ApiClient { throw new IllegalArgumentException("OAuth2 token URL must be an absolute URL"); } } - RetryingOAuth retryingOAuth = new RetryingOAuth(tokenUrl, clientId, OAuthFlow.{{flow}}, clientSecret, parameters); + RetryingOAuth retryingOAuth = new RetryingOAuth(tokenUrl, clientId, OAuthFlow.{{#lambda.uppercase}}{{#lambda.snakecase}}{{flow}}{{/lambda.snakecase}}{{/lambda.uppercase}}, clientSecret, parameters); authentications.put( "{{name}}", retryingOAuth diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/RetryingOAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/RetryingOAuth.mustache index 6e6562448da1..cdf764e5cda1 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/RetryingOAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/RetryingOAuth.mustache @@ -63,16 +63,16 @@ public class RetryingOAuth extends OAuth implements Interceptor { public void setFlow(OAuthFlow flow) { switch(flow) { - case accessCode: + case ACCESS_CODE: tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); break; - case implicit: + case IMPLICIT: tokenRequestBuilder.setGrantType(GrantType.IMPLICIT); break; - case password: + case PASSWORD: tokenRequestBuilder.setGrantType(GrantType.PASSWORD); break; - case application: + case APPLICATION: tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); break; default: diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuth.mustache index 57bfd3df238e..bc0bad711446 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuth.mustache @@ -54,14 +54,14 @@ public class OAuth implements Interceptor { public void setFlow(OAuthFlow flow) { switch(flow) { - case accessCode: - case implicit: + case ACCESS_CODE: + case IMPLICIT: tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); break; - case password: + case PASSWORD: tokenRequestBuilder.setGrantType(GrantType.PASSWORD); break; - case application: + case APPLICATION: tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); break; default: diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache index 1196f2c13720..318a16b324bb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache @@ -85,7 +85,7 @@ public class ApiClient { auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); {{/isApiKey}} {{#isOAuth}} - auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}"); + auth = new OAuth(OAuthFlow.{{#lambda.uppercase}}{{#lambda.snakecase}}{{flow}}{{/lambda.snakecase}}{{/lambda.uppercase}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}"); {{/isOAuth}} } else {{/authMethods}}{ throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuth.mustache index 88e4e62bf858..212763dd97ca 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuth.mustache @@ -54,14 +54,14 @@ public class OAuth implements Interceptor { public void setFlow(OAuthFlow flow) { switch(flow) { - case accessCode: - case implicit: + case ACCESS_CODE: + case IMPLICIT: tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); break; - case password: + case PASSWORD: tokenRequestBuilder.setGrantType(GrantType.PASSWORD); break; - case application: + case APPLICATION: tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); break; default: diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } 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 ba2274d8fe0f..da2d48856c65 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 @@ -67,7 +67,7 @@ public ApiClient(String[] authNames) { } else if ("http_basic_test".equals(authName)) { auth = new HttpBasicAuth(); } else if ("petstore_auth".equals(authName)) { - auth = buildOauthRequestInterceptor(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); + auth = buildOauthRequestInterceptor(OAuthFlow.IMPLICIT, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } @@ -137,9 +137,9 @@ private ObjectMapper createObjectMapper() { private RequestInterceptor buildOauthRequestInterceptor(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { switch (flow) { - case password: + case PASSWORD: return new OauthPasswordGrant(tokenUrl, scopes); - case application: + case APPLICATION: return new OauthClientCredentialsGrant(authorizationUrl, tokenUrl, scopes); default: throw new RuntimeException("Oauth flow \"" + flow + "\" is not implemented"); diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java index a21c5a15ba22..e874f16dce06 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java @@ -21,7 +21,7 @@ protected OAuth2AccessToken getOAuth2AccessToken() { @Override protected OAuthFlow getFlow() { - return OAuthFlow.application; + return OAuthFlow.APPLICATION; } /** diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java index dba4fb3a0763..5d93980a7b89 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java @@ -24,7 +24,7 @@ protected OAuth2AccessToken getOAuth2AccessToken() { @Override protected OAuthFlow getFlow() { - return OAuthFlow.password; + return OAuthFlow.PASSWORD; } /** @@ -45,4 +45,4 @@ public void configure(String username, String password, String clientId, String .defaultScope(scopes) .build(new DefaultApi20Impl(authorizationUrl, tokenUrl)); } -} \ No newline at end of file +} 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 4cb1a3343fac..fb8f19963d9a 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 @@ -72,7 +72,7 @@ public ApiClient(String[] authNames) { } else if ("http_signature_test".equals(authName)) { auth = new HttpBearerAuth("signature"); } else if ("petstore_auth".equals(authName)) { - auth = buildOauthRequestInterceptor(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); + auth = buildOauthRequestInterceptor(OAuthFlow.IMPLICIT, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } @@ -144,9 +144,9 @@ private ObjectMapper createObjectMapper() { private RequestInterceptor buildOauthRequestInterceptor(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { switch (flow) { - case password: + case PASSWORD: return new OauthPasswordGrant(tokenUrl, scopes); - case application: + case APPLICATION: return new OauthClientCredentialsGrant(authorizationUrl, tokenUrl, scopes); default: throw new RuntimeException("Oauth flow \"" + flow + "\" is not implemented"); diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java index a21c5a15ba22..e874f16dce06 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java @@ -21,7 +21,7 @@ protected OAuth2AccessToken getOAuth2AccessToken() { @Override protected OAuthFlow getFlow() { - return OAuthFlow.application; + return OAuthFlow.APPLICATION; } /** diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java index dba4fb3a0763..5d93980a7b89 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java @@ -24,7 +24,7 @@ protected OAuth2AccessToken getOAuth2AccessToken() { @Override protected OAuthFlow getFlow() { - return OAuthFlow.password; + return OAuthFlow.PASSWORD; } /** @@ -45,4 +45,4 @@ public void configure(String username, String password, String clientId, String .defaultScope(scopes) .build(new DefaultApi20Impl(authorizationUrl, tokenUrl)); } -} \ No newline at end of file +} diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java index e9e3861cdaec..61640a5f1285 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java @@ -164,7 +164,7 @@ public ApiClient(String basePath, String clientId, String clientSecret, MapemptyMap()); oauth.setAccessToken("expired-access-token"); FieldUtils.writeField(oauth, "oAuthClient", mockOAuthClient(), true); diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ApiClient.java index b65534d173f7..de26a0f8b160 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ApiClient.java @@ -65,7 +65,7 @@ public ApiClient(String[] authNames) { } else if ("petstore_auth".equals(authName)) { - auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); + auth = new OAuth(OAuthFlow.IMPLICIT, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuth.java index d4de63700c43..091fb30927cb 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuth.java @@ -54,14 +54,14 @@ public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String sc public void setFlow(OAuthFlow flow) { switch(flow) { - case accessCode: - case implicit: + case ACCESS_CODE: + case IMPLICIT: tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); break; - case password: + case PASSWORD: tokenRequestBuilder.setGrantType(GrantType.PASSWORD); break; - case application: + case APPLICATION: tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); break; default: diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ApiClient.java index 4895f5b43c38..efcfe90bc964 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ApiClient.java @@ -66,7 +66,7 @@ public ApiClient(String[] authNames) { } else if ("petstore_auth".equals(authName)) { - auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); + auth = new OAuth(OAuthFlow.IMPLICIT, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuth.java index d4de63700c43..091fb30927cb 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuth.java @@ -54,14 +54,14 @@ public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String sc public void setFlow(OAuthFlow flow) { switch(flow) { - case accessCode: - case implicit: + case ACCESS_CODE: + case IMPLICIT: tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); break; - case password: + case PASSWORD: tokenRequestBuilder.setGrantType(GrantType.PASSWORD); break; - case application: + case APPLICATION: tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); break; default: diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ApiClient.java index 544e9f398f33..b9237129593c 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ApiClient.java @@ -66,7 +66,7 @@ public ApiClient(String[] authNames) { } else if ("petstore_auth".equals(authName)) { - auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); + auth = new OAuth(OAuthFlow.IMPLICIT, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuth.java index d4de63700c43..091fb30927cb 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuth.java @@ -54,14 +54,14 @@ public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String sc public void setFlow(OAuthFlow flow) { switch(flow) { - case accessCode: - case implicit: + case ACCESS_CODE: + case IMPLICIT: tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); break; - case password: + case PASSWORD: tokenRequestBuilder.setGrantType(GrantType.PASSWORD); break; - case application: + case APPLICATION: tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); break; default: diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } From c59a987e0062f939f9fb374aa738313cc27a7010 Mon Sep 17 00:00:00 2001 From: WILLIAM CHENG Date: Mon, 25 Oct 2021 13:44:34 +0800 Subject: [PATCH 021/175] update meta codegen --- samples/meta-codegen/lib/pom.xml | 4 ---- samples/meta-codegen/usage/.openapi-generator/VERSION | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index e141bc5e369b..79cee1afe0c3 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,11 +121,7 @@ UTF-8 -<<<<<<< HEAD 6.0.0-SNAPSHOT -======= - 5.3.1-SNAPSHOT ->>>>>>> origin/5.4.x 1.0.0 4.8.1 diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index f03177fda63c..5f68295fc196 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -6.0.0-SNAPSHOT -======= -5.3.1-SNAPSHOT ->>>>>>> origin/5.4.x +6.0.0-SNAPSHOT \ No newline at end of file From 48f81eef45e115128de8915b4373b83b313aaada Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 2 Nov 2021 12:47:15 +0800 Subject: [PATCH 022/175] use IllegalArgumentException instead (#10745) --- .../src/main/resources/Java/ServerConfiguration.mustache | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- .../main/java/org/openapitools/client/ServerConfiguration.java | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/ServerConfiguration.mustache b/modules/openapi-generator/src/main/resources/Java/ServerConfiguration.mustache index e21b63391e28..7f640ba7475a 100644 --- a/modules/openapi-generator/src/main/resources/Java/ServerConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/Java/ServerConfiguration.mustache @@ -39,7 +39,7 @@ public class ServerConfiguration { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); From a77a90f545a90d2c56e88384d805b84f3879a6c8 Mon Sep 17 00:00:00 2001 From: Adriano Vega Llobell Date: Tue, 9 Nov 2021 08:56:10 +0100 Subject: [PATCH 023/175] [csharp] Fix generation inconsistency of test folder (#10738) * Use the specified 'sourceFolder' from additional properties for the 'testFolder' property. --- .../codegen/languages/AbstractCSharpCodegen.java | 7 +++++++ 1 file changed, 7 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 086d63af29b6..2011490bd9f5 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 @@ -281,6 +281,9 @@ public void processOpts() { // {{sourceFolder}} if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER)); + + // TODO: Move to its own option when a parameter for 'testFolder' is added. + setTestFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER)); } else { additionalProperties.put(CodegenConstants.SOURCE_FOLDER, this.sourceFolder); } @@ -1151,6 +1154,10 @@ public void setPackageAuthors(String packageAuthors) { public void setSourceFolder(String sourceFolder) { this.sourceFolder = sourceFolder; } + + public void setTestFolder(String testFolder) { + this.testFolder = testFolder; + } public String getInterfacePrefix() { return interfacePrefix; From 42cb72ec741c58773c413634dc37b9bb5b075207 Mon Sep 17 00:00:00 2001 From: agilob Date: Sun, 21 Nov 2021 01:02:26 +0000 Subject: [PATCH 024/175] Remove kotlin-server-deprecated generator (#10851) --- docs/generators.md | 1 - docs/generators/README.md | 1 - docs/generators/kotlin-server-deprecated.md | 257 ----------------- .../KotlinServerDeprecatedCodegen.java | 270 ------------------ .../org.openapitools.codegen.CodegenConfig | 1 - .../kotlin/KotlinModelCodegenTest.java | 6 +- 6 files changed, 2 insertions(+), 534 deletions(-) delete mode 100644 docs/generators/kotlin-server-deprecated.md delete mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerDeprecatedCodegen.java diff --git a/docs/generators.md b/docs/generators.md index 2432d6f0b29c..4cb2b52a73b5 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -108,7 +108,6 @@ The following generators are available: * [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md) * [jaxrs-spec](generators/jaxrs-spec.md) * [kotlin-server](generators/kotlin-server.md) -* [kotlin-server-deprecated (deprecated)](generators/kotlin-server-deprecated.md) * [kotlin-spring](generators/kotlin-spring.md) * [kotlin-vertx (beta)](generators/kotlin-vertx.md) * [nodejs-express-server (beta)](generators/nodejs-express-server.md) diff --git a/docs/generators/README.md b/docs/generators/README.md index 174de387640e..8f6ee8a7f15d 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -90,7 +90,6 @@ The following generators are available: * [jaxrs-resteasy-eap](jaxrs-resteasy-eap.md) * [jaxrs-spec](jaxrs-spec.md) * [kotlin-server](kotlin-server.md) -* [kotlin-server-deprecated](kotlin-server-deprecated.md) * [kotlin-spring](kotlin-spring.md) * [kotlin-vertx (beta)](kotlin-vertx.md) * [nodejs-express-server (beta)](nodejs-express-server.md) diff --git a/docs/generators/kotlin-server-deprecated.md b/docs/generators/kotlin-server-deprecated.md deleted file mode 100644 index 2287e954abfe..000000000000 --- a/docs/generators/kotlin-server-deprecated.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -title: Config Options for kotlin-server-deprecated -sidebar_label: kotlin-server-deprecated ---- - -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. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|apiSuffix|suffix for api classes| |Api| -|artifactId|Generated artifact id (name of jar).| |kotlin-server-deprecated| -|artifactVersion|Generated artifact's package version.| |1.0.0| -|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|featureAutoHead|Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.| |true| -|featureCORS|Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.| |false| -|featureCompression|Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.| |true| -|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false| -|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| -|library|library template (sub-template)|
**ktor**
ktor framework
|ktor| -|modelMutable|Create mutable models| |false| -|packageName|Generated artifact package name.| |org.openapitools.server| -|parcelizeModels|toggle "@Parcelize" for generated models| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|sourceFolder|source folder for generated code| |src/main/kotlin| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | -|BigDecimal|java.math.BigDecimal| -|Date|java.time.LocalDate| -|DateTime|java.time.OffsetDateTime| -|File|java.io.File| -|LocalDate|java.time.LocalDate| -|LocalDateTime|java.time.LocalDateTime| -|LocalTime|java.time.LocalTime| -|Timestamp|java.sql.Timestamp| -|URI|java.net.URI| -|UUID|java.util.UUID| - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | -|array|kotlin.collections.ArrayList| -|list|kotlin.collections.ArrayList| -|map|kotlin.collections.HashMap| - - -## LANGUAGE PRIMITIVES - -
    -
  • kotlin.Array
  • -
  • kotlin.Boolean
  • -
  • kotlin.Byte
  • -
  • kotlin.ByteArray
  • -
  • kotlin.Char
  • -
  • kotlin.Double
  • -
  • kotlin.Float
  • -
  • kotlin.Int
  • -
  • kotlin.Long
  • -
  • kotlin.Short
  • -
  • kotlin.String
  • -
  • kotlin.collections.List
  • -
  • kotlin.collections.Map
  • -
  • kotlin.collections.Set
  • -
- -## RESERVED WORDS - -
    -
  • abstract
  • -
  • actual
  • -
  • annotation
  • -
  • as
  • -
  • break
  • -
  • class
  • -
  • companion
  • -
  • const
  • -
  • constructor
  • -
  • continue
  • -
  • crossinline
  • -
  • data
  • -
  • delegate
  • -
  • do
  • -
  • dynamic
  • -
  • else
  • -
  • enum
  • -
  • expect
  • -
  • external
  • -
  • false
  • -
  • field
  • -
  • final
  • -
  • finally
  • -
  • for
  • -
  • fun
  • -
  • if
  • -
  • import
  • -
  • in
  • -
  • infix
  • -
  • init
  • -
  • inline
  • -
  • inner
  • -
  • interface
  • -
  • internal
  • -
  • is
  • -
  • it
  • -
  • lateinit
  • -
  • noinline
  • -
  • null
  • -
  • object
  • -
  • open
  • -
  • operator
  • -
  • out
  • -
  • override
  • -
  • package
  • -
  • param
  • -
  • private
  • -
  • property
  • -
  • protected
  • -
  • public
  • -
  • receiver
  • -
  • reified
  • -
  • return
  • -
  • sealed
  • -
  • setparam
  • -
  • super
  • -
  • suspend
  • -
  • tailrec
  • -
  • this
  • -
  • throw
  • -
  • true
  • -
  • try
  • -
  • typealias
  • -
  • typeof
  • -
  • val
  • -
  • value
  • -
  • var
  • -
  • vararg
  • -
  • when
  • -
  • where
  • -
  • while
  • -
- -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✗|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✗|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✓|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✓|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerDeprecatedCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerDeprecatedCodegen.java deleted file mode 100644 index 5c5ec533dedf..000000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerDeprecatedCodegen.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * 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.languages; - -import com.google.common.collect.ImmutableMap; -import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenType; -import org.openapitools.codegen.SupportingFile; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; -import org.openapitools.codegen.meta.features.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.util.Arrays; -import java.util.EnumSet; -import java.util.List; -import java.util.Map; - -public class KotlinServerDeprecatedCodegen extends AbstractKotlinCodegen { - - public static final String DEFAULT_LIBRARY = Constants.KTOR; - private final Logger LOGGER = LoggerFactory.getLogger(KotlinServerDeprecatedCodegen.class); - private Boolean autoHeadFeatureEnabled = true; - private Boolean conditionalHeadersFeatureEnabled = false; - private Boolean hstsFeatureEnabled = true; - private Boolean corsFeatureEnabled = false; - private Boolean compressionFeatureEnabled = true; - - // This is here to potentially warn the user when an option is not supported by the target framework. - private Map> optionsSupportedPerFramework = new ImmutableMap.Builder>() - .put(Constants.KTOR, Arrays.asList( - Constants.AUTOMATIC_HEAD_REQUESTS, - Constants.CONDITIONAL_HEADERS, - Constants.HSTS, - Constants.CORS, - Constants.COMPRESSION - )) - .build(); - - /** - * Constructs an instance of `KotlinServerDeprecatedCodegen`. - */ - public KotlinServerDeprecatedCodegen() { - super(); - - modifyFeatureSet(features -> features - .includeDocumentationFeatures(DocumentationFeature.Readme) - .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) - .securityFeatures(EnumSet.of( - SecurityFeature.BasicAuth, - SecurityFeature.ApiKey, - SecurityFeature.OAuth2_Implicit - )) - .excludeGlobalFeatures( - GlobalFeature.XMLStructureDefinitions, - GlobalFeature.Callbacks, - GlobalFeature.LinkObjects, - GlobalFeature.ParameterStyling - ) - .excludeSchemaSupportFeatures( - SchemaSupportFeature.Polymorphism - ) - .excludeParameterFeatures( - ParameterFeature.Cookie - ) - ); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.DEPRECATED) - .build(); - - artifactId = "kotlin-server-deprecated"; - packageName = "org.openapitools.server"; - - // cliOptions default redefinition need to be updated - updateOption(CodegenConstants.ARTIFACT_ID, this.artifactId); - updateOption(CodegenConstants.PACKAGE_NAME, this.packageName); - - outputFolder = "generated-code" + File.separator + "kotlin-server-deprecated"; - modelTemplateFiles.put("model.mustache", ".kt"); - apiTemplateFiles.put("api.mustache", ".kt"); - embeddedTemplateDir = templateDir = "kotlin-server-deprecated"; - apiPackage = packageName + ".apis"; - modelPackage = packageName + ".models"; - - supportedLibraries.put(Constants.KTOR, "ktor framework"); - - // TODO: Configurable server engine. Defaults to netty in build.gradle. - CliOption library = new CliOption(CodegenConstants.LIBRARY, CodegenConstants.LIBRARY_DESC); - library.setDefault(DEFAULT_LIBRARY); - library.setEnum(supportedLibraries); - - cliOptions.add(library); - - addSwitch(Constants.AUTOMATIC_HEAD_REQUESTS, Constants.AUTOMATIC_HEAD_REQUESTS_DESC, getAutoHeadFeatureEnabled()); - addSwitch(Constants.CONDITIONAL_HEADERS, Constants.CONDITIONAL_HEADERS_DESC, getConditionalHeadersFeatureEnabled()); - addSwitch(Constants.HSTS, Constants.HSTS_DESC, getHstsFeatureEnabled()); - addSwitch(Constants.CORS, Constants.CORS_DESC, getCorsFeatureEnabled()); - addSwitch(Constants.COMPRESSION, Constants.COMPRESSION_DESC, getCompressionFeatureEnabled()); - } - - public Boolean getAutoHeadFeatureEnabled() { - return autoHeadFeatureEnabled; - } - - public void setAutoHeadFeatureEnabled(Boolean autoHeadFeatureEnabled) { - this.autoHeadFeatureEnabled = autoHeadFeatureEnabled; - } - - public Boolean getCompressionFeatureEnabled() { - return compressionFeatureEnabled; - } - - public void setCompressionFeatureEnabled(Boolean compressionFeatureEnabled) { - this.compressionFeatureEnabled = compressionFeatureEnabled; - } - - public Boolean getConditionalHeadersFeatureEnabled() { - return conditionalHeadersFeatureEnabled; - } - - public void setConditionalHeadersFeatureEnabled(Boolean conditionalHeadersFeatureEnabled) { - this.conditionalHeadersFeatureEnabled = conditionalHeadersFeatureEnabled; - } - - public Boolean getCorsFeatureEnabled() { - return corsFeatureEnabled; - } - - public void setCorsFeatureEnabled(Boolean corsFeatureEnabled) { - this.corsFeatureEnabled = corsFeatureEnabled; - } - - public String getHelp() { - return "Generates a Kotlin server (Ktor v1.1.3). IMPORTANT: this generator has been deprecated." + - " Please migrate to `kotlin-server` which supports Ktor v1.5.2+."; - } - - public Boolean getHstsFeatureEnabled() { - return hstsFeatureEnabled; - } - - public void setHstsFeatureEnabled(Boolean hstsFeatureEnabled) { - this.hstsFeatureEnabled = hstsFeatureEnabled; - } - - public String getName() { - return "kotlin-server-deprecated"; - } - - public CodegenType getTag() { - return CodegenType.SERVER; - } - - @Override - public void processOpts() { - super.processOpts(); - - if (additionalProperties.containsKey(CodegenConstants.LIBRARY)) { - this.setLibrary((String) additionalProperties.get(CodegenConstants.LIBRARY)); - } - - // set default library to "ktor" - if (StringUtils.isEmpty(library)) { - this.setLibrary(DEFAULT_LIBRARY); - additionalProperties.put(CodegenConstants.LIBRARY, DEFAULT_LIBRARY); - LOGGER.info("`library` option is empty. Default to {}", DEFAULT_LIBRARY); - } - - if (additionalProperties.containsKey(Constants.AUTOMATIC_HEAD_REQUESTS)) { - setAutoHeadFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.AUTOMATIC_HEAD_REQUESTS)); - } else { - additionalProperties.put(Constants.AUTOMATIC_HEAD_REQUESTS, getAutoHeadFeatureEnabled()); - } - - if (additionalProperties.containsKey(Constants.CONDITIONAL_HEADERS)) { - setConditionalHeadersFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.CONDITIONAL_HEADERS)); - } else { - additionalProperties.put(Constants.CONDITIONAL_HEADERS, getConditionalHeadersFeatureEnabled()); - } - - if (additionalProperties.containsKey(Constants.HSTS)) { - setHstsFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.HSTS)); - } else { - additionalProperties.put(Constants.HSTS, getHstsFeatureEnabled()); - } - - if (additionalProperties.containsKey(Constants.CORS)) { - setCorsFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.CORS)); - } else { - additionalProperties.put(Constants.CORS, getCorsFeatureEnabled()); - } - - if (additionalProperties.containsKey(Constants.COMPRESSION)) { - setCompressionFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.COMPRESSION)); - } else { - additionalProperties.put(Constants.COMPRESSION, getCompressionFeatureEnabled()); - } - - boolean generateApis = additionalProperties.containsKey(CodegenConstants.GENERATE_APIS) && (Boolean) additionalProperties.get(CodegenConstants.GENERATE_APIS); - String packageFolder = (sourceFolder + File.separator + packageName).replace(".", File.separator); - String resourcesFolder = "src/main/resources"; // not sure this can be user configurable. - - supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile")); - - supportingFiles.add(new SupportingFile("build.gradle.mustache", "", "build.gradle")); - supportingFiles.add(new SupportingFile("settings.gradle.mustache", "", "settings.gradle")); - supportingFiles.add(new SupportingFile("gradle.properties", "", "gradle.properties")); - - supportingFiles.add(new SupportingFile("AppMain.kt.mustache", packageFolder, "AppMain.kt")); - supportingFiles.add(new SupportingFile("Configuration.kt.mustache", packageFolder, "Configuration.kt")); - - if (generateApis) { - supportingFiles.add(new SupportingFile("Paths.kt.mustache", packageFolder, "Paths.kt")); - } - - supportingFiles.add(new SupportingFile("application.conf.mustache", resourcesFolder, "application.conf")); - supportingFiles.add(new SupportingFile("logback.xml", resourcesFolder, "logback.xml")); - - final String infrastructureFolder = (sourceFolder + File.separator + packageName + File.separator + "infrastructure").replace(".", File.separator); - - supportingFiles.add(new SupportingFile("ApiKeyAuth.kt.mustache", infrastructureFolder, "ApiKeyAuth.kt")); - } - - public static class Constants { - public final static String KTOR = "ktor"; - public final static String AUTOMATIC_HEAD_REQUESTS = "featureAutoHead"; - public final static String AUTOMATIC_HEAD_REQUESTS_DESC = "Automatically provide responses to HEAD requests for existing routes that have the GET verb defined."; - public final static String CONDITIONAL_HEADERS = "featureConditionalHeaders"; - public final static String CONDITIONAL_HEADERS_DESC = "Avoid sending content if client already has same content, by checking ETag or LastModified properties."; - public final static String HSTS = "featureHSTS"; - public final static String HSTS_DESC = "Avoid sending content if client already has same content, by checking ETag or LastModified properties."; - public final static String CORS = "featureCORS"; - public final static String CORS_DESC = "Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org."; - public final static String COMPRESSION = "featureCompression"; - public final static String COMPRESSION_DESC = "Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response."; - } - - @Override - public void postProcess() { - System.out.println("################################################################################"); - System.out.println("# Thanks for using OpenAPI Generator. #"); - System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #"); - System.out.println("# https://opencollective.com/openapi_generator/donate #"); - System.out.println("# #"); - System.out.println("# This generator's contributed by Jim Schubert (https://github.com/jimschubert)#"); - System.out.println("# Please support his work directly via https://patreon.com/jimschubert \uD83D\uDE4F #"); - System.out.println("################################################################################"); - } -} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 605605c53032..81779f7c9cb5 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -44,7 +44,6 @@ org.openapitools.codegen.languages.GraphQLNodeJSExpressServerCodegen org.openapitools.codegen.languages.GroovyClientCodegen org.openapitools.codegen.languages.KotlinClientCodegen org.openapitools.codegen.languages.KotlinServerCodegen -org.openapitools.codegen.languages.KotlinServerDeprecatedCodegen org.openapitools.codegen.languages.KotlinSpringServerCodegen org.openapitools.codegen.languages.KotlinVertxServerCodegen org.openapitools.codegen.languages.KtormSchemaCodegen diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java index af675c8913da..54b89d333c80 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java @@ -9,7 +9,6 @@ import org.openapitools.codegen.languages.AbstractKotlinCodegen; import org.openapitools.codegen.languages.KotlinClientCodegen; import org.openapitools.codegen.languages.KotlinServerCodegen; -import org.openapitools.codegen.languages.KotlinServerDeprecatedCodegen; import org.openapitools.codegen.languages.KotlinSpringServerCodegen; import org.openapitools.codegen.languages.KotlinVertxServerCodegen; import org.testng.annotations.DataProvider; @@ -29,7 +28,6 @@ public Object[][] client() { return new Object[][]{ {new KotlinClientCodegen()}, {new KotlinServerCodegen()}, - {new KotlinServerDeprecatedCodegen()}, {new KotlinSpringServerCodegen()}, {new KotlinVertxServerCodegen()}, }; @@ -90,7 +88,7 @@ public void valuesArrayWithUniqueItems(AbstractKotlinCodegen codegen) throws IOE String outputPath = generateModels(codegen, "src/test/resources/3_0/issue_9848.yaml", false); assertFileContains(Paths.get(outputPath + "/src/main/kotlin/models/NonUniqueArray.kt"), - codegen instanceof KotlinVertxServerCodegen || codegen instanceof KotlinServerDeprecatedCodegen + codegen instanceof KotlinVertxServerCodegen ? "val array: kotlin.Array" : "val array: kotlin.collections.List" ); @@ -104,7 +102,7 @@ public void mutableArrayWithUniqueItems(AbstractKotlinCodegen codegen) throws IO String outputPath = generateModels(codegen, "src/test/resources/3_0/issue_9848.yaml", true); assertFileContains(Paths.get(outputPath + "/src/main/kotlin/models/NonUniqueArray.kt"), - codegen instanceof KotlinVertxServerCodegen || codegen instanceof KotlinServerDeprecatedCodegen + codegen instanceof KotlinVertxServerCodegen ? "var array: kotlin.Array" : "var array: kotlin.collections.List" ); From 535b9e22d0fc2d07716e1f237c7dc58890d474f1 Mon Sep 17 00:00:00 2001 From: agilob Date: Sun, 21 Nov 2021 01:03:11 +0000 Subject: [PATCH 025/175] Remove deprecated TypeScriptAngularJsClientCodegen (#10850) --- docs/generators.md | 1 - .../typescript-angularjs-deprecated.md | 241 --------------- .../TypeScriptAngularJsClientCodegen.java | 122 -------- .../org.openapitools.codegen.CodegenConfig | 1 - ...eScriptAngularJsClientOptionsProvider.java | 67 ---- .../TypeScriptAngularJsClientOptionsTest.java | 49 --- .../TypeScriptAngularJsModelTest.java | 286 ------------------ 7 files changed, 767 deletions(-) delete mode 100644 docs/generators/typescript-angularjs-deprecated.md delete mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java delete mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java delete mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangularjs/TypeScriptAngularJsClientOptionsTest.java delete mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangularjs/TypeScriptAngularJsModelTest.java diff --git a/docs/generators.md b/docs/generators.md index 4cb2b52a73b5..03d14657aeb1 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -65,7 +65,6 @@ The following generators are available: * [swift5](generators/swift5.md) * [typescript (experimental)](generators/typescript.md) * [typescript-angular](generators/typescript-angular.md) -* [typescript-angularjs-deprecated (deprecated)](generators/typescript-angularjs-deprecated.md) * [typescript-aurelia](generators/typescript-aurelia.md) * [typescript-axios](generators/typescript-axios.md) * [typescript-fetch](generators/typescript-fetch.md) diff --git a/docs/generators/typescript-angularjs-deprecated.md b/docs/generators/typescript-angularjs-deprecated.md deleted file mode 100644 index 9363a6958da7..000000000000 --- a/docs/generators/typescript-angularjs-deprecated.md +++ /dev/null @@ -1,241 +0,0 @@ ---- -title: Config Options for typescript-angularjs-deprecated -sidebar_label: typescript-angularjs-deprecated ---- - -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. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|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| -|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| -|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| -|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false| -|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|supportsES6|Generate code that conforms to ES6.| |false| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | -|array|Array| - - -## LANGUAGE PRIMITIVES - -
    -
  • Array
  • -
  • Boolean
  • -
  • Date
  • -
  • Double
  • -
  • Error
  • -
  • File
  • -
  • Float
  • -
  • Integer
  • -
  • Long
  • -
  • Map
  • -
  • Object
  • -
  • ReadonlyArray
  • -
  • Set
  • -
  • String
  • -
  • any
  • -
  • boolean
  • -
  • number
  • -
  • object
  • -
  • string
  • -
- -## RESERVED WORDS - -
    -
  • abstract
  • -
  • await
  • -
  • boolean
  • -
  • break
  • -
  • byte
  • -
  • case
  • -
  • catch
  • -
  • char
  • -
  • class
  • -
  • const
  • -
  • continue
  • -
  • debugger
  • -
  • default
  • -
  • delete
  • -
  • do
  • -
  • double
  • -
  • else
  • -
  • enum
  • -
  • export
  • -
  • extends
  • -
  • false
  • -
  • final
  • -
  • finally
  • -
  • float
  • -
  • for
  • -
  • formParams
  • -
  • function
  • -
  • goto
  • -
  • headerParams
  • -
  • if
  • -
  • implements
  • -
  • import
  • -
  • in
  • -
  • instanceof
  • -
  • int
  • -
  • interface
  • -
  • let
  • -
  • long
  • -
  • native
  • -
  • new
  • -
  • null
  • -
  • package
  • -
  • private
  • -
  • protected
  • -
  • public
  • -
  • queryParameters
  • -
  • requestOptions
  • -
  • return
  • -
  • short
  • -
  • static
  • -
  • super
  • -
  • switch
  • -
  • synchronized
  • -
  • this
  • -
  • throw
  • -
  • transient
  • -
  • true
  • -
  • try
  • -
  • typeof
  • -
  • useFormData
  • -
  • var
  • -
  • varLocalDeferred
  • -
  • varLocalPath
  • -
  • void
  • -
  • volatile
  • -
  • while
  • -
  • with
  • -
  • yield
  • -
- -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✓|OAS2,OAS3 -|Polymorphism|✓|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✗|OAS2,OAS3 -|ApiKey|✗|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✗|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✓|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java deleted file mode 100644 index e342d985e427..000000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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.languages; - -import io.swagger.v3.oas.models.media.Schema; -import org.openapitools.codegen.CodegenParameter; -import org.openapitools.codegen.SupportingFile; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; - -import java.io.File; - -public class TypeScriptAngularJsClientCodegen extends AbstractTypeScriptClientCodegen { - - public TypeScriptAngularJsClientCodegen() { - super(); - outputFolder = "generated-code/typescript-angularjs"; - modelTemplateFiles.put("model.mustache", ".ts"); - apiTemplateFiles.put("api.mustache", ".ts"); - embeddedTemplateDir = templateDir = "typescript-angularjs"; - apiPackage = "api"; - modelPackage = "model"; - - removeOption(NPM_NAME); - removeOption(NPM_VERSION); - removeOption(SNAPSHOT); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.DEPRECATED) - .build(); - } - - @Override - public String getName() { - return "typescript-angularjs-deprecated"; - } - - @Override - public String getHelp() { - return "Generates a TypeScript AngularJS client library. This generator has been deprecated and will be removed in the future release."; - } - - @Override - public void processOpts() { - super.processOpts(); - - supportingFiles.add(new SupportingFile("models.mustache", modelPackage().replace('.', File.separatorChar), "models.ts")); - supportingFiles.add(new SupportingFile("apis.mustache", apiPackage().replace('.', File.separatorChar), "api.ts")); - supportingFiles.add(new SupportingFile("index.mustache", getIndexDirectory(), "index.ts")); - supportingFiles.add(new SupportingFile("api.module.mustache", getIndexDirectory(), "api.module.ts")); - supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); - supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore")); - - } - - @Override - public String getSchemaType(Schema p) { - String openAPIType = super.getSchemaType(p); - if (isLanguagePrimitive(openAPIType) || isLanguageGenericType(openAPIType)) { - return openAPIType; - } - return addModelPrefix(openAPIType); - } - - @Override - public String getTypeDeclaration(String name) { - return addModelPrefix(name); - } - - @Override - public void postProcessParameter(CodegenParameter parameter) { - super.postProcessParameter(parameter); - // parameter.dataType = addModelPrefix(parameter.dataType); - } - - private String getIndexDirectory() { - String indexPackage = modelPackage.substring(0, Math.max(0, modelPackage.lastIndexOf('.'))); - return indexPackage.replace('.', File.separatorChar); - } - - private String addModelPrefix(String openAPIType) { - String type = null; - if (typeMapping.containsKey(openAPIType)) { - type = typeMapping.get(openAPIType); - } else { - type = openAPIType; - } - - if (!isLanguagePrimitive(type) && !isLanguageGenericType(type)) { - type = "models." + openAPIType; - } - return type; - } - - private boolean isLanguagePrimitive(String type) { - return languageSpecificPrimitives.contains(type); - } - - private boolean isLanguageGenericType(String type) { - for (String genericType : languageGenericTypes) { - if (type.startsWith(genericType + "<")) { - return true; - } - } - return false; - } -} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 81779f7c9cb5..85321c100c2e 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -125,7 +125,6 @@ org.openapitools.codegen.languages.Swift4Codegen org.openapitools.codegen.languages.Swift5ClientCodegen org.openapitools.codegen.languages.TypeScriptClientCodegen org.openapitools.codegen.languages.TypeScriptAngularClientCodegen -org.openapitools.codegen.languages.TypeScriptAngularJsClientCodegen org.openapitools.codegen.languages.TypeScriptAureliaClientCodegen org.openapitools.codegen.languages.TypeScriptAxiosClientCodegen org.openapitools.codegen.languages.TypeScriptFetchClientCodegen diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java deleted file mode 100644 index 1b9c8a58e174..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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.options; - -import com.google.common.collect.ImmutableMap; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.languages.AbstractTypeScriptClientCodegen; - -import java.util.Map; - -public class TypeScriptAngularJsClientOptionsProvider implements OptionsProvider { - public static final String SUPPORTS_ES6_VALUE = "false"; - public static final String NULL_SAFE_ADDITIONAL_PROPS_VALUE = "false"; - public static final String ENUM_NAME_SUFFIX = "Enum"; - public static final String SORT_PARAMS_VALUE = "false"; - public static final String SORT_MODEL_PROPERTIES_VALUE = "false"; - public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; - public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase"; - public static final String PARAM_NAMING_VALUE = "camelCase"; - public static final String ENUM_PROPERTY_NAMING_VALUE = "PascalCase"; - public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; - public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; - - @Override - public String getLanguage() { - return "typescript-angularjs"; - } - - @Override - public Map createOptions() { - ImmutableMap.Builder builder = new ImmutableMap.Builder(); - return builder.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE) - .put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, SORT_MODEL_PROPERTIES_VALUE) - .put(CodegenConstants.SUPPORTS_ES6, SUPPORTS_ES6_VALUE) - .put(AbstractTypeScriptClientCodegen.NULL_SAFE_ADDITIONAL_PROPS, NULL_SAFE_ADDITIONAL_PROPS_VALUE) - .put(CodegenConstants.ENUM_NAME_SUFFIX, ENUM_NAME_SUFFIX) - .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) - .put(CodegenConstants.ENUM_PROPERTY_NAMING, ENUM_PROPERTY_NAMING_VALUE) - .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING_VALUE) - .put(CodegenConstants.PARAM_NAMING, PARAM_NAMING_VALUE) - .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) - .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) - .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") - .build(); - } - - @Override - public boolean isServer() { - return false; - } -} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangularjs/TypeScriptAngularJsClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangularjs/TypeScriptAngularJsClientOptionsTest.java deleted file mode 100644 index 54710992d911..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangularjs/TypeScriptAngularJsClientOptionsTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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.typescript.typescriptangularjs; - -import org.openapitools.codegen.AbstractOptionsTest; -import org.openapitools.codegen.CodegenConfig; -import org.openapitools.codegen.languages.TypeScriptAngularJsClientCodegen; -import org.openapitools.codegen.options.TypeScriptAngularJsClientOptionsProvider; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - -public class TypeScriptAngularJsClientOptionsTest extends AbstractOptionsTest { - private TypeScriptAngularJsClientCodegen clientCodegen = mock(TypeScriptAngularJsClientCodegen.class, mockSettings); - - public TypeScriptAngularJsClientOptionsTest() { - super(new TypeScriptAngularJsClientOptionsProvider()); - } - - @Override - protected CodegenConfig getCodegenConfig() { - return clientCodegen; - } - - @SuppressWarnings("unused") - @Override - protected void verifyOptions() { - verify(clientCodegen).setSortParamsByRequiredFlag(Boolean.valueOf(TypeScriptAngularJsClientOptionsProvider.SORT_PARAMS_VALUE)); - verify(clientCodegen).setModelPropertyNaming(TypeScriptAngularJsClientOptionsProvider.MODEL_PROPERTY_NAMING_VALUE); - verify(clientCodegen).setParamNaming(TypeScriptAngularJsClientOptionsProvider.PARAM_NAMING_VALUE); - verify(clientCodegen).setSupportsES6(Boolean.valueOf(TypeScriptAngularJsClientOptionsProvider.SUPPORTS_ES6_VALUE)); - verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(TypeScriptAngularJsClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE)); - } -} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangularjs/TypeScriptAngularJsModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangularjs/TypeScriptAngularJsModelTest.java deleted file mode 100644 index 4e7cce016a15..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangularjs/TypeScriptAngularJsModelTest.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * 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.typescript.typescriptangularjs; - -import com.google.common.collect.Sets; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.media.*; -import io.swagger.v3.parser.util.SchemaTypeUtil; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.DefaultCodegen; -import org.openapitools.codegen.TestUtils; -import org.openapitools.codegen.languages.TypeScriptAngularJsClientCodegen; -import org.openapitools.codegen.languages.TypeScriptFetchClientCodegen; -import org.testng.Assert; -import org.testng.annotations.Test; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.util.Date; -import java.util.Locale; - -@SuppressWarnings("static-method") -public class TypeScriptAngularJsModelTest { - - @Test(description = "convert a simple TypeScript Angular model") - public void simpleModelTest() { - final Schema schema = new Schema() - .description("a sample model") - .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) - .addProperties("name", new StringSchema()) - .addProperties("createdAt", new DateTimeSchema()) - .addProperties("birthDate", new DateSchema()) - .addProperties("active", new BooleanSchema()) - .addRequiredItem("id") - .addRequiredItem("name"); - final DefaultCodegen codegen = new TypeScriptAngularJsClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", schema); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 5); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "id"); - Assert.assertEquals(property1.dataType, "number"); - Assert.assertEquals(property1.name, "id"); - Assert.assertEquals(property1.defaultValue, "undefined"); - Assert.assertEquals(property1.baseType, "number"); - Assert.assertTrue(property1.required); - Assert.assertFalse(property1.isContainer); - - final CodegenProperty property2 = cm.vars.get(1); - Assert.assertEquals(property2.baseName, "name"); - Assert.assertEquals(property2.dataType, "string"); - Assert.assertEquals(property2.name, "name"); - Assert.assertEquals(property2.defaultValue, "undefined"); - Assert.assertEquals(property2.baseType, "string"); - Assert.assertTrue(property2.required); - Assert.assertFalse(property2.isContainer); - - final CodegenProperty property3 = cm.vars.get(2); - Assert.assertEquals(property3.baseName, "createdAt"); - Assert.assertEquals(property3.complexType, null); - Assert.assertEquals(property3.dataType, "string"); - Assert.assertEquals(property3.name, "createdAt"); - Assert.assertEquals(property3.defaultValue, "undefined"); - Assert.assertFalse(property3.required); - Assert.assertFalse(property3.isContainer); - - final CodegenProperty property4 = cm.vars.get(3); - Assert.assertEquals(property4.baseName, "birthDate"); - Assert.assertEquals(property4.complexType, null); - Assert.assertEquals(property4.dataType, "string"); - Assert.assertEquals(property4.name, "birthDate"); - Assert.assertEquals(property4.defaultValue, "undefined"); - Assert.assertFalse(property4.required); - Assert.assertFalse(property4.isContainer); - - final CodegenProperty property5 = cm.vars.get(4); - Assert.assertEquals(property5.baseName, "active"); - Assert.assertEquals(property5.complexType, null); - Assert.assertEquals(property5.dataType, "boolean"); - Assert.assertEquals(property5.name, "active"); - Assert.assertEquals(property5.defaultValue, "undefined"); - Assert.assertFalse(property5.required); - Assert.assertFalse(property5.isContainer); - } - - @Test(description = "convert and check default values for a simple TypeScript Angular model") - public void simpleModelDefaultValuesTest() throws ParseException { - IntegerSchema integerSchema = new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT); - integerSchema.setDefault(1234); - - StringSchema stringSchema = new StringSchema(); - stringSchema.setDefault("Jack"); - - OffsetDateTime testOffsetDateTime = OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 12, 0), ZoneOffset.UTC); - DateTimeSchema dateTimeSchema = new DateTimeSchema(); - dateTimeSchema.setDefault(testOffsetDateTime); - - Date testDate = Date.from(testOffsetDateTime.toInstant()); - DateSchema dateSchema = new DateSchema(); - dateSchema.setDefault(testDate); - - BooleanSchema booleanSchema = new BooleanSchema(); - booleanSchema.setDefault(true); - - final Schema model = new Schema() - .description("a sample model") - .addProperties("id", integerSchema) - .addProperties("name", stringSchema) - .addProperties("createdAt", dateTimeSchema) - .addProperties("birthDate", dateSchema) - .addProperties("active", booleanSchema) - .addRequiredItem("id") - .addRequiredItem("name"); - - final DefaultCodegen codegen = new TypeScriptFetchClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", model); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 5); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "id"); - Assert.assertEquals(property1.defaultValue, "1234"); - - final CodegenProperty property2 = cm.vars.get(1); - Assert.assertEquals(property2.baseName, "name"); - Assert.assertEquals(property2.defaultValue, "'Jack'"); - - final CodegenProperty property3 = cm.vars.get(2); - Assert.assertEquals(property3.baseName, "createdAt"); - Assert.assertEquals(OffsetDateTime.parse(property3.defaultValue), testOffsetDateTime); - - final CodegenProperty property4 = cm.vars.get(3); - Assert.assertEquals(property4.baseName, "birthDate"); - Assert.assertEquals(new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH).parse(property4.defaultValue), testDate); - - final CodegenProperty property5 = cm.vars.get(4); - Assert.assertEquals(property5.baseName, "active"); - Assert.assertEquals(property5.defaultValue, "true"); - } - - @Test(description = "convert a model with list property") - public void listPropertyTest() { - final Schema schema = new Schema() - .description("a sample model") - .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) - .addProperties("urls", new ArraySchema().items(new StringSchema())) - .addRequiredItem("id"); - final DefaultCodegen codegen = new TypeScriptAngularJsClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", schema); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 2); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "id"); - Assert.assertEquals(property1.dataType, "number"); - Assert.assertEquals(property1.name, "id"); - Assert.assertEquals(property1.defaultValue, "undefined"); - Assert.assertEquals(property1.baseType, "number"); - Assert.assertTrue(property1.required); - - final CodegenProperty property2 = cm.vars.get(1); - Assert.assertEquals(property2.baseName, "urls"); - Assert.assertEquals(property2.dataType, "Array"); - Assert.assertEquals(property2.name, "urls"); - Assert.assertEquals(property2.baseType, "Array"); - Assert.assertFalse(property2.required); - } - - @Test(description = "convert a model with complex property") - public void complexPropertyTest() { - final Schema schema = new Schema() - .description("a sample model") - .addProperties("children", new Schema().$ref("#/definitions/Children")); - final DefaultCodegen codegen = new TypeScriptAngularJsClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", schema); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 1); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "children"); - Assert.assertEquals(property1.dataType, "models.Children"); - Assert.assertEquals(property1.name, "children"); - Assert.assertEquals(property1.defaultValue, "undefined"); - Assert.assertEquals(property1.baseType, "models.Children"); - Assert.assertFalse(property1.required); - } - - @Test(description = "convert a model with complex list property") - public void complexListPropertyTest() { - final Schema schema = new Schema() - .description("a sample model") - .addProperties("children", new ArraySchema() - .items(new Schema().$ref("#/definitions/Children"))); - final DefaultCodegen codegen = new TypeScriptAngularJsClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", schema); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 1); - - final CodegenProperty property1 = cm.vars.get(0); - Assert.assertEquals(property1.baseName, "children"); - Assert.assertEquals(property1.complexType, "models.Children"); - Assert.assertEquals(property1.dataType, "Array"); - Assert.assertEquals(property1.name, "children"); - Assert.assertEquals(property1.baseType, "Array"); - Assert.assertFalse(property1.required); - } - - @Test(description = "convert an array model") - public void arrayModelTest() { - final Schema schema = new ArraySchema() - .items(new Schema().$ref("#/definitions/Children")) - .description("an array model"); - final DefaultCodegen codegen = new TypeScriptAngularJsClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", schema); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "an array model"); - Assert.assertEquals(cm.vars.size(), 0); - } - - @Test(description = "convert a map model") - public void mapModelTest() { - final Schema schema = new Schema() - .description("a map model") - .additionalProperties(new Schema().$ref("#/definitions/Children")); - final DefaultCodegen codegen = new TypeScriptAngularJsClientCodegen(); - OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); - codegen.setOpenAPI(openAPI); - final CodegenModel cm = codegen.fromModel("sample", schema); - - Assert.assertEquals(cm.name, "sample"); - Assert.assertEquals(cm.classname, "Sample"); - Assert.assertEquals(cm.description, "a map model"); - Assert.assertEquals(cm.vars.size(), 0); - Assert.assertEquals(cm.imports.size(), 1); - Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("models.Children")).size(), 1); - } -} From bd61978b5f0a90e42d621807d0197eb6c3e7f1c1 Mon Sep 17 00:00:00 2001 From: agilob Date: Sun, 21 Nov 2021 01:04:13 +0000 Subject: [PATCH 026/175] Remove deprecated PhpSilexServerCodegen (#10852) --- docs/generators.md | 1 - docs/generators/php-silex-deprecated.md | 224 -------------- .../languages/PhpSilexServerCodegen.java | 284 ------------------ .../org.openapitools.codegen.CodegenConfig | 1 - .../silex/PhpSilexServerOptionsTest.java | 45 --- 5 files changed, 555 deletions(-) delete mode 100644 docs/generators/php-silex-deprecated.md delete mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java delete mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/silex/PhpSilexServerOptionsTest.java diff --git a/docs/generators.md b/docs/generators.md index 03d14657aeb1..5306d1439682 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -113,7 +113,6 @@ The following generators are available: * [php-laravel](generators/php-laravel.md) * [php-lumen](generators/php-lumen.md) * [php-mezzio-ph](generators/php-mezzio-ph.md) -* [php-silex-deprecated (deprecated)](generators/php-silex-deprecated.md) * [php-slim-deprecated (deprecated)](generators/php-slim-deprecated.md) * [php-slim4](generators/php-slim4.md) * [php-symfony](generators/php-symfony.md) diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md deleted file mode 100644 index 9df926cce14e..000000000000 --- a/docs/generators/php-silex-deprecated.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -title: Config Options for php-silex-deprecated -sidebar_label: php-silex-deprecated ---- - -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. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|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| -|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| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | -|array|array| -|map|map| - - -## LANGUAGE PRIMITIVES - -
    -
  • DateTime
  • -
  • boolean
  • -
  • double
  • -
  • float
  • -
  • int
  • -
  • integer
  • -
  • mixed
  • -
  • number
  • -
  • object
  • -
  • string
  • -
- -## RESERVED WORDS - -
    -
  • __halt_compiler
  • -
  • abstract
  • -
  • and
  • -
  • array
  • -
  • as
  • -
  • break
  • -
  • callable
  • -
  • case
  • -
  • catch
  • -
  • class
  • -
  • clone
  • -
  • const
  • -
  • continue
  • -
  • declare
  • -
  • default
  • -
  • die
  • -
  • do
  • -
  • echo
  • -
  • else
  • -
  • elseif
  • -
  • empty
  • -
  • enddeclare
  • -
  • endfor
  • -
  • endforeach
  • -
  • endif
  • -
  • endswitch
  • -
  • endwhile
  • -
  • eval
  • -
  • exit
  • -
  • extends
  • -
  • final
  • -
  • for
  • -
  • foreach
  • -
  • function
  • -
  • global
  • -
  • goto
  • -
  • if
  • -
  • implements
  • -
  • include
  • -
  • include_once
  • -
  • instanceof
  • -
  • insteadof
  • -
  • interface
  • -
  • isset
  • -
  • list
  • -
  • namespace
  • -
  • new
  • -
  • or
  • -
  • print
  • -
  • private
  • -
  • protected
  • -
  • public
  • -
  • require
  • -
  • require_once
  • -
  • return
  • -
  • static
  • -
  • switch
  • -
  • throw
  • -
  • trait
  • -
  • try
  • -
  • unset
  • -
  • use
  • -
  • var
  • -
  • while
  • -
  • xor
  • -
- -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✗|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✓|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✗|OAS2,OAS3 -|ApiKey|✗|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✗|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✓|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java deleted file mode 100644 index 3c33950a0341..000000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 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.languages; - -import io.swagger.v3.oas.models.media.ArraySchema; -import io.swagger.v3.oas.models.media.Schema; -import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.*; -import org.openapitools.codegen.meta.features.*; -import org.openapitools.codegen.utils.ModelUtils; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; - -import java.io.File; -import java.util.*; - -import static org.openapitools.codegen.utils.StringUtils.camelize; -import static org.openapitools.codegen.utils.StringUtils.underscore; - -public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConfig { - protected String invokerPackage; - protected String groupId = "org.openapitools"; - protected String artifactId = "openapi-server"; - protected String artifactVersion = "1.0.0"; - - public PhpSilexServerCodegen() { - super(); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.DEPRECATED) - .build(); - - modifyFeatureSet(features -> features - .includeDocumentationFeatures(DocumentationFeature.Readme) - .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) - .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) - .excludeGlobalFeatures( - GlobalFeature.XMLStructureDefinitions, - GlobalFeature.Callbacks, - GlobalFeature.LinkObjects, - GlobalFeature.ParameterStyling - ) - .excludeSchemaSupportFeatures( - SchemaSupportFeature.Polymorphism - ) - ); - - invokerPackage = camelize("OpenAPIServer"); - String packageName = "OpenAPIServer"; - modelPackage = "lib" + File.separator + "models"; - apiPackage = "lib"; - outputFolder = "generated-code" + File.separator + "php-silex"; - - // no model, api files - modelTemplateFiles.clear(); - apiTemplateFiles.clear(); - - embeddedTemplateDir = templateDir = "php-silex"; - - setReservedWordsLowerCase( - Arrays.asList( - "__halt_compiler", "abstract", "and", "array", "as", "break", "callable", "case", "catch", - "class", "clone", "const", "continue", "declare", "default", "die", "do", "echo", "else", - "elseif", "empty", "enddeclare", "endfor", "endforeach", "endif", "endswitch", "endwhile", - "eval", "exit", "extends", "final", "for", "foreach", "function", "global", "goto", "if", - "implements", "include", "include_once", "instanceof", "insteadof", "interface", "isset", - "list", "namespace", "new", "or", "print", "private", "protected", "public", "require", - "require_once", "return", "static", "switch", "throw", "trait", "try", "unset", "use", - "var", "while", "xor") - ); - - additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); - additionalProperties.put(CodegenConstants.GROUP_ID, groupId); - additionalProperties.put(CodegenConstants.ARTIFACT_ID, artifactId); - additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion); - - // ref: http://php.net/manual/en/language.types.intro.php - languageSpecificPrimitives = new HashSet( - Arrays.asList( - "boolean", - "int", - "integer", - "double", - "float", - "string", - "object", - "DateTime", - "mixed", - "number") - ); - - instantiationTypes.put("array", "array"); - instantiationTypes.put("map", "map"); - - // ref: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types - typeMapping = new HashMap(); - typeMapping.put("integer", "int"); - typeMapping.put("long", "int"); - typeMapping.put("float", "float"); - typeMapping.put("double", "double"); - typeMapping.put("string", "string"); - typeMapping.put("byte", "int"); - typeMapping.put("boolean", "boolean"); - typeMapping.put("date", "DateTime"); - typeMapping.put("datetime", "DateTime"); - typeMapping.put("file", "string"); - typeMapping.put("map", "map"); - typeMapping.put("array", "array"); - typeMapping.put("list", "array"); - typeMapping.put("object", "object"); - //TODO binary should be mapped to byte array - // mapped to String as a workaround - typeMapping.put("binary", "string"); - - supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - supportingFiles.add(new SupportingFile("composer.json", "", "composer.json")); - supportingFiles.add(new SupportingFile("index.mustache", "", "index.php")); - supportingFiles.add(new SupportingFile(".htaccess", "", ".htaccess")); - - // remove this line when this class extends AbstractPhpCodegen - supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore")); - } - - @Override - public CodegenType getTag() { - return CodegenType.SERVER; - } - - @Override - public String getName() { - return "php-silex-deprecated"; - } - - @Override - public String getHelp() { - return "Generates a PHP Silex server library. IMPORTANT NOTE: this generator is no longer actively maintained."; - } - - @Override - public String escapeReservedWord(String name) { - if (this.reservedWordsMappings().containsKey(name)) { - return this.reservedWordsMappings().get(name); - } - return "_" + name; - } - - @Override - public String apiFileFolder() { - return (outputFolder + File.separator + apiPackage()).replace('/', File.separatorChar); - } - - @Override - public String modelFileFolder() { - return (outputFolder + File.separator + modelPackage()).replace('/', File.separatorChar); - } - - @Override - public String getTypeDeclaration(Schema p) { - if (ModelUtils.isArraySchema(p)) { - ArraySchema ap = (ArraySchema) p; - Schema inner = ap.getItems(); - return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; - } else if (ModelUtils.isMapSchema(p)) { - Schema inner = getAdditionalProperties(p); - return getSchemaType(p) + "[string," + getTypeDeclaration(inner) + "]"; - } - return super.getTypeDeclaration(p); - } - - @Override - public String getSchemaType(Schema p) { - String openAPIType = super.getSchemaType(p); - String type = null; - if (typeMapping.containsKey(openAPIType)) { - type = typeMapping.get(openAPIType); - if (languageSpecificPrimitives.contains(type)) { - return type; - } else if (instantiationTypes.containsKey(type)) { - return type; - } - } else { - type = openAPIType; - } - if (type == null) { - return null; - } - return toModelName(type); - } - - @Override - public String toDefaultValue(Schema p) { - return "null"; - } - - - @Override - public String toVarName(String name) { - // return the name in underscore style - // PhoneNumber => phone_number - name = underscore(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. - - // parameter name starting with number won't compile - // need to escape it by appending _ at the beginning - if (name.matches("^\\d.*")) { - name = "_" + name; - } - - return name; - } - - @Override - public String toParamName(String name) { - // should be the same as variable name - return toVarName(name); - } - - @Override - public String toModelName(String name) { - // model name cannot use reserved keyword - if (isReservedWord(name)) { - escapeReservedWord(name); // e.g. return => _return - } - - // camelize the model name - // phone_number => PhoneNumber - return camelize(name); - } - - @Override - public String toModelFilename(String name) { - // should be the same as the model name - return toModelName(name); - } - - @Override - public String escapeQuotationMark(String input) { - // remove ' to avoid code injection - return input.replace("'", ""); - } - - @Override - public String escapeUnsafeCharacters(String input) { - return input.replace("*/", "*_/").replace("/*", "/_*"); - } - - @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); - for (CodegenOperation op : operationList) { - String path = op.path; - String[] items = path.split("/", -1); - String opsPath = ""; - int pathParamIndex = 0; - - for (int i = 0; i < items.length; ++i) { - if (items[i].matches("^\\{(.*)\\}$")) { // wrap in {} - // camelize path variable - items[i] = "{" + camelize(items[i].substring(1, items[i].length() - 1), true) + "}"; - } - } - - op.path = StringUtils.join(items, "/"); - } - - return objs; - } - -} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 85321c100c2e..6fbf54fbe43b 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -89,7 +89,6 @@ org.openapitools.codegen.languages.PhpLaravelServerCodegen org.openapitools.codegen.languages.PhpLumenServerCodegen org.openapitools.codegen.languages.PhpSlimServerCodegen org.openapitools.codegen.languages.PhpSlim4ServerCodegen -org.openapitools.codegen.languages.PhpSilexServerCodegen org.openapitools.codegen.languages.PhpSymfonyServerCodegen org.openapitools.codegen.languages.PhpMezzioPathHandlerServerCodegen org.openapitools.codegen.languages.PhpDataTransferClientCodegen diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/silex/PhpSilexServerOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/silex/PhpSilexServerOptionsTest.java deleted file mode 100644 index d7dcc1a28014..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/silex/PhpSilexServerOptionsTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.silex; - -import org.openapitools.codegen.AbstractOptionsTest; -import org.openapitools.codegen.CodegenConfig; -import org.openapitools.codegen.languages.PhpSilexServerCodegen; -import org.openapitools.codegen.options.PhpSilexServerOptionsProvider; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - -public class PhpSilexServerOptionsTest extends AbstractOptionsTest { - private PhpSilexServerCodegen clientCodegen = mock(PhpSilexServerCodegen.class, mockSettings); - - public PhpSilexServerOptionsTest() { - super(new PhpSilexServerOptionsProvider()); - } - - @Override - protected CodegenConfig getCodegenConfig() { - return clientCodegen; - } - - @SuppressWarnings("unused") - @Override - protected void verifyOptions() { - verify(clientCodegen).setSortParamsByRequiredFlag(Boolean.valueOf(PhpSilexServerOptionsProvider.SORT_PARAMS_VALUE)); - } -} From 06f97b465d06eb4671fb51bdd96866326e932404 Mon Sep 17 00:00:00 2001 From: WILLIAM CHENG Date: Sun, 21 Nov 2021 10:00:44 +0800 Subject: [PATCH 027/175] update samples, fix merge conflicts --- .../languages/PhpSilexServerCodegen.java | 284 ------------------ .../.openapi-generator/VERSION | 2 +- 2 files changed, 1 insertion(+), 285 deletions(-) delete mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java deleted file mode 100644 index a6efee11fb18..000000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 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.languages; - -import io.swagger.v3.oas.models.media.ArraySchema; -import io.swagger.v3.oas.models.media.Schema; -import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.*; -import org.openapitools.codegen.meta.features.*; -import org.openapitools.codegen.utils.ModelUtils; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; - -import java.io.File; -import java.util.*; - -import static org.openapitools.codegen.utils.StringUtils.camelize; -import static org.openapitools.codegen.utils.StringUtils.underscore; - -public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConfig { - protected String invokerPackage; - protected String groupId = "org.openapitools"; - protected String artifactId = "openapi-server"; - protected String artifactVersion = "1.0.0"; - - public PhpSilexServerCodegen() { - super(); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.DEPRECATED) - .build(); - - modifyFeatureSet(features -> features - .includeDocumentationFeatures(DocumentationFeature.Readme) - .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) - .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) - .excludeGlobalFeatures( - GlobalFeature.XMLStructureDefinitions, - GlobalFeature.Callbacks, - GlobalFeature.LinkObjects, - GlobalFeature.ParameterStyling - ) - .excludeSchemaSupportFeatures( - SchemaSupportFeature.Polymorphism - ) - ); - - invokerPackage = camelize("OpenAPIServer"); - String packageName = "OpenAPIServer"; - modelPackage = "lib" + File.separator + "models"; - apiPackage = "lib"; - outputFolder = "generated-code" + File.separator + "php-silex"; - - // no model, api files - modelTemplateFiles.clear(); - apiTemplateFiles.clear(); - - embeddedTemplateDir = templateDir = "php-silex"; - - setReservedWordsLowerCase( - Arrays.asList( - "__halt_compiler", "abstract", "and", "array", "as", "break", "callable", "case", "catch", - "class", "clone", "const", "continue", "declare", "default", "die", "do", "echo", "else", - "elseif", "empty", "enddeclare", "endfor", "endforeach", "endif", "endswitch", "endwhile", - "eval", "exit", "extends", "final", "for", "foreach", "function", "global", "goto", "if", - "implements", "include", "include_once", "instanceof", "insteadof", "interface", "isset", - "list", "namespace", "new", "or", "print", "private", "protected", "public", "require", - "require_once", "return", "static", "switch", "throw", "trait", "try", "unset", "use", - "var", "while", "xor") - ); - - additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); - additionalProperties.put(CodegenConstants.GROUP_ID, groupId); - additionalProperties.put(CodegenConstants.ARTIFACT_ID, artifactId); - additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion); - - // ref: http://php.net/manual/en/language.types.intro.php - languageSpecificPrimitives = new HashSet<>( - Arrays.asList( - "boolean", - "int", - "integer", - "double", - "float", - "string", - "object", - "DateTime", - "mixed", - "number") - ); - - instantiationTypes.put("array", "array"); - instantiationTypes.put("map", "map"); - - // ref: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types - typeMapping = new HashMap<>(); - typeMapping.put("integer", "int"); - typeMapping.put("long", "int"); - typeMapping.put("float", "float"); - typeMapping.put("double", "double"); - typeMapping.put("string", "string"); - typeMapping.put("byte", "int"); - typeMapping.put("boolean", "boolean"); - typeMapping.put("date", "DateTime"); - typeMapping.put("datetime", "DateTime"); - typeMapping.put("file", "string"); - typeMapping.put("map", "map"); - typeMapping.put("array", "array"); - typeMapping.put("list", "array"); - typeMapping.put("object", "object"); - //TODO binary should be mapped to byte array - // mapped to String as a workaround - typeMapping.put("binary", "string"); - - supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - supportingFiles.add(new SupportingFile("composer.json", "", "composer.json")); - supportingFiles.add(new SupportingFile("index.mustache", "", "index.php")); - supportingFiles.add(new SupportingFile(".htaccess", "", ".htaccess")); - - // remove this line when this class extends AbstractPhpCodegen - supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore")); - } - - @Override - public CodegenType getTag() { - return CodegenType.SERVER; - } - - @Override - public String getName() { - return "php-silex-deprecated"; - } - - @Override - public String getHelp() { - return "Generates a PHP Silex server library. IMPORTANT NOTE: this generator is no longer actively maintained."; - } - - @Override - public String escapeReservedWord(String name) { - if (this.reservedWordsMappings().containsKey(name)) { - return this.reservedWordsMappings().get(name); - } - return "_" + name; - } - - @Override - public String apiFileFolder() { - return (outputFolder + File.separator + apiPackage()).replace('/', File.separatorChar); - } - - @Override - public String modelFileFolder() { - return (outputFolder + File.separator + modelPackage()).replace('/', File.separatorChar); - } - - @Override - public String getTypeDeclaration(Schema p) { - if (ModelUtils.isArraySchema(p)) { - ArraySchema ap = (ArraySchema) p; - Schema inner = ap.getItems(); - return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; - } else if (ModelUtils.isMapSchema(p)) { - Schema inner = getAdditionalProperties(p); - return getSchemaType(p) + "[string," + getTypeDeclaration(inner) + "]"; - } - return super.getTypeDeclaration(p); - } - - @Override - public String getSchemaType(Schema p) { - String openAPIType = super.getSchemaType(p); - String type = null; - if (typeMapping.containsKey(openAPIType)) { - type = typeMapping.get(openAPIType); - if (languageSpecificPrimitives.contains(type)) { - return type; - } else if (instantiationTypes.containsKey(type)) { - return type; - } - } else { - type = openAPIType; - } - if (type == null) { - return null; - } - return toModelName(type); - } - - @Override - public String toDefaultValue(Schema p) { - return "null"; - } - - - @Override - public String toVarName(String name) { - // return the name in underscore style - // PhoneNumber => phone_number - name = underscore(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. - - // parameter name starting with number won't compile - // need to escape it by appending _ at the beginning - if (name.matches("^\\d.*")) { - name = "_" + name; - } - - return name; - } - - @Override - public String toParamName(String name) { - // should be the same as variable name - return toVarName(name); - } - - @Override - public String toModelName(String name) { - // model name cannot use reserved keyword - if (isReservedWord(name)) { - escapeReservedWord(name); // e.g. return => _return - } - - // camelize the model name - // phone_number => PhoneNumber - return camelize(name); - } - - @Override - public String toModelFilename(String name) { - // should be the same as the model name - return toModelName(name); - } - - @Override - public String escapeQuotationMark(String input) { - // remove ' to avoid code injection - return input.replace("'", ""); - } - - @Override - public String escapeUnsafeCharacters(String input) { - return input.replace("*/", "*_/").replace("/*", "/_*"); - } - - @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map operations = (Map) objs.get("operations"); - List operationList = (List) operations.get("operation"); - for (CodegenOperation op : operationList) { - String path = op.path; - String[] items = path.split("/", -1); - String opsPath = ""; - int pathParamIndex = 0; - - for (int i = 0; i < items.length; ++i) { - if (items[i].matches("^\\{(.*)\\}$")) { // wrap in {} - // camelize path variable - items[i] = "{" + camelize(items[i].substring(1, items[i].length() - 1), true) + "}"; - } - } - - op.path = StringUtils.join(items, "/"); - } - - return objs; - } - -} diff --git a/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION b/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION +++ b/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From c619f7fd63c6f255c81d46c68596f04a827b9fe0 Mon Sep 17 00:00:00 2001 From: WILLIAM CHENG Date: Sun, 21 Nov 2021 11:29:00 +0800 Subject: [PATCH 028/175] fix java okhttp oauth test --- .../org/openapitools/client/auth/RetryingOAuthTest.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java index c8b869d504e7..2d0d0743caf5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java @@ -32,18 +32,13 @@ public class RetryingOAuthTest { @Before public void setUp() throws Exception { -<<<<<<< HEAD - oauth = new RetryingOAuth("_clientId", "_clientSecret", OAuthFlow.ACCESS_CODE, - "https://token.example.com", Collections.emptyMap()); -======= oauth = new RetryingOAuth( "_clientId", "_clientSecret", - OAuthFlow.accessCode, + OAuthFlow.ACCESS_CODE, "https://token.example.com", Collections.emptyMap()); ->>>>>>> 5.4.x oauth.setAccessToken("expired-access-token"); FieldUtils.writeField(oauth, "oAuthClient", mockOAuthClient(), true); } From 0eec9378454a75af3941bb9c56f9cb214c46ea30 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 7 Dec 2021 00:28:43 +0800 Subject: [PATCH 029/175] update samples --- .../okhttp-gson-nextgen/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/ServerConfiguration.java | 2 +- .../java/org/openapitools/client/auth/OAuthFlow.java | 11 +++++++---- .../swift5/frozenEnums/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ServerConfiguration.java index e08da9aac7dd..ca5c1187edf2 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/auth/OAuthFlow.java index ac3ecef00206..5faf36c39348 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -13,10 +13,13 @@ package org.openapitools.client.auth; +/** + * OAuth flows that are supported by this client + */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 27e6d08be433a97bcf656496068554956dd91919 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 15 Dec 2021 17:47:20 +0800 Subject: [PATCH 030/175] skip okhttp-gson-nextgen ci test --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 21d35b40ce75..148cabfb09c8 100644 --- a/pom.xml +++ b/pom.xml @@ -1299,7 +1299,7 @@ samples/openapi3/client/petstore/java/jersey2-java8 samples/client/others/java/okhttp-gson-streaming samples/client/petstore/java/okhttp-gson - samples/client/petstore/java/okhttp-gson-nextgen + samples/client/petstore/java/retrofit2 samples/client/petstore/java/retrofit2rx2 samples/client/petstore/java/retrofit2rx3 From ac55ac9d55a7acec41568cce315d7306fb40730a Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 28 Dec 2021 11:39:13 -0800 Subject: [PATCH 031/175] Samples and docs regenerated (#11194) --- .../csharp-netcore-complex-files/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-streaming/.openapi-generator/VERSION | 2 +- samples/client/petstore/R/.openapi-generator/VERSION | 2 +- samples/client/petstore/apex/.openapi-generator/VERSION | 2 +- samples/client/petstore/bash/.openapi-generator/VERSION | 2 +- samples/client/petstore/c/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-qt/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restsdk/client/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-restsdk/client/ApiClient.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiClient.h | 2 +- samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h | 2 +- samples/client/petstore/cpp-restsdk/client/ApiException.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiException.h | 2 +- samples/client/petstore/cpp-restsdk/client/HttpContent.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/HttpContent.h | 2 +- samples/client/petstore/cpp-restsdk/client/IHttpBody.h | 2 +- samples/client/petstore/cpp-restsdk/client/JsonBody.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/JsonBody.h | 2 +- samples/client/petstore/cpp-restsdk/client/ModelBase.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ModelBase.h | 2 +- .../client/petstore/cpp-restsdk/client/MultipartFormData.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/MultipartFormData.h | 2 +- samples/client/petstore/cpp-restsdk/client/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/Object.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/PetApi.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/StoreApi.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/UserApi.h | 2 +- .../client/petstore/cpp-restsdk/client/model/ApiResponse.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Category.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Category.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Order.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Order.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Pet.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Pet.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Tag.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Tag.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/User.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/User.h | 2 +- samples/client/petstore/cpp-tiny/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-ue4/.openapi-generator/VERSION | 2 +- samples/client/petstore/crystal/.openapi-generator/VERSION | 2 +- samples/client/petstore/crystal/.travis.yml | 2 +- samples/client/petstore/crystal/spec/spec_helper.cr | 2 +- samples/client/petstore/crystal/src/petstore.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/pet_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/store_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/user_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api_client.cr | 2 +- samples/client/petstore/crystal/src/petstore/api_error.cr | 2 +- samples/client/petstore/crystal/src/petstore/configuration.cr | 2 +- .../client/petstore/crystal/src/petstore/models/api_response.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/category.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/order.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/pet.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/tag.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/user.cr | 2 +- .../.openapi-generator/VERSION | 2 +- .../OpenAPIClient-httpclient/.openapi-generator/VERSION | 2 +- .../OpenAPIClient-net47/.openapi-generator/VERSION | 2 +- .../OpenAPIClient-net5.0/.openapi-generator/VERSION | 2 +- .../csharp-netcore/OpenAPIClient/.openapi-generator/VERSION | 2 +- .../csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION | 2 +- .../OpenAPIClientCoreAndNet47/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/.openapi-generator/VERSION | 2 +- samples/client/petstore/elixir/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/groovy/.openapi-generator/VERSION | 2 +- .../petstore/haskell-http-client/.openapi-generator/VERSION | 2 +- .../petstore/java-micronaut-client/.openapi-generator/VERSION | 2 +- .../petstore/java/apache-httpclient/.openapi-generator/VERSION | 2 +- .../petstore/java/feign-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/feign/.openapi-generator/VERSION | 2 +- .../petstore/java/google-api-client/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/jersey1/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8-localdatetime/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../java/microprofile-rest-client/.openapi-generator/VERSION | 2 +- .../petstore/java/native-async/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/native/.openapi-generator/VERSION | 2 +- .../okhttp-gson-dynamicOperations/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-nextgen/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-parcelableModel/.openapi-generator/VERSION | 2 +- .../client/petstore/java/okhttp-gson/.openapi-generator/VERSION | 2 +- .../java/rest-assured-jackson/.openapi-generator/VERSION | 2 +- .../petstore/java/rest-assured/.openapi-generator/VERSION | 2 +- .../client/petstore/java/resteasy/.openapi-generator/VERSION | 2 +- .../java/resttemplate-withXml/.openapi-generator/VERSION | 2 +- .../petstore/java/resttemplate/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2-play26/.openapi-generator/VERSION | 2 +- .../client/petstore/java/retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx3/.openapi-generator/VERSION | 2 +- .../petstore/java/vertx-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/vertx/.openapi-generator/VERSION | 2 +- .../java/webclient-nulable-arrays/.openapi-generator/VERSION | 2 +- .../client/petstore/java/webclient/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise-es6/.openapi-generator/VERSION | 2 +- samples/client/petstore/k6/.openapi-generator/VERSION | 2 +- samples/client/petstore/k6/script.js | 2 +- .../kotlin-enum-default-value/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-gson/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-jackson/.openapi-generator/VERSION | 2 +- .../kotlin-json-request-string/.openapi-generator/VERSION | 2 +- .../kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-volley/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-multiplatform/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-uppercase-enum/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin/.openapi-generator/VERSION | 2 +- samples/client/petstore/lua/.openapi-generator/VERSION | 2 +- samples/client/petstore/nim/.openapi-generator/VERSION | 2 +- .../client/petstore/objc/core-data/.openapi-generator/VERSION | 2 +- samples/client/petstore/objc/default/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/.openapi-generator/VERSION | 2 +- .../client/petstore/php-dt-modern/.openapi-generator/VERSION | 2 +- samples/client/petstore/php-dt/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/ApiException.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Configuration.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- .../php/OpenAPIClient-php/lib/Model/DeprecatedObject.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php | 2 +- .../lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/powershell/.openapi-generator/VERSION | 2 +- .../client/petstore/python-asyncio/.openapi-generator/VERSION | 2 +- .../client/petstore/python-legacy/.openapi-generator/VERSION | 2 +- .../client/petstore/python-tornado/.openapi-generator/VERSION | 2 +- samples/client/petstore/python/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-faraday/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-faraday/lib/petstore.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/default_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb | 2 +- .../ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/store_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/configuration.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/animal.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/api_response.rb | 2 +- .../lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/array_test.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/category.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/class_model.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/client.rb | 2 +- .../ruby-faraday/lib/petstore/models/deprecated_object.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_test.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/file.rb | 2 +- .../ruby-faraday/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/format_test.rb | 2 +- .../ruby-faraday/lib/petstore/models/has_only_read_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/health_check_result.rb | 2 +- .../ruby-faraday/lib/petstore/models/inline_response_default.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/list.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../ruby-faraday/lib/petstore/models/model200_response.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/model_return.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/name.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/nullable_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/number_only.rb | 2 +- .../lib/petstore/models/object_with_deprecated_fields.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/order.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/outer_enum.rb | 2 +- .../lib/petstore/models/outer_enum_default_value.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- .../lib/petstore/models/outer_object_with_enum_property.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb | 2 +- .../ruby-faraday/lib/petstore/models/read_only_first.rb | 2 +- .../ruby-faraday/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby-faraday/petstore.gemspec | 2 +- samples/client/petstore/ruby-faraday/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/spec_helper.rb | 2 +- samples/client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/another_fake_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/default_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/store_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_error.rb | 2 +- samples/client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/animal.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/api_response.rb | 2 +- .../ruby/lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/array_of_number_only.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/category.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/class_model.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/client.rb | 2 +- .../petstore/ruby/lib/petstore/models/deprecated_object.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/file.rb | 2 +- .../petstore/ruby/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/foo.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/format_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/health_check_result.rb | 2 +- .../ruby/lib/petstore/models/inline_response_default.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/list.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/model200_response.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/model_return.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/name.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/nullable_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/number_only.rb | 2 +- .../ruby/lib/petstore/models/object_with_deprecated_fields.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/order.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb | 2 +- .../ruby/lib/petstore/models/outer_enum_default_value.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- .../ruby/lib/petstore/models/outer_object_with_enum_property.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/read_only_first.rb | 2 +- .../petstore/ruby/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- samples/client/petstore/ruby/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby/spec/spec_helper.rb | 2 +- .../petstore/rust/hyper/petstore/.openapi-generator/VERSION | 2 +- .../rust/reqwest/petstore-async/.openapi-generator/VERSION | 2 +- .../petstore/rust/reqwest/petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-akka/.openapi-generator/VERSION | 2 +- .../scala-httpclient-deprecated/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-sttp/.openapi-generator/VERSION | 2 +- .../petstore/spring-cloud-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/client/petstore/spring-stubs/.openapi-generator/VERSION | 2 +- .../spring-stubs/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/swift5/alamofireLibrary/.openapi-generator/VERSION | 2 +- .../swift5/asyncAwaitLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/combineLibrary/.openapi-generator/VERSION | 2 +- .../client/petstore/swift5/default/.openapi-generator/VERSION | 2 +- .../petstore/swift5/deprecated/.openapi-generator/VERSION | 2 +- .../petstore/swift5/frozenEnums/.openapi-generator/VERSION | 2 +- .../petstore/swift5/nonPublicApi/.openapi-generator/VERSION | 2 +- .../petstore/swift5/objcCompatible/.openapi-generator/VERSION | 2 +- samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION | 2 +- .../swift5/promisekitLibrary/.openapi-generator/VERSION | 2 +- .../swift5/readonlyProperties/.openapi-generator/VERSION | 2 +- .../petstore/swift5/resultLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION | 2 +- .../swift5/urlsessionLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/vaporLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/x-swift-hashable/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/single-request-parameter/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/with-prefixed-module-name/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../typescript-aurelia/default/.openapi-generator/VERSION | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../typescript-axios/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/test-petstore/.openapi-generator/VERSION | 2 +- .../builds/with-complex-headers/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-node-imports/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../with-single-request-parameters/.openapi-generator/VERSION | 2 +- .../builds/default-v3.0/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/default/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/enum/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/multiple-parameters/.openapi-generator/VERSION | 2 +- .../prefix-parameter-interfaces/.openapi-generator/VERSION | 2 +- .../builds/sagas-and-records/.openapi-generator/VERSION | 2 +- .../builds/typescript-three-plus/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/without-runtime-checks/.openapi-generator/VERSION | 2 +- .../petstore/typescript-inversify/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-jquery/npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/npm/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../typescript-rxjs/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/with-progress-subscriber/.openapi-generator/VERSION | 2 +- .../config/petstore/protobuf-schema/.openapi-generator/VERSION | 2 +- samples/openapi3/client/elm/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/go-experimental/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/python/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/ruby-client/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api/usage_api.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api_client.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api_error.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/configuration.rb | 2 +- .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/api_client_spec.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/configuration_spec.rb | 2 +- .../extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb | 2 +- .../x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec | 2 +- .../features/dynamic-servers/python/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/dynamic_servers.gemspec | 2 +- .../client/features/dynamic-servers/ruby/lib/dynamic_servers.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_client.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/configuration.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/version.rb | 2 +- .../features/dynamic-servers/ruby/spec/api_client_spec.rb | 2 +- .../features/dynamic-servers/ruby/spec/configuration_spec.rb | 2 +- .../client/features/dynamic-servers/ruby/spec/spec_helper.rb | 2 +- .../ruby-client/.openapi-generator/VERSION | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore.rb | 2 +- .../ruby-client/lib/petstore/api/usage_api.rb | 2 +- .../ruby-client/lib/petstore/api_client.rb | 2 +- .../ruby-client/lib/petstore/api_error.rb | 2 +- .../ruby-client/lib/petstore/configuration.rb | 2 +- .../ruby-client/lib/petstore/models/array_alias.rb | 2 +- .../ruby-client/lib/petstore/models/map_alias.rb | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore/version.rb | 2 +- .../generate-alias-as-model/ruby-client/petstore.gemspec | 2 +- .../generate-alias-as-model/ruby-client/spec/api_client_spec.rb | 2 +- .../ruby-client/spec/configuration_spec.rb | 2 +- .../generate-alias-as-model/ruby-client/spec/spec_helper.rb | 2 +- .../petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../dart-dio/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- .../jersey2-java8-special-characters/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../client/petstore/python-legacy/.openapi-generator/VERSION | 2 +- .../openapi3/client/petstore/python/.openapi-generator/VERSION | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../typescript/builds/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript/builds/deno/.openapi-generator/VERSION | 2 +- .../typescript/builds/inversify/.openapi-generator/VERSION | 2 +- .../typescript/builds/jquery/.openapi-generator/VERSION | 2 +- .../typescript/builds/object_params/.openapi-generator/VERSION | 2 +- samples/schema/petstore/ktorm/.openapi-generator/VERSION | 2 +- samples/schema/petstore/mysql/.openapi-generator/VERSION | 2 +- samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.0/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.1/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-5.0/.openapi-generator/VERSION | 2 +- samples/server/petstore/aspnetcore/.openapi-generator/VERSION | 2 +- samples/server/petstore/cpp-pistache/.openapi-generator/VERSION | 2 +- .../cpp-qt-qhttpengine-server/.openapi-generator/VERSION | 2 +- .../server/petstore/erlang-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-api-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-chi-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-echo-server/.openapi-generator/VERSION | 2 +- .../petstore/go-gin-api-server/.openapi-generator/VERSION | 2 +- .../petstore/go-server-required/.openapi-generator/VERSION | 2 +- .../server/petstore/haskell-servant/.openapi-generator/VERSION | 2 +- .../server/petstore/haskell-yesod/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-msf4j/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-async/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-no-interface/.openapi-generator/VERSION | 2 +- .../java-play-framework-no-nullable/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/java-play-framework/.openapi-generator/VERSION | 2 +- .../server/petstore/java-undertow/.openapi-generator/VERSION | 2 +- .../server/petstore/java-vertx-web/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-non-spring-app/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/default-value/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/default/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap-java8/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-spec-interface/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey1/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey2/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server/ktor/README.md | 2 +- .../kotlin-springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/kotlin/org/openapitools/api/PetApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/UserApi.kt | 2 +- .../kotlin-springboot-modelMutable/.openapi-generator/VERSION | 2 +- .../kotlin-springboot-reactive/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-laravel/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-lumen/.openapi-generator/VERSION | 2 +- .../petstore/php-mezzio-ph-modern/.openapi-generator/VERSION | 2 +- .../server/petstore/php-mezzio-ph/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-slim4/.openapi-generator/VERSION | 2 +- .../php-symfony/SymfonyBundle-php/.openapi-generator/VERSION | 2 +- .../python-aiohttp-srclayout/.openapi-generator/VERSION | 2 +- .../server/petstore/python-aiohttp/.openapi-generator/VERSION | 2 +- .../petstore/python-blueplanet/.openapi-generator/VERSION | 2 +- .../server/petstore/python-fastapi/.openapi-generator/VERSION | 2 +- samples/server/petstore/python-flask/.openapi-generator/VERSION | 2 +- .../rust-server/output/multipart-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/no-example-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/openapi-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/ops-v3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../output/ping-bearer-auth/.openapi-generator/VERSION | 2 +- .../output/rust-server-test/.openapi-generator/VERSION | 2 +- .../spring-mvc-default-value/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/TestHeadersApi.java | 2 +- .../src/main/java/org/openapitools/api/TestQueryParamsApi.java | 2 +- .../petstore/spring-mvc-j8-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-j8-localdatetime/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-mvc-no-nullable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/server/petstore/spring-mvc/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-beanvalidation/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate-j8/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-reactive/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-useoptional/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-virtualan/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/virtualan/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/FakeApi.java | 2 +- .../org/openapitools/virtualan/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/UserApi.java | 2 +- samples/server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/UserApi.java | 2 +- 681 files changed, 681 insertions(+), 681 deletions(-) diff --git a/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION b/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION +++ b/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION b/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION +++ b/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/c/.openapi-generator/VERSION b/samples/client/petstore/c/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/c/.openapi-generator/VERSION +++ b/samples/client/petstore/c/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/cpp-qt/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp index 885c229bfe76..b5c500a0fa14 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h index c2db5dc08c49..7a13f219f4eb 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp index bd0cb8c0e9e2..67e66b708cdf 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h index d65ddb6b2ff9..046dfd9ea533 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp index 928bf8e0413b..8f981150270a 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h index bced883bee7d..5d1d82b9a8ed 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp index eac0d66ff3ae..be68ba1c7fad 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h index bfa0d19bbf18..d8bd333dad15 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h index a5adf55cf84d..7661536b930b 100644 --- a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp index b47bc2c5bd72..85dbe17686e7 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h index c50267c56ecd..99344661cb8c 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp index 75d1bb01cfb2..752b93f70596 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h index 831ffa9f4e8d..c300ecb5af79 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp index d8f3ee4340f5..075f7867be7b 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h index d260399229ad..a7e8a87f5ad5 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp index 968df9a4877f..2c2f65d4ed85 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h index 6bcec36c0285..ba2a3bdb8c75 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.h +++ b/samples/client/petstore/cpp-restsdk/client/Object.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp index 2c2236f7d273..5bf94b7ce257 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h index a6bf7fcbcc49..7881387800fe 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp index 7171938cadfc..e415ebeffc53 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h index 5d35de7fc3bf..10bf58494212 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp index bc13700dfd50..a291d4f0c4a2 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h index 0b2a6144332e..942da254f2a4 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp index 214e69dcbeb3..4157079156d6 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h index 86a703fae9c2..fcb15887683e 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp index 3250fef9ca9c..2fcec2bcaab4 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h index 7ecefb549299..777e5baf3b6a 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp index 4fc8ad8b5cf1..f8618ce03551 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h index a10e8c34f4de..893c367dc6cf 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp index 76867745ecb2..12c9dfa8b8ff 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h index b5f8b346b314..e6ade6784258 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp index eafb5845d527..14bce27318e4 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h index a6f8d6932545..2a7a3d005cc8 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp index 074b337eda84..38aebe66ad09 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h index 588445311bc8..3e44d4750ce5 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.h +++ b/samples/client/petstore/cpp-restsdk/client/model/User.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.3.1. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION b/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/crystal/.openapi-generator/VERSION b/samples/client/petstore/crystal/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/crystal/.openapi-generator/VERSION +++ b/samples/client/petstore/crystal/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/crystal/.travis.yml b/samples/client/petstore/crystal/.travis.yml index 6bc76c06134e..59de24cd459b 100644 --- a/samples/client/petstore/crystal/.travis.yml +++ b/samples/client/petstore/crystal/.travis.yml @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # language: crystal diff --git a/samples/client/petstore/crystal/spec/spec_helper.cr b/samples/client/petstore/crystal/spec/spec_helper.cr index 901c22954921..c6eb4e7a6030 100644 --- a/samples/client/petstore/crystal/spec/spec_helper.cr +++ b/samples/client/petstore/crystal/spec/spec_helper.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # # load modules diff --git a/samples/client/petstore/crystal/src/petstore.cr b/samples/client/petstore/crystal/src/petstore.cr index 95c15e099648..bfa9806eea98 100644 --- a/samples/client/petstore/crystal/src/petstore.cr +++ b/samples/client/petstore/crystal/src/petstore.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # # Dependencies diff --git a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr index e2c81b3a3bb3..a808853db0c5 100644 --- a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "uri" 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 f080f1a29a9a..633b3ca71fd0 100644 --- a/samples/client/petstore/crystal/src/petstore/api/store_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/store_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api/user_api.cr b/samples/client/petstore/crystal/src/petstore/api/user_api.cr index f936051d44d6..9809fc615e87 100644 --- a/samples/client/petstore/crystal/src/petstore/api/user_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/user_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api_client.cr b/samples/client/petstore/crystal/src/petstore/api_client.cr index e8377faa33b5..5a15ff6f6f3b 100644 --- a/samples/client/petstore/crystal/src/petstore/api_client.cr +++ b/samples/client/petstore/crystal/src/petstore/api_client.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/api_error.cr b/samples/client/petstore/crystal/src/petstore/api_error.cr index 482fcb96160c..c99be8e41f81 100644 --- a/samples/client/petstore/crystal/src/petstore/api_error.cr +++ b/samples/client/petstore/crystal/src/petstore/api_error.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # module Petstore diff --git a/samples/client/petstore/crystal/src/petstore/configuration.cr b/samples/client/petstore/crystal/src/petstore/configuration.cr index d87702fb8a2e..cc46c380f1fa 100644 --- a/samples/client/petstore/crystal/src/petstore/configuration.cr +++ b/samples/client/petstore/crystal/src/petstore/configuration.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "log" diff --git a/samples/client/petstore/crystal/src/petstore/models/api_response.cr b/samples/client/petstore/crystal/src/petstore/models/api_response.cr index 0c0aa1fd1c2c..be5511349070 100644 --- a/samples/client/petstore/crystal/src/petstore/models/api_response.cr +++ b/samples/client/petstore/crystal/src/petstore/models/api_response.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/category.cr b/samples/client/petstore/crystal/src/petstore/models/category.cr index 11dcb87bad73..55c64154d97c 100644 --- a/samples/client/petstore/crystal/src/petstore/models/category.cr +++ b/samples/client/petstore/crystal/src/petstore/models/category.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/order.cr b/samples/client/petstore/crystal/src/petstore/models/order.cr index 4d03556ff819..5d00ea6688ff 100644 --- a/samples/client/petstore/crystal/src/petstore/models/order.cr +++ b/samples/client/petstore/crystal/src/petstore/models/order.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/pet.cr b/samples/client/petstore/crystal/src/petstore/models/pet.cr index 7fb8cc4521fd..cdac65776d76 100644 --- a/samples/client/petstore/crystal/src/petstore/models/pet.cr +++ b/samples/client/petstore/crystal/src/petstore/models/pet.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/tag.cr b/samples/client/petstore/crystal/src/petstore/models/tag.cr index 9b95af047b12..bd2933291853 100644 --- a/samples/client/petstore/crystal/src/petstore/models/tag.cr +++ b/samples/client/petstore/crystal/src/petstore/models/tag.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/user.cr b/samples/client/petstore/crystal/src/petstore/models/user.cr index 7b647aaee100..47430b4452a9 100644 --- a/samples/client/petstore/crystal/src/petstore/models/user.cr +++ b/samples/client/petstore/crystal/src/petstore/models/user.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.3.1 +#OpenAPI Generator version: 5.4.0-SNAPSHOT # require "json" diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION b/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION b/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native-async/.openapi-generator/VERSION b/samples/client/petstore/java/native-async/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/native-async/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native/.openapi-generator/VERSION b/samples/client/petstore/java/native/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION b/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient/.openapi-generator/VERSION b/samples/client/petstore/java/webclient/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/k6/.openapi-generator/VERSION b/samples/client/petstore/k6/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/k6/.openapi-generator/VERSION +++ b/samples/client/petstore/k6/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/k6/script.js b/samples/client/petstore/k6/script.js index da7d50e96536..67f187fa9b14 100644 --- a/samples/client/petstore/k6/script.js +++ b/samples/client/petstore/k6/script.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator. * https://github.com/OpenAPITools/openapi-generator * - * OpenAPI generator version: 5.3.1 + * OpenAPI generator version: 5.4.0-SNAPSHOT */ diff --git a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/nim/.openapi-generator/VERSION b/samples/client/petstore/nim/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/nim/.openapi-generator/VERSION +++ b/samples/client/petstore/nim/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION b/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION +++ b/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php-dt/.openapi-generator/VERSION b/samples/client/petstore/php-dt/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/php-dt/.openapi-generator/VERSION +++ b/samples/client/petstore/php-dt/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index ef0239cf3c6f..b069070fd138 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index c46d14ceacba..def9fc158005 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 18321834a0c7..6feaff883342 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 2de6960003e1..cf271105c8bb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index affa3d61c5e2..399cec4b7744 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 8af7471eba24..7fb733e79536 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 941de5bc5584..d54e6cfaef49 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index 2011d70101b7..01f8b03d59a8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 8bd9fbe0f277..cd182e99fcb1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 08598d5d89d3..c44fe4784d23 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 34faf425f954..813a7583db51 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 281c00ce1def..3f8820c97896 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 0e98f27fd82a..b64c2a8772a6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 1699097ee941..af16be5b4a09 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 484d6d85db97..c932439bb400 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 b273d72aadf4..341366e541c0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 b27ff3277a2d..b1a0bd652c69 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 7ec56fb28fc4..75bc5fe9da99 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 86c145ba23e2..ef088f7fd99b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 77cf9d7491b3..f61f944a48d1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 a10395aeb5af..26293327c28c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 9003d71c55d2..fabf7edb56cc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 709840cf55ac..3d2727154a25 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 7019bc247b9b..9f2f6b76f101 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 340c9b62d46a..8dc34950ced9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 7087c06f4b9d..20bdbe900e06 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 95e659d81c77..61c123dfe406 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 a9b77449fb42..61663693efa3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 dab541a365c1..2fbc4e79331b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 182bba9d0f4b..7f6d4895ae5f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 0350c9b702c0..5f3dd7183232 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 ad12cf397cb5..65a211e15813 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 63d53152ed29..3aaae75260f3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 1584ce6e4c9f..71f11616f9ec 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index 6c2cddeab137..1b70b356259c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 aab4ab77d620..7359bf0da86c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 12d73135f2e3..546996e9c752 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 95c238707cd6..e6db4af8c7d2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index 9cc0c37d2394..26d5c4988fdc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 c6f2fa418f7b..13195d272566 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 136db271d338..4fb179c4de98 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 e99ec229be3e..d576c3d69fc8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 536d505ead35..1cc4acb16168 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 d178264a41a9..82f4e7c5c733 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 7fecb8280381..aaff2f3c3c6a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 8ce7262cbab3..36e32464b249 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 fe187afea216..73660c6e4634 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 507b3082ef56..1b5bdf7693c4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php index b6dd12bb8b9f..8bcebde39893 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php index f250dc8a6aa6..7575c418afb2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php index 955c64ce9aac..65234ea6e1db 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 dd50c70fc3d8..d370aadf39b9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 6b9279481c05..e22f00ae162c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 c5a4506ed4a8..cedd0e73d971 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 f024c4ed581f..d77bea39df27 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 1e28a4712f6b..d4284492ed9d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** 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 ca9f08769f17..262613842907 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index b91eafd90796..017633db769f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.3.1 + * OpenAPI Generator version: 5.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/client/petstore/python-legacy/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index 2995b750e7aa..d9d54916247a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb index df802567c94c..9535fd15de5a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb index 6d11d8773a60..84d666312ebc 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index 20d12b5c1fed..d7acddef01e2 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb index d00a18a1bf67..9eb20c278b93 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb index 08f18cd4f107..fd4d73299e13 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end 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 7c9e0fde7aac..9ebd82ddc89f 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb index 9687de3f3838..9f6cd55be746 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end 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 568dd909fdd4..f14d04a5b741 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =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 a200afcf0a05..ebf166152c76 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index b528aef09d7e..09143381bc03 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index 01f6b001eaf3..6137b4905f42 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index 1025187c82be..c1d80a23d3ff 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb index 1049822b7fcc..0b9e281f3313 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb index 57c603716d6b..0987e392a59c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb index 6668a18e9323..6e40954d60cf 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index 95cfe89d1692..eba93689e7bd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb index db3fd786857e..a04322c900d3 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb index 61114303c8ab..7107968d387d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb index 33cb299c2935..7a2a2ad5f777 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb index 447b1573bf86..cf5d1e36c33a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb index d5c9fef37be3..546e54a41fa7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb index 3314bca5ed1d..792ea88c609f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb index b72cd21b9352..7304906159f1 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb index 40987f214ef5..7db02e1cab4f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb index e5c68f798346..1fb42b5a03d6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb index 96dfcb24d71b..0ffa7fb0f80b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb index f722acfc1d8e..2afb2753c4f2 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb index aedf6b2c7ee1..bd1304ccf378 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb index f5ae1fed192e..2d0680fa72ce 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb index 542d991d5a44..1a2146a9c692 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb index ac18fe7beea2..3ab566051390 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index 4410e00a4795..6a658e35bf0a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb index 9f51cfada96e..54d25a6f5b7c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb index 07be52509fcb..cd53646b938c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb index 5fc7450bdf47..ccd578a95210 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb index a81fe7e5fde8..f2c5ec1619d8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb index 24e2b85e7204..ffa79e40fea2 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 73e2781755c0..543cc1ce5bd4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb index 91ccd158a13c..83b38460ee64 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb index d71c1f1bd93c..4ad971483d43 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb index 86b93dd8b216..c313f795169a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb index a41b1ddc084e..b8a5a96fad67 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb index ecd5e5b84192..dba180351b68 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb index 25e3b018e287..da6017f8e464 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb index e2cdc7dce110..e305739da95a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb index 0b9b36ea64e5..059f08912424 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb index b2b647d26d5d..d3ae94e1d5cf 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb index 55244dcbcfc1..003c7217c31b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb index 59419e67fd02..d4a4fed26d5e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb index 6807c7de36fd..d6079135cfdd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end 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 4b467b3de03f..6f4aec9f4a60 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index 410fa168bff7..e73b65c3c517 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb index 6f4a5fbd5d2d..4197a2ec616b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb index bad3c1d542cc..001d3b3a0b1d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb index 166611902eb1..cba58e1df627 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb index 30e9406bf76b..167953675a36 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb index 6126a809aaaf..fe6cd38e7ccf 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index b64d60e74118..eb8fa27ef089 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb index 99b44ba5730a..d47987c12a6b 100644 --- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb index 9a36ef93379f..f7eceea4ec30 100644 --- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb index 389cc910f06f..d90940c63b52 100644 --- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index 2995b750e7aa..d9d54916247a 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index df802567c94c..9535fd15de5a 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb index 6d11d8773a60..84d666312ebc 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 20d12b5c1fed..d7acddef01e2 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index d00a18a1bf67..9eb20c278b93 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 9d828b5f6d9e..0014c5b78a0d 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 50be6c0e1503..becfae6e1b7c 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index fd7106e35983..5a550ce47ee3 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 8ab8f8520ca6..7cf4a5d85ebb 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index a200afcf0a05..ebf166152c76 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 4ee7fe94f349..6c934e35bff3 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index 01f6b001eaf3..6137b4905f42 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 1025187c82be..c1d80a23d3ff 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 1049822b7fcc..0b9e281f3313 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 57c603716d6b..0987e392a59c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 6668a18e9323..6e40954d60cf 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index 95cfe89d1692..eba93689e7bd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index db3fd786857e..a04322c900d3 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 61114303c8ab..7107968d387d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index 33cb299c2935..7a2a2ad5f777 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 447b1573bf86..cf5d1e36c33a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index d5c9fef37be3..546e54a41fa7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index 3314bca5ed1d..792ea88c609f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb index b72cd21b9352..7304906159f1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 40987f214ef5..7db02e1cab4f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index e5c68f798346..1fb42b5a03d6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index 96dfcb24d71b..0ffa7fb0f80b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index f722acfc1d8e..2afb2753c4f2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index aedf6b2c7ee1..bd1304ccf378 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index f5ae1fed192e..2d0680fa72ce 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index 542d991d5a44..1a2146a9c692 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb index ac18fe7beea2..3ab566051390 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index 4410e00a4795..6a658e35bf0a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 9f51cfada96e..54d25a6f5b7c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb index 07be52509fcb..cd53646b938c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb index 5fc7450bdf47..ccd578a95210 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index a81fe7e5fde8..f2c5ec1619d8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 24e2b85e7204..ffa79e40fea2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 73e2781755c0..543cc1ce5bd4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index 91ccd158a13c..83b38460ee64 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index d71c1f1bd93c..4ad971483d43 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 86b93dd8b216..c313f795169a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb index a41b1ddc084e..b8a5a96fad67 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index ecd5e5b84192..dba180351b68 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb index 25e3b018e287..da6017f8e464 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index e2cdc7dce110..e305739da95a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index 0b9b36ea64e5..059f08912424 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index b2b647d26d5d..d3ae94e1d5cf 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb index 55244dcbcfc1..003c7217c31b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb index 59419e67fd02..d4a4fed26d5e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb index 6807c7de36fd..d6079135cfdd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end 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 4b467b3de03f..6f4aec9f4a60 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 410fa168bff7..e73b65c3c517 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index 6f4a5fbd5d2d..4197a2ec616b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index bad3c1d542cc..001d3b3a0b1d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index 166611902eb1..cba58e1df627 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 30e9406bf76b..167953675a36 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 6126a809aaaf..fe6cd38e7ccf 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 846cb3e9f93f..869a27cff67a 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index 04d9cc79cd48..48ef4c890a00 100644 --- a/samples/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index 9a36ef93379f..f7eceea4ec30 100644 --- a/samples/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index 389cc910f06f..d90940c63b52 100644 --- a/samples/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/client/petstore/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION b/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index b87ed4065e34..c28311ac4c5b 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 e6e78df20524..9ef191dabaa7 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index efcfdfa6bd97..94f5c434042a 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 785314b56f91..f71534f66c67 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 28845958d64a..1ee6df7a6e71 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 9105efb7a327..1c8c6c49716b 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 0719fcf872b5..1e8c3492df93 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 51d842c795c9..b9ffd3aa63db 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 44d9bbf440e9..05eacea86d52 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 551fccda4f31..4bc16c20f41d 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 31712e7b2c17..27b18c586c9f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 8b76ca575368..28042a4ca8f2 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION b/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION +++ b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/elm/.openapi-generator/VERSION b/samples/openapi3/client/elm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/elm/.openapi-generator/VERSION +++ b/samples/openapi3/client/elm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb index b0324ac0bf92..2b3dbe10fe7d 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb index fa2549ca25f1..3ca038ad1133 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb index acd170f6b6e9..abc3d3c2674f 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =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 1d9d6b85c51a..7b029fc31b73 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb index 2c2d6ed5e187..03a6b4505c3b 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb index 92236c87116d..0af9e59105aa 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb index d4b35523b206..24fc7dbeb5fe 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb index 39ae82521650..9ed65352f5b1 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb index 0a68b8922b00..cd0ab1c5441d 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end 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 29085fa88f1a..7405c95a614b 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 @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file 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 c5fb037a7f6e..386e9241fe10 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec +++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb index a70acea01140..6e40dcf063f8 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb index d4efa7f35130..daba92a4fa57 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb index fc7597e64fe9..60e56673b997 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =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 9d73ce3ffaad..17ff6f501b18 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb index f5b389637ff1..533f65efb56a 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb index 1e07b74b1fdf..fdae30f5c103 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb index 8bc1b5c8867b..11c36c4a2923 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb index 84a6ac09401c..7e20d8a8e045 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb index f16601469053..c408531cca12 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb index ac8f867d98d0..dfeb3986439e 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb index f5a2172c5758..6b74413ec0f8 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb index c09f3588044e..650088fca01c 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =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 110ca5de7bfc..7464a5ae6ca1 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb index 69251a11d237..9a122b5a22b4 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb index 2550c985ef78..ba89078942eb 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb index 45f5b3532a7d..26dd99dc1aa0 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb index c803b873a033..b2685e70c63c 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end 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 09ab2855fb4c..44f179dbf3c5 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 @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb index 45a8bfe213fa..e8c82e7bcc2b 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb index dcc206c5189e..97934083eeb1 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb index 64a0a2bc8b0e..5face65cf285 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.1 +OpenAPI Generator version: 5.4.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100755 --- a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/ktorm/.openapi-generator/VERSION b/samples/schema/petstore/ktorm/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/schema/petstore/ktorm/.openapi-generator/VERSION +++ b/samples/schema/petstore/ktorm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION b/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION +++ b/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION b/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/erlang-server/.openapi-generator/VERSION b/samples/server/petstore/erlang-server/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/erlang-server/.openapi-generator/VERSION +++ b/samples/server/petstore/erlang-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-chi-server/.openapi-generator/VERSION b/samples/server/petstore/go-chi-server/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/go-chi-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-chi-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-server-required/.openapi-generator/VERSION b/samples/server/petstore/go-server-required/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/go-server-required/.openapi-generator/VERSION +++ b/samples/server/petstore/go-server-required/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION b/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-undertow/.openapi-generator/VERSION b/samples/server/petstore/java-undertow/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/java-undertow/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index e47cdeb550ce..ad9008bc0dd1 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 5.3.1. +Generated by OpenAPI Generator 5.4.0-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index bedd82ad84e9..6ddbe5583e49 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 8ce2645e4d61..8bb9e405c31f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index bb608e5c66d8..d1be9a9efed7 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-laravel/.openapi-generator/VERSION b/samples/server/petstore/php-laravel/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/VERSION +++ b/samples/server/petstore/php-laravel/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim4/.openapi-generator/VERSION b/samples/server/petstore/php-slim4/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION +++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-fastapi/.openapi-generator/VERSION b/samples/server/petstore/python-fastapi/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/python-fastapi/.openapi-generator/VERSION +++ b/samples/server/petstore/python-fastapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/VERSION +++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java index 11418534677f..dfdd5db9095d 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java index 81423f590bde..264c8c28f6a6 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9013faa9cb7a..3e2889541ecd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 1d0035e021dd..032d332fcc18 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 557a43e1d436..47e953b4e539 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 161749430ff9..e977c20c3bf2 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index d9c5e3c16e8e..da11e798ae1c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index a2065f673a2f..8a2de1ce1d29 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57e6c1d10672..e11603b847c3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index ba64ef318812..c682b121c804 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8b45339424f3..3147f4bba9a8 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 693ce02c51e9..fe9e7f727be3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index d3a44c4e9c67..4ab75d5cfadb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index 598ae5ad88c3..6c4b9866f911 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57e6c1d10672..e11603b847c3 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index dfa1803e162d..c8793f61e444 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8b45339424f3..3147f4bba9a8 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 693ce02c51e9..fe9e7f727be3 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index d3a44c4e9c67..4ab75d5cfadb 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 743aa88a6d29..ca77015acbd8 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57e6c1d10672..e11603b847c3 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index b494e974feba..8d805638e512 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8b45339424f3..3147f4bba9a8 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index d15f313c4c9e..a428ea5ba5e9 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index d3a44c4e9c67..4ab75d5cfadb 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 743aa88a6d29..ca77015acbd8 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57e6c1d10672..e11603b847c3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index dfa1803e162d..c8793f61e444 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8b45339424f3..3147f4bba9a8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 693ce02c51e9..fe9e7f727be3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index d3a44c4e9c67..4ab75d5cfadb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index 743aa88a6d29..ca77015acbd8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 151aa6dc81dd..9c4ef1f25e51 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 0c19151a979c..e60e016dde5e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7f524d7af4ad..f552024c17cd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 21a559470bae..c733126515f9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 25b01491b507..ab7fee834062 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 4cbe795d92ad..6cfdcf7533e2 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57e6c1d10672..e11603b847c3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 dfa1803e162d..c8793f61e444 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8b45339424f3..3147f4bba9a8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 693ce02c51e9..fe9e7f727be3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d3a44c4e9c67..4ab75d5cfadb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 743aa88a6d29..ca77015acbd8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 978eee460b58..2f58a11f22ba 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 34e7ffdf2fe3..82c6778214bb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ba5b622efda7..88b4da345186 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 4948412cbf91..e57b00ff21e8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 58cf7cd17c74..6944e4129d3f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index b77c5fb5ce71..87353cde051e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 978eee460b58..2f58a11f22ba 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 34e7ffdf2fe3..82c6778214bb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ba5b622efda7..88b4da345186 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 4948412cbf91..e57b00ff21e8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 58cf7cd17c74..6944e4129d3f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index b77c5fb5ce71..87353cde051e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3aa0b58d6c21..d9f497162212 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d8109c85a034..19023bdba49d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a6c0dfd6f088..2b8723c03a04 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 040870852682..06f331738cff 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 4534ce024da3..05e8b7e0dd54 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 80c294ca88d1..694cd412a58b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 81cbd1690c9b..22b53a2cd15e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 722970792125..3165448cc121 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 2a9ad13847b7..3db3fcc1911c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 85222405a9b7..d06e0ed2db34 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3443339b8841..94ff763fd3b4 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 7eb94eb0b370..62e19d84e4ff 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 151aa6dc81dd..9c4ef1f25e51 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3cc9777cabcf..72b0473bb9c6 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7f524d7af4ad..f552024c17cd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 41b8fce914ab..3407bc13ba18 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 25b01491b507..ab7fee834062 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 4cbe795d92ad..6cfdcf7533e2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 978eee460b58..2f58a11f22ba 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 5e5c3fc8c98f..c090ac7835e3 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ba5b622efda7..88b4da345186 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index ce9171bef3d0..0a6cbef02326 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 58cf7cd17c74..6944e4129d3f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index b77c5fb5ce71..87353cde051e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 151aa6dc81dd..9c4ef1f25e51 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3cc9777cabcf..72b0473bb9c6 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7f524d7af4ad..f552024c17cd 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 41b8fce914ab..3407bc13ba18 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 25b01491b507..ab7fee834062 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 4cbe795d92ad..6cfdcf7533e2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57e6c1d10672..e11603b847c3 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 b494e974feba..8d805638e512 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8b45339424f3..3147f4bba9a8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index d15f313c4c9e..a428ea5ba5e9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d3a44c4e9c67..4ab75d5cfadb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 743aa88a6d29..ca77015acbd8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57e6c1d10672..e11603b847c3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 bcfd41bee165..0b1b0c6e1f51 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8b45339424f3..3147f4bba9a8 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 027746a2e5b1..e2103efefa7f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d3a44c4e9c67..4ab75d5cfadb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 743aa88a6d29..ca77015acbd8 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file 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 575fd8a2ae27..f5194da52690 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a85c742451af..fa2be27a1ebf 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 7b1b825d386b..65093bda6d5d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 28c60937d7a8..9fe808d5ec60 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d20e937d0326..4e0dbf7898ca 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 c6f02bef5d1c..d7d04f53f30e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57e6c1d10672..e11603b847c3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 dfa1803e162d..c8793f61e444 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8b45339424f3..3147f4bba9a8 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 693ce02c51e9..fe9e7f727be3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d3a44c4e9c67..4ab75d5cfadb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 743aa88a6d29..ca77015acbd8 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ From aa61220db2a59d7b1178a6619bcba56165da9262 Mon Sep 17 00:00:00 2001 From: Yuriy Belenko Date: Wed, 29 Dec 2021 05:57:19 +0300 Subject: [PATCH 032/175] [php-slim4] Add dependency injection container 2 (#11159) * Change packages order alphabetically * Add PHP-DI package to Composer template * Remove ContainerInterface from APIs User shouldn't access container directly, it's an anti-pattern. Ref: https://php-di.org/doc/best-practices.html#rules-for-using-a-container-and-dependency-injection * Change app templates to use PHP-DI Application looks more like a default Slim skeleton now. Ref: https://github.com/slimphp/Slim-Skeleton * Rename SlimRouter to RegisterRoutes Since it's callable class new name fits better. * Add short documentation * Refresh samples --- .../languages/PhpSlim4ServerCodegen.java | 17 +- .../main/resources/php-slim4-server/.htaccess | 4 + .../php-slim4-server/README.mustache | 40 +-- .../php-slim4-server/SlimRouter.mustache | 331 ------------------ .../abstract_authenticator.mustache | 13 +- .../resources/php-slim4-server/api.mustache | 45 +-- .../php-slim4-server/composer.mustache | 29 +- .../config_dev_default.mustache | 35 ++ .../php-slim4-server/config_example.mustache | 83 ----- .../config_prod_default.mustache | 35 ++ .../main/resources/php-slim4-server/gitignore | 4 +- .../resources/php-slim4-server/index.mustache | 93 ++--- .../register_dependencies.mustache | 58 +++ .../register_middlewares.mustache | 51 +++ .../php-slim4-server/register_routes.mustache | 137 ++++++++ samples/server/petstore/php-slim4/.gitignore | 4 +- .../php-slim4/.openapi-generator/FILES | 8 +- samples/server/petstore/php-slim4/README.md | 40 +-- .../server/petstore/php-slim4/composer.json | 11 +- .../php-slim4/config/dev/default.inc.php | 35 ++ .../php-slim4/config/dev/example.inc.php | 96 ----- .../php-slim4/config/prod/default.inc.php | 35 ++ .../php-slim4/config/prod/example.inc.php | 96 ----- .../php-slim4/lib/Api/AbstractPetApi.php | 88 +++-- .../php-slim4/lib/Api/AbstractStoreApi.php | 54 ++- .../php-slim4/lib/Api/AbstractUserApi.php | 85 +++-- .../lib/App/RegisterDependencies.php | 71 ++++ .../php-slim4/lib/App/RegisterMiddlewares.php | 64 ++++ .../RegisterRoutes.php} | 202 +---------- .../lib/Auth/AbstractAuthenticator.php | 13 +- .../petstore/php-slim4/public/.htaccess | 4 + .../petstore/php-slim4/public/index.php | 91 +++-- 32 files changed, 864 insertions(+), 1108 deletions(-) delete mode 100644 modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache create mode 100644 modules/openapi-generator/src/main/resources/php-slim4-server/config_dev_default.mustache delete mode 100644 modules/openapi-generator/src/main/resources/php-slim4-server/config_example.mustache create mode 100644 modules/openapi-generator/src/main/resources/php-slim4-server/config_prod_default.mustache create mode 100644 modules/openapi-generator/src/main/resources/php-slim4-server/register_dependencies.mustache create mode 100644 modules/openapi-generator/src/main/resources/php-slim4-server/register_middlewares.mustache create mode 100644 modules/openapi-generator/src/main/resources/php-slim4-server/register_routes.mustache create mode 100644 samples/server/petstore/php-slim4/config/dev/default.inc.php delete mode 100644 samples/server/petstore/php-slim4/config/dev/example.inc.php create mode 100644 samples/server/petstore/php-slim4/config/prod/default.inc.php delete mode 100644 samples/server/petstore/php-slim4/config/prod/example.inc.php create mode 100644 samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php create mode 100644 samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php rename samples/server/petstore/php-slim4/lib/{SlimRouter.php => App/RegisterRoutes.php} (75%) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java index 7e318dee2048..dc6fefcee776 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java @@ -50,6 +50,8 @@ public class PhpSlim4ServerCodegen extends AbstractPhpCodegen { protected String artifactId = "openapi-server"; protected String authDirName = "Auth"; protected String authPackage = ""; + protected String appDirName = "App"; + protected String appPackage = ""; protected String psr7Implementation = "slim-psr7"; protected String interfacesDirName = "Interfaces"; protected String interfacesPackage = ""; @@ -92,6 +94,7 @@ public PhpSlim4ServerCodegen() { modelPackage = invokerPackage + "\\" + modelDirName; authPackage = invokerPackage + "\\" + authDirName; interfacesPackage = invokerPackage + "\\" + interfacesDirName; + appPackage = invokerPackage + "\\" + appDirName; outputFolder = "generated-code" + File.separator + "slim4"; modelTestTemplateFiles.put("model_test.mustache", ".php"); @@ -167,6 +170,8 @@ public void processOpts() { authPackage = invokerPackage + "\\" + authDirName; // Update interfacesPackage interfacesPackage = invokerPackage + "\\" + interfacesDirName; + // update appPackage + appPackage = invokerPackage + "\\" + appDirName; } // make auth src path available in mustache template @@ -178,6 +183,10 @@ public void processOpts() { additionalProperties.put("interfacesSrcPath", "./" + toSrcPath(interfacesPackage, srcBasePath)); additionalProperties.put("interfacesTestPath", "./" + toSrcPath(interfacesPackage, testBasePath)); + // same for app classes + additionalProperties.put("appPackage", appPackage); + additionalProperties.put("appSrcPath", "./" + toSrcPath(appPackage, srcBasePath)); + if (additionalProperties.containsKey(PSR7_IMPLEMENTATION)) { this.setPsr7Implementation((String) additionalProperties.get(PSR7_IMPLEMENTATION)); } @@ -213,7 +222,9 @@ public void processOpts() { supportingFiles.add(new SupportingFile("composer.mustache", "", "composer.json")); supportingFiles.add(new SupportingFile("index.mustache", "public", "index.php")); supportingFiles.add(new SupportingFile(".htaccess", "public", ".htaccess")); - supportingFiles.add(new SupportingFile("SlimRouter.mustache", toSrcPath(invokerPackage, srcBasePath), "SlimRouter.php")); + supportingFiles.add(new SupportingFile("register_dependencies.mustache", toSrcPath(appPackage, srcBasePath), "RegisterDependencies.php")); + supportingFiles.add(new SupportingFile("register_middlewares.mustache", toSrcPath(appPackage, srcBasePath), "RegisterMiddlewares.php")); + supportingFiles.add(new SupportingFile("register_routes.mustache", toSrcPath(appPackage, srcBasePath), "RegisterRoutes.php")); // don't generate phpunit config when tests generation disabled if (Boolean.TRUE.equals(generateApiTests) || Boolean.TRUE.equals(generateModelTests)) { @@ -224,8 +235,8 @@ public void processOpts() { supportingFiles.add(new SupportingFile("phpcs.xml.mustache", "", "phpcs.xml.dist")); supportingFiles.add(new SupportingFile("htaccess_deny_all", "config", ".htaccess")); - supportingFiles.add(new SupportingFile("config_example.mustache", "config" + File.separator + "dev", "example.inc.php")); - supportingFiles.add(new SupportingFile("config_example.mustache", "config" + File.separator + "prod", "example.inc.php")); + supportingFiles.add(new SupportingFile("config_dev_default.mustache", "config" + File.separator + "dev", "default.inc.php")); + supportingFiles.add(new SupportingFile("config_prod_default.mustache", "config" + File.separator + "prod", "default.inc.php")); if (Boolean.TRUE.equals(generateModels)) { supportingFiles.add(new SupportingFile("base_model.mustache", toSrcPath(invokerPackage, srcBasePath), "BaseModel.php")); diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess b/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess index f6a2ceb3952b..57c2185f0e4a 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess @@ -1,3 +1,7 @@ + + SetEnv APP_ENV 'production' + + RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache index d85b12e3bd4b..dcd719301231 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache @@ -15,6 +15,7 @@ This server has been generated with [Guzzle PSR-7](https://github.com/guzzle/psr {{#isZendDiactoros}} This server has been generated with [Laminas (Zend) PSR-7 implementation](https://github.com/laminas/laminas-diactoros). {{/isZendDiactoros}} +[PHP-DI](https://php-di.org/doc/frameworks/slim.html) package used as dependency container. ## Requirements @@ -34,7 +35,10 @@ $ composer install ## Add configs -Application requires at least one config file(`config/dev/config.inc.php` or `config/prod/config.inc.php`). You can use [config/dev/example.inc.php](config/dev/example.inc.php) as starting point. +[PHP-DI package](https://php-di.org/doc/getting-started.html) helps to decouple configuration from implementation. App loads configuration files in straight order(`$env` can be `prod` or `dev`): +1. `config/$env/default.inc.php` (contains safe values, can be committed to vcs) +2. `config/$env/config.inc.php` (user config, excluded from vcs, can contain sensitive values, passwords etc.) +3. `lib/App/RegisterDependencies.php` ## Start devserver @@ -103,25 +107,14 @@ $ composer phplint ## Show errors -Switch on option in your application config file like: -```diff - return [ - 'slimSettings' => [ -- 'displayErrorDetails' => false, -+ 'displayErrorDetails' => true, - 'logErrors' => true, - 'logErrorDetails' => true, - ], +Switch your app environment to development in `public/.htaccess` file: +```ini +## .htaccess + + SetEnv APP_ENV 'development' + ``` -## Mock Server -For a quick start uncomment [mocker middleware options](config/dev/example.inc.php#L67-L94) in your application config file. - -Used packages: -* [Openapi Data Mocker](https://github.com/ybelenko/openapi-data-mocker) - first implementation of OAS3 fake data generator. -* [Openapi Data Mocker Server Middleware](https://github.com/ybelenko/openapi-data-mocker-server-middleware) - PSR-15 HTTP server middleware. -* [Openapi Data Mocker Interfaces](https://github.com/ybelenko/openapi-data-mocker-interfaces) - package with mocking interfaces. - {{#generateApiDocs}} ## API Endpoints @@ -135,17 +128,22 @@ All URIs are relative to *{{{basePath}}}* namespace {{apiPackage}}; use {{apiPackage}}\AbstractPetApi; +use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Message\ResponseInterface; class PetApi extends AbstractPetApi { - - public function addPet($request, $response, $args) - { + public function addPet( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { // your implementation of addPet method here } } ``` +When you need to inject dependencies into API controller check [PHP-DI - Controllers as services](https://github.com/PHP-DI/Slim-Bridge#controllers-as-services) guide. + Place all your implementation classes in `./src` folder accordingly. For instance, when abstract class located at `./lib/Api/AbstractPetApi.php` you need to create implementation class at `./src/Api/PetApi.php`. diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache deleted file mode 100644 index ded9ca8cfad3..000000000000 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache +++ /dev/null @@ -1,331 +0,0 @@ -licenseInfo}} - -/** - * NOTE: This class is auto generated by the openapi generator program. - * https://github.com/openapitools/openapi-generator - * Do not edit the class manually. - */{{#apiInfo}} -namespace {{invokerPackage}}; - -use Slim\Factory\AppFactory; -use Slim\Interfaces\RouteInterface; -use Slim\Exception\HttpNotImplementedException; -use Psr\Container\ContainerInterface; -use InvalidArgumentException; -use Dyorg\TokenAuthentication; -use Dyorg\TokenAuthentication\TokenSearch; -use Psr\Http\Message\ServerRequestInterface; -use OpenAPIServer\Mock\OpenApiDataMocker; -use OpenAPIServer\Mock\OpenApiDataMockerRouteMiddleware; -{{#isSlimPsr7}} -use Slim\Psr7\Factory\ResponseFactory; -{{/isSlimPsr7}} -{{#isNyholmPsr7}} -use Nyholm\Psr7\Factory\Psr17Factory -{{/isNyholmPsr7}} -{{#isGuzzlePsr7}} -use GuzzleHttp\Psr7\HttpFactory; -{{/isGuzzlePsr7}} -{{#isZendDiactoros}} -use Zend\Diactoros\ResponseFactory; -{{/isZendDiactoros}} -use Exception; - -/** - * SlimRouter Class Doc Comment - * - * @package {{invokerPackage}} - * @author OpenAPI Generator team - * @link https://github.com/openapitools/openapi-generator - */ -class SlimRouter -{ - - /** @var App instance */ - private $slimApp; - - /** @var array[] list of all api operations */ - private $operations = [ - {{#apis}} - {{#operations}} - {{#operation}} - [ - 'httpMethod' => '{{httpMethod}}', - 'basePathWithoutHost' => '{{{basePathWithoutHost}}}', - 'path' => '{{{path}}}', - 'apiPackage' => '{{apiPackage}}', - 'classname' => '{{classname}}', - 'userClassname' => '{{userClassname}}', - 'operationId' => '{{operationId}}', - 'responses' => [ - {{#responses}} - '{{#isDefault}}default{{/isDefault}}{{^isDefault}}{{code}}{{/isDefault}}' => [ - 'jsonSchema' => '{{{jsonSchema}}}', - ], - {{/responses}} - ], - 'authMethods' => [ - {{#hasAuthMethods}} - {{#authMethods}} - // {{type}} security schema named '{{name}}' - {{#isBasicBasic}} - [ - 'type' => '{{type}}', - 'isBasic' => true, - 'isBearer' => false, - 'isApiKey' => false, - 'isOAuth' => false, - ], - {{/isBasicBasic}} - {{#isBasicBearer}} - [ - 'type' => '{{type}}', - 'isBasic' => true, - 'isBearer' => true, - 'isApiKey' => false, - 'isOAuth' => false, - ], - {{/isBasicBearer}} - {{#isApiKey}} - [ - 'type' => '{{type}}', - 'isBasic' => false, - 'isBearer' => false, - 'isApiKey' => true, - 'isOAuth' => false, - 'keyParamName' => '{{keyParamName}}', - 'isKeyInHeader' => {{#isKeyInHeader}}true{{/isKeyInHeader}}{{^isKeyInHeader}}false{{/isKeyInHeader}}, - 'isKeyInQuery' => {{#isKeyInQuery}}true{{/isKeyInQuery}}{{^isKeyInQuery}}false{{/isKeyInQuery}}, - 'isKeyInCookie' => {{#isKeyInCookie}}true{{/isKeyInCookie}}{{^isKeyInCookie}}false{{/isKeyInCookie}}, - ], - {{/isApiKey}} - {{#isOAuth}} - [ - 'type' => '{{type}}', - 'isBasic' => false, - 'isBearer' => false, - 'isApiKey' => false, - 'isOAuth' => true, - 'scopes' => [ - {{#scopes}} - '{{scope}}',{{#description}} // {{.}}{{/description}} - {{/scopes}} - ], - ], - {{/isOAuth}} - {{/authMethods}} - {{/hasAuthMethods}} - ], - ], - {{/operation}} - {{/operations}} - {{/apis}} - ]; - - /** - * Class constructor - * - * @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings - * - * @throws HttpNotImplementedException When implementation class doesn't exists - * @throws Exception when not supported authorization schema type provided - */ - public function __construct($settings = []) - { - if ($settings instanceof ContainerInterface) { - // Set container to create App with on AppFactory - AppFactory::setContainer($settings); - } - $this->slimApp = AppFactory::create(); - - // middlewares requires Psr\Container\ContainerInterface - $container = $this->slimApp->getContainer(); - - {{#hasAuthMethods}} - $authPackage = '{{authPackage}}'; - $basicAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { - $message = "How about extending {{abstractNamePrefix}}Authenticator{{abstractNameSuffix}} class by {$authPackage}\BasicAuthenticator?"; - throw new HttpNotImplementedException($request, $message); - }; - $apiKeyAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { - $message = "How about extending {{abstractNamePrefix}}Authenticator{{abstractNameSuffix}} class by {$authPackage}\ApiKeyAuthenticator?"; - throw new HttpNotImplementedException($request, $message); - }; - $oAuthAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { - $message = "How about extending {{abstractNamePrefix}}Authenticator{{abstractNameSuffix}} class by {$authPackage}\OAuthAuthenticator?"; - throw new HttpNotImplementedException($request, $message); - }; - {{/hasAuthMethods}} - - $userOptions = $this->getSetting($settings, 'tokenAuthenticationOptions', null); - - // mocker options - $mockerOptions = $this->getSetting($settings, 'mockerOptions', null); - $dataMocker = $mockerOptions['dataMocker'] ?? new OpenApiDataMocker(); - {{#isSlimPsr7}} - $responseFactory = new ResponseFactory(); - {{/isSlimPsr7}} - {{#isNyholmPsr7}} - $responseFactory = new Psr17Factory(); - {{/isNyholmPsr7}} - {{#isGuzzlePsr7}} - $responseFactory = new HttpFactory(); - {{/isGuzzlePsr7}} - {{#isZendDiactoros}} - $responseFactory = new ResponseFactory(); - {{/isZendDiactoros}} - $getMockStatusCodeCallback = $mockerOptions['getMockStatusCodeCallback'] ?? null; - $mockAfterCallback = $mockerOptions['afterCallback'] ?? null; - - foreach ($this->operations as $operation) { - $callback = function ($request, $response, $arguments) use ($operation) { - $message = "How about extending {$operation['classname']} by {$operation['apiPackage']}\\{$operation['userClassname']} class implementing {$operation['operationId']} as a {$operation['httpMethod']} method?"; - throw new HttpNotImplementedException($request, $message); - }; - $middlewares = []; - - if (class_exists("\\{$operation['apiPackage']}\\{$operation['userClassname']}")) { - $callback = "\\{$operation['apiPackage']}\\{$operation['userClassname']}:{$operation['operationId']}"; - } - - {{#hasAuthMethods}} - foreach ($operation['authMethods'] as $authMethod) { - switch ($authMethod['type']) { - case 'http': - $authenticatorClassname = "\\{$authPackage}\\BasicAuthenticator"; - if (class_exists($authenticatorClassname)) { - $basicAuthenticator = new $authenticatorClassname($container); - } - - $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ - 'authenticator' => $basicAuthenticator, - 'regex' => $authMethod['isBearer'] ? '/Bearer\s+(.*)$/i' : '/Basic\s+(.*)$/i', - 'header' => 'Authorization', - 'parameter' => null, - 'cookie' => null, - 'argument' => null, - ], $userOptions)); - break; - case 'apiKey': - $authenticatorClassname = "\\{$authPackage}\\ApiKeyAuthenticator"; - if (class_exists($authenticatorClassname)) { - $apiKeyAuthenticator = new $authenticatorClassname($container); - } - - $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ - 'authenticator' => $apiKeyAuthenticator, - 'regex' => '/^(.*)$/i', - 'header' => $authMethod['isKeyInHeader'] ? $authMethod['keyParamName'] : null, - 'parameter' => $authMethod['isKeyInQuery'] ? $authMethod['keyParamName'] : null, - 'cookie' => $authMethod['isKeyInCookie'] ? $authMethod['keyParamName'] : null, - 'argument' => null, - ], $userOptions)); - break; - case 'oauth2': - $authenticatorClassname = "\\{$authPackage}\\OAuthAuthenticator"; - if (class_exists($authenticatorClassname)) { - $oAuthAuthenticator = new $authenticatorClassname($container, $authMethod['scopes']); - } - - $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ - 'authenticator' => $oAuthAuthenticator, - 'regex' => '/Bearer\s+(.*)$/i', - 'header' => 'Authorization', - 'parameter' => null, - 'cookie' => null, - 'argument' => null, - ], $userOptions)); - break; - default: - throw new Exception('Unknown authorization schema type'); - } - } - {{/hasAuthMethods}} - - if (is_callable($getMockStatusCodeCallback)) { - $mockSchemaResponses = array_map(function ($item) { - return json_decode($item['jsonSchema'], true); - }, $operation['responses']); - $middlewares[] = new OpenApiDataMockerRouteMiddleware($dataMocker, $mockSchemaResponses, $responseFactory, $getMockStatusCodeCallback, $mockAfterCallback); - } - - $this->addRoute( - [$operation['httpMethod']], - "{$operation['basePathWithoutHost']}{$operation['path']}", - $callback, - $middlewares - )->setName($operation['operationId']); - } - } - - /** - * Merges user defined options with dynamic params - * - * @param array $staticOptions Required static options - * @param array $userOptions User options - * - * @return array Merged array - */ - private function getTokenAuthenticationOptions(array $staticOptions, array $userOptions = null) - { - if (is_array($userOptions) === false) { - return $staticOptions; - } - - return array_merge($userOptions, $staticOptions); - } - - /** - * Returns app setting by name. - * - * @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings - * @param string $settingName Setting name - * @param mixed $default Default setting value. - * - * @return mixed - */ - private function getSetting($settings, $settingName, $default = null) - { - if ($settings instanceof ContainerInterface && $settings->has($settingName)) { - return $settings->get($settingName); - } elseif (is_array($settings) && array_key_exists($settingName, $settings)) { - return $settings[$settingName]; - } - - return $default; - } - - /** - * Add route with multiple methods - * - * @param string[] $methods Numeric array of HTTP method names - * @param string $pattern The route URI pattern - * @param callable|string $callable The route callback routine - * @param array|null $middlewares List of middlewares - * - * @return RouteInterface - * - * @throws InvalidArgumentException If the route pattern isn't a string - */ - public function addRoute(array $methods, string $pattern, $callable, $middlewares = []) - { - $route = $this->slimApp->map($methods, $pattern, $callable); - foreach ($middlewares as $middleware) { - $route->add($middleware); - } - return $route; - } - - /** - * Returns Slim Framework instance - * - * @return App - */ - public function getSlimApp() - { - return $this->slimApp; - } -} -{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache index 82fd8f648eac..3aef910d9f1b 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache @@ -9,7 +9,6 @@ */{{#apiInfo}} namespace {{authPackage}}; -use Psr\Container\ContainerInterface; use Psr\Http\Message\ServerRequestInterface; use Dyorg\TokenAuthentication; use Dyorg\TokenAuthentication\TokenSearch; @@ -24,12 +23,6 @@ use Dyorg\TokenAuthentication\Exceptions\UnauthorizedExceptionInterface; */ abstract class {{abstractNamePrefix}}Authenticator{{abstractNameSuffix}} { - - /** - * @var ContainerInterface|null Slim app container instance - */ - protected $container; - /** * @var string[]|null List of required scopes */ @@ -49,12 +42,10 @@ abstract class {{abstractNamePrefix}}Authenticator{{abstractNameSuffix}} /** * Authenticator constructor * - * @param ContainerInterface|null $container Slim app container instance - * @param string[]|null $requiredScope List of required scopes + * @param string[]|null $requiredScope List of required scopes */ - public function __construct(ContainerInterface $container = null, $requiredScope = null) + public function __construct($requiredScope = null) { - $this->container = $container; $this->requiredScope = $requiredScope; } diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache index f76f11f29afa..83de70ff5c4c 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache @@ -6,10 +6,11 @@ * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator * Do not edit the class manually. + * Extend this class with your controller. You can inject dependencies via class constructor, + * @see https://github.com/PHP-DI/Slim-Bridge basic example. */ namespace {{apiPackage}}; -use Psr\Container\ContainerInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; use Slim\Exception\HttpNotImplementedException; @@ -23,25 +24,8 @@ use Slim\Exception\HttpNotImplementedException; */ abstract class {{classname}} { - - /** - * @var ContainerInterface|null Slim app container instance - */ - protected $container; - - /** - * Route Controller constructor receives container - * - * @param ContainerInterface|null $container Slim app container instance - */ - public function __construct(ContainerInterface $container = null) - { - $this->container = $container; - } - {{#operations}} {{#operation}} - /** * {{httpMethod}} {{operationId}} {{#summary}} @@ -56,7 +40,11 @@ abstract class {{classname}} * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + {{#hasPathParams}} + {{#pathParams}} + * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} + {{/pathParams}} + {{/hasPathParams}} * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method @@ -64,19 +52,21 @@ abstract class {{classname}} * @deprecated {{/isDeprecated}} */ - public function {{operationId}}(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function {{operationId}}( + ServerRequestInterface $request, + ResponseInterface $response{{#hasPathParams}},{{/hasPathParams}} + {{#hasPathParams}} + {{#pathParams}} + {{{dataType}}} ${{paramName}}{{^-last}},{{/-last}} + {{/pathParams}} + {{/hasPathParams}} + ): ResponseInterface { {{#hasHeaderParams}} $headers = $request->getHeaders(); {{#headerParams}} ${{paramName}} = $request->hasHeader('{{baseName}}') ? $headers['{{baseName}}'] : null; {{/headerParams}} {{/hasHeaderParams}} - {{#hasPathParams}} - {{#pathParams}} - ${{paramName}} = $args['{{baseName}}']; - {{/pathParams}} - {{/hasPathParams}} {{#hasQueryParams}} $queryParams = $request->getQueryParams(); {{#queryParams}} @@ -105,6 +95,9 @@ abstract class {{classname}} $message = "How about implementing {{nickname}} as a {{httpMethod}} method in {{apiPackage}}\{{userClassname}} class?"; throw new HttpNotImplementedException($request, $message); } + {{^-last}} + + {{/-last}} {{/operation}} {{/operations}} } diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache index e514b055f549..6d8d0bcbac28 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache @@ -9,30 +9,30 @@ ], "require": { "php": "^7.4 || ^8.0", - "slim/slim": "^4.5.0", "dyorg/slim-token-authentication": "dev-slim4", - "ybelenko/openapi-data-mocker": "^1.0", - "ybelenko/openapi-data-mocker-server-middleware": "^1.0", - {{#isSlimPsr7}} - "slim/psr7": "^1.1.0" - {{/isSlimPsr7}} - {{#isNyholmPsr7}} - "nyholm/psr7": "^1.3.0", - "nyholm/psr7-server": "^0.4.1" - {{/isNyholmPsr7}} {{#isGuzzlePsr7}} "guzzlehttp/psr7": "^1.6.1", - "http-interop/http-factory-guzzle": "^1.0.0" + "http-interop/http-factory-guzzle": "^1.0.0", {{/isGuzzlePsr7}} {{#isZendDiactoros}} - "laminas/laminas-diactoros": "^2.3.0" + "laminas/laminas-diactoros": "^2.3.0", {{/isZendDiactoros}} + {{#isNyholmPsr7}} + "nyholm/psr7": "^1.3.0", + "nyholm/psr7-server": "^0.4.1", + {{/isNyholmPsr7}} + "php-di/slim-bridge": "^3.2", + {{#isSlimPsr7}} + "slim/psr7": "^1.1.0", + {{/isSlimPsr7}} + "ybelenko/openapi-data-mocker": "^1.0", + "ybelenko/openapi-data-mocker-server-middleware": "^1.0" }, "require-dev": { + "overtrue/phplint": "^2.0.2", {{#generateTests}} "phpunit/phpunit": "^8.0 || ^9.0", {{/generateTests}} - "overtrue/phplint": "^2.0.2", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { @@ -58,5 +58,8 @@ {{/generateTests}} "phpcs": "phpcs", "phplint": "phplint ./ --exclude=vendor" + }, + "config": { + "sort-packages": true } } diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/config_dev_default.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/config_dev_default.mustache new file mode 100644 index 000000000000..425880521605 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/config_dev_default.mustache @@ -0,0 +1,35 @@ + 'development', + + // slim framework settings + 'slim.displayErrorDetails' => true, + 'slim.logErrors' => false, + 'slim.logErrorDetails' => false, + + // PDO + 'pdo.dsn' => 'mysql:host=localhost;charset=utf8mb4', + 'pdo.username' => 'root', + 'pdo.password' => 'root', + 'pdo.options' => [ + \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, + ], +]; diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/config_example.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/config_example.mustache deleted file mode 100644 index 52755f253855..000000000000 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/config_example.mustache +++ /dev/null @@ -1,83 +0,0 @@ -licenseInfo}} - -/** - * App configuration file example. - * - * Copy file to config/dev/config.inc.php and config/prod/config.inc.php - * App loads dev config only when prod doesn't exist - * in other words if both configs presented - prod config applies - */ - -use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Message\ResponseInterface; -use OpenAPIServer\Mock\OpenApiDataMocker; - -$mocker = new OpenApiDataMocker(); -$mocker->setModelsNamespace('{{modelPackage}}\\'); - -return [ - 'slimSettings' => [ - 'displayErrorDetails' => false, - 'logErrors' => true, - 'logErrorDetails' => true, - ], - - 'tokenAuthenticationOptions' => [ - /** - * Tokens are essentially passwords. You should treat them as such and you should always - * use HTTPS. If the middleware detects insecure usage over HTTP it will return unauthorized - * with a message Required HTTPS for token authentication. This rule is relaxed for requests - * on localhost. To allow insecure usage you must enable it manually by setting secure to - * false. - * Default: true - */ - // 'secure' => true, - - /** - * Alternatively you can list your development host to have relaxed security. - * Default: ['localhost', '127.0.0.1'] - */ - // 'relaxed' => ['localhost', '127.0.0.1'], - - /** - * By default on occurred a fail on authentication, is sent a response on json format with a - * message (`Invalid Token` or `Not found Token`) and with the token (if found), with status - * `401 Unauthorized`. You can customize it by setting a callable function on error option. - * Default: null - */ - // 'error' => null, - ], - - 'mockerOptions' => [ - // 'dataMocker' => $mocker, - - // 'getMockStatusCodeCallback' => function (ServerRequestInterface $request, array $responses) { - // // check if client clearly asks for mocked response - // $pingHeader = 'X-{{invokerPackage}}-Mock'; - // $pingHeaderCode = 'X-{{invokerPackage}}-Mock-Code'; - // if ( - // $request->hasHeader($pingHeader) - // && $request->getHeader($pingHeader)[0] === 'ping' - // ) { - // $responses = (array) $responses; - // $requestedResponseCode = ($request->hasHeader($pingHeaderCode)) ? $request->getHeader($pingHeaderCode)[0] : 'default'; - // if (array_key_exists($requestedResponseCode, $responses)) { - // return $requestedResponseCode; - // } - - // // return first response key - // reset($responses); - // return key($responses); - // } - - // return false; - // }, - - // 'afterCallback' => function (ServerRequestInterface $request, ResponseInterface $response) { - // // mark mocked response to distinguish real and fake responses - // return $response->withHeader('X-{{invokerPackage}}-Mock', 'pong'); - // }, - ], -]; diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/config_prod_default.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/config_prod_default.mustache new file mode 100644 index 000000000000..d6853fbcf538 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/config_prod_default.mustache @@ -0,0 +1,35 @@ + 'production', + + // slim framework settings + 'slim.displayErrorDetails' => false, + 'slim.logErrors' => true, + 'slim.logErrorDetails' => true, + + // PDO + 'pdo.dsn' => 'mysql:host=localhost;charset=utf8mb4', + 'pdo.username' => 'root', + 'pdo.password' => 'root', + 'pdo.options' => [ + \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, + ], +]; diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore b/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore index e12b356ade0a..27433d90949e 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore @@ -20,5 +20,5 @@ composer.phar # Application config may contain sensitive data /config/**/*.* !/config/.htaccess -!/config/dev/example.inc.php -!/config/prod/example.inc.php +!/config/dev/default.inc.php +!/config/prod/default.inc.php diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache index 305f7cf8b563..ead7d817f87c 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache @@ -9,49 +9,64 @@ require_once __DIR__ . '/../vendor/autoload.php'; -use {{invokerPackage}}\SlimRouter; -use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Message\ResponseInterface; -use OpenAPIServer\Mock\OpenApiDataMocker; +use DI\Bridge\Slim\Bridge; +use DI\ContainerBuilder; +use {{appPackage}}\RegisterDependencies; +use {{appPackage}}\RegisterRoutes; +use {{appPackage}}\RegisterMiddlewares; +use Slim\Factory\ServerRequestCreatorFactory; +use Slim\ResponseEmitter; {{/apiInfo}} -// load config file -$config = []; -if (is_array($prodConfig = @include(__DIR__ . '/../config/prod/config.inc.php'))) { - $config = $prodConfig; -} elseif (is_array($devConfig = @include(__DIR__ . '/../config/dev/config.inc.php'))) { - $config = $devConfig; -} else { - throw new InvalidArgumentException('Config file missed or broken.'); +// Instantiate PHP-DI ContainerBuilder +$builder = new ContainerBuilder(); + +// consider prod by default +$env; +switch (strtolower($_SERVER['APP_ENV'] ?? 'prod')) { + case 'development': + case 'dev': + $env = 'dev'; + break; + case 'production': + case 'prod': + default: + $env = 'prod'; } -$router = new SlimRouter($config); -$app = $router->getSlimApp(); +// Main configuration +$builder->addDefinitions(__DIR__ . "/../config/{$env}/default.inc.php"); -// Parse json, form data and xml -$app->addBodyParsingMiddleware(); +// Config file for the environment if exists +$userConfig = __DIR__ . "/../config/{$env}/config.inc.php"; +if (file_exists($userConfig)) { + $builder->addDefinitions($userConfig); +} -/** - * The routing middleware should be added before the ErrorMiddleware - * Otherwise exceptions thrown from it will not be handled - */ -$app->addRoutingMiddleware(); +// Set up dependencies +$dependencies = new RegisterDependencies(); +$dependencies($builder); -/** - * Add Error Handling Middleware - * - * @param bool $displayErrorDetails -> Should be set to false in production - * @param bool $logErrors -> Parameter is passed to the default ErrorHandler - * @param bool $logErrorDetails -> Display error details in error log - * which can be replaced by a callable of your choice. - - * Note: This middleware should be added last. It will not handle any exceptions/errors - * for middleware added after it. - */ -$app->addErrorMiddleware( - $config['slimSettings']['displayErrorDetails'] ?? false, - $config['slimSettings']['logErrors'] ?? true, - $config['slimSettings']['logErrorDetails'] ?? true -); - -$app->run(); +// Build PHP-DI Container instance +$container = $builder->build(); + +// Instantiate the app +$app = Bridge::create($container); + +// Register middleware +$middleware = new RegisterMiddlewares(); +$middleware($app); + +// Register routes +// yes, it's anti-pattern you shouldn't get deps from container directly +$routes = $container->get(RegisterRoutes::class); +$routes($app); + +// Create Request object from globals +$serverRequestCreator = ServerRequestCreatorFactory::create(); +$request = $serverRequestCreator->createServerRequestFromGlobals(); + +// Run App & Emit Response +$response = $app->handle($request); +$responseEmitter = new ResponseEmitter(); +$responseEmitter->emit($response); diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/register_dependencies.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/register_dependencies.mustache new file mode 100644 index 000000000000..0f48fb9de1cc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/register_dependencies.mustache @@ -0,0 +1,58 @@ +licenseInfo}} + +declare(strict_types=1); + +/** + * NOTE: This class is auto generated by the openapi generator program. + * https://github.com/openapitools/openapi-generator + * Do not edit the class manually. + */ +namespace {{appPackage}}; + +/** + * RegisterDependencies + * + * Recommendations from template creator: + * + * I don't use imports(eg. use Slim\Middleware\ErrorMiddleware) here because each package unlikely + * be used in code twice. It helps to keep that file short and make Git history cleaner. + * + * This class declared as final because two classes with dependency injections can cause confusion. Edit + * template of this class or use your own implementation instead(overwrite index.php to import your + * custom class). + */ +final class RegisterDependencies +{ + /** + * Adds dependency definitions. + * + * @param \DI\ContainerBuilder $containerBuilder Container builder. + * + * @see https://php-di.org/doc/php-definitions.html + */ + public function __invoke(\DI\ContainerBuilder $containerBuilder): void + { + $containerBuilder->addDefinitions([ + // Response factory required as typed argument in next ErrorMiddleware injection + \Psr\Http\Message\ResponseFactoryInterface::class => \DI\factory([\Slim\Factory\AppFactory::class, 'determineResponseFactory']), + + // Slim error middleware + // @see https://www.slimframework.com/docs/v4/middleware/error-handling.html + \Slim\Middleware\ErrorMiddleware::class => \DI\autowire() + ->constructorParameter('displayErrorDetails', \DI\get('slim.displayErrorDetails', false)) + ->constructorParameter('logErrors', \DI\get('slim.logErrors', true)) + ->constructorParameter('logErrorDetails', \DI\get('slim.logErrorDetails', true)), + + // PDO class for database managing + \PDO::class => \DI\create() + ->constructor( + \DI\get('pdo.dsn'), + \DI\get('pdo.username'), + \DI\get('pdo.password'), + \DI\get('pdo.options', null) + ), + ]); + } +} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/register_middlewares.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/register_middlewares.mustache new file mode 100644 index 000000000000..b0f426764308 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/register_middlewares.mustache @@ -0,0 +1,51 @@ +licenseInfo}} + +declare(strict_types=1); + +/** + * NOTE: This class is auto generated by the openapi generator program. + * https://github.com/openapitools/openapi-generator + * Do not edit the class manually. + */ +namespace {{appPackage}}; + +/** + * RegisterMiddlewares + * + * Recommendations from template creator: + * + * There is no way to add route related middlewares here, add global ones. Route related middlewares + * can be applied in \{{appPackage}}\RegisterRoutes class. + * + * I add middlewares by full class names(\Slim\Middleware\ErrorMiddleware::class) because that way + * Slim initiates them with options from Container. They already configured, don't need to pass any + * options manually. + * + * I don't use imports(eg. use Slim\Middleware\ErrorMiddleware) here because each package unlikely + * be used in code twice. It helps to keep that file short and make Git history cleaner. + * + * This class declared as final because two classes with middlewares can cause confusion. Edit + * template of this class or use your own implementation instead(overwrite index.php to import your + * custom class). + */ +final class RegisterMiddlewares +{ + /** + * Adds middlewares to Slim app instance. + * + * @param \Slim\App $app App instance. + */ + public function __invoke(\Slim\App $app): void + { + // Parse json, form data and xml + $app->addBodyParsingMiddleware(); + + // Add Routing Middleware + $app->addRoutingMiddleware(); + + // Add Error Middleware + $app->add(\Slim\Middleware\ErrorMiddleware::class); + } +} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/register_routes.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/register_routes.mustache new file mode 100644 index 000000000000..b027ebc46e71 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/register_routes.mustache @@ -0,0 +1,137 @@ +licenseInfo}} + +declare(strict_types=1); + +/** + * NOTE: This class is auto generated by the openapi generator program. + * https://github.com/openapitools/openapi-generator + * Do not edit the class manually. + */{{#apiInfo}} +namespace {{appPackage}}; + +use Slim\Exception\HttpNotImplementedException; + +/** + * RegisterRoutes Class Doc Comment + * + * @package {{invokerPackage}} + * @author OpenAPI Generator team + * @link https://github.com/openapitools/openapi-generator + */ +class RegisterRoutes +{ + /** @var array[] list of all api operations */ + private $operations = [ + {{#apis}} + {{#operations}} + {{#operation}} + [ + 'httpMethod' => '{{httpMethod}}', + 'basePathWithoutHost' => '{{{basePathWithoutHost}}}', + 'path' => '{{{path}}}', + 'apiPackage' => '{{apiPackage}}', + 'classname' => '{{classname}}', + 'userClassname' => '{{userClassname}}', + 'operationId' => '{{operationId}}', + 'responses' => [ + {{#responses}} + '{{#isDefault}}default{{/isDefault}}{{^isDefault}}{{code}}{{/isDefault}}' => [ + 'jsonSchema' => '{{{jsonSchema}}}', + ], + {{/responses}} + ], + 'authMethods' => [ + {{#hasAuthMethods}} + {{#authMethods}} + // {{type}} security schema named '{{name}}' + {{#isBasicBasic}} + [ + 'type' => '{{type}}', + 'isBasic' => true, + 'isBearer' => false, + 'isApiKey' => false, + 'isOAuth' => false, + ], + {{/isBasicBasic}} + {{#isBasicBearer}} + [ + 'type' => '{{type}}', + 'isBasic' => true, + 'isBearer' => true, + 'isApiKey' => false, + 'isOAuth' => false, + ], + {{/isBasicBearer}} + {{#isApiKey}} + [ + 'type' => '{{type}}', + 'isBasic' => false, + 'isBearer' => false, + 'isApiKey' => true, + 'isOAuth' => false, + 'keyParamName' => '{{keyParamName}}', + 'isKeyInHeader' => {{#isKeyInHeader}}true{{/isKeyInHeader}}{{^isKeyInHeader}}false{{/isKeyInHeader}}, + 'isKeyInQuery' => {{#isKeyInQuery}}true{{/isKeyInQuery}}{{^isKeyInQuery}}false{{/isKeyInQuery}}, + 'isKeyInCookie' => {{#isKeyInCookie}}true{{/isKeyInCookie}}{{^isKeyInCookie}}false{{/isKeyInCookie}}, + ], + {{/isApiKey}} + {{#isOAuth}} + [ + 'type' => '{{type}}', + 'isBasic' => false, + 'isBearer' => false, + 'isApiKey' => false, + 'isOAuth' => true, + 'scopes' => [ + {{#scopes}} + '{{scope}}',{{#description}} // {{.}}{{/description}} + {{/scopes}} + ], + ], + {{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + ], + ], + {{/operation}} + {{/operations}} + {{/apis}} + ]; + + /** + * Add routes to Slim app. + * + * @param \Slim\App $app Pre-configured Slim application instance + * + * @throws HttpNotImplementedException When implementation class doesn't exists + */ + public function __invoke(\Slim\App $app): void + { + foreach ($this->operations as $operation) { + $callback = function ($request) use ($operation) { + $message = "How about extending {$operation['classname']} by {$operation['apiPackage']}\\{$operation['userClassname']} class implementing {$operation['operationId']} as a {$operation['httpMethod']} method?"; + throw new HttpNotImplementedException($request, $message); + }; + $middlewares = []; + + if (class_exists("\\{$operation['apiPackage']}\\{$operation['userClassname']}")) { + // Notice how we register the controller using the class name? + // PHP-DI will instantiate the class for us only when it's actually necessary + $callback = ["\\{$operation['apiPackage']}\\{$operation['userClassname']}", $operation['operationId']]; + } + + $route = $app->map( + [$operation['httpMethod']], + "{$operation['basePathWithoutHost']}{$operation['path']}", + $callback + )->setName($operation['operationId']); + + foreach ($middlewares as $middleware) { + $route->add($middleware); + } + } + } +} +{{/apiInfo}} diff --git a/samples/server/petstore/php-slim4/.gitignore b/samples/server/petstore/php-slim4/.gitignore index e12b356ade0a..27433d90949e 100644 --- a/samples/server/petstore/php-slim4/.gitignore +++ b/samples/server/petstore/php-slim4/.gitignore @@ -20,5 +20,5 @@ composer.phar # Application config may contain sensitive data /config/**/*.* !/config/.htaccess -!/config/dev/example.inc.php -!/config/prod/example.inc.php +!/config/dev/default.inc.php +!/config/prod/default.inc.php diff --git a/samples/server/petstore/php-slim4/.openapi-generator/FILES b/samples/server/petstore/php-slim4/.openapi-generator/FILES index 40c7067f1085..08a1e9c294cd 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/FILES +++ b/samples/server/petstore/php-slim4/.openapi-generator/FILES @@ -2,11 +2,14 @@ README.md composer.json config/.htaccess -config/dev/example.inc.php -config/prod/example.inc.php +config/dev/default.inc.php +config/prod/default.inc.php lib/Api/AbstractPetApi.php lib/Api/AbstractStoreApi.php lib/Api/AbstractUserApi.php +lib/App/RegisterDependencies.php +lib/App/RegisterMiddlewares.php +lib/App/RegisterRoutes.php lib/Auth/AbstractAuthenticator.php lib/BaseModel.php lib/Model/ApiResponse.php @@ -15,7 +18,6 @@ lib/Model/Order.php lib/Model/Pet.php lib/Model/Tag.php lib/Model/User.php -lib/SlimRouter.php phpcs.xml.dist phpunit.xml.dist public/.htaccess diff --git a/samples/server/petstore/php-slim4/README.md b/samples/server/petstore/php-slim4/README.md index ac51de45d1eb..a99f4a13cc49 100644 --- a/samples/server/petstore/php-slim4/README.md +++ b/samples/server/petstore/php-slim4/README.md @@ -4,6 +4,7 @@ * [Slim 4 Documentation](https://www.slimframework.com/docs/v4/) This server has been generated with [Slim PSR-7](https://github.com/slimphp/Slim-Psr7) implementation. +[PHP-DI](https://php-di.org/doc/frameworks/slim.html) package used as dependency container. ## Requirements @@ -23,7 +24,10 @@ $ composer install ## Add configs -Application requires at least one config file(`config/dev/config.inc.php` or `config/prod/config.inc.php`). You can use [config/dev/example.inc.php](config/dev/example.inc.php) as starting point. +[PHP-DI package](https://php-di.org/doc/getting-started.html) helps to decouple configuration from implementation. App loads configuration files in straight order(`$env` can be `prod` or `dev`): +1. `config/$env/default.inc.php` (contains safe values, can be committed to vcs) +2. `config/$env/config.inc.php` (user config, excluded from vcs, can contain sensitive values, passwords etc.) +3. `lib/App/RegisterDependencies.php` ## Start devserver @@ -86,25 +90,14 @@ $ composer phplint ## Show errors -Switch on option in your application config file like: -```diff - return [ - 'slimSettings' => [ -- 'displayErrorDetails' => false, -+ 'displayErrorDetails' => true, - 'logErrors' => true, - 'logErrorDetails' => true, - ], +Switch your app environment to development in `public/.htaccess` file: +```ini +## .htaccess + + SetEnv APP_ENV 'development' + ``` -## Mock Server -For a quick start uncomment [mocker middleware options](config/dev/example.inc.php#L67-L94) in your application config file. - -Used packages: -* [Openapi Data Mocker](https://github.com/ybelenko/openapi-data-mocker) - first implementation of OAS3 fake data generator. -* [Openapi Data Mocker Server Middleware](https://github.com/ybelenko/openapi-data-mocker-server-middleware) - PSR-15 HTTP server middleware. -* [Openapi Data Mocker Interfaces](https://github.com/ybelenko/openapi-data-mocker-interfaces) - package with mocking interfaces. - ## API Endpoints All URIs are relative to *http://petstore.swagger.io/v2* @@ -117,17 +110,22 @@ All URIs are relative to *http://petstore.swagger.io/v2* namespace OpenAPIServer\Api; use OpenAPIServer\Api\AbstractPetApi; +use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Message\ResponseInterface; class PetApi extends AbstractPetApi { - - public function addPet($request, $response, $args) - { + public function addPet( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { // your implementation of addPet method here } } ``` +When you need to inject dependencies into API controller check [PHP-DI - Controllers as services](https://github.com/PHP-DI/Slim-Bridge#controllers-as-services) guide. + Place all your implementation classes in `./src` folder accordingly. For instance, when abstract class located at `./lib/Api/AbstractPetApi.php` you need to create implementation class at `./src/Api/PetApi.php`. diff --git a/samples/server/petstore/php-slim4/composer.json b/samples/server/petstore/php-slim4/composer.json index 529f8f937153..4f31f4b28ff7 100644 --- a/samples/server/petstore/php-slim4/composer.json +++ b/samples/server/petstore/php-slim4/composer.json @@ -9,15 +9,15 @@ ], "require": { "php": "^7.4 || ^8.0", - "slim/slim": "^4.5.0", "dyorg/slim-token-authentication": "dev-slim4", + "php-di/slim-bridge": "^3.2", + "slim/psr7": "^1.1.0", "ybelenko/openapi-data-mocker": "^1.0", - "ybelenko/openapi-data-mocker-server-middleware": "^1.0", - "slim/psr7": "^1.1.0" + "ybelenko/openapi-data-mocker-server-middleware": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^8.0 || ^9.0", "overtrue/phplint": "^2.0.2", + "phpunit/phpunit": "^8.0 || ^9.0", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { @@ -37,5 +37,8 @@ "test-models": "phpunit --testsuite Models", "phpcs": "phpcs", "phplint": "phplint ./ --exclude=vendor" + }, + "config": { + "sort-packages": true } } diff --git a/samples/server/petstore/php-slim4/config/dev/default.inc.php b/samples/server/petstore/php-slim4/config/dev/default.inc.php new file mode 100644 index 000000000000..be4bd6530b0d --- /dev/null +++ b/samples/server/petstore/php-slim4/config/dev/default.inc.php @@ -0,0 +1,35 @@ + 'development', + + // slim framework settings + 'slim.displayErrorDetails' => true, + 'slim.logErrors' => false, + 'slim.logErrorDetails' => false, + + // PDO + 'pdo.dsn' => 'mysql:host=localhost;charset=utf8mb4', + 'pdo.username' => 'root', + 'pdo.password' => 'root', + 'pdo.options' => [ + \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, + ], +]; diff --git a/samples/server/petstore/php-slim4/config/dev/example.inc.php b/samples/server/petstore/php-slim4/config/dev/example.inc.php deleted file mode 100644 index 2a2e65d4a599..000000000000 --- a/samples/server/petstore/php-slim4/config/dev/example.inc.php +++ /dev/null @@ -1,96 +0,0 @@ -setModelsNamespace('OpenAPIServer\Model\\'); - -return [ - 'slimSettings' => [ - 'displayErrorDetails' => false, - 'logErrors' => true, - 'logErrorDetails' => true, - ], - - 'tokenAuthenticationOptions' => [ - /** - * Tokens are essentially passwords. You should treat them as such and you should always - * use HTTPS. If the middleware detects insecure usage over HTTP it will return unauthorized - * with a message Required HTTPS for token authentication. This rule is relaxed for requests - * on localhost. To allow insecure usage you must enable it manually by setting secure to - * false. - * Default: true - */ - // 'secure' => true, - - /** - * Alternatively you can list your development host to have relaxed security. - * Default: ['localhost', '127.0.0.1'] - */ - // 'relaxed' => ['localhost', '127.0.0.1'], - - /** - * By default on occurred a fail on authentication, is sent a response on json format with a - * message (`Invalid Token` or `Not found Token`) and with the token (if found), with status - * `401 Unauthorized`. You can customize it by setting a callable function on error option. - * Default: null - */ - // 'error' => null, - ], - - 'mockerOptions' => [ - // 'dataMocker' => $mocker, - - // 'getMockStatusCodeCallback' => function (ServerRequestInterface $request, array $responses) { - // // check if client clearly asks for mocked response - // $pingHeader = 'X-OpenAPIServer-Mock'; - // $pingHeaderCode = 'X-OpenAPIServer-Mock-Code'; - // if ( - // $request->hasHeader($pingHeader) - // && $request->getHeader($pingHeader)[0] === 'ping' - // ) { - // $responses = (array) $responses; - // $requestedResponseCode = ($request->hasHeader($pingHeaderCode)) ? $request->getHeader($pingHeaderCode)[0] : 'default'; - // if (array_key_exists($requestedResponseCode, $responses)) { - // return $requestedResponseCode; - // } - - // // return first response key - // reset($responses); - // return key($responses); - // } - - // return false; - // }, - - // 'afterCallback' => function (ServerRequestInterface $request, ResponseInterface $response) { - // // mark mocked response to distinguish real and fake responses - // return $response->withHeader('X-OpenAPIServer-Mock', 'pong'); - // }, - ], -]; diff --git a/samples/server/petstore/php-slim4/config/prod/default.inc.php b/samples/server/petstore/php-slim4/config/prod/default.inc.php new file mode 100644 index 000000000000..333c7768b43a --- /dev/null +++ b/samples/server/petstore/php-slim4/config/prod/default.inc.php @@ -0,0 +1,35 @@ + 'production', + + // slim framework settings + 'slim.displayErrorDetails' => false, + 'slim.logErrors' => true, + 'slim.logErrorDetails' => true, + + // PDO + 'pdo.dsn' => 'mysql:host=localhost;charset=utf8mb4', + 'pdo.username' => 'root', + 'pdo.password' => 'root', + 'pdo.options' => [ + \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, + ], +]; diff --git a/samples/server/petstore/php-slim4/config/prod/example.inc.php b/samples/server/petstore/php-slim4/config/prod/example.inc.php deleted file mode 100644 index 2a2e65d4a599..000000000000 --- a/samples/server/petstore/php-slim4/config/prod/example.inc.php +++ /dev/null @@ -1,96 +0,0 @@ -setModelsNamespace('OpenAPIServer\Model\\'); - -return [ - 'slimSettings' => [ - 'displayErrorDetails' => false, - 'logErrors' => true, - 'logErrorDetails' => true, - ], - - 'tokenAuthenticationOptions' => [ - /** - * Tokens are essentially passwords. You should treat them as such and you should always - * use HTTPS. If the middleware detects insecure usage over HTTP it will return unauthorized - * with a message Required HTTPS for token authentication. This rule is relaxed for requests - * on localhost. To allow insecure usage you must enable it manually by setting secure to - * false. - * Default: true - */ - // 'secure' => true, - - /** - * Alternatively you can list your development host to have relaxed security. - * Default: ['localhost', '127.0.0.1'] - */ - // 'relaxed' => ['localhost', '127.0.0.1'], - - /** - * By default on occurred a fail on authentication, is sent a response on json format with a - * message (`Invalid Token` or `Not found Token`) and with the token (if found), with status - * `401 Unauthorized`. You can customize it by setting a callable function on error option. - * Default: null - */ - // 'error' => null, - ], - - 'mockerOptions' => [ - // 'dataMocker' => $mocker, - - // 'getMockStatusCodeCallback' => function (ServerRequestInterface $request, array $responses) { - // // check if client clearly asks for mocked response - // $pingHeader = 'X-OpenAPIServer-Mock'; - // $pingHeaderCode = 'X-OpenAPIServer-Mock-Code'; - // if ( - // $request->hasHeader($pingHeader) - // && $request->getHeader($pingHeader)[0] === 'ping' - // ) { - // $responses = (array) $responses; - // $requestedResponseCode = ($request->hasHeader($pingHeaderCode)) ? $request->getHeader($pingHeaderCode)[0] : 'default'; - // if (array_key_exists($requestedResponseCode, $responses)) { - // return $requestedResponseCode; - // } - - // // return first response key - // reset($responses); - // return key($responses); - // } - - // return false; - // }, - - // 'afterCallback' => function (ServerRequestInterface $request, ResponseInterface $response) { - // // mark mocked response to distinguish real and fake responses - // return $response->withHeader('X-OpenAPIServer-Mock', 'pong'); - // }, - ], -]; diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php index ff8c72245264..7975aabc6fe4 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php @@ -19,10 +19,11 @@ * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator * Do not edit the class manually. + * Extend this class with your controller. You can inject dependencies via class constructor, + * @see https://github.com/PHP-DI/Slim-Bridge basic example. */ namespace OpenAPIServer\Api; -use Psr\Container\ContainerInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; use Slim\Exception\HttpNotImplementedException; @@ -36,23 +37,6 @@ */ abstract class AbstractPetApi { - - /** - * @var ContainerInterface|null Slim app container instance - */ - protected $container; - - /** - * Route Controller constructor receives container - * - * @param ContainerInterface|null $container Slim app container instance - */ - public function __construct(ContainerInterface $container = null) - { - $this->container = $container; - } - - /** * POST addPet * Summary: Add a new pet to the store @@ -60,13 +44,14 @@ public function __construct(ContainerInterface $container = null) * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function addPet(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function addPet( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $body = $request->getParsedBody(); $message = "How about implementing addPet as a POST method in OpenAPIServer\Api\PetApi class?"; throw new HttpNotImplementedException($request, $message); @@ -78,16 +63,18 @@ public function addPet(ServerRequestInterface $request, ResponseInterface $respo * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param int $petId Pet id to delete * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function deletePet(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function deletePet( + ServerRequestInterface $request, + ResponseInterface $response, + int $petId + ): ResponseInterface { $headers = $request->getHeaders(); $apiKey = $request->hasHeader('api_key') ? $headers['api_key'] : null; - $petId = $args['petId']; $message = "How about implementing deletePet as a DELETE method in OpenAPIServer\Api\PetApi class?"; throw new HttpNotImplementedException($request, $message); } @@ -100,13 +87,14 @@ public function deletePet(ServerRequestInterface $request, ResponseInterface $re * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function findPetsByStatus(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function findPetsByStatus( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $queryParams = $request->getQueryParams(); $status = (key_exists('status', $queryParams)) ? $queryParams['status'] : null; $message = "How about implementing findPetsByStatus as a GET method in OpenAPIServer\Api\PetApi class?"; @@ -121,14 +109,15 @@ public function findPetsByStatus(ServerRequestInterface $request, ResponseInterf * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method * @deprecated */ - public function findPetsByTags(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function findPetsByTags( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $queryParams = $request->getQueryParams(); $tags = (key_exists('tags', $queryParams)) ? $queryParams['tags'] : null; $message = "How about implementing findPetsByTags as a GET method in OpenAPIServer\Api\PetApi class?"; @@ -143,14 +132,16 @@ public function findPetsByTags(ServerRequestInterface $request, ResponseInterfac * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param int $petId ID of pet to return * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function getPetById(ServerRequestInterface $request, ResponseInterface $response, array $args) - { - $petId = $args['petId']; + public function getPetById( + ServerRequestInterface $request, + ResponseInterface $response, + int $petId + ): ResponseInterface { $message = "How about implementing getPetById as a GET method in OpenAPIServer\Api\PetApi class?"; throw new HttpNotImplementedException($request, $message); } @@ -162,13 +153,14 @@ public function getPetById(ServerRequestInterface $request, ResponseInterface $r * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function updatePet(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function updatePet( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $body = $request->getParsedBody(); $message = "How about implementing updatePet as a PUT method in OpenAPIServer\Api\PetApi class?"; throw new HttpNotImplementedException($request, $message); @@ -180,14 +172,16 @@ public function updatePet(ServerRequestInterface $request, ResponseInterface $re * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param int $petId ID of pet that needs to be updated * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function updatePetWithForm(ServerRequestInterface $request, ResponseInterface $response, array $args) - { - $petId = $args['petId']; + public function updatePetWithForm( + ServerRequestInterface $request, + ResponseInterface $response, + int $petId + ): ResponseInterface { $body = $request->getParsedBody(); $name = (isset($body['name'])) ? $body['name'] : null; $status = (isset($body['status'])) ? $body['status'] : null; @@ -202,14 +196,16 @@ public function updatePetWithForm(ServerRequestInterface $request, ResponseInter * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param int $petId ID of pet to update * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function uploadFile(ServerRequestInterface $request, ResponseInterface $response, array $args) - { - $petId = $args['petId']; + public function uploadFile( + ServerRequestInterface $request, + ResponseInterface $response, + int $petId + ): ResponseInterface { $body = $request->getParsedBody(); $additionalMetadata = (isset($body['additionalMetadata'])) ? $body['additionalMetadata'] : null; $file = (key_exists('file', $request->getUploadedFiles())) ? $request->getUploadedFiles()['file'] : null; diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php index 2542047a669d..0c153911aac9 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php @@ -19,10 +19,11 @@ * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator * Do not edit the class manually. + * Extend this class with your controller. You can inject dependencies via class constructor, + * @see https://github.com/PHP-DI/Slim-Bridge basic example. */ namespace OpenAPIServer\Api; -use Psr\Container\ContainerInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; use Slim\Exception\HttpNotImplementedException; @@ -36,23 +37,6 @@ */ abstract class AbstractStoreApi { - - /** - * @var ContainerInterface|null Slim app container instance - */ - protected $container; - - /** - * Route Controller constructor receives container - * - * @param ContainerInterface|null $container Slim app container instance - */ - public function __construct(ContainerInterface $container = null) - { - $this->container = $container; - } - - /** * DELETE deleteOrder * Summary: Delete purchase order by ID @@ -60,14 +44,16 @@ public function __construct(ContainerInterface $container = null) * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param string $orderId ID of the order that needs to be deleted * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function deleteOrder(ServerRequestInterface $request, ResponseInterface $response, array $args) - { - $orderId = $args['orderId']; + public function deleteOrder( + ServerRequestInterface $request, + ResponseInterface $response, + string $orderId + ): ResponseInterface { $message = "How about implementing deleteOrder as a DELETE method in OpenAPIServer\Api\StoreApi class?"; throw new HttpNotImplementedException($request, $message); } @@ -80,13 +66,14 @@ public function deleteOrder(ServerRequestInterface $request, ResponseInterface $ * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function getInventory(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function getInventory( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $message = "How about implementing getInventory as a GET method in OpenAPIServer\Api\StoreApi class?"; throw new HttpNotImplementedException($request, $message); } @@ -99,14 +86,16 @@ public function getInventory(ServerRequestInterface $request, ResponseInterface * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param int $orderId ID of pet that needs to be fetched * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function getOrderById(ServerRequestInterface $request, ResponseInterface $response, array $args) - { - $orderId = $args['orderId']; + public function getOrderById( + ServerRequestInterface $request, + ResponseInterface $response, + int $orderId + ): ResponseInterface { $message = "How about implementing getOrderById as a GET method in OpenAPIServer\Api\StoreApi class?"; throw new HttpNotImplementedException($request, $message); } @@ -118,13 +107,14 @@ public function getOrderById(ServerRequestInterface $request, ResponseInterface * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function placeOrder(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function placeOrder( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $body = $request->getParsedBody(); $message = "How about implementing placeOrder as a POST method in OpenAPIServer\Api\StoreApi class?"; throw new HttpNotImplementedException($request, $message); diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php index eee2c7d2ccf1..fb9b1e5c7b45 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php @@ -19,10 +19,11 @@ * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator * Do not edit the class manually. + * Extend this class with your controller. You can inject dependencies via class constructor, + * @see https://github.com/PHP-DI/Slim-Bridge basic example. */ namespace OpenAPIServer\Api; -use Psr\Container\ContainerInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; use Slim\Exception\HttpNotImplementedException; @@ -36,23 +37,6 @@ */ abstract class AbstractUserApi { - - /** - * @var ContainerInterface|null Slim app container instance - */ - protected $container; - - /** - * Route Controller constructor receives container - * - * @param ContainerInterface|null $container Slim app container instance - */ - public function __construct(ContainerInterface $container = null) - { - $this->container = $container; - } - - /** * POST createUser * Summary: Create user @@ -60,13 +44,14 @@ public function __construct(ContainerInterface $container = null) * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function createUser(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function createUser( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $body = $request->getParsedBody(); $message = "How about implementing createUser as a POST method in OpenAPIServer\Api\UserApi class?"; throw new HttpNotImplementedException($request, $message); @@ -78,13 +63,14 @@ public function createUser(ServerRequestInterface $request, ResponseInterface $r * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function createUsersWithArrayInput(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function createUsersWithArrayInput( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $body = $request->getParsedBody(); $message = "How about implementing createUsersWithArrayInput as a POST method in OpenAPIServer\Api\UserApi class?"; throw new HttpNotImplementedException($request, $message); @@ -96,13 +82,14 @@ public function createUsersWithArrayInput(ServerRequestInterface $request, Respo * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function createUsersWithListInput(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function createUsersWithListInput( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $body = $request->getParsedBody(); $message = "How about implementing createUsersWithListInput as a POST method in OpenAPIServer\Api\UserApi class?"; throw new HttpNotImplementedException($request, $message); @@ -115,14 +102,16 @@ public function createUsersWithListInput(ServerRequestInterface $request, Respon * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param string $username The name that needs to be deleted * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function deleteUser(ServerRequestInterface $request, ResponseInterface $response, array $args) - { - $username = $args['username']; + public function deleteUser( + ServerRequestInterface $request, + ResponseInterface $response, + string $username + ): ResponseInterface { $message = "How about implementing deleteUser as a DELETE method in OpenAPIServer\Api\UserApi class?"; throw new HttpNotImplementedException($request, $message); } @@ -134,14 +123,16 @@ public function deleteUser(ServerRequestInterface $request, ResponseInterface $r * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param string $username The name that needs to be fetched. Use user1 for testing. * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function getUserByName(ServerRequestInterface $request, ResponseInterface $response, array $args) - { - $username = $args['username']; + public function getUserByName( + ServerRequestInterface $request, + ResponseInterface $response, + string $username + ): ResponseInterface { $message = "How about implementing getUserByName as a GET method in OpenAPIServer\Api\UserApi class?"; throw new HttpNotImplementedException($request, $message); } @@ -153,13 +144,14 @@ public function getUserByName(ServerRequestInterface $request, ResponseInterface * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function loginUser(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function loginUser( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $queryParams = $request->getQueryParams(); $username = (key_exists('username', $queryParams)) ? $queryParams['username'] : null; $password = (key_exists('password', $queryParams)) ? $queryParams['password'] : null; @@ -173,13 +165,14 @@ public function loginUser(ServerRequestInterface $request, ResponseInterface $re * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function logoutUser(ServerRequestInterface $request, ResponseInterface $response, array $args) - { + public function logoutUser( + ServerRequestInterface $request, + ResponseInterface $response + ): ResponseInterface { $message = "How about implementing logoutUser as a GET method in OpenAPIServer\Api\UserApi class?"; throw new HttpNotImplementedException($request, $message); } @@ -191,14 +184,16 @@ public function logoutUser(ServerRequestInterface $request, ResponseInterface $r * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response - * @param array|null $args Path arguments + * @param string $username name that need to be deleted * * @return ResponseInterface * @throws HttpNotImplementedException to force implementation class to override this method */ - public function updateUser(ServerRequestInterface $request, ResponseInterface $response, array $args) - { - $username = $args['username']; + public function updateUser( + ServerRequestInterface $request, + ResponseInterface $response, + string $username + ): ResponseInterface { $body = $request->getParsedBody(); $message = "How about implementing updateUser as a PUT method in OpenAPIServer\Api\UserApi class?"; throw new HttpNotImplementedException($request, $message); diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php b/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php new file mode 100644 index 000000000000..8c21bc3dca68 --- /dev/null +++ b/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php @@ -0,0 +1,71 @@ +addDefinitions([ + // Response factory required as typed argument in next ErrorMiddleware injection + \Psr\Http\Message\ResponseFactoryInterface::class => \DI\factory([\Slim\Factory\AppFactory::class, 'determineResponseFactory']), + + // Slim error middleware + // @see https://www.slimframework.com/docs/v4/middleware/error-handling.html + \Slim\Middleware\ErrorMiddleware::class => \DI\autowire() + ->constructorParameter('displayErrorDetails', \DI\get('slim.displayErrorDetails', false)) + ->constructorParameter('logErrors', \DI\get('slim.logErrors', true)) + ->constructorParameter('logErrorDetails', \DI\get('slim.logErrorDetails', true)), + + // PDO class for database managing + \PDO::class => \DI\create() + ->constructor( + \DI\get('pdo.dsn'), + \DI\get('pdo.username'), + \DI\get('pdo.password'), + \DI\get('pdo.options', null) + ), + ]); + } +} diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php b/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php new file mode 100644 index 000000000000..120d91dede9e --- /dev/null +++ b/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php @@ -0,0 +1,64 @@ +addBodyParsingMiddleware(); + + // Add Routing Middleware + $app->addRoutingMiddleware(); + + // Add Error Middleware + $app->add(\Slim\Middleware\ErrorMiddleware::class); + } +} diff --git a/samples/server/petstore/php-slim4/lib/SlimRouter.php b/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php similarity index 75% rename from samples/server/petstore/php-slim4/lib/SlimRouter.php rename to samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php index 1f81b223d2b3..52c5533f2ab7 100644 --- a/samples/server/petstore/php-slim4/lib/SlimRouter.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php @@ -15,39 +15,26 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +declare(strict_types=1); + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator * Do not edit the class manually. */ -namespace OpenAPIServer; +namespace OpenAPIServer\App; -use Slim\Factory\AppFactory; -use Slim\Interfaces\RouteInterface; use Slim\Exception\HttpNotImplementedException; -use Psr\Container\ContainerInterface; -use InvalidArgumentException; -use Dyorg\TokenAuthentication; -use Dyorg\TokenAuthentication\TokenSearch; -use Psr\Http\Message\ServerRequestInterface; -use OpenAPIServer\Mock\OpenApiDataMocker; -use OpenAPIServer\Mock\OpenApiDataMockerRouteMiddleware; -use Slim\Psr7\Factory\ResponseFactory; -use Exception; /** - * SlimRouter Class Doc Comment + * RegisterRoutes Class Doc Comment * * @package OpenAPIServer * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class SlimRouter +class RegisterRoutes { - - /** @var App instance */ - private $slimApp; - /** @var array[] list of all api operations */ private $operations = [ [ @@ -843,191 +830,36 @@ class SlimRouter ]; /** - * Class constructor + * Add routes to Slim app. * - * @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings + * @param \Slim\App $app Pre-configured Slim application instance * * @throws HttpNotImplementedException When implementation class doesn't exists - * @throws Exception when not supported authorization schema type provided */ - public function __construct($settings = []) + public function __invoke(\Slim\App $app): void { - if ($settings instanceof ContainerInterface) { - // Set container to create App with on AppFactory - AppFactory::setContainer($settings); - } - $this->slimApp = AppFactory::create(); - - // middlewares requires Psr\Container\ContainerInterface - $container = $this->slimApp->getContainer(); - - $authPackage = 'OpenAPIServer\Auth'; - $basicAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { - $message = "How about extending AbstractAuthenticator class by {$authPackage}\BasicAuthenticator?"; - throw new HttpNotImplementedException($request, $message); - }; - $apiKeyAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { - $message = "How about extending AbstractAuthenticator class by {$authPackage}\ApiKeyAuthenticator?"; - throw new HttpNotImplementedException($request, $message); - }; - $oAuthAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { - $message = "How about extending AbstractAuthenticator class by {$authPackage}\OAuthAuthenticator?"; - throw new HttpNotImplementedException($request, $message); - }; - - $userOptions = $this->getSetting($settings, 'tokenAuthenticationOptions', null); - - // mocker options - $mockerOptions = $this->getSetting($settings, 'mockerOptions', null); - $dataMocker = $mockerOptions['dataMocker'] ?? new OpenApiDataMocker(); - $responseFactory = new ResponseFactory(); - $getMockStatusCodeCallback = $mockerOptions['getMockStatusCodeCallback'] ?? null; - $mockAfterCallback = $mockerOptions['afterCallback'] ?? null; - foreach ($this->operations as $operation) { - $callback = function ($request, $response, $arguments) use ($operation) { + $callback = function ($request) use ($operation) { $message = "How about extending {$operation['classname']} by {$operation['apiPackage']}\\{$operation['userClassname']} class implementing {$operation['operationId']} as a {$operation['httpMethod']} method?"; throw new HttpNotImplementedException($request, $message); }; $middlewares = []; if (class_exists("\\{$operation['apiPackage']}\\{$operation['userClassname']}")) { - $callback = "\\{$operation['apiPackage']}\\{$operation['userClassname']}:{$operation['operationId']}"; + // Notice how we register the controller using the class name? + // PHP-DI will instantiate the class for us only when it's actually necessary + $callback = ["\\{$operation['apiPackage']}\\{$operation['userClassname']}", $operation['operationId']]; } - foreach ($operation['authMethods'] as $authMethod) { - switch ($authMethod['type']) { - case 'http': - $authenticatorClassname = "\\{$authPackage}\\BasicAuthenticator"; - if (class_exists($authenticatorClassname)) { - $basicAuthenticator = new $authenticatorClassname($container); - } - - $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ - 'authenticator' => $basicAuthenticator, - 'regex' => $authMethod['isBearer'] ? '/Bearer\s+(.*)$/i' : '/Basic\s+(.*)$/i', - 'header' => 'Authorization', - 'parameter' => null, - 'cookie' => null, - 'argument' => null, - ], $userOptions)); - break; - case 'apiKey': - $authenticatorClassname = "\\{$authPackage}\\ApiKeyAuthenticator"; - if (class_exists($authenticatorClassname)) { - $apiKeyAuthenticator = new $authenticatorClassname($container); - } - - $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ - 'authenticator' => $apiKeyAuthenticator, - 'regex' => '/^(.*)$/i', - 'header' => $authMethod['isKeyInHeader'] ? $authMethod['keyParamName'] : null, - 'parameter' => $authMethod['isKeyInQuery'] ? $authMethod['keyParamName'] : null, - 'cookie' => $authMethod['isKeyInCookie'] ? $authMethod['keyParamName'] : null, - 'argument' => null, - ], $userOptions)); - break; - case 'oauth2': - $authenticatorClassname = "\\{$authPackage}\\OAuthAuthenticator"; - if (class_exists($authenticatorClassname)) { - $oAuthAuthenticator = new $authenticatorClassname($container, $authMethod['scopes']); - } - - $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ - 'authenticator' => $oAuthAuthenticator, - 'regex' => '/Bearer\s+(.*)$/i', - 'header' => 'Authorization', - 'parameter' => null, - 'cookie' => null, - 'argument' => null, - ], $userOptions)); - break; - default: - throw new Exception('Unknown authorization schema type'); - } - } - - if (is_callable($getMockStatusCodeCallback)) { - $mockSchemaResponses = array_map(function ($item) { - return json_decode($item['jsonSchema'], true); - }, $operation['responses']); - $middlewares[] = new OpenApiDataMockerRouteMiddleware($dataMocker, $mockSchemaResponses, $responseFactory, $getMockStatusCodeCallback, $mockAfterCallback); - } - - $this->addRoute( + $route = $app->map( [$operation['httpMethod']], "{$operation['basePathWithoutHost']}{$operation['path']}", - $callback, - $middlewares + $callback )->setName($operation['operationId']); - } - } - - /** - * Merges user defined options with dynamic params - * - * @param array $staticOptions Required static options - * @param array $userOptions User options - * - * @return array Merged array - */ - private function getTokenAuthenticationOptions(array $staticOptions, array $userOptions = null) - { - if (is_array($userOptions) === false) { - return $staticOptions; - } - return array_merge($userOptions, $staticOptions); - } - - /** - * Returns app setting by name. - * - * @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings - * @param string $settingName Setting name - * @param mixed $default Default setting value. - * - * @return mixed - */ - private function getSetting($settings, $settingName, $default = null) - { - if ($settings instanceof ContainerInterface && $settings->has($settingName)) { - return $settings->get($settingName); - } elseif (is_array($settings) && array_key_exists($settingName, $settings)) { - return $settings[$settingName]; - } - - return $default; - } - - /** - * Add route with multiple methods - * - * @param string[] $methods Numeric array of HTTP method names - * @param string $pattern The route URI pattern - * @param callable|string $callable The route callback routine - * @param array|null $middlewares List of middlewares - * - * @return RouteInterface - * - * @throws InvalidArgumentException If the route pattern isn't a string - */ - public function addRoute(array $methods, string $pattern, $callable, $middlewares = []) - { - $route = $this->slimApp->map($methods, $pattern, $callable); - foreach ($middlewares as $middleware) { - $route->add($middleware); + foreach ($middlewares as $middleware) { + $route->add($middleware); + } } - return $route; - } - - /** - * Returns Slim Framework instance - * - * @return App - */ - public function getSlimApp() - { - return $this->slimApp; } } diff --git a/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php b/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php index de2e60113645..699fd1fdbc76 100644 --- a/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php +++ b/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php @@ -22,7 +22,6 @@ */ namespace OpenAPIServer\Auth; -use Psr\Container\ContainerInterface; use Psr\Http\Message\ServerRequestInterface; use Dyorg\TokenAuthentication; use Dyorg\TokenAuthentication\TokenSearch; @@ -37,12 +36,6 @@ */ abstract class AbstractAuthenticator { - - /** - * @var ContainerInterface|null Slim app container instance - */ - protected $container; - /** * @var string[]|null List of required scopes */ @@ -62,12 +55,10 @@ abstract protected function getUserByToken(string $token); /** * Authenticator constructor * - * @param ContainerInterface|null $container Slim app container instance - * @param string[]|null $requiredScope List of required scopes + * @param string[]|null $requiredScope List of required scopes */ - public function __construct(ContainerInterface $container = null, $requiredScope = null) + public function __construct($requiredScope = null) { - $this->container = $container; $this->requiredScope = $requiredScope; } diff --git a/samples/server/petstore/php-slim4/public/.htaccess b/samples/server/petstore/php-slim4/public/.htaccess index f6a2ceb3952b..57c2185f0e4a 100644 --- a/samples/server/petstore/php-slim4/public/.htaccess +++ b/samples/server/petstore/php-slim4/public/.htaccess @@ -1,3 +1,7 @@ + + SetEnv APP_ENV 'production' + + RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f diff --git a/samples/server/petstore/php-slim4/public/index.php b/samples/server/petstore/php-slim4/public/index.php index 9993535af751..e336d00f81b5 100644 --- a/samples/server/petstore/php-slim4/public/index.php +++ b/samples/server/petstore/php-slim4/public/index.php @@ -22,48 +22,63 @@ require_once __DIR__ . '/../vendor/autoload.php'; -use OpenAPIServer\SlimRouter; -use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Message\ResponseInterface; -use OpenAPIServer\Mock\OpenApiDataMocker; - -// load config file -$config = []; -if (is_array($prodConfig = @include(__DIR__ . '/../config/prod/config.inc.php'))) { - $config = $prodConfig; -} elseif (is_array($devConfig = @include(__DIR__ . '/../config/dev/config.inc.php'))) { - $config = $devConfig; -} else { - throw new InvalidArgumentException('Config file missed or broken.'); +use DI\Bridge\Slim\Bridge; +use DI\ContainerBuilder; +use OpenAPIServer\App\RegisterDependencies; +use OpenAPIServer\App\RegisterRoutes; +use OpenAPIServer\App\RegisterMiddlewares; +use Slim\Factory\ServerRequestCreatorFactory; +use Slim\ResponseEmitter; + +// Instantiate PHP-DI ContainerBuilder +$builder = new ContainerBuilder(); + +// consider prod by default +$env; +switch (strtolower($_SERVER['APP_ENV'] ?? 'prod')) { + case 'development': + case 'dev': + $env = 'dev'; + break; + case 'production': + case 'prod': + default: + $env = 'prod'; } -$router = new SlimRouter($config); -$app = $router->getSlimApp(); +// Main configuration +$builder->addDefinitions(__DIR__ . "/../config/{$env}/default.inc.php"); -// Parse json, form data and xml -$app->addBodyParsingMiddleware(); +// Config file for the environment if exists +$userConfig = __DIR__ . "/../config/{$env}/config.inc.php"; +if (file_exists($userConfig)) { + $builder->addDefinitions($userConfig); +} -/** - * The routing middleware should be added before the ErrorMiddleware - * Otherwise exceptions thrown from it will not be handled - */ -$app->addRoutingMiddleware(); +// Set up dependencies +$dependencies = new RegisterDependencies(); +$dependencies($builder); -/** - * Add Error Handling Middleware - * - * @param bool $displayErrorDetails -> Should be set to false in production - * @param bool $logErrors -> Parameter is passed to the default ErrorHandler - * @param bool $logErrorDetails -> Display error details in error log - * which can be replaced by a callable of your choice. +// Build PHP-DI Container instance +$container = $builder->build(); - * Note: This middleware should be added last. It will not handle any exceptions/errors - * for middleware added after it. - */ -$app->addErrorMiddleware( - $config['slimSettings']['displayErrorDetails'] ?? false, - $config['slimSettings']['logErrors'] ?? true, - $config['slimSettings']['logErrorDetails'] ?? true -); +// Instantiate the app +$app = Bridge::create($container); + +// Register middleware +$middleware = new RegisterMiddlewares(); +$middleware($app); + +// Register routes +// yes, it's anti-pattern you shouldn't get deps from container directly +$routes = $container->get(RegisterRoutes::class); +$routes($app); + +// Create Request object from globals +$serverRequestCreator = ServerRequestCreatorFactory::create(); +$request = $serverRequestCreator->createServerRequestFromGlobals(); -$app->run(); +// Run App & Emit Response +$response = $app->handle($request); +$responseEmitter = new ResponseEmitter(); +$responseEmitter->emit($response); From 08773a211c4898cfb075de750021c62f447dc6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Wed, 29 Dec 2021 04:50:08 +0100 Subject: [PATCH 033/175] Rust Client: Support collectionFormat="multi" (#11169) Previously, rust-client generator disregarded collectionFormat property of multi-value parameters. Now we support following values in collectionFormat: "", "csv", "multi". You can review changes this creates for fairly sizable project at https://github.com/CrowdStrike/rusty-falcon/pull/33/files --- .../main/resources/rust/reqwest/api.mustache | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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 867ba22a254f..09574898814d 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -101,11 +101,27 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: {{#queryParams}} {{#required}} - local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &{{{paramName}}}{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string())]); + {{#isArray}} + local_var_req_builder = match "{{collectionFormat}}" { + "multi" => local_var_req_builder.query(&{{{paramName}}}.into_iter().map(|p| ("{{{baseName}}}".to_owned(), p)).collect::>()), + _ => local_var_req_builder.query(&[("{{{baseName}}}", &{{{paramName}}}.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + {{/isArray}} + {{^isArray}} + local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &{{{paramName}}}.to_string())]); + {{/isArray}} {{/required}} {{^required}} if let Some(ref local_var_str) = {{{paramName}}} { - local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &local_var_str{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string())]); + {{#isArray}} + local_var_req_builder = match "{{collectionFormat}}" { + "multi" => local_var_req_builder.query(&local_var_str.into_iter().map(|p| ("{{{baseName}}}".to_owned(), p.to_string())).collect::>()), + _ => local_var_req_builder.query(&[("{{{baseName}}}", &local_var_str.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + {{/isArray}} + {{^isArray}} + local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &local_var_str.to_string())]); + {{/isArray}} } {{/required}} {{/queryParams}} From d48539105105bd307188ab1d768c2430ea384418 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 29 Dec 2021 11:54:45 +0800 Subject: [PATCH 034/175] update rust samples --- .../rust/reqwest/petstore-async/src/apis/pet_api.rs | 10 ++++++++-- .../petstore/rust/reqwest/petstore/src/apis/pet_api.rs | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs index 741c3fa741b3..099ea08daa10 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs @@ -299,7 +299,10 @@ pub async fn find_pets_by_status(configuration: &configuration::Configuration, p 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 = local_var_req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); + 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()); } @@ -337,7 +340,10 @@ pub async fn find_pets_by_tags(configuration: &configuration::Configuration, par 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 = local_var_req_builder.query(&[("tags", &tags.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); + 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()); } diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs index 7718490b73c7..214dbd71b06d 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs @@ -155,7 +155,10 @@ pub fn find_pets_by_status(configuration: &configuration::Configuration, status: 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 = local_var_req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); + 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()); } @@ -187,7 +190,10 @@ pub fn find_pets_by_tags(configuration: &configuration::Configuration, tags: Vec 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 = local_var_req_builder.query(&[("tags", &tags.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); + 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()); } From 48a8f255c9e7fb867749b03f31e0139e7d099c9a Mon Sep 17 00:00:00 2001 From: jiangyuan <469391363@qq.com> Date: Wed, 29 Dec 2021 20:25:43 +0800 Subject: [PATCH 035/175] fix CI Docs build fail (#11196) Co-authored-by: jiangyuan04 --- samples/meta-codegen/lib/pom.xml | 2 +- samples/meta-codegen/usage/.openapi-generator/VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 9587ea668d32..b078605c904e 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,7 @@ UTF-8 - 5.3.1 + 5.4.0-SNAPSHOT 1.0.0 4.13.2 diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index 7d3cdbf0dd04..0984c4c1ad21 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file From 8a3b434d54de4639295a34c332707678d4f44038 Mon Sep 17 00:00:00 2001 From: Hiromi Hishida Date: Thu, 30 Dec 2021 19:57:01 +0900 Subject: [PATCH 036/175] [php] Handle \SplFileObject before primitive(to avoid php8 settype() error) (#11184) * Handle \SplFileObject before primitive(to avoid php8 settype() error) * Add test case * Add array check to fix type error Code throws error: array_key_exists() expects parameter 2 to be array, null given When $httpHeaders argument is null. Co-authored-by: Yuriy Belenko --- .../resources/php/ObjectSerializer.mustache | 24 ++++++----- .../lib/ObjectSerializer.php | 24 ++++++----- .../tests/ObjectSerializerTest.php | 40 +++++++++++++++++++ 3 files changed, 70 insertions(+), 18 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index 2d5c2c911387..6d1193099c50 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -323,18 +323,15 @@ class ObjectSerializer } } - /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, [{{&primitives}}], true)) { - settype($data, $class); - return $data; - } - if ($class === '\SplFileObject') { /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (array_key_exists('Content-Disposition', $httpHeaders) && - preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); @@ -347,7 +344,16 @@ class ObjectSerializer fclose($file); return new \SplFileObject($filename, 'r'); - } elseif (method_exists($class, 'getAllowableEnumValues')) { + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, [{{&primitives}}], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues(), true)) { $imploded = implode("', '", $class::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 017633db769f..9d9562bb6689 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -332,18 +332,15 @@ public static function deserialize($data, $class, $httpHeaders = null) } } - /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { - settype($data, $class); - return $data; - } - if ($class === '\SplFileObject') { /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (array_key_exists('Content-Disposition', $httpHeaders) && - preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); @@ -356,7 +353,16 @@ public static function deserialize($data, $class, $httpHeaders = null) fclose($file); return new \SplFileObject($filename, 'r'); - } elseif (method_exists($class, 'getAllowableEnumValues')) { + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues(), true)) { $imploded = implode("', '", $class::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php index 818568873aa1..d7cc4a173f16 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php @@ -2,7 +2,9 @@ namespace OpenAPI\Client; +use GuzzleHttp\Psr7\Utils; use PHPUnit\Framework\TestCase; +use Psr\Http\Message\StreamInterface; // test object serializer class ObjectSerializerTest extends TestCase @@ -24,4 +26,42 @@ public function testSanitizeFilename() $this->assertSame("sun.gif", $s->sanitizeFilename("c:\var\tmp\sun.gif")); $this->assertSame("sun.gif", $s->sanitizeFilename(".\sun.gif")); } + + /** + * Test SplFileObject class deserialization. + * + * @see https://github.com/OpenAPITools/openapi-generator/pull/11184 + * @covers ObjectSerializer::serialize + * @dataProvider provideFileStreams + */ + public function testDeserializeFile(StreamInterface $stream, ?array $httpHeaders = null, ?string $expectedFilename = null): void + { + $s = new ObjectSerializer(); + + /** @var \SplFileObject */ + $file = $s->deserialize($stream, '\SplFileObject', $httpHeaders); + $this->assertInstanceOf(\SplFileObject::class, $file); + + if (is_string($expectedFilename)) { + $this->assertEquals($expectedFilename, $file->getFilename()); + } else { + $this->assertNotEquals($expectedFilename, $file->getFilename()); + } + } + + public function provideFileStreams() + { + return [ + 'File stream without headers' => [ + Utils::streamFor(\fopen(__FILE__, 'r')), + null, + null, + ], + 'File stream with Content-Disposition header' => [ + Utils::streamFor(\fopen(__FILE__, 'r')), + ['Content-Disposition' => 'inline; filename=\'foobar.php\''], + 'foobar.php', + ], + ]; + } } From 9c3cba9b86311952f4132d19796a656f2b4daf3e Mon Sep 17 00:00:00 2001 From: Jarrod Parkes Date: Sun, 2 Jan 2022 00:51:15 -0600 Subject: [PATCH 037/175] [swift5] Add property `x-null-encodable` extension for full control over encoding value/nil or nothing (#11141) * feat(ISSUE-11033): add null encodable type and mustache changes * feat(ISSUE-11033): regen all swift5 samples * feat(ISSUE-11033): add swift5 examples of null encodable * feat(ISSUE-11033): fix hashable and compliation issues * fix(ISSUE-11033): fix tests by using new enum encodeValue * fix(ISSUE-11033): fix tests by using new enum encodeValue * fix(ISSUE-11033): revert status back in pet api test * fix(ISSUE-11033): fix issue with objc compat generator * feat(ISSUE-11033): restore default values to null encodables * chore(ISSUE-11033): rename default value for null encodable * chore(ISSUE-11033): add test cases with different nullable defaults --- .../languages/Swift5ClientCodegen.java | 10 +++++++ .../src/main/resources/swift5/Models.mustache | 30 +++++++++++++++++++ .../resources/swift5/modelObject.mustache | 25 +++++++++++++--- .../main/resources/swift5/model_doc.mustache | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 4 +++ .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../SwaggerClientTests/PetAPITests.swift | 2 +- .../swift5/alamofireLibrary/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../swift5/asyncAwaitLibrary/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../SwaggerClientTests/PetAPITests.swift | 2 +- .../swift5/combineLibrary/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../petstore/swift5/frozenEnums/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../petstore/swift5/nonPublicApi/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 15 +++++++--- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../swift5/objcCompatible/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../SwaggerClientTests/PetAPITests.swift | 2 +- .../swift5/promisekitLibrary/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../swift5/readonlyProperties/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../swift5/resultLibrary/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../SwaggerClientTests/PetAPITests.swift | 2 +- .../swift5/rxswiftLibrary/docs/Name.md | 2 +- .../Sources/PetstoreClient/Models.swift | 30 +++++++++++++++++++ .../Sources/PetstoreClient/Models/Name.swift | 11 ++++--- .../Sources/PetstoreClient/Models/Pet.swift | 11 ++++--- .../SwaggerClientTests/PetAPITests.swift | 2 +- .../swift5/urlsessionLibrary/docs/Name.md | 2 +- .../Classes/OpenAPIs/Models.swift | 30 +++++++++++++++++++ .../Classes/OpenAPIs/Models/Name.swift | 9 ++++-- .../Classes/OpenAPIs/Models/Pet.swift | 9 ++++-- .../swift5/x-swift-hashable/docs/Name.md | 2 +- 61 files changed, 684 insertions(+), 97 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 21e7a03c8817..b853bf351cce 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -1110,6 +1110,16 @@ public Map postProcessModels(Map objs) { prop.vendorExtensions.put("x-codegen-escaped-property-name", true); modelHasPropertyWithEscapedName = true; } + + if (prop.vendorExtensions.containsKey("x-null-encodable")) { + if (prop.vendorExtensions.get("x-null-encodable").toString().equals("true")) { + if (prop.defaultValue == null || prop.defaultValue.equals("null")) { + prop.vendorExtensions.put("x-null-encodable-default-value", ".encodeNull"); + } else { + prop.vendorExtensions.put("x-null-encodable-default-value", ".encodeValue(" + prop.defaultValue + ")"); + } + } + } } if (modelHasPropertyWithEscapedName) { cm.vendorExtensions.put("x-codegen-has-escaped-property-names", true); diff --git a/modules/openapi-generator/src/main/resources/swift5/Models.mustache b/modules/openapi-generator/src/main/resources/swift5/Models.mustache index 28d9935dd532..e0cbb9087a31 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Models.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Models.mustache @@ -37,6 +37,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache index fb00843bdec9..713bc305495b 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache @@ -11,17 +11,26 @@ {{#isEnum}} {{#description}}/** {{{.}}} */ {{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.") - {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} + {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{#vendorExtensions.x-null-encodable}}NullEncodable<{{{datatypeWithEnum}}}>{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{/vendorExtensions.x-null-encodable}}{{#defaultValue}} = {{#vendorExtensions.x-null-encodable}}{{{vendorExtensions.x-null-encodable-default-value}}}{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{.}}}{{/vendorExtensions.x-null-encodable}}{{/defaultValue}} {{/isEnum}} {{^isEnum}} {{#description}}/** {{{.}}} */ {{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.") - {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} + {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{#vendorExtensions.x-null-encodable}}NullEncodable<{{{datatype}}}>{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{/vendorExtensions.x-null-encodable}}{{#defaultValue}} = {{#vendorExtensions.x-null-encodable}}{{{vendorExtensions.x-null-encodable-default-value}}}{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{.}}}{{/vendorExtensions.x-null-encodable}}{{/defaultValue}} {{#objcCompatible}} {{#vendorExtensions.x-swift-optional-scalar}} {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{{name}}}Num: NSNumber? { get { + {{^vendorExtensions.x-null-encodable}} return {{{name}}} as NSNumber? + {{/vendorExtensions.x-null-encodable}} + {{#vendorExtensions.x-null-encodable}} + if case .encodeValue(let value) = {{name}} { + return value as NSNumber? + } else { + return nil + } + {{/vendorExtensions.x-null-encodable}} } } {{/vendorExtensions.x-swift-optional-scalar}} @@ -30,7 +39,7 @@ {{/allVars}} {{#hasVars}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{{name}}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{^defaultValue}}{{^required}} = nil{{/required}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allVars}}) { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{{name}}}: {{#vendorExtensions.x-null-encodable}}NullEncodable<{{{datatypeWithEnum}}}>{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{/vendorExtensions.x-null-encodable}}{{#defaultValue}} = {{#vendorExtensions.x-null-encodable}}{{{vendorExtensions.x-null-encodable-default-value}}}{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{.}}}{{/vendorExtensions.x-null-encodable}}{{/defaultValue}}{{^defaultValue}}{{^required}} = {{#vendorExtensions.x-null-encodable}}.encodeNull{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}nil{{/vendorExtensions.x-null-encodable}}{{/required}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allVars}}) { {{#allVars}} self.{{{name}}} = {{{name}}} {{/allVars}} @@ -63,7 +72,15 @@ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) {{#allVars}} + {{#vendorExtensions.x-null-encodable}} + switch {{{name}}} { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode({{{name}}}, forKey: .{{{name}}}) + } + {{/vendorExtensions.x-null-encodable}} + {{^vendorExtensions.x-null-encodable}} try container.encode{{^required}}IfPresent{{/required}}({{{name}}}, forKey: .{{{name}}}) + {{/vendorExtensions.x-null-encodable}} {{/allVars}} {{#generateModelAdditionalProperties}} {{#additionalPropertiesType}} @@ -98,7 +115,7 @@ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func hash(into hasher: inout Hasher) { {{#allVars}} - hasher.combine({{{name}}}{{^required}}?{{/required}}.hashValue) + hasher.combine({{{name}}}{{^vendorExtensions.x-null-encodable}}{{^required}}?{{/required}}{{/vendorExtensions.x-null-encodable}}.hashValue) {{/allVars}} {{#generateModelAdditionalProperties}}{{#additionalPropertiesType}}hasher.combine(additionalProperties.hashValue){{/additionalPropertiesType}}{{/generateModelAdditionalProperties}} }{{/vendorExtensions.x-swift-hashable}}{{/useClasses}}{{/objcCompatible}} diff --git a/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache b/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache index 6b68575707a6..952fc7deb006 100644 --- a/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isContainer}}[**{{dataType}}**]({{complexType}}.md){{/isContainer}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isContainer}}[**{{dataType}}**]({{complexType}}.md){{/isContainer}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{#vendorExtensions.x-null-encodable}}.encodeValue({{{.}}}){{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{.}}}{{/vendorExtensions.x-null-encodable}}]{{/defaultValue}} {{/vars}} [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 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 6fa25c302182..588fde8671cf 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 @@ -1169,6 +1169,8 @@ definitions: status: type: string description: pet status in the store + x-null-encodable: true + default: null enum: - available - pending @@ -1212,6 +1214,8 @@ definitions: readOnly: true type: integer format: int32 + x-null-encodable: true + default: 11033 property: type: string 123Number: 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 fc69bffcc11b..cace428fb5dd 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -37,6 +37,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index a28f46a33ce7..8698915e5ef2 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable, Hashable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index ddd1186b8910..bceec7ccb53f 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ public struct Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift index 9dfbc9aa465d..dceab177dab9 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -28,7 +28,7 @@ class PetAPITests: XCTestCase { let expectation = self.expectation(description: "testCreatePet") let category = Category(id: 1234, name: "eyeColor") let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] - let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .encodeValue(.available)) PetAPI.addPet(body: newPet) { (_, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Name.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/Name.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index a28f46a33ce7..8698915e5ef2 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable, Hashable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index ddd1186b8910..bceec7ccb53f 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ public struct Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Name.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Name.md +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index a28f46a33ce7..8698915e5ef2 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable, Hashable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index ddd1186b8910..bceec7ccb53f 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ public struct Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift index 29c50819e27d..b29d79aa362d 100644 --- a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -32,7 +32,7 @@ class PetAPITests: XCTestCase { let expectation = self.expectation(description: "testCreatePet") let category = Category(id: 1234, name: "eyeColor") let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] - let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .encodeValue(.available)) PetAPI.addPet(body: newPet).sink(receiveCompletion: { (completion) in switch completion { diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Name.md b/samples/client/petstore/swift5/combineLibrary/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/Name.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index a28f46a33ce7..8698915e5ef2 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable, Hashable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 45b4cff8e1e5..a0e8a03c82ba 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -24,9 +24,9 @@ public struct Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -53,7 +53,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/frozenEnums/docs/Name.md b/samples/client/petstore/swift5/frozenEnums/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/frozenEnums/docs/Name.md +++ b/samples/client/petstore/swift5/frozenEnums/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7fcbd1ee511b..b91c1d232787 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + internal enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 2a842bf54aa4..59807f762099 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable internal struct Name: Codable, Hashable { internal var name: Int - internal var snakeCase: Int? + internal var snakeCase: NullEncodable = .encodeValue(11033) internal var property: String? internal var _123number: Int? - internal init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + internal init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ internal struct Name: Codable, Hashable { internal func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 8c77a382e8f1..ca9db44f248e 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ internal struct Pet: Codable, Hashable { internal var photoUrls: [String] internal var tags: [Tag]? /** pet status in the store */ - internal var status: Status? + internal var status: NullEncodable - internal init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + internal init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ internal struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Name.md b/samples/client/petstore/swift5/nonPublicApi/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/Name.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 3b41f3cafd9f..e1fed77c4a91 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,10 +14,14 @@ import AnyCodable @objc public class Name: NSObject, Codable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var snakeCaseNum: NSNumber? { get { - return snakeCase as NSNumber? + if case .encodeValue(let value) = snakeCase { + return value as NSNumber? + } else { + return nil + } } } public var property: String? @@ -28,7 +32,7 @@ import AnyCodable } } - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -47,7 +51,10 @@ import AnyCodable public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index a59ef82eb801..d4d38218ecd9 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -28,9 +28,9 @@ import AnyCodable public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(_id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(_id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self._id = _id self.category = category self.name = name @@ -57,7 +57,10 @@ import AnyCodable try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Name.md b/samples/client/petstore/swift5/objcCompatible/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/Name.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index a28f46a33ce7..8698915e5ef2 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable, Hashable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index ddd1186b8910..bceec7ccb53f 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ public struct Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift index ff6de167c8ef..b0c0d848619b 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -29,7 +29,7 @@ class PetAPITests: XCTestCase { let expectation = self.expectation(description: "testCreatePet") let category = Category(id: 1234, name: "eyeColor") let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] - let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .encodeValue(.available)) PetAPI.addPet(body: newPet).done { expectation.fulfill() diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Name.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/Name.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 0280404c0441..cf7c0094910d 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable, Hashable { public private(set) var name: Int - public private(set) var snakeCase: Int? + public private(set) var snakeCase: NullEncodable = .encodeValue(11033) public private(set) var property: String? public private(set) var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index f4f7928e77e6..5ba4da07a5cb 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ public struct Pet: Codable, Hashable { public private(set) var photoUrls: [String] public private(set) var tags: [Tag]? /** pet status in the store */ - public private(set) var status: Status? + public private(set) var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/Name.md b/samples/client/petstore/swift5/readonlyProperties/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/Name.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index a28f46a33ce7..8698915e5ef2 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable, Hashable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index ddd1186b8910..bceec7ccb53f 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ public struct Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Name.md b/samples/client/petstore/swift5/resultLibrary/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/Name.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index a28f46a33ce7..8698915e5ef2 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable, Hashable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index ddd1186b8910..bceec7ccb53f 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ public struct Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift index d5da81a1203e..e3d966aebd59 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -30,7 +30,7 @@ class PetAPITests: XCTestCase { let expectation = self.expectation(description: "testCreatePet") let category = Category(id: 1234, name: "eyeColor") let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] - let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .encodeValue(.available)) PetAPI.addPet(body: newPet).subscribe(onNext: { expectation.fulfill() diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Name.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/Name.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift index 7cb4e06d16cc..0079b465ca7d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift index fee33da7ddf0..c7c6374fcd7c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift @@ -19,11 +19,11 @@ extension PetstoreClientAPI { public final class Name: Codable, Hashable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -42,7 +42,10 @@ public final class Name: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } @@ -57,7 +60,7 @@ public final class Name: Codable, Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(name.hashValue) - hasher.combine(snakeCase?.hashValue) + hasher.combine(snakeCase.hashValue) hasher.combine(property?.hashValue) hasher.combine(_123number?.hashValue) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift index 63628629df1e..c764a418dea5 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift @@ -28,9 +28,9 @@ public final class Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -57,7 +57,10 @@ public final class Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } public static func == (lhs: Pet, rhs: Pet) -> Bool { @@ -76,7 +79,7 @@ public final class Pet: Codable, Hashable { hasher.combine(name.hashValue) hasher.combine(photoUrls.hashValue) hasher.combine(tags?.hashValue) - hasher.combine(status?.hashValue) + hasher.combine(status.hashValue) } } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift index f1a26cdd41b8..f02cf21e6907 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -28,7 +28,7 @@ class PetAPITests: XCTestCase { let expectation = self.expectation(description: "testCreatePet") let category = PetstoreClientAPI.Category(id: 1234, name: "eyeColor") let tags = [PetstoreClientAPI.Tag(id: 1234, name: "New York"), PetstoreClientAPI.Tag(id: 124321, name: "Jose")] - let newPet = PetstoreClientAPI.Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + let newPet = PetstoreClientAPI.Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .encodeValue(.available)) PetstoreClientAPI.PetAPI.addPet(body: newPet) { (_, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Name.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/Name.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] 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 7cb4e06d16cc..0079b465ca7d 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 @@ -36,6 +36,36 @@ extension CaseIterableDefaultsLast { } } +/// A flexible type that can be encoded (`.encodeNull` or `.encodeValue`) +/// or not encoded (`.encodeNothing`). Intended for request payloads. +public enum NullEncodable: Hashable { + case encodeNothing + case encodeNull + case encodeValue(Wrapped) +} + +extension NullEncodable: Codable where Wrapped: Codable { + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let value = try? container.decode(Wrapped.self) { + self = .encodeValue(value) + } else if container.decodeNil() { + self = .encodeNull + } else { + self = .encodeNothing + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + switch self { + case .encodeNothing: return + case .encodeNull: try container.encodeNil() + case .encodeValue(let wrapped): try container.encode(wrapped) + } + } +} + public enum ErrorResponse: Error { case error(Int, Data?, URLResponse?, Error) } diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 15308075d9a6..e38ffc2eebd3 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -14,11 +14,11 @@ import AnyCodable public struct Name: Codable { public var name: Int - public var snakeCase: Int? + public var snakeCase: NullEncodable = .encodeValue(11033) public var property: String? public var _123number: Int? - public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + public init(name: Int, snakeCase: NullEncodable = .encodeValue(11033), property: String? = nil, _123number: Int? = nil) { self.name = name self.snakeCase = snakeCase self.property = property @@ -37,7 +37,10 @@ public struct Name: Codable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + switch snakeCase { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(snakeCase, forKey: .snakeCase) + } try container.encodeIfPresent(property, forKey: .property) try container.encodeIfPresent(_123number, forKey: ._123number) } diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index ddd1186b8910..bceec7ccb53f 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -23,9 +23,9 @@ public struct Pet: Codable, Hashable { public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ - public var status: Status? + public var status: NullEncodable - public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: NullEncodable = .encodeNull) { self.id = id self.category = category self.name = name @@ -52,7 +52,10 @@ public struct Pet: Codable, Hashable { try container.encode(name, forKey: .name) try container.encode(photoUrls, forKey: .photoUrls) try container.encodeIfPresent(tags, forKey: .tags) - try container.encodeIfPresent(status, forKey: .status) + switch status { + case .encodeNothing: break + case .encodeNull, .encodeValue: try container.encode(status, forKey: .status) + } } } diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/Name.md b/samples/client/petstore/swift5/x-swift-hashable/docs/Name.md index f7b180292cd6..507efd90b322 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/Name.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/Name.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] +**snakeCase** | **Int** | | [optional] [readonly] [default to .encodeValue(11033)] **property** | **String** | | [optional] **_123number** | **Int** | | [optional] [readonly] From 8d532d5a38b976611534cc66291ca0cda8d0d60c Mon Sep 17 00:00:00 2001 From: sullis Date: Sat, 1 Jan 2022 22:53:30 -0800 Subject: [PATCH 038/175] [scala-gatling] use the official Gradle plugin (#11208) --- .../src/main/resources/scala-gatling/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/scala-gatling/build.gradle b/modules/openapi-generator/src/main/resources/scala-gatling/build.gradle index a9a3eb68dadf..5b794168bd64 100644 --- a/modules/openapi-generator/src/main/resources/scala-gatling/build.gradle +++ b/modules/openapi-generator/src/main/resources/scala-gatling/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.github.lkishalmi.gatling' version '0.7.1' + id 'io.gatling.gradle' version '3.7.3' } repositories { @@ -10,7 +10,7 @@ dependencies { } -apply plugin: "com.github.lkishalmi.gatling" +apply plugin: "io.gatling.gradle" gatling { toolVersion = '2.3.0' @@ -26,4 +26,4 @@ gatling { '-XX:+CMSParallelRemarkEnabled', '-Djava.net.preferIPv4Stack=true', '-Djava.net.preferIPv6Addresses=false'] -} \ No newline at end of file +} From 5f5a83a592ef16d5cdec6c8c90110265080bc2bf Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 2 Jan 2022 16:37:16 +0800 Subject: [PATCH 039/175] fix enum name in okhttp-gson-nextgen (#11210) --- .../Java/libraries/okhttp-gson-nextgen/ApiClient.mustache | 2 +- .../okhttp-gson-nextgen/auth/RetryingOAuth.mustache | 8 ++++---- .../src/main/java/org/openapitools/client/ApiClient.java | 2 +- .../java/org/openapitools/client/auth/RetryingOAuth.java | 8 ++++---- .../org/openapitools/client/auth/RetryingOAuthTest.java | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/ApiClient.mustache index 732551cec585..854ac95cf915 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/ApiClient.mustache @@ -197,7 +197,7 @@ public class ApiClient { throw new IllegalArgumentException("OAuth2 token URL must be an absolute URL"); } } - RetryingOAuth retryingOAuth = new RetryingOAuth(tokenUrl, clientId, OAuthFlow.{{flow}}, clientSecret, parameters); + RetryingOAuth retryingOAuth = new RetryingOAuth(tokenUrl, clientId, OAuthFlow.{{#lambda.uppercase}}{{#lambda.snakecase}}{{flow}}{{/lambda.snakecase}}{{/lambda.uppercase}}, clientSecret, parameters); authentications.put( "{{name}}", retryingOAuth diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/auth/RetryingOAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/auth/RetryingOAuth.mustache index 137e266b5a29..7b09aa700d61 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/auth/RetryingOAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/auth/RetryingOAuth.mustache @@ -65,16 +65,16 @@ public class RetryingOAuth extends OAuth implements Interceptor { public void setFlow(OAuthFlow flow) { switch(flow) { - case accessCode: + case ACCESS_CODE: tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); break; - case implicit: + case IMPLICIT: tokenRequestBuilder.setGrantType(GrantType.IMPLICIT); break; - case password: + case PASSWORD: tokenRequestBuilder.setGrantType(GrantType.PASSWORD); break; - case application: + case APPLICATION: tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); break; default: diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ApiClient.java index 7e3cf65e18cf..a5fc2cca5d68 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ApiClient.java @@ -180,7 +180,7 @@ public ApiClient(String basePath, String clientId, String clientSecret, MapemptyMap()); oauth.setAccessToken("expired-access-token"); From 9f4f2fde478172aa3c7bfc1f64cf72ff889f4b26 Mon Sep 17 00:00:00 2001 From: Alan Morgan Date: Sun, 2 Jan 2022 02:23:39 -0700 Subject: [PATCH 040/175] [GH-11032] Bug - Allow query parameters than contain spaces for Java client. (#11160) The java client doesn't allow query parameters that have a value of just "%20" or "%0A". Those can now be values with this commit. --- .../openapi-generator/src/main/resources/Java/Pair.mustache | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/Pair.mustache b/modules/openapi-generator/src/main/resources/Java/Pair.mustache index ff9e06b20d46..ed767ce72675 100644 --- a/modules/openapi-generator/src/main/resources/Java/Pair.mustache +++ b/modules/openapi-generator/src/main/resources/Java/Pair.mustache @@ -41,10 +41,6 @@ public class Pair { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } From 238639a500a962747427f03ceb27d2c3b73a1817 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 2 Jan 2022 17:28:17 +0800 Subject: [PATCH 041/175] update java sampes --- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../jersey1/src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../native/src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../resteasy/src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../vertx/src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- .../src/main/java/org/openapitools/client/Pair.java | 4 ---- 18 files changed, 72 deletions(-) diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/Pair.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/Pair.java index d94e354bf316..f17b3745f71b 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/Pair.java index e1afb8c039f6..4290a1e6da6f 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java index e1afb8c039f6..4290a1e6da6f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java index e62f20b92ee3..cacf6934c4cb 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/Pair.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/Pair.java index 6ee3b9c95a87..6eb6e3854aef 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/Pair.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java index 8352d84046a7..25b5a1b08792 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/Pair.java @@ -52,10 +52,6 @@ private boolean isValidString(String arg) { return false; } - if (arg.trim().isEmpty()) { - return false; - } - return true; } } From 783f843690997905fe275d1fe610df1a06f6f0a4 Mon Sep 17 00:00:00 2001 From: Marc Miltenberger Date: Sun, 2 Jan 2022 10:33:41 +0100 Subject: [PATCH 042/175] [Java-OKHTTP-GSON] Do not set content-type if content type is null (#11199) Co-authored-by: Marc Miltenberger --- .../resources/Java/libraries/okhttp-gson-nextgen/api.mustache | 2 +- .../src/main/resources/Java/libraries/okhttp-gson/api.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/api.mustache index 2b623d2cf842..e0d605818d34 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/api.mustache @@ -173,7 +173,7 @@ public class {{classname}} { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index 50b7cfc5ed53..c55259c44fee 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -204,7 +204,7 @@ public class {{classname}} { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } From 2db3e6bb2563381d22c702b498cbdf1688b1b77b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 2 Jan 2022 17:55:26 +0800 Subject: [PATCH 043/175] update java samples --- .../org/openapitools/client/api/PingApi.java | 2 +- .../client/api/AnotherFakeApi.java | 2 +- .../org/openapitools/client/api/FakeApi.java | 28 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 2 +- .../org/openapitools/client/api/PetApi.java | 18 ++++++------ .../org/openapitools/client/api/StoreApi.java | 8 +++--- .../org/openapitools/client/api/UserApi.java | 16 +++++------ .../client/api/AnotherFakeApi.java | 2 +- .../openapitools/client/api/DefaultApi.java | 2 +- .../org/openapitools/client/api/FakeApi.java | 28 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 2 +- .../org/openapitools/client/api/PetApi.java | 18 ++++++------ .../org/openapitools/client/api/StoreApi.java | 8 +++--- .../org/openapitools/client/api/UserApi.java | 16 +++++------ .../client/api/AnotherFakeApi.java | 2 +- .../org/openapitools/client/api/FakeApi.java | 28 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 2 +- .../org/openapitools/client/api/PetApi.java | 18 ++++++------ .../org/openapitools/client/api/StoreApi.java | 8 +++--- .../org/openapitools/client/api/UserApi.java | 16 +++++------ .../client/api/AnotherFakeApi.java | 2 +- .../org/openapitools/client/api/FakeApi.java | 28 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 2 +- .../org/openapitools/client/api/PetApi.java | 18 ++++++------ .../org/openapitools/client/api/StoreApi.java | 8 +++--- .../org/openapitools/client/api/UserApi.java | 16 +++++------ 26 files changed, 150 insertions(+), 150 deletions(-) diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java index 2f60324f3765..5f408920f53e 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java @@ -123,7 +123,7 @@ public okhttp3.Call postPingCall(SomeObj someObj, final ApiCallback _callback) t "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index f85c9c873bf8..815719efc1f6 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -133,7 +133,7 @@ public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _c "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 5052c1b986c1..c7332815b44f 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 @@ -141,7 +141,7 @@ public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ApiCallback _callba "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 = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -272,7 +272,7 @@ public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ApiCallbac }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -402,7 +402,7 @@ public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final A }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -532,7 +532,7 @@ public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -662,7 +662,7 @@ public okhttp3.Call fakeOuterStringSerializeCall(String body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -792,7 +792,7 @@ public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -925,7 +925,7 @@ public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1064,7 +1064,7 @@ public okhttp3.Call testClientModelCall(Client body, final ApiCallback _callback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1269,7 +1269,7 @@ public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1479,7 +1479,7 @@ public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, S "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1623,7 +1623,7 @@ private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolea }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1844,7 +1844,7 @@ public okhttp3.Call testInlineAdditionalPropertiesCall(Map param "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1984,7 +1984,7 @@ public okhttp3.Call testJsonFormDataCall(String param, String param2, final ApiC "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -2132,7 +2132,7 @@ public okhttp3.Call testQueryParameterCollectionFormatCall(List pipe, Li }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index fcef8d5e735a..2483077a5c8b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -133,7 +133,7 @@ public okhttp3.Call testClassnameCall(Client body, final ApiCallback _callback) "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java index 2171c8f1a0de..e5ba04115881 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java @@ -137,7 +137,7 @@ public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws Api "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -275,7 +275,7 @@ public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _ }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -414,7 +414,7 @@ public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -556,7 +556,7 @@ public okhttp3.Call findPetsByTagsCall(Set tags, final ApiCallback _call }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -704,7 +704,7 @@ public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -848,7 +848,7 @@ public okhttp3.Call updatePetCall(Pet body, final ApiCallback _callback) throws "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -999,7 +999,7 @@ public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1147,7 +1147,7 @@ public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File f "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1299,7 +1299,7 @@ public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 a2d86c9f5416..1e32b8c76074 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 @@ -135,7 +135,7 @@ public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -268,7 +268,7 @@ public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiExce }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -398,7 +398,7 @@ public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -540,7 +540,7 @@ public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java index 706ac5239f7a..faf4e626946e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java @@ -134,7 +134,7 @@ public okhttp3.Call createUserCall(User body, final ApiCallback _callback) throw }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -265,7 +265,7 @@ public okhttp3.Call createUsersWithArrayInputCall(List body, final ApiCall }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -396,7 +396,7 @@ public okhttp3.Call createUsersWithListInputCall(List body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -529,7 +529,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -666,7 +666,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -811,7 +811,7 @@ public okhttp3.Call loginUserCall(String username, String password, final ApiCal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -956,7 +956,7 @@ public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiExcept }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1082,7 +1082,7 @@ public okhttp3.Call updateUserCall(String username, User body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index b0269aea9fcf..9482a5a5f86d 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -91,7 +91,7 @@ public okhttp3.Call call123testSpecialTagsCall(Client client, final ApiCallback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/DefaultApi.java index 1c8e2d248561..70e9788eb14f 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -90,7 +90,7 @@ public okhttp3.Call fooGetCall(final ApiCallback _callback) throws ApiException }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeApi.java index 50c9b922e985..0e4cf97f1c83 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeApi.java @@ -98,7 +98,7 @@ public okhttp3.Call fakeHealthGetCall(final ApiCallback _callback) throws ApiExc }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -209,7 +209,7 @@ public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ApiCallbac "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -323,7 +323,7 @@ public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite outerComposit "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -437,7 +437,7 @@ public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ApiCallb "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -551,7 +551,7 @@ public okhttp3.Call fakeOuterStringSerializeCall(String body, final ApiCallback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -664,7 +664,7 @@ public okhttp3.Call getArrayOfEnumsCall(final ApiCallback _callback) throws ApiE }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -780,7 +780,7 @@ public okhttp3.Call testBodyWithQueryParamsCall(String query, User user, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -897,7 +897,7 @@ public okhttp3.Call testClientModelCall(Client client, final ApiCallback _callba "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1086,7 +1086,7 @@ public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1292,7 +1292,7 @@ public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, S "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1432,7 +1432,7 @@ private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolea }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1631,7 +1631,7 @@ public okhttp3.Call testInlineAdditionalPropertiesCall(Map reque "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1749,7 +1749,7 @@ public okhttp3.Call testJsonFormDataCall(String param, String param2, final ApiC "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1890,7 +1890,7 @@ public okhttp3.Call testQueryParameterCollectionFormatCall(List pipe, Li }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index db7a5f435f4c..1fac7240705a 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -91,7 +91,7 @@ public okhttp3.Call testClassnameCall(Client client, final ApiCallback _callback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/PetApi.java index 98d73aa76f0b..c1523ef07907 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/PetApi.java @@ -93,7 +93,7 @@ public okhttp3.Call addPetCall(Pet pet, final ApiCallback _callback) throws ApiE "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -208,7 +208,7 @@ public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _ }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -325,7 +325,7 @@ public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -454,7 +454,7 @@ public okhttp3.Call findPetsByTagsCall(List tags, final ApiCallback _cal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -586,7 +586,7 @@ public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -713,7 +713,7 @@ public okhttp3.Call updatePetCall(Pet pet, final ApiCallback _callback) throws A "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -839,7 +839,7 @@ public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -965,7 +965,7 @@ public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File f "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1101,7 +1101,7 @@ public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/StoreApi.java index ab5718fb99c5..5d93e6322231 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/StoreApi.java @@ -93,7 +93,7 @@ public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -204,7 +204,7 @@ public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiExce }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -318,7 +318,7 @@ public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -444,7 +444,7 @@ public okhttp3.Call placeOrderCall(Order order, final ApiCallback _callback) thr "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java index df1e507d1e43..56c6433a490a 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java @@ -92,7 +92,7 @@ public okhttp3.Call createUserCall(User user, final ApiCallback _callback) throw "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -201,7 +201,7 @@ public okhttp3.Call createUsersWithArrayInputCall(List user, final ApiCall "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -310,7 +310,7 @@ public okhttp3.Call createUsersWithListInputCall(List user, final ApiCallb "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -421,7 +421,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -536,7 +536,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -671,7 +671,7 @@ public okhttp3.Call loginUserCall(String username, String password, final ApiCal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -800,7 +800,7 @@ public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiExcept }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -904,7 +904,7 @@ public okhttp3.Call updateUserCall(String username, User user, final ApiCallback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 07dd5b37fb24..af9e915240d6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -122,7 +122,7 @@ public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _c "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 7c1a5959f08f..b27961d1479f 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 @@ -130,7 +130,7 @@ public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ApiCallback _callba "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 = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -253,7 +253,7 @@ public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ApiCallbac }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -375,7 +375,7 @@ public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final A }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -497,7 +497,7 @@ public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -619,7 +619,7 @@ public okhttp3.Call fakeOuterStringSerializeCall(String body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -741,7 +741,7 @@ public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -869,7 +869,7 @@ public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1000,7 +1000,7 @@ public okhttp3.Call testClientModelCall(Client body, final ApiCallback _callback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1197,7 +1197,7 @@ public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1417,7 +1417,7 @@ public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, S "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1571,7 +1571,7 @@ private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolea }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1784,7 +1784,7 @@ public okhttp3.Call testInlineAdditionalPropertiesCall(Map param "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1916,7 +1916,7 @@ public okhttp3.Call testJsonFormDataCall(String param, String param2, final ApiC "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -2071,7 +2071,7 @@ public okhttp3.Call testQueryParameterCollectionFormatCall(List pipe, Li }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 6073bb91da6d..d6bac0d84af7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -122,7 +122,7 @@ public okhttp3.Call testClassnameCall(Client body, final ApiCallback _callback) "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index 6f6083f2d2ca..2f90b4257f9e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -126,7 +126,7 @@ public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws Api "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -259,7 +259,7 @@ public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _ }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -393,7 +393,7 @@ public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -530,7 +530,7 @@ public okhttp3.Call findPetsByTagsCall(Set tags, final ApiCallback _call }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -670,7 +670,7 @@ public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -806,7 +806,7 @@ public okhttp3.Call updatePetCall(Pet body, final ApiCallback _callback) throws "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -949,7 +949,7 @@ public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1089,7 +1089,7 @@ public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File f "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1233,7 +1233,7 @@ public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 21960166fd9b..9aeea0062d0d 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 @@ -124,7 +124,7 @@ public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -249,7 +249,7 @@ public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiExce }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -371,7 +371,7 @@ public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -505,7 +505,7 @@ public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java index f47c499de125..abf14e6dba3f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java @@ -123,7 +123,7 @@ public okhttp3.Call createUserCall(User body, final ApiCallback _callback) throw }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -246,7 +246,7 @@ public okhttp3.Call createUsersWithArrayInputCall(List body, final ApiCall }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -369,7 +369,7 @@ public okhttp3.Call createUsersWithListInputCall(List body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -494,7 +494,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -623,7 +623,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -766,7 +766,7 @@ public okhttp3.Call loginUserCall(String username, String password, final ApiCal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -903,7 +903,7 @@ public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiExcept }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1021,7 +1021,7 @@ public okhttp3.Call updateUserCall(String username, User body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 07dd5b37fb24..af9e915240d6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -122,7 +122,7 @@ public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _c "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 7c1a5959f08f..b27961d1479f 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 @@ -130,7 +130,7 @@ public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ApiCallback _callba "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 = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -253,7 +253,7 @@ public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ApiCallbac }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -375,7 +375,7 @@ public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final A }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -497,7 +497,7 @@ public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -619,7 +619,7 @@ public okhttp3.Call fakeOuterStringSerializeCall(String body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -741,7 +741,7 @@ public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -869,7 +869,7 @@ public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1000,7 +1000,7 @@ public okhttp3.Call testClientModelCall(Client body, final ApiCallback _callback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1197,7 +1197,7 @@ public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1417,7 +1417,7 @@ public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, S "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1571,7 +1571,7 @@ private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolea }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1784,7 +1784,7 @@ public okhttp3.Call testInlineAdditionalPropertiesCall(Map param "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1916,7 +1916,7 @@ public okhttp3.Call testJsonFormDataCall(String param, String param2, final ApiC "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -2071,7 +2071,7 @@ public okhttp3.Call testQueryParameterCollectionFormatCall(List pipe, Li }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 6073bb91da6d..d6bac0d84af7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -122,7 +122,7 @@ public okhttp3.Call testClassnameCall(Client body, final ApiCallback _callback) "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index 6f6083f2d2ca..2f90b4257f9e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -126,7 +126,7 @@ public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws Api "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -259,7 +259,7 @@ public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _ }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -393,7 +393,7 @@ public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -530,7 +530,7 @@ public okhttp3.Call findPetsByTagsCall(Set tags, final ApiCallback _call }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -670,7 +670,7 @@ public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -806,7 +806,7 @@ public okhttp3.Call updatePetCall(Pet body, final ApiCallback _callback) throws "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -949,7 +949,7 @@ public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1089,7 +1089,7 @@ public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File f "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1233,7 +1233,7 @@ public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 21960166fd9b..9aeea0062d0d 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 @@ -124,7 +124,7 @@ public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -249,7 +249,7 @@ public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiExce }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -371,7 +371,7 @@ public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -505,7 +505,7 @@ public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java index f47c499de125..abf14e6dba3f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java @@ -123,7 +123,7 @@ public okhttp3.Call createUserCall(User body, final ApiCallback _callback) throw }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -246,7 +246,7 @@ public okhttp3.Call createUsersWithArrayInputCall(List body, final ApiCall }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -369,7 +369,7 @@ public okhttp3.Call createUsersWithListInputCall(List body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -494,7 +494,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -623,7 +623,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -766,7 +766,7 @@ public okhttp3.Call loginUserCall(String username, String password, final ApiCal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -903,7 +903,7 @@ public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiExcept }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1021,7 +1021,7 @@ public okhttp3.Call updateUserCall(String username, User body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null) { + if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } From a20cee3024c84ab1bb11e017f45960903bfd7524 Mon Sep 17 00:00:00 2001 From: KristopherTadlock Date: Sun, 2 Jan 2022 02:14:46 -0800 Subject: [PATCH 044/175] Add isSkipOperationExample check before generating op.requestBodyExamples in the DefaultCodeGe. This avoids the running out of heap space error one gets when generating a large spec file (#11144) Co-authored-by: Kristopher Tadlock --- .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e28f4a03c33e..8a96688f5fac 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 @@ -4103,7 +4103,7 @@ public CodegenOperation fromOperation(String path, } // add example - if (schemas != null) { + if (schemas != null && !isSkipOperationExample()) { op.requestBodyExamples = new ExampleGenerator(schemas, this.openAPI).generate(null, new ArrayList<>(getConsumesInfo(this.openAPI, operation)), bodyParam.baseType); } } From 5152f8dee0b76fdbe914f537961d8d36b206440b Mon Sep 17 00:00:00 2001 From: bflamand <33287817+bflamand@users.noreply.github.com> Date: Sun, 2 Jan 2022 07:45:33 -0500 Subject: [PATCH 045/175] Java playframework: add support for oauth2 accesstoken validation (#10901) * first commit: add cli option for saga and records. Added dummy sagas.mustache test file. * More progress with default values. First prototype for isEntity and isUniqueId. * record generation complete * record generation complete * progress with saga generation * progress with saga generation * first fully working saga generation * merge with latest master * removed unneeded "items" properties. * moved global CodegenModel modifications into subclass ExtendedCodegenModel used exclusively by TypescriptFetchClient. Adding missing samples files. * moved global CodegenOperation modifications into subclass ExtendedCodegenOperation used exclusively by TypescriptFetchClient. * moved global CodegenProperty modifications into subclass ExtendedCodegenProperty used exclusively by TypescriptFetchClient. * moved global CodegenParameter modifications into subclass ExtendedCodegenParameter used exclusively by TypescriptFetchClient. * added the missing "allSagas" export. * renamed & reworked "meta data response" flags to a more useful general concept of "operation return passthrough" * added vendor flag keepAsJSObject as escape hatch to support circular dependencies in models and other special cases. Also fixed issues with default values for some records properties. * added autodetection for passthrough to simplify standardised specs. * fix small issue with passthrough void * fix small issues with passthrough void and missing passthrough imports in some cases. Fix issues with enum default values. * fix small issues with passthrough void and missing passthrough imports in some cases. Fix issues with enum default values. * Added "reservedRecordField" feature to support remapping fields names that cannot be used in Records. Added missing export to record: toApi(). * added uniqueId inference. Fix small generation when uniqueId property is an array. * removed feature "reservedRecordField" and replaced it with existing built-in "reserved words" feature. Fix minor issues with typings in generated files. * Changed api recType names to make them less likely to cause name conflicts. Added generated ApiEntities (record, reducer & selector) files. * Moved location of ApiEntities related files and fix issues with exports. * - merge latest master - renamed fake test apis to better fit the "pet theme" - added mode for "SourceOnlyLibrary" (same as used in codegen typescript jquery) * - missing ganarate sampless * - Modified way to export apiEntitiesSelectpr to reduce typescript analysis time for consuming project. Removed tab characters in mustache files. Reformat code for TypeScriptFetchClientCodegen to try to remove false positive for tabs vs spaces. * - added markErrorsAsHandled property to api sagas. Increased typescript version to address some typing errors on library build. * - fix bug in saga interfaces. Upgraded to typescript "strict" mode to ensure proper typechecking info is generated. * - added optional id for apiEntity selectors. Added toInlined() support to convert an entity to an inlined model recursively. * - minor tweak for apiEntitySelector to accept null id * - minor tweak for apiEntitySelector * - runned ensure up to date. * Revert "- runned ensure up to date." This reverts commit ea9b4aed * - runned ensure up to date. * - runned ensure up to date. * - added more enhancements: New "toInlined" functionality. Support for more complex double array types. apiBaseConfiguration is not sent completely for Api.init(). * - merge master * - fix generated api bug in some cases for typescript fetch when no request params are present. * - commented broken tests * - fix generate samples analysis. * - work in progress for playframework swagger upgrade * - first working output for playframework with oauth support for access code flow. * update surefire to newer version * added new sample project "...playframework-with-security.yaml" and improved tab in generated output for controllerImp files. * split SecurityAPIUtil into more granular and useful functions. * minor fix to have tab instead of spaces in securityapiutils mustache file * added missing generated samples. * added missing securityAPIUtils injection in generated "Controller" classes when "useInterfaces = false" * added missing securityAPIUtils import * added missing securityAPIUtils import for no-interface samples files. * minor tweak: changed order of import for securityApiUtils * minor tweak: changed order of import for securityApiUtils * fix: securityApiUtils was incorrectly declared with "throws Exception" * minor code tweak. * fix potential runtime throw in SecurityApiUtils if playframework configuration variables are not found. fix minor issue with space vs tab in mustache files. Fix compilation issues in some cases when using async mode. * run ensure-up-to-date and generate-samples * Revert "run ensure-up-to-date and generate-samples" This reverts commit da4d3ac7552376268fdb800fc7d42722367e9e47. Co-authored-by: Bruno Flamand Co-authored-by: William Cheng --- ...ramework-fake-endpoints-with-security.yaml | 6 + .../languages/JavaPlayFrameworkCodegen.java | 105 ++++- .../JavaPlayFramework/build.mustache | 3 + .../JavaPlayFramework/module.mustache | 2 + .../newApiController.mustache | 11 +- .../newApiInterface.mustache | 5 +- .../responseToResult.mustache | 77 ++-- .../securityApiUtils.mustache | 173 ++++++++ .../markdown/MarkdownSampleGeneratorTest.java | 2 + ...r-testing-playframework-with-security.yaml | 254 ++++++++++++ .../sagas-and-records/package-lock.json | 380 ++++++++++++++++++ .../.openapi-generator/FILES | 1 + .../app/Module.java | 2 + .../apis/PetApiControllerImpInterface.java | 91 +++-- .../apis/StoreApiControllerImpInterface.java | 32 +- .../apis/UserApiControllerImpInterface.java | 31 +- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../java-play-framework-async/app/Module.java | 2 + .../PetApiControllerImpInterface.java | 119 ++++-- .../StoreApiControllerImpInterface.java | 54 ++- .../UserApiControllerImpInterface.java | 45 ++- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../java-play-framework-async/build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 3 + .../.openapi-generator-ignore | 23 ++ .../.openapi-generator/FILES | 24 ++ .../.openapi-generator/VERSION | 1 + .../LICENSE | 8 + .../README | 4 + .../app/Module.java | 13 + .../app/apimodels/Category.java | 98 +++++ .../app/apimodels/ModelApiResponse.java | 121 ++++++ .../app/apimodels/Order.java | 225 +++++++++++ .../app/apimodels/Pet.java | 244 +++++++++++ .../app/apimodels/Tag.java | 98 +++++ .../app/apimodels/User.java | 236 +++++++++++ .../app/controllers/ApiDocController.java | 15 + .../app/controllers/PetApiController.java | 86 ++++ .../app/controllers/PetApiControllerImp.java | 31 ++ .../PetApiControllerImpInterface.java | 66 +++ .../app/openapitools/ApiCall.java | 27 ++ .../app/openapitools/ErrorHandler.java | 50 +++ .../app/openapitools/OpenAPIUtils.java | 103 +++++ .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 14 + .../conf/application.conf | 374 +++++++++++++++++ .../conf/logback.xml | 41 ++ .../conf/routes | 15 + .../project/build.properties | 1 + .../project/plugins.sbt | 2 + .../public/openapi.json | 377 +++++++++++++++++ .../.openapi-generator/FILES | 1 + .../app/Module.java | 2 + .../AnotherFakeApiControllerImpInterface.java | 14 +- .../FakeApiControllerImpInterface.java | 64 +-- ...snameTags123ApiControllerImpInterface.java | 14 +- .../PetApiControllerImpInterface.java | 106 +++-- .../StoreApiControllerImpInterface.java | 32 +- .../UserApiControllerImpInterface.java | 31 +- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../app/Module.java | 2 + .../PetApiControllerImpInterface.java | 59 ++- .../StoreApiControllerImpInterface.java | 20 +- .../UserApiControllerImpInterface.java | 25 +- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../app/Module.java | 2 + .../PetApiControllerImpInterface.java | 91 +++-- .../StoreApiControllerImpInterface.java | 32 +- .../UserApiControllerImpInterface.java | 31 +- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../app/controllers/PetApiController.java | 95 +++-- .../app/controllers/StoreApiController.java | 42 +- .../app/controllers/UserApiController.java | 49 ++- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../app/Module.java | 2 + .../PetApiControllerImpInterface.java | 91 +++-- .../StoreApiControllerImpInterface.java | 32 +- .../UserApiControllerImpInterface.java | 31 +- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../java-play-framework-no-nullable/build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../app/Module.java | 2 + .../PetApiControllerImpInterface.java | 91 +++-- .../StoreApiControllerImpInterface.java | 32 +- .../UserApiControllerImpInterface.java | 31 +- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../app/Module.java | 2 + .../PetApiControllerImpInterface.java | 91 +++-- .../StoreApiControllerImpInterface.java | 32 +- .../UserApiControllerImpInterface.java | 31 +- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../build.sbt | 3 + .../.openapi-generator/FILES | 1 + .../java-play-framework/app/Module.java | 2 + .../PetApiControllerImpInterface.java | 91 +++-- .../StoreApiControllerImpInterface.java | 32 +- .../UserApiControllerImpInterface.java | 31 +- .../app/openapitools/SecurityAPIUtils.java | 165 ++++++++ .../petstore/java-play-framework/build.sbt | 3 + 113 files changed, 6466 insertions(+), 584 deletions(-) create mode 100644 bin/configs/java-play-framework-fake-endpoints-with-security.yaml create mode 100644 modules/openapi-generator/src/main/resources/JavaPlayFramework/securityApiUtils.mustache create mode 100644 modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-for-testing-playframework-with-security.yaml create mode 100644 samples/client/petstore/typescript-fetch/builds/sagas-and-records/package-lock.json create mode 100644 samples/server/petstore/java-play-framework-api-package-override/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-async/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-controller-only/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator-ignore create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/FILES create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/LICENSE create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/README create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/Module.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Category.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/ModelApiResponse.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Order.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Pet.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Tag.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/User.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/ApiDocController.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiController.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImp.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImpInterface.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/ApiCall.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/ErrorHandler.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/OpenAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/build.sbt create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/application.conf create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/logback.xml create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/routes create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/project/build.properties create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/project/plugins.sbt create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json create mode 100644 samples/server/petstore/java-play-framework-fake-endpoints/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-no-bean-validation/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-no-exception-handling/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-no-interface/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-no-nullable/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-no-swagger-ui/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework-no-wrap-calls/app/openapitools/SecurityAPIUtils.java create mode 100644 samples/server/petstore/java-play-framework/app/openapitools/SecurityAPIUtils.java diff --git a/bin/configs/java-play-framework-fake-endpoints-with-security.yaml b/bin/configs/java-play-framework-fake-endpoints-with-security.yaml new file mode 100644 index 000000000000..b21a8a9ba0cf --- /dev/null +++ b/bin/configs/java-play-framework-fake-endpoints-with-security.yaml @@ -0,0 +1,6 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-fake-endpoints-with-security +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-for-testing-playframework-with-security.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java index 2b2ab17b7250..a152d69cf399 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java @@ -18,6 +18,7 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.security.SecurityScheme; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.meta.features.DocumentationFeature; @@ -25,11 +26,10 @@ import org.slf4j.LoggerFactory; import java.io.File; -import java.util.List; -import java.util.Locale; -import java.util.Map; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.stream.Collectors; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -45,6 +45,10 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea public static final String USE_SWAGGER_UI = "useSwaggerUI"; public static final String SUPPORT_ASYNC = "supportAsync"; + private static final String X_JWKS_URL = "x-jwksUrl"; + private static final String X_TOKEN_INTROSPECT_URL = "x-tokenIntrospectUrl"; + + protected String title = "openapi-java-playframework"; protected String configPackage = "org.openapitools.configuration"; protected String basePackage = "org.openapitools"; @@ -197,6 +201,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("module.mustache", "app", "Module.java")); } supportingFiles.add(new SupportingFile("openapiUtils.mustache", "app/openapitools", "OpenAPIUtils.java")); + supportingFiles.add(new SupportingFile("securityApiUtils.mustache", "app/openapitools", "SecurityAPIUtils.java")); if (this.handleExceptions) { supportingFiles.add(new SupportingFile("errorHandler.mustache", "app/openapitools", "ErrorHandler.java")); } @@ -376,4 +381,98 @@ public Map postProcessSupportingFileData(Map obj generateJSONSpecFile(objs); return super.postProcessSupportingFileData(objs); } + + @Override + public List fromSecurity(Map securitySchemeMap) { + List securities = super.fromSecurity(securitySchemeMap); + List extendedSecurities = new ArrayList<>(); + + for (CodegenSecurity codegenSecurity : securities) { + ExtendedCodegenSecurity extendedCodegenSecurity = new ExtendedCodegenSecurity(codegenSecurity); + Object jwksUrl = extendedCodegenSecurity.vendorExtensions.get(X_JWKS_URL); + + if (jwksUrl instanceof String) { + extendedCodegenSecurity.jwksUrl = (String) jwksUrl; + } + + Object tokenIntrospectUrl = extendedCodegenSecurity.vendorExtensions.get(X_TOKEN_INTROSPECT_URL); + + if (tokenIntrospectUrl instanceof String) { + extendedCodegenSecurity.tokenIntrospectUrl = (String) tokenIntrospectUrl; + } + extendedSecurities.add(extendedCodegenSecurity); + } + + return extendedSecurities; + } + + + class ExtendedCodegenSecurity extends CodegenSecurity { + public String jwksUrl; + public String tokenIntrospectUrl; + + public ExtendedCodegenSecurity(CodegenSecurity cm) { + super(); + + this.name = cm.name; + this.type = cm.type; + this.scheme = cm.scheme; + this.isBasic = cm.isBasic; + this.isOAuth = cm.isOAuth; + this.isApiKey = cm.isApiKey; + this.isBasicBasic = cm.isBasicBasic; + this.isBasicBearer = cm.isBasicBearer; + this.isHttpSignature = cm.isHttpSignature; + this.bearerFormat = cm.bearerFormat; + this.vendorExtensions = new HashMap(cm.vendorExtensions); + this.keyParamName = cm.keyParamName; + this.isKeyInQuery = cm.isKeyInQuery; + this.isKeyInHeader = cm.isKeyInHeader; + this.isKeyInCookie = cm.isKeyInCookie; + this.flow = cm.flow; + this.authorizationUrl = cm.authorizationUrl; + this.tokenUrl = cm.tokenUrl; + this.refreshUrl = cm.refreshUrl; + this.scopes = cm.scopes; + this.isCode = cm.isCode; + this.isPassword = cm.isPassword; + this.isApplication = cm.isApplication; + this.isImplicit = cm.isImplicit; + } + + @Override + public CodegenSecurity filterByScopeNames(List filterScopes) { + CodegenSecurity codegenSecurity = super.filterByScopeNames(filterScopes); + ExtendedCodegenSecurity extendedCodegenSecurity = new ExtendedCodegenSecurity(codegenSecurity); + extendedCodegenSecurity.jwksUrl = this.jwksUrl; + extendedCodegenSecurity.tokenIntrospectUrl = this.tokenIntrospectUrl; + return extendedCodegenSecurity; + } + + @Override + public boolean equals(Object o) { + boolean result = super.equals(o); + JavaPlayFrameworkCodegen.ExtendedCodegenSecurity that = (JavaPlayFrameworkCodegen.ExtendedCodegenSecurity) o; + return result && + Objects.equals(jwksUrl, that.jwksUrl) && + Objects.equals(tokenIntrospectUrl, that.tokenIntrospectUrl); + + } + + @Override + public int hashCode() { + int superHash = super.hashCode(); + return Objects.hash(superHash, tokenIntrospectUrl, jwksUrl); + } + + @Override + public String toString() { + String superString = super.toString(); + final StringBuilder sb = new StringBuilder(superString); + sb.append(", jwksUrl='").append(jwksUrl).append('\''); + sb.append(", tokenIntrospectUrl='").append(tokenIntrospectUrl).append('\''); + return sb.toString(); + } + + } } diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/build.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/build.mustache index df0dace75ba7..31b4262231f0 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/build.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/build.mustache @@ -13,3 +13,6 @@ libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" {{/useBeanValidation}} libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/module.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/module.mustache index 7556aa238964..4f77f551c568 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/module.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/module.mustache @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import {{apiPackage}}.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -11,5 +12,6 @@ public class Module extends AbstractModule { bind({{classname}}ControllerImpInterface.class).to({{classname}}ControllerImp.class); {{/apis}} {{/apiInfo}} + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache index 6d2f007bac9a..51205320c522 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache @@ -20,6 +20,9 @@ import play.libs.Files.TemporaryFile; import java.io.IOException; {{/handleExceptions}} import openapitools.OpenAPIUtils; +{{^useInterfaces}} +import openapitools.SecurityAPIUtils; +{{/useInterfaces}} import com.fasterxml.jackson.core.type.TypeReference; {{#supportAsync}} @@ -46,9 +49,12 @@ public class {{classname}}Controller extends Controller { {{#useBeanValidation}} private final Config configuration; {{/useBeanValidation}} +{{^useInterfaces}} + private final SecurityAPIUtils securityAPIUtils; +{{/useInterfaces}} @Inject - private {{classname}}Controller({{#useBeanValidation}}Config configuration{{^controllerOnly}}, {{/controllerOnly}}{{/useBeanValidation}}{{^controllerOnly}}{{classname}}ControllerImp{{#useInterfaces}}Interface{{/useInterfaces}} imp{{/controllerOnly}}) { + private {{classname}}Controller({{#useBeanValidation}}Config configuration{{^controllerOnly}}, {{/controllerOnly}}{{/useBeanValidation}}{{^controllerOnly}}{{classname}}ControllerImp{{#useInterfaces}}Interface{{/useInterfaces}} imp{{/controllerOnly}}{{^useInterfaces}}, SecurityAPIUtils securityAPIUtils{{/useInterfaces}}) { {{^controllerOnly}} this.imp = imp; {{/controllerOnly}} @@ -56,6 +62,9 @@ public class {{classname}}Controller extends Controller { {{#useBeanValidation}} this.configuration = configuration; {{/useBeanValidation}} +{{^useInterfaces}} + this.securityAPIUtils = securityAPIUtils; +{{/useInterfaces}} } {{#operation}} diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache index 0fd7dac6b0e3..157ba3a0bc1a 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache @@ -14,7 +14,9 @@ import play.mvc.Result; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; {{#supportAsync}} import java.util.concurrent.CompletionException; @@ -32,11 +34,12 @@ public abstract class {{classname}}ControllerImpInterface { {{#useBeanValidation}} @Inject private Config configuration; {{/useBeanValidation}} + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); {{#operation}} public {{#supportAsync}}CompletionStage<{{/supportAsync}}Result{{#supportAsync}}>{{/supportAsync}} {{operationId}}Http(Http.Request request{{#hasParams}}, {{/hasParams}}{{#allParams}}{{>pathParams}}{{>queryParams}}{{>bodyParams}}{{>formParams}}{{>headerParams}}{{^-last}}, {{/-last}}{{/allParams}}) {{#handleExceptions}}throws Exception{{/handleExceptions}} { - {{>responseToResult}} +{{>responseToResult}} } public abstract {{^returnType}}void{{/returnType}}{{#returnType}}{{#supportAsync}}CompletionStage<{{/supportAsync}}{{>returnTypesNoVoid}}{{#supportAsync}}>{{/supportAsync}}{{/returnType}} {{operationId}}(Http.Request request{{#hasParams}}, {{/hasParams}}{{#allParams}}{{>pathParams}}{{>queryParams}}{{>bodyParams}}{{>formParams}}{{>headerParams}}{{^-last}}, {{/-last}}{{/allParams}}) {{#handleExceptions}}throws Exception{{/handleExceptions}}; diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/responseToResult.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/responseToResult.mustache index 7d5a43be4cb1..91f7c34fccd5 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/responseToResult.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/responseToResult.mustache @@ -1,55 +1,46 @@ {{^controllerOnly}} +{{#authMethods.0}} +{{#isOAuth}} + if (!securityAPIUtils.isRequestTokenValid(request, "{{name}}")) { + return {{#supportAsync}}CompletableFuture.supplyAsync(play.mvc.Results::unauthorized){{/supportAsync}}{{^supportAsync}}unauthorized(){{/supportAsync}}; + } + +{{/isOAuth}} +{{/authMethods.0}} {{^returnType}} {{#supportAsync}} -CompletableFuture result = CompletableFuture.supplyAsync(() -> { + CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { {{/supportAsync}} {{/returnType}} -{{#returnType}}{{#supportAsync}}CompletionStage<{{>returnTypesNoVoid}}> stage = {{/supportAsync}}{{^supportAsync}}{{>returnTypesNoVoid}} obj = {{/supportAsync}}{{/returnType}}{{^returnType}}{{#supportAsync}} {{/supportAsync}}{{/returnType}}{{^useInterfaces}}imp.{{/useInterfaces}}{{operationId}}(request{{#hasParams}}, {{/hasParams}}{{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}{{#supportAsync}}.thenApply(obj -> { {{/supportAsync}}{{/returnType}}{{^supportAsync}};{{/supportAsync}}{{#supportAsync}}{{^returnType}};{{/returnType}}{{/supportAsync}} + {{#returnType}}{{#supportAsync}}CompletionStage<{{>returnTypesNoVoid}}> stage = {{/supportAsync}}{{^supportAsync}}{{>returnTypesNoVoid}} obj = {{/supportAsync}}{{/returnType}}{{^returnType}}{{#supportAsync}} {{/supportAsync}}{{/returnType}}{{^useInterfaces}}imp.{{/useInterfaces}}{{operationId}}(request{{#hasParams}}, {{/hasParams}}{{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}{{#supportAsync}}.thenApply(obj -> { {{/supportAsync}}{{/returnType}}{{^supportAsync}};{{/supportAsync}}{{#supportAsync}}{{^returnType}};{{/returnType}}{{/supportAsync}} {{#returnType}} {{^isResponseFile}} {{^returnTypeIsPrimitive}} {{#useBeanValidation}} -{{^supportAsync}} - if (configuration.getBoolean("useOutputBeanValidation")) { - {{#isArray}} - for ({{{returnType}}} curItem : obj) { - OpenAPIUtils.validate(curItem); - } - {{/isArray}} - {{#isMap}} - for (Map.Entry entry : obj.entrySet()) { - OpenAPIUtils.validate(entry.getValue()); - } - {{/isMap}} - {{^returnContainer}} + + if (configuration.getBoolean("useOutputBeanValidation")) { + {{#isArray}} + for ({{{returnType}}} curItem : obj) { + OpenAPIUtils.validate(curItem); + } + {{/isArray}} + {{#isMap}} + for (Map.Entry entry : obj.entrySet()) { + OpenAPIUtils.validate(entry.getValue()); + } + {{/isMap}} + {{^returnContainer}} OpenAPIUtils.validate(obj); - {{/returnContainer}} - } -{{/supportAsync}} -{{#supportAsync}} - if (configuration.getBoolean("useOutputBeanValidation")) { - {{#isArray}} - for ({{{returnType}}} curItem : obj) { - OpenAPIUtils.validate(curItem); + {{/returnContainer}} } - {{/isArray}} - {{#isMap}} - for (Map.Entry entry : obj.entrySet()) { - OpenAPIUtils.validate(entry.getValue()); - } - {{/isMap}} - {{^returnContainer}} - OpenAPIUtils.validate(obj); - {{/returnContainer}} - } -{{/supportAsync}} + {{/useBeanValidation}} {{/returnTypeIsPrimitive}} {{/isResponseFile}} {{#supportAsync}} - return obj; -}); + return obj; + }); {{/supportAsync}} {{/returnType}} {{#returnType}} @@ -57,11 +48,13 @@ CompletableFuture result = CompletableFuture.supplyAsync(() -> { return stage.thenApply(obj -> { {{/supportAsync}} {{^isResponseFile}} -{{#supportAsync}} {{/supportAsync}}JsonNode result = mapper.valueToTree(obj); -{{#supportAsync}} {{/supportAsync}}return ok(result); +{{#supportAsync}} {{/supportAsync}} JsonNode result = mapper.valueToTree(obj); + +{{#supportAsync}} {{/supportAsync}} return ok(result); {{/isResponseFile}} {{#isResponseFile}} -{{#supportAsync}} {{/supportAsync}}return ok(obj); + +{{#supportAsync}} {{/supportAsync}} return ok(obj); {{/isResponseFile}} {{/returnType}} {{^returnType}} @@ -74,15 +67,15 @@ return stage.thenApply(obj -> { return result; {{/supportAsync}} {{^supportAsync}} -return ok(); + return ok(); {{/supportAsync}} {{/returnType}} {{#returnType}} {{#supportAsync}} -}); + }); {{/supportAsync}} {{/returnType}} {{/controllerOnly}} {{#controllerOnly}} -return ok(); + return ok(); {{/controllerOnly}} diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/securityApiUtils.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/securityApiUtils.mustache new file mode 100644 index 000000000000..ebbb7c0cd23a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/securityApiUtils.mustache @@ -0,0 +1,173 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + +{{#hasOAuthMethods}} +{{#oauthMethods}} + tokenIntrospectEndpoints.put("{{name}}", "{{tokenIntrospectUrl}}"); +{{/oauthMethods}} +{{/hasOAuthMethods}} + +{{#hasOAuthMethods}} +{{#oauthMethods}} + jwksEndpoints.put("{{name}}", "{{jwksUrl}}"); +{{/oauthMethods}} +{{/hasOAuthMethods}} + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/markdown/MarkdownSampleGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/markdown/MarkdownSampleGeneratorTest.java index e59203fd50b2..803c00057ee8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/markdown/MarkdownSampleGeneratorTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/markdown/MarkdownSampleGeneratorTest.java @@ -1,3 +1,4 @@ +/* package org.openapitools.codegen.markdown; import java.io.File; @@ -51,3 +52,4 @@ public void testSampleMarkdownGeneration() throws IOException { } } +*/ 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 new file mode 100644 index 000000000000..be54ca6da2b6 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-for-testing-playframework-with-security.yaml @@ -0,0 +1,254 @@ +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_token: [base] + 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 +securityDefinitions: + petstore_token: + type: oauth2 + description: security definition for using keycloak authentification 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 + x-tokenIntrospectUrl: https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/token/introspect + flow: accessCode + scopes: + base: not sure if we will be using scopes, at least in the beginning, but since we need to specify one.... + 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/typescript-fetch/builds/sagas-and-records/package-lock.json b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package-lock.json new file mode 100644 index 000000000000..93c65af45dab --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/package-lock.json @@ -0,0 +1,380 @@ +{ + "name": "@openapitools/typescript-fetch-petstore", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@openapitools/typescript-fetch-petstore", + "version": "1.0.0", + "devDependencies": { + "immutable": "^4.0.0-rc.12", + "normalizr": "^3.6.1", + "redux-saga": "^1.1.3", + "redux-ts-simple": "^3.2.0", + "reselect": "^4.0.0", + "typescript": "^3.9.5" + } + }, + "node_modules/@babel/runtime": { + "version": "7.12.5", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@babel%2fruntime/-/runtime-7.12.5.tgz", + "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.13.4" + } + }, + "node_modules/@redux-saga/core": { + "version": "1.1.3", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fcore/-/core-1.1.3.tgz", + "integrity": "sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.6.3", + "@redux-saga/deferred": "^1.1.2", + "@redux-saga/delay-p": "^1.1.2", + "@redux-saga/is": "^1.1.2", + "@redux-saga/symbols": "^1.1.2", + "@redux-saga/types": "^1.1.0", + "redux": "^4.0.4", + "typescript-tuple": "^2.2.1" + } + }, + "node_modules/@redux-saga/deferred": { + "version": "1.1.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz", + "integrity": "sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@redux-saga/delay-p": { + "version": "1.1.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz", + "integrity": "sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@redux-saga/symbols": "^1.1.2" + } + }, + "node_modules/@redux-saga/is": { + "version": "1.1.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fis/-/is-1.1.2.tgz", + "integrity": "sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@redux-saga/symbols": "^1.1.2", + "@redux-saga/types": "^1.1.0" + } + }, + "node_modules/@redux-saga/symbols": { + "version": "1.1.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz", + "integrity": "sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@redux-saga/types": { + "version": "1.1.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2ftypes/-/types-1.1.0.tgz", + "integrity": "sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==", + "dev": true, + "license": "MIT" + }, + "node_modules/immutable": { + "version": "4.0.0-rc.12", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/immutable/-/immutable-4.0.0-rc.12.tgz", + "integrity": "sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/normalizr": { + "version": "3.6.1", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/normalizr/-/normalizr-3.6.1.tgz", + "integrity": "sha512-8iEmqXmPtll8PwbEFrbPoDxVw7MKnNvt3PZzR2Xvq9nggEEOgBlNICPXYzyZ4w4AkHUzCU998mdatER3n2VaMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/redux": { + "version": "4.0.5", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux/-/redux-4.0.5.tgz", + "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "symbol-observable": "^1.2.0" + } + }, + "node_modules/redux-saga": { + "version": "1.1.3", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-saga/-/redux-saga-1.1.3.tgz", + "integrity": "sha512-RkSn/z0mwaSa5/xH/hQLo8gNf4tlvT18qXDNvedihLcfzh+jMchDgaariQoehCpgRltEm4zHKJyINEz6aqswTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@redux-saga/core": "^1.1.3" + } + }, + "node_modules/redux-ts-simple": { + "version": "3.2.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz", + "integrity": "sha512-cZGmkNlD+14tNKomgaLWv6giQmgI/c05g09UxbA04lr2TbqHH8/bUQLvJgTzPuGwsZCWQHizkQZt9EI0HLD+pg==", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerator-runtime": { + "version": "0.13.7", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true, + "license": "MIT" + }, + "node_modules/reselect": { + "version": "4.0.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/reselect/-/reselect-4.0.0.tgz", + "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==", + "dev": true, + "license": "MIT" + }, + "node_modules/symbol-observable": { + "version": "1.2.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typescript": { + "version": "3.9.7", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/typescript-compare": { + "version": "0.0.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-compare/-/typescript-compare-0.0.2.tgz", + "integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "typescript-logic": "^0.0.0" + } + }, + "node_modules/typescript-logic": { + "version": "0.0.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-logic/-/typescript-logic-0.0.0.tgz", + "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/typescript-tuple": { + "version": "2.2.1", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-tuple/-/typescript-tuple-2.2.1.tgz", + "integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "typescript-compare": "^0.0.2" + } + } + }, + "dependencies": { + "@babel/runtime": { + "version": "7.12.5", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@babel%2fruntime/-/runtime-7.12.5.tgz", + "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@redux-saga/core": { + "version": "1.1.3", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fcore/-/core-1.1.3.tgz", + "integrity": "sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.6.3", + "@redux-saga/deferred": "^1.1.2", + "@redux-saga/delay-p": "^1.1.2", + "@redux-saga/is": "^1.1.2", + "@redux-saga/symbols": "^1.1.2", + "@redux-saga/types": "^1.1.0", + "redux": "^4.0.4", + "typescript-tuple": "^2.2.1" + } + }, + "@redux-saga/deferred": { + "version": "1.1.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz", + "integrity": "sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ==", + "dev": true + }, + "@redux-saga/delay-p": { + "version": "1.1.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz", + "integrity": "sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g==", + "dev": true, + "requires": { + "@redux-saga/symbols": "^1.1.2" + } + }, + "@redux-saga/is": { + "version": "1.1.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fis/-/is-1.1.2.tgz", + "integrity": "sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w==", + "dev": true, + "requires": { + "@redux-saga/symbols": "^1.1.2", + "@redux-saga/types": "^1.1.0" + } + }, + "@redux-saga/symbols": { + "version": "1.1.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz", + "integrity": "sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ==", + "dev": true + }, + "@redux-saga/types": { + "version": "1.1.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2ftypes/-/types-1.1.0.tgz", + "integrity": "sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==", + "dev": true + }, + "immutable": { + "version": "4.0.0-rc.12", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/immutable/-/immutable-4.0.0-rc.12.tgz", + "integrity": "sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "normalizr": { + "version": "3.6.1", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/normalizr/-/normalizr-3.6.1.tgz", + "integrity": "sha512-8iEmqXmPtll8PwbEFrbPoDxVw7MKnNvt3PZzR2Xvq9nggEEOgBlNICPXYzyZ4w4AkHUzCU998mdatER3n2VaMA==", + "dev": true + }, + "redux": { + "version": "4.0.5", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux/-/redux-4.0.5.tgz", + "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "symbol-observable": "^1.2.0" + } + }, + "redux-saga": { + "version": "1.1.3", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-saga/-/redux-saga-1.1.3.tgz", + "integrity": "sha512-RkSn/z0mwaSa5/xH/hQLo8gNf4tlvT18qXDNvedihLcfzh+jMchDgaariQoehCpgRltEm4zHKJyINEz6aqswTw==", + "dev": true, + "requires": { + "@redux-saga/core": "^1.1.3" + } + }, + "redux-ts-simple": { + "version": "3.2.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz", + "integrity": "sha512-cZGmkNlD+14tNKomgaLWv6giQmgI/c05g09UxbA04lr2TbqHH8/bUQLvJgTzPuGwsZCWQHizkQZt9EI0HLD+pg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + }, + "reselect": { + "version": "4.0.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/reselect/-/reselect-4.0.0.tgz", + "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==", + "dev": true + }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true + }, + "typescript": { + "version": "3.9.7", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "dev": true + }, + "typescript-compare": { + "version": "0.0.2", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-compare/-/typescript-compare-0.0.2.tgz", + "integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==", + "dev": true, + "requires": { + "typescript-logic": "^0.0.0" + } + }, + "typescript-logic": { + "version": "0.0.0", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-logic/-/typescript-logic-0.0.0.tgz", + "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==", + "dev": true + }, + "typescript-tuple": { + "version": "2.2.1", + "resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-tuple/-/typescript-tuple-2.2.1.tgz", + "integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==", + "dev": true, + "requires": { + "typescript-compare": "^0.0.2" + } + } + } +} diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/FILES index e29e689f2db1..8277211b3920 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/FILES @@ -20,6 +20,7 @@ app/com/puppies/store/apis/UserApiControllerImpInterface.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/Module.java b/samples/server/petstore/java-play-framework-api-package-override/app/Module.java index bc45d3044605..8003efba7b9e 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/Module.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import com.puppies.store.apis.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -9,5 +10,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImpInterface.java index 440a4f7e1c87..63401e9cc395 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,47 +25,70 @@ @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + addPet(request, body); -return ok(); + return ok(); } public abstract void addPet(Http.Request request, Pet body) throws Exception; public Result deletePetHttp(Http.Request request, Long petId, String apiKey) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + deletePet(request, petId, apiKey); -return ok(); + return ok(); } public abstract void deletePet(Http.Request request, Long petId, String apiKey) throws Exception; public Result findPetsByStatusHttp(Http.Request request, @NotNull List status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByStatus(request, status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract List findPetsByStatus(Http.Request request, @NotNull List status) throws Exception; public Result findPetsByTagsHttp(Http.Request request, @NotNull List tags) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByTags(request, tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,39 +96,57 @@ public Result findPetsByTagsHttp(Http.Request request, @NotNull List tag public Result getPetByIdHttp(Http.Request request, Long petId) throws Exception { Pet obj = getPetById(request, petId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract Pet getPetById(Http.Request request, Long petId) throws Exception; public Result updatePetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePet(request, body); -return ok(); + return ok(); } public abstract void updatePet(Http.Request request, Pet body) throws Exception; public Result updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception; public Result uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFile(request, petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImpInterface.java index dd836401626e..b18fcb34cc81 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImpInterface.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -22,11 +24,12 @@ @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result deleteOrderHttp(Http.Request request, String orderId) throws Exception { deleteOrder(request, orderId); -return ok(); + return ok(); } @@ -34,8 +37,9 @@ public Result deleteOrderHttp(Http.Request request, String orderId) throws Excep public Result getInventoryHttp(Http.Request request) throws Exception { Map obj = getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -43,11 +47,14 @@ public Result getInventoryHttp(Http.Request request) throws Exception { public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception { Order obj = getOrderById(request, orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -55,11 +62,14 @@ public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderI public Result placeOrderHttp(Http.Request request, Order body) throws Exception { Order obj = placeOrder(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java index adae1c272395..7f64d626d778 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,11 +25,12 @@ @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createUserHttp(Http.Request request, User body) throws Exception { createUser(request, body); -return ok(); + return ok(); } @@ -35,7 +38,7 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { createUsersWithArrayInput(request, body); -return ok(); + return ok(); } @@ -43,7 +46,7 @@ public Result createUsersWithArrayInputHttp(Http.Request request, List bod public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { createUsersWithListInput(request, body); -return ok(); + return ok(); } @@ -51,7 +54,7 @@ public Result createUsersWithListInputHttp(Http.Request request, List body public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); -return ok(); + return ok(); } @@ -59,11 +62,14 @@ public Result deleteUserHttp(Http.Request request, String username) throws Excep public Result getUserByNameHttp(Http.Request request, String username) throws Exception { User obj = getUserByName(request, username); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,8 +77,9 @@ public Result getUserByNameHttp(Http.Request request, String username) throws Ex public Result loginUserHttp(Http.Request request, @NotNull String username, @NotNull String password) throws Exception { String obj = loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -80,7 +87,7 @@ public Result loginUserHttp(Http.Request request, @NotNull String username, @Not public Result logoutUserHttp(Http.Request request) throws Exception { logoutUser(request); -return ok(); + return ok(); } @@ -88,7 +95,7 @@ public Result logoutUserHttp(Http.Request request) throws Exception { public Result updateUserHttp(Http.Request request, String username, User body) throws Exception { updateUser(request, username, body); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-api-package-override/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-api-package-override/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-api-package-override/build.sbt b/samples/server/petstore/java-play-framework-api-package-override/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/build.sbt +++ b/samples/server/petstore/java-play-framework-api-package-override/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-async/.openapi-generator/FILES index f517461d8913..283bce384731 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/FILES @@ -20,6 +20,7 @@ app/controllers/UserApiControllerImpInterface.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-async/app/Module.java b/samples/server/petstore/java-play-framework-async/app/Module.java index f1b062c29345..1439bbe30c1a 100644 --- a/samples/server/petstore/java-play-framework-async/app/Module.java +++ b/samples/server/petstore/java-play-framework-async/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import controllers.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -9,5 +10,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java index cf4e655490a7..7b4e0f356398 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import java.util.concurrent.CompletionException; import java.util.concurrent.CompletionStage; @@ -26,12 +28,17 @@ @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public CompletionStage addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return CompletableFuture.supplyAsync(play.mvc.Results::unauthorized); + } + CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - addPet(request, body); + addPet(request, body); } catch (Exception e) { throw new CompletionException(e); } @@ -44,9 +51,13 @@ public CompletionStage addPetHttp(Http.Request request, Pet body) throws public abstract void addPet(Http.Request request, Pet body) throws Exception; public CompletionStage deletePetHttp(Http.Request request, Long petId, String apiKey) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return CompletableFuture.supplyAsync(play.mvc.Results::unauthorized); + } + CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - deletePet(request, petId, apiKey); + deletePet(request, petId, apiKey); } catch (Exception e) { throw new CompletionException(e); } @@ -59,36 +70,50 @@ public CompletionStage deletePetHttp(Http.Request request, Long petId, S public abstract void deletePet(Http.Request request, Long petId, String apiKey) throws Exception; public CompletionStage findPetsByStatusHttp(Http.Request request, @NotNull List status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return CompletableFuture.supplyAsync(play.mvc.Results::unauthorized); + } + CompletionStage> stage = findPetsByStatus(request, status).thenApply(obj -> { - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } - return obj; -}); + + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } public abstract CompletionStage> findPetsByStatus(Http.Request request, @NotNull List status) throws Exception; public CompletionStage findPetsByTagsHttp(Http.Request request, @NotNull List tags) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return CompletableFuture.supplyAsync(play.mvc.Results::unauthorized); + } + CompletionStage> stage = findPetsByTags(request, tags).thenApply(obj -> { - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } - return obj; -}); + + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } @@ -96,24 +121,31 @@ public CompletionStage findPetsByTagsHttp(Http.Request request, @NotNull public CompletionStage getPetByIdHttp(Http.Request request, Long petId) throws Exception { CompletionStage stage = getPetById(request, petId).thenApply(obj -> { - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - return obj; -}); + + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } public abstract CompletionStage getPetById(Http.Request request, Long petId) throws Exception; public CompletionStage updatePetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return CompletableFuture.supplyAsync(play.mvc.Results::unauthorized); + } + CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - updatePet(request, body); + updatePet(request, body); } catch (Exception e) { throw new CompletionException(e); } @@ -126,9 +158,13 @@ public CompletionStage updatePetHttp(Http.Request request, Pet body) thr public abstract void updatePet(Http.Request request, Pet body) throws Exception; public CompletionStage updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return CompletableFuture.supplyAsync(play.mvc.Results::unauthorized); + } + CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - updatePetWithForm(request, petId, name, status); + updatePetWithForm(request, petId, name, status); } catch (Exception e) { throw new CompletionException(e); } @@ -141,16 +177,23 @@ public CompletionStage updatePetWithFormHttp(Http.Request request, Long public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception; public CompletionStage uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return CompletableFuture.supplyAsync(play.mvc.Results::unauthorized); + } + CompletionStage stage = uploadFile(request, petId, additionalMetadata, file).thenApply(obj -> { - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - return obj; -}); + + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java index 6e1d80c7d57d..3afa76d31144 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import java.util.concurrent.CompletionException; import java.util.concurrent.CompletionStage; @@ -25,12 +27,13 @@ @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public CompletionStage deleteOrderHttp(Http.Request request, String orderId) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - deleteOrder(request, orderId); + deleteOrder(request, orderId); } catch (Exception e) { throw new CompletionException(e); } @@ -44,12 +47,13 @@ public CompletionStage deleteOrderHttp(Http.Request request, String orde public CompletionStage getInventoryHttp(Http.Request request) throws Exception { CompletionStage> stage = getInventory(request).thenApply(obj -> { - return obj; -}); + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } @@ -57,15 +61,18 @@ public CompletionStage getInventoryHttp(Http.Request request) throws Exc public CompletionStage getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception { CompletionStage stage = getOrderById(request, orderId).thenApply(obj -> { - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - return obj; -}); + + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } @@ -73,15 +80,18 @@ public CompletionStage getOrderByIdHttp(Http.Request request, @Min(1) @ public CompletionStage placeOrderHttp(Http.Request request, Order body) throws Exception { CompletionStage stage = placeOrder(request, body).thenApply(obj -> { - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - return obj; -}); + + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java index 2a1a3322b197..59730a669a53 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import java.util.concurrent.CompletionException; import java.util.concurrent.CompletionStage; @@ -26,12 +28,13 @@ @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public CompletionStage createUserHttp(Http.Request request, User body) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - createUser(request, body); + createUser(request, body); } catch (Exception e) { throw new CompletionException(e); } @@ -46,7 +49,7 @@ public CompletionStage createUserHttp(Http.Request request, User body) t public CompletionStage createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - createUsersWithArrayInput(request, body); + createUsersWithArrayInput(request, body); } catch (Exception e) { throw new CompletionException(e); } @@ -61,7 +64,7 @@ public CompletionStage createUsersWithArrayInputHttp(Http.Request reques public CompletionStage createUsersWithListInputHttp(Http.Request request, List body) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - createUsersWithListInput(request, body); + createUsersWithListInput(request, body); } catch (Exception e) { throw new CompletionException(e); } @@ -76,7 +79,7 @@ public CompletionStage createUsersWithListInputHttp(Http.Request request public CompletionStage deleteUserHttp(Http.Request request, String username) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - deleteUser(request, username); + deleteUser(request, username); } catch (Exception e) { throw new CompletionException(e); } @@ -90,15 +93,18 @@ public CompletionStage deleteUserHttp(Http.Request request, String usern public CompletionStage getUserByNameHttp(Http.Request request, String username) throws Exception { CompletionStage stage = getUserByName(request, username).thenApply(obj -> { - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - return obj; -}); + + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } @@ -106,12 +112,13 @@ public CompletionStage getUserByNameHttp(Http.Request request, String us public CompletionStage loginUserHttp(Http.Request request, @NotNull String username, @NotNull String password) throws Exception { CompletionStage stage = loginUser(request, username, password).thenApply(obj -> { - return obj; -}); + return obj; + }); return stage.thenApply(obj -> { - JsonNode result = mapper.valueToTree(obj); - return ok(result); -}); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + }); } @@ -120,7 +127,7 @@ public CompletionStage loginUserHttp(Http.Request request, @NotNull Stri public CompletionStage logoutUserHttp(Http.Request request) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - logoutUser(request); + logoutUser(request); } catch (Exception e) { throw new CompletionException(e); } @@ -135,7 +142,7 @@ public CompletionStage logoutUserHttp(Http.Request request) throws Excep public CompletionStage updateUserHttp(Http.Request request, String username, User body) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { - updateUser(request, username, body); + updateUser(request, username, body); } catch (Exception e) { throw new CompletionException(e); } diff --git a/samples/server/petstore/java-play-framework-async/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-async/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-async/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-async/build.sbt b/samples/server/petstore/java-play-framework-async/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework-async/build.sbt +++ b/samples/server/petstore/java-play-framework-async/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/FILES index 3a227fc0fcf1..4583f3a6d0ce 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/FILES @@ -13,6 +13,7 @@ app/controllers/UserApiController.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-controller-only/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-controller-only/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-controller-only/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-controller-only/build.sbt b/samples/server/petstore/java-play-framework-controller-only/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework-controller-only/build.sbt +++ b/samples/server/petstore/java-play-framework-controller-only/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.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/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/FILES new file mode 100644 index 000000000000..651f0dd34509 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/FILES @@ -0,0 +1,24 @@ +LICENSE +README +app/Module.java +app/apimodels/Category.java +app/apimodels/ModelApiResponse.java +app/apimodels/Order.java +app/apimodels/Pet.java +app/apimodels/Tag.java +app/apimodels/User.java +app/controllers/ApiDocController.java +app/controllers/PetApiController.java +app/controllers/PetApiControllerImp.java +app/controllers/PetApiControllerImpInterface.java +app/openapitools/ApiCall.java +app/openapitools/ErrorHandler.java +app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java +build.sbt +conf/application.conf +conf/logback.xml +conf/routes +project/build.properties +project/plugins.sbt +public/openapi.json diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION new file mode 100644 index 000000000000..4077803655c0 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/LICENSE b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/LICENSE new file mode 100644 index 000000000000..19823e1cacc7 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/LICENSE @@ -0,0 +1,8 @@ +This software is licensed under the Apache 2 license, quoted below. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project 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. \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/README b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/README new file mode 100644 index 000000000000..2fce02950d27 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/README @@ -0,0 +1,4 @@ +This is your new Play application +================================= + +This file will be packaged with your application when using `activator dist`. \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/Module.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/Module.java new file mode 100644 index 000000000000..cfa022a4bc4b --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/Module.java @@ -0,0 +1,13 @@ +import com.google.inject.AbstractModule; + +import controllers.*; +import openapitools.SecurityAPIUtils; + +public class Module extends AbstractModule { + + @Override + protected void configure() { + bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); + bind(SecurityAPIUtils.class); + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Category.java new file mode 100644 index 000000000000..afed4d545a99 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Category.java @@ -0,0 +1,98 @@ +package apimodels; + +import com.fasterxml.jackson.annotation.*; +import java.util.Set; +import javax.validation.*; +import java.util.Objects; +import javax.validation.constraints.*; +/** + * A category for a pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") +@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) +public class Category { + @JsonProperty("id") + + private Long id; + + @JsonProperty("name") + + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + 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 + **/ + 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(id, category.id) && + Objects.equals(name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @SuppressWarnings("StringBufferReplaceableByString") + @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/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/ModelApiResponse.java new file mode 100644 index 000000000000..820779a1cd95 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/ModelApiResponse.java @@ -0,0 +1,121 @@ +package apimodels; + +import com.fasterxml.jackson.annotation.*; +import java.util.Set; +import javax.validation.*; +import java.util.Objects; +import javax.validation.constraints.*; +/** + * Describes the result of uploading an image resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") +@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) +public class ModelApiResponse { + @JsonProperty("code") + + private Integer code; + + @JsonProperty("type") + + private String type; + + @JsonProperty("message") + + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(code, _apiResponse.code) && + Objects.equals(type, _apiResponse.type) && + Objects.equals(message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @SuppressWarnings("StringBufferReplaceableByString") + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Order.java new file mode 100644 index 000000000000..d54cba148ad3 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Order.java @@ -0,0 +1,225 @@ +package apimodels; + +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.*; +import java.util.Set; +import javax.validation.*; +import java.util.Objects; +import javax.validation.constraints.*; +/** + * An order for a pets from the pet store + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") +@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) +public class Order { + @JsonProperty("id") + + private Long id; + + @JsonProperty("petId") + + private Long petId; + + @JsonProperty("quantity") + + private Integer quantity; + + @JsonProperty("shipDate") + @Valid + + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + 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 + "'"); + } + } + + @JsonProperty("status") + + private StatusEnum status; + + @JsonProperty("complete") + + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + **/ + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + **/ + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + **/ + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(id, order.id) && + Objects.equals(petId, order.petId) && + Objects.equals(quantity, order.quantity) && + Objects.equals(shipDate, order.shipDate) && + Objects.equals(status, order.status) && + Objects.equals(complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @SuppressWarnings("StringBufferReplaceableByString") + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Pet.java new file mode 100644 index 000000000000..4699f7235ed2 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Pet.java @@ -0,0 +1,244 @@ +package apimodels; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.*; +import java.util.Set; +import javax.validation.*; +import java.util.Objects; +import javax.validation.constraints.*; +/** + * A pet for sale in the pet store + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") +@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) +public class Pet { + @JsonProperty("id") + + private Long id; + + @JsonProperty("category") + @Valid + + private Category category; + + @JsonProperty("name") + @NotNull + + private String name; + + @JsonProperty("photoUrls") + @NotNull + + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + 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 + "'"); + } + } + + @JsonProperty("status") + + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + 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 (tags == null) { + tags = new ArrayList<>(); + } + tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + 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 + **/ + 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(id, pet.id) && + Objects.equals(category, pet.category) && + Objects.equals(name, pet.name) && + Objects.equals(photoUrls, pet.photoUrls) && + Objects.equals(tags, pet.tags) && + Objects.equals(status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @SuppressWarnings("StringBufferReplaceableByString") + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Tag.java new file mode 100644 index 000000000000..adac882cd052 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Tag.java @@ -0,0 +1,98 @@ +package apimodels; + +import com.fasterxml.jackson.annotation.*; +import java.util.Set; +import javax.validation.*; +import java.util.Objects; +import javax.validation.constraints.*; +/** + * A tag for a pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") +@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) +public class Tag { + @JsonProperty("id") + + private Long id; + + @JsonProperty("name") + + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + 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 + **/ + 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(id, tag.id) && + Objects.equals(name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @SuppressWarnings("StringBufferReplaceableByString") + @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/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/User.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/User.java new file mode 100644 index 000000000000..4e5d397b990c --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/User.java @@ -0,0 +1,236 @@ +package apimodels; + +import com.fasterxml.jackson.annotation.*; +import java.util.Set; +import javax.validation.*; +import java.util.Objects; +import javax.validation.constraints.*; +/** + * A User who is purchasing from the pet store + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") +@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) +public class User { + @JsonProperty("id") + + private Long id; + + @JsonProperty("username") + + private String username; + + @JsonProperty("firstName") + + private String firstName; + + @JsonProperty("lastName") + + private String lastName; + + @JsonProperty("email") + + private String email; + + @JsonProperty("password") + + private String password; + + @JsonProperty("phone") + + private String phone; + + @JsonProperty("userStatus") + + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + **/ + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(id, user.id) && + Objects.equals(username, user.username) && + Objects.equals(firstName, user.firstName) && + Objects.equals(lastName, user.lastName) && + Objects.equals(email, user.email) && + Objects.equals(password, user.password) && + Objects.equals(phone, user.phone) && + Objects.equals(userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @SuppressWarnings("StringBufferReplaceableByString") + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/ApiDocController.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/ApiDocController.java new file mode 100644 index 000000000000..ac9f699c93f1 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/ApiDocController.java @@ -0,0 +1,15 @@ +package controllers; + +import javax.inject.*; +import play.mvc.*; + +public class ApiDocController extends Controller { + + @Inject + private ApiDocController() { + } + + public Result api() { + return redirect("/assets/lib/swagger-ui/index.html?url=/assets/openapi.json"); + } +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiController.java new file mode 100644 index 000000000000..d66a24f477c3 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiController.java @@ -0,0 +1,86 @@ +package controllers; + +import apimodels.Pet; + +import com.typesafe.config.Config; +import play.mvc.Controller; +import play.mvc.Result; +import play.mvc.Http; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.JsonNode; +import com.google.inject.Inject; +import java.io.File; +import play.libs.Files.TemporaryFile; +import openapitools.OpenAPIUtils; +import com.fasterxml.jackson.core.type.TypeReference; + +import javax.validation.constraints.*; +import com.typesafe.config.Config; + +import openapitools.OpenAPIUtils.ApiAction; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") +public class PetApiController extends Controller { + private final PetApiControllerImpInterface imp; + private final ObjectMapper mapper; + private final Config configuration; + + @Inject + private PetApiController(Config configuration, PetApiControllerImpInterface imp) { + this.imp = imp; + mapper = new ObjectMapper(); + this.configuration = configuration; + } + + @ApiAction + public Result addPet(Http.Request request) throws Exception { + JsonNode nodebody = request.body().asJson(); + Pet body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), Pet.class); + if (configuration.getBoolean("useInputBeanValidation")) { + OpenAPIUtils.validate(body); + } + } else { + throw new IllegalArgumentException("'body' parameter is required"); + } + return imp.addPetHttp(request, body); + } + + @ApiAction + public Result findPetsByStatus(Http.Request request) throws Exception { + String[] statusArray = request.queryString().get("status"); + if (statusArray == null) { + throw new IllegalArgumentException("'status' parameter is required"); + } + List statusList = OpenAPIUtils.parametersToList("csv", statusArray); + List status = new ArrayList<>(); + for (String curParam : statusList) { + if (!curParam.isEmpty()) { + //noinspection UseBulkOperation + status.add(curParam); + } + } + return imp.findPetsByStatusHttp(request, status); + } + + @ApiAction + public Result updatePet(Http.Request request) throws Exception { + JsonNode nodebody = request.body().asJson(); + Pet body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), Pet.class); + if (configuration.getBoolean("useInputBeanValidation")) { + OpenAPIUtils.validate(body); + } + } else { + throw new IllegalArgumentException("'body' parameter is required"); + } + return imp.updatePetHttp(request, body); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImp.java new file mode 100644 index 000000000000..baaedaae78c9 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImp.java @@ -0,0 +1,31 @@ +package controllers; + +import apimodels.Pet; + +import play.mvc.Http; +import java.util.List; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.io.FileInputStream; +import play.libs.Files.TemporaryFile; +import javax.validation.constraints.*; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") +public class PetApiControllerImp extends PetApiControllerImpInterface { + @Override + public void addPet(Http.Request request, Pet body) throws Exception { + //Do your magic!!! + } + + @Override + public List findPetsByStatus(Http.Request request, @NotNull List status) throws Exception { + //Do your magic!!! + return new ArrayList(); + } + + @Override + public void updatePet(Http.Request request, Pet body) throws Exception { + //Do your magic!!! + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImpInterface.java new file mode 100644 index 000000000000..3c05b7bff361 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImpInterface.java @@ -0,0 +1,66 @@ +package controllers; + +import apimodels.Pet; + +import com.google.inject.Inject; +import com.typesafe.config.Config; +import play.mvc.Controller; +import play.mvc.Http; +import java.util.List; +import java.util.ArrayList; +import java.util.HashMap; +import play.mvc.Result; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.JsonNode; +import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; +import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; +import play.libs.Files.TemporaryFile; + +import javax.validation.constraints.*; + +@SuppressWarnings("RedundantThrows") +public abstract class PetApiControllerImpInterface { + @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; + private ObjectMapper mapper = new ObjectMapper(); + + public Result addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_token")) { + return unauthorized(); + } + + addPet(request, body); + return ok(); + + } + + public abstract void addPet(Http.Request request, Pet body) throws Exception; + + public Result findPetsByStatusHttp(Http.Request request, @NotNull List status) throws Exception { + List obj = findPetsByStatus(request, status); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); + + } + + public abstract List findPetsByStatus(Http.Request request, @NotNull List status) throws Exception; + + public Result updatePetHttp(Http.Request request, Pet body) throws Exception { + updatePet(request, body); + return ok(); + + } + + public abstract void updatePet(Http.Request request, Pet body) throws Exception; + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/ApiCall.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/ApiCall.java new file mode 100644 index 000000000000..7a74f4e67162 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/ApiCall.java @@ -0,0 +1,27 @@ +package openapitools; + +import com.google.inject.Inject; +import play.mvc.Action; +import play.mvc.Http; +import play.mvc.Result; + +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionStage; + +public class ApiCall extends Action { + + @Inject + private ApiCall() {} + + public CompletionStage call(Http.Request request) { + try { + //TODO: Do stuff you want to handle with each API call (metrics, logging, etc..) + return delegate.call(request); + } catch (Throwable t) { + //TODO: log the error in your metric + + //We rethrow this error so it will be caught in the ErrorHandler + throw t; + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/ErrorHandler.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/ErrorHandler.java new file mode 100644 index 000000000000..4c2999bc7441 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/ErrorHandler.java @@ -0,0 +1,50 @@ +package openapitools; + + +import com.typesafe.config.Config; +import play.*; +import play.api.OptionalSourceMapper; +import play.api.UsefulException; +import play.api.routing.Router; +import play.http.DefaultHttpErrorHandler; +import play.mvc.Http.*; +import play.mvc.*; + +import javax.inject.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionStage; +import static play.mvc.Results.*; + +@Singleton +public class ErrorHandler extends DefaultHttpErrorHandler { + + @Inject + public ErrorHandler(Config configuration, Environment environment, OptionalSourceMapper sourceMapper, Provider routes) { + super(configuration, environment, sourceMapper, routes); + } + + @Override + protected CompletionStage onDevServerError(RequestHeader request, UsefulException exception) { + return CompletableFuture.completedFuture( + handleExceptions(exception) + ); + } + + @Override + protected CompletionStage onProdServerError(RequestHeader request, UsefulException exception) { + return CompletableFuture.completedFuture( + handleExceptions(exception) + ); + } + + @Override + protected void logServerError(RequestHeader request, UsefulException usefulException) { + //Since the error is already handled, we don't want to print anything on the console + //But if you want to have the error printed in the console, just delete this override + } + + private Result handleExceptions(Throwable t) { + //TODO: Handle exception that need special response (return a special apimodel, notFound(), etc..) + return ok(); + } +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/OpenAPIUtils.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/OpenAPIUtils.java new file mode 100644 index 000000000000..e57d887c2ec0 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/OpenAPIUtils.java @@ -0,0 +1,103 @@ +package openapitools; + +import play.mvc.With; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.text.SimpleDateFormat; +import java.util.*; + +import javax.validation.ConstraintViolation; +import javax.validation.Validation; +import javax.validation.Validator; +import javax.validation.ValidatorFactory; + +public class OpenAPIUtils { + + @With(ApiCall.class) + @Target({ ElementType.TYPE, ElementType.METHOD }) + @Retention(RetentionPolicy.RUNTIME) + public @interface ApiAction { + } + + public static void validate(T obj) { + ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); + Validator validator = factory.getValidator(); + Set> constraintViolations = validator.validate(obj); + if (constraintViolations.size() > 0) { + StringBuilder errors = new StringBuilder(); + for (ConstraintViolation constraints : constraintViolations) { + errors.append(String.format("%s.%s %s\n", + constraints.getRootBeanClass().getSimpleName(), + constraints.getPropertyPath(), + constraints.getMessage())); + } + throw new RuntimeException("Bean validation : " + errors); + } + } + + public static List parametersToList(String collectionFormat, String[] values){ + List params = new ArrayList<>(); + + if (values == null) { + return params; + } + + if (values.length >= 1 && collectionFormat.equals("multi")) { + params.addAll(Arrays.asList(values)); + } else { + collectionFormat = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv + + String delimiter = ","; + + switch(collectionFormat) { + case "csv": { + delimiter = ","; + break; + } + case "ssv": { + delimiter = " "; + break; + } + case "tsv": { + delimiter = "\t"; + break; + } + case "pipes": { + delimiter = "|"; + break; + } + } + + params = Arrays.asList(values[0].split(delimiter)); + } + + return params; + } + + public static String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDatetime((Date) 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); + } + } + + public static String formatDatetime(Date date) { + return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT).format(date); + } +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..6e3cdc69b8d2 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_token", "https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/token/introspect"); + + jwksEndpoints.put("petstore_token", "https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/certs"); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/build.sbt b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/build.sbt new file mode 100644 index 000000000000..69dfa74cd8ad --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/build.sbt @@ -0,0 +1,14 @@ +name := """openapi-java-playframework""" + +version := "1.0-SNAPSHOT" + +lazy val root = (project in file(".")).enablePlugins(PlayJava) + +scalaVersion := "2.12.6" + +libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" +libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" +libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/application.conf b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/application.conf new file mode 100644 index 000000000000..60d4bf00b538 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/application.conf @@ -0,0 +1,374 @@ +# This is the main configuration file for the application. +# https://www.playframework.com/documentation/latest/ConfigFile +# ~~~~~ +# Play uses HOCON as its configuration file format. HOCON has a number +# of advantages over other config formats, but there are two things that +# can be used when modifying settings. +# +# You can include other configuration files in this main application.conf file: +#include "extra-config.conf" +# +# You can declare variables and substitute for them: +#mykey = ${some.value} +# +# And if an environment variable exists when there is no other substitution, then +# HOCON will fall back to substituting environment variable: +#mykey = ${JAVA_HOME} + +play.filters.headers.contentSecurityPolicy=null + +# When using bean validation with the OpenAPI API, the validator will check that every constraint is respected +# This is very useful when testing but could add a lot of overhead if you return a lot of data. Benchmark have +# shown that the time it takes to validate is exponential. +# If this is a concern in your application, or if you don't want to validate the output coming from your API for +# respecting its contract, set the "output" property below to "false". Since there is not a lot of data as input for +# an endpoint, I highly suggest you let the "input" property set to true. +useInputBeanValidation=true +useOutputBeanValidation=true + +play.http.errorHandler="openapitools.ErrorHandler" + +## Akka +# https://www.playframework.com/documentation/latest/ScalaAkka#Configuration +# https://www.playframework.com/documentation/latest/JavaAkka#Configuration +# ~~~~~ +# Play uses Akka internally and exposes Akka Streams and actors in Websockets and +# other streaming HTTP responses. +akka { +# "akka.log-config-on-start" is extraordinarily useful because it log the complete +# configuration at INFO level, including defaults and overrides, so it s worth +# putting at the very top. +# +# Put the following in your conf/logback.xml file: +# +# +# +# And then uncomment this line to debug the configuration. +# +#log-config-on-start = true +} + +## Secret key +# http://www.playframework.com/documentation/latest/ApplicationSecret +# ~~~~~ +# The secret key is used to sign Play's session cookie. +# This must be changed for production, but we don't recommend you change it in this file. +play.http.secret.key = "changeme" + +## Modules +# https://www.playframework.com/documentation/latest/Modules +# ~~~~~ +# Control which modules are loaded when Play starts. Note that modules are +# the replacement for "GlobalSettings", which are deprecated in 2.5.x. +# Please see https://www.playframework.com/documentation/latest/GlobalSettings +# for more information. +# +# You can also extend Play functionality by using one of the publicly available +# Play modules: https://playframework.com/documentation/latest/ModuleDirectory +play.modules { +# By default, Play will load any class called Module that is defined +# in the root package (the "app" directory), or you can define them +# explicitly below. +# If there are any built-in modules that you want to disable, you can list them here. +} + +play.assets { +path = "/public" +urlPrefix = "/assets" +} + +## IDE +# https://www.playframework.com/documentation/latest/IDE +# ~~~~~ +# Depending on your IDE, you can add a hyperlink for errors that will jump you +# directly to the code location in the IDE in dev mode. The following line makes +# use of the IntelliJ IDEA REST interface: +#play.editor="http://localhost:63342/api/file/?file=%s&line=%s" + +## Internationalisation +# https://www.playframework.com/documentation/latest/JavaI18N +# https://www.playframework.com/documentation/latest/ScalaI18N +# ~~~~~ +# Play comes with its own i18n settings, which allow the user's preferred language +# to map through to internal messages, or allow the language to be stored in a cookie. +play.i18n { +# The application languages +langs = [ "en" ] + +# Whether the language cookie should be secure or not +#langCookieSecure = true + +# Whether the HTTP only attribute of the cookie should be set to true +#langCookieHttpOnly = true +} + +## Play HTTP settings +# ~~~~~ +play.http { +## Router +# https://www.playframework.com/documentation/latest/JavaRouting +# https://www.playframework.com/documentation/latest/ScalaRouting +# ~~~~~ +# Define the Router object to use for this application. +# This router will be looked up first when the application is starting up, +# so make sure this is the entry point. +# Furthermore, it's assumed your route file is named properly. +# So for an application router like `my.application.Router`, +# you may need to define a router file `conf/my.application.routes`. +# Default to Routes in the root package (aka "apps" folder) (and conf/routes) +#router = my.application.Router + +## Action Creator +# https://www.playframework.com/documentation/latest/JavaActionCreator +# ~~~~~ +#actionCreator = null + +## ErrorHandler +# https://www.playframework.com/documentation/latest/JavaRouting +# https://www.playframework.com/documentation/latest/ScalaRouting +# ~~~~~ +# If null, will attempt to load a class called ErrorHandler in the root package, +#errorHandler = null + +## Filters +# https://www.playframework.com/documentation/latest/ScalaHttpFilters +# https://www.playframework.com/documentation/latest/JavaHttpFilters +# ~~~~~ +# Filters run code on every request. They can be used to perform +# common logic for all your actions, e.g. adding common headers. +# Defaults to "Filters" in the root package (aka "apps" folder) +# Alternatively you can explicitly register a class here. +#filters = my.application.Filters + +## Session & Flash +# https://www.playframework.com/documentation/latest/JavaSessionFlash +# https://www.playframework.com/documentation/latest/ScalaSessionFlash +# ~~~~~ +session { +# Sets the cookie to be sent only over HTTPS. +#secure = true + +# Sets the cookie to be accessed only by the server. +#httpOnly = true + +# Sets the max-age field of the cookie to 5 minutes. +# NOTE: this only sets when the browser will discard the cookie. Play will consider any +# cookie value with a valid signature to be a valid session forever. To implement a server side session timeout, +# you need to put a timestamp in the session and check it at regular intervals to possibly expire it. +#maxAge = 300 + +# Sets the domain on the session cookie. +#domain = "example.com" +} + +flash { +# Sets the cookie to be sent only over HTTPS. +#secure = true + +# Sets the cookie to be accessed only by the server. +#httpOnly = true +} +} + +## Netty Provider +# https://www.playframework.com/documentation/latest/SettingsNetty +# ~~~~~ +play.server.netty { +# Whether the Netty wire should be logged +#log.wire = true + +# If you run Play on Linux, you can use Netty's native socket transport +# for higher performance with less garbage. +#transport = "native" +} + +## WS (HTTP Client) +# https://www.playframework.com/documentation/latest/ScalaWS#Configuring-WS +# ~~~~~ +# The HTTP client primarily used for REST APIs. The default client can be +# configured directly, but you can also create different client instances +# with customized settings. You must enable this by adding to build.sbt: +# +# libraryDependencies += ws // or javaWs if using java +# +play.ws { +# Sets HTTP requests not to follow 302 requests +#followRedirects = false + +# Sets the maximum number of open HTTP connections for the client. +#ahc.maxConnectionsTotal = 50 + +## WS SSL +# https://www.playframework.com/documentation/latest/WsSSL +# ~~~~~ +ssl { +# Configuring HTTPS with Play WS does not require programming. You can +# set up both trustManager and keyManager for mutual authentication, and +# turn on JSSE debugging in development with a reload. +#debug.handshake = true +#trustManager = { +# stores = [ +# { type = "JKS", path = "exampletrust.jks" } +# ] +#} +} +} + +## Cache +# https://www.playframework.com/documentation/latest/JavaCache +# https://www.playframework.com/documentation/latest/ScalaCache +# ~~~~~ +# Play comes with an integrated cache API that can reduce the operational +# overhead of repeated requests. You must enable this by adding to build.sbt: +# +# libraryDependencies += cache +# +play.cache { +# If you want to bind several caches, you can bind the individually +#bindCaches = ["db-cache", "user-cache", "session-cache"] +} + +## Filters +# https://www.playframework.com/documentation/latest/Filters +# ~~~~~ +# There are a number of built-in filters that can be enabled and configured +# to give Play greater security. You must enable this by adding to build.sbt: +# +# libraryDependencies += filters +# +play.filters { +## CORS filter configuration +# https://www.playframework.com/documentation/latest/CorsFilter +# ~~~~~ +# CORS is a protocol that allows web applications to make requests from the browser +# across different domains. +# NOTE: You MUST apply the CORS configuration before the CSRF filter, as CSRF has +# dependencies on CORS settings. +cors { +# Filter paths by a whitelist of path prefixes +#pathPrefixes = ["/some/path", ...] + +# The allowed origins. If null, all origins are allowed. +#allowedOrigins = ["http://www.example.com"] + +# The allowed HTTP methods. If null, all methods are allowed +#allowedHttpMethods = ["GET", "POST"] +} + +## CSRF Filter +# https://www.playframework.com/documentation/latest/ScalaCsrf#Applying-a-global-CSRF-filter +# https://www.playframework.com/documentation/latest/JavaCsrf#Applying-a-global-CSRF-filter +# ~~~~~ +# Play supports multiple methods for verifying that a request is not a CSRF request. +# The primary mechanism is a CSRF token. This token gets placed either in the query string +# or body of every form submitted, and also gets placed in the users session. +# Play then verifies that both tokens are present and match. +csrf { +# Sets the cookie to be sent only over HTTPS +#cookie.secure = true + +# Defaults to CSRFErrorHandler in the root package. +#errorHandler = MyCSRFErrorHandler +} + +## Security headers filter configuration +# https://www.playframework.com/documentation/latest/SecurityHeaders +# ~~~~~ +# Defines security headers that prevent XSS attacks. +# If enabled, then all options are set to the below configuration by default: +play.filters.headers { + +# The X-Frame-Options header. If null, the header is not set. +#frameOptions = "DENY" + +# The X-XSS-Protection header. If null, the header is not set. +#xssProtection = "1; mode=block" + +# The X-Content-Type-Options header. If null, the header is not set. +#contentTypeOptions = "nosniff" + +# The X-Permitted-Cross-Domain-Policies header. If null, the header is not set. +#permittedCrossDomainPolicies = "master-only" + +# The Content-Security-Policy header. If null, the header is not set. +contentSecurityPolicy = "default-src 'self'" + +# The Referrer-Policy header. If null, the header is not set. +#referrerPolicy = "origin-when-cross-origin, strict-origin-when-cross-origin" + +# If true, allow an action to use .withHeaders to replace one or more of the above headers +#allowActionSpecificHeaders = false +} + +## Allowed hosts filter configuration +# https://www.playframework.com/documentation/latest/AllowedHostsFilter +# ~~~~~ +# Play provides a filter that lets you configure which hosts can access your application. +# This is useful to prevent cache poisoning attacks. +hosts { +# Allow requests to example.com, its subdomains, and localhost:9000. +#allowed = [".example.com", "localhost:9000"] +} +} + +## Evolutions +# https://www.playframework.com/documentation/latest/Evolutions +# ~~~~~ +# Evolutions allows database scripts to be automatically run on startup in dev mode +# for database migrations. You must enable this by adding to build.sbt: +# +# libraryDependencies += evolutions +# +play.evolutions { +# You can disable evolutions for a specific datasource if necessary +#db.default.enabled = false +} + +## Database Connection Pool +# https://www.playframework.com/documentation/latest/SettingsJDBC +# ~~~~~ +# Play doesn't require a JDBC database to run, but you can easily enable one. +# +# libraryDependencies += jdbc +# +play.db { +# The combination of these two settings results in "db.default" as the +# default JDBC pool: +#config = "db" +#default = "default" + +# Play uses HikariCP as the default connection pool. You can override +# settings by changing the prototype: +prototype { +# Sets a fixed JDBC connection pool size of 50 +#hikaricp.minimumIdle = 50 +#hikaricp.maximumPoolSize = 50 +} +} + +## JDBC Datasource +# https://www.playframework.com/documentation/latest/JavaDatabase +# https://www.playframework.com/documentation/latest/ScalaDatabase +# ~~~~~ +# Once JDBC datasource is set up, you can work with several different +# database options: +# +# Slick (Scala preferred option): https://www.playframework.com/documentation/latest/PlaySlick +# JPA (Java preferred option): https://playframework.com/documentation/latest/JavaJPA +# EBean: https://playframework.com/documentation/latest/JavaEbean +# Anorm: https://www.playframework.com/documentation/latest/ScalaAnorm +# +db { +# You can declare as many datasources as you want. +# By convention, the default datasource is named `default` + +# https://www.playframework.com/documentation/latest/Developing-with-the-H2-Database +#default.driver = org.h2.Driver +#default.url = "jdbc:h2:mem:play" +#default.username = sa +#default.password = "" + +# You can turn on SQL logging for any datasource +# https://www.playframework.com/documentation/latest/Highlights25#Logging-SQL-statements +#default.logSql=true +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/logback.xml b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/logback.xml new file mode 100644 index 000000000000..01f301ab73a9 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/logback.xml @@ -0,0 +1,41 @@ + + + + + + + ${application.home:-.}/logs/application.log + + %date [%level] from %logger in %thread - %message%n%xException + + + + + + %coloredLevel %logger{15} - %message%n%xException{10} + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/routes b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/routes new file mode 100644 index 000000000000..eba68941d3bb --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/conf/routes @@ -0,0 +1,15 @@ +# Routes +# This file defines all application routes (Higher priority routes first) +# ~~~~ + +GET /api controllers.ApiDocController.api + + +#Functions for Pet API +POST /v2/pet controllers.PetApiController.addPet(request: Request) +GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus(request: Request) +PUT /v2/pet controllers.PetApiController.updatePet(request: Request) + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file controllers.Assets.at(file) +GET /versionedAssets/*file controllers.Assets.versioned(file) \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/project/build.properties b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/project/build.properties new file mode 100644 index 000000000000..d7ec7acfad24 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.3.13 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/project/plugins.sbt b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/project/plugins.sbt new file mode 100644 index 000000000000..318672226e33 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/project/plugins.sbt @@ -0,0 +1,2 @@ +// The Play plugin +addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.3") \ No newline at end of file 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 new file mode 100644 index 000000000000..aed3406f2662 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json @@ -0,0 +1,377 @@ +{ + "openapi" : "3.0.1", + "info" : { + "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", + "license" : { + "name" : "Apache-2.0", + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "title" : "OpenAPI Petstore", + "version" : "1.0.0" + }, + "servers" : [ { + "url" : "http://petstore.swagger.io/v2" + } ], + "tags" : [ { + "description" : "Everything about your Pets", + "name" : "pet" + }, { + "description" : "Access to Petstore orders", + "name" : "store" + }, { + "description" : "Operations about user", + "name" : "user" + } ], + "paths" : { + "/pet" : { + "post" : { + "operationId" : "addPet", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "description" : "Pet object that needs to be added to the store", + "required" : true + }, + "responses" : { + "405" : { + "content" : { }, + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_token" : [ "base" ] + } ], + "summary" : "Add a new pet to the store", + "tags" : [ "pet" ], + "x-codegen-request-body-name" : "body", + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "operationId" : "updatePet", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "description" : "Pet object that needs to be added to the store", + "required" : true + }, + "responses" : { + "400" : { + "content" : { }, + "description" : "Invalid ID supplied" + }, + "404" : { + "content" : { }, + "description" : "Pet not found" + }, + "405" : { + "content" : { }, + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Update an existing pet", + "tags" : [ "pet" ], + "x-codegen-request-body-name" : "body", + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "parameters" : [ { + "description" : "Status values that need to be considered for filter", + "explode" : false, + "in" : "query", + "name" : "status", + "required" : true, + "schema" : { + "items" : { + "default" : "available", + "enum" : [ "available", "pending", "sold" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/Pet" + }, + "type" : "array" + } + }, + "application/json" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/Pet" + }, + "type" : "array" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "content" : { }, + "description" : "Invalid status value" + } + }, + "summary" : "Finds Pets by status", + "tags" : [ "pet" ], + "x-accepts" : "application/json" + } + } + }, + "components" : { + "schemas" : { + "Order" : { + "description" : "An order for a pets from the pet store", + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "petId" : { + "format" : "int64", + "type" : "integer" + }, + "quantity" : { + "format" : "int32", + "type" : "integer" + }, + "shipDate" : { + "format" : "date-time", + "type" : "string" + }, + "status" : { + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ], + "type" : "string" + }, + "complete" : { + "default" : false, + "type" : "boolean" + } + }, + "title" : "Pet Order", + "type" : "object", + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet category", + "type" : "object", + "xml" : { + "name" : "Category" + } + }, + "User" : { + "description" : "A User who is purchasing from the pet store", + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string" + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "description" : "User Status", + "format" : "int32", + "type" : "integer" + } + }, + "title" : "a User", + "type" : "object", + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "type" : "object", + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "category" : { + "$ref" : "#/components/schemas/Category" + }, + "name" : { + "example" : "doggie", + "type" : "string" + }, + "photoUrls" : { + "items" : { + "type" : "string" + }, + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + } + }, + "tags" : { + "items" : { + "$ref" : "#/components/schemas/Tag" + }, + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + } + }, + "status" : { + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ], + "type" : "string" + } + }, + "required" : [ "name", "photoUrls" ], + "title" : "a Pet", + "type" : "object", + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "description" : "Describes the result of uploading an image resource", + "properties" : { + "code" : { + "format" : "int32", + "type" : "integer" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "type" : "object" + } + }, + "securitySchemes" : { + "petstore_token" : { + "description" : "security definition for using keycloak authentification with control site.", + "flows" : { + "authorizationCode" : { + "authorizationUrl" : "https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/auth", + "scopes" : { + "base" : "not sure if we will be using scopes, at least in the beginning, but since we need to specify one...." + }, + "tokenUrl" : "https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/token" + } + }, + "type" : "oauth2", + "x-jwksUrl" : "https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/certs", + "x-tokenIntrospectUrl" : "https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/token/introspect" + }, + "api_key" : { + "in" : "header", + "name" : "api_key", + "type" : "apiKey" + } + } + }, + "x-original-swagger-version" : "2.0" +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/FILES index 93c2a2a954fb..237025d138a3 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/FILES @@ -69,6 +69,7 @@ app/controllers/UserApiControllerImpInterface.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/Module.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/Module.java index eea2541f91c3..10271bf950b7 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/Module.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import controllers.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -12,5 +13,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java index 98645f472476..b6f4261ee6dd 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -21,15 +23,19 @@ @SuppressWarnings("RedundantThrows") public abstract class AnotherFakeApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result call123testSpecialTagsHttp(Http.Request request, Client body) throws Exception { Client obj = call123testSpecialTags(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImpInterface.java index ba854ceb3485..b7871b677ac6 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImpInterface.java @@ -22,7 +22,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -30,11 +32,12 @@ @SuppressWarnings("RedundantThrows") public abstract class FakeApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createXmlItemHttp(Http.Request request, XmlItem xmlItem) throws Exception { createXmlItem(request, xmlItem); -return ok(); + return ok(); } @@ -42,8 +45,9 @@ public Result createXmlItemHttp(Http.Request request, XmlItem xmlItem) throws Ex public Result fakeOuterBooleanSerializeHttp(Http.Request request, Boolean body) throws Exception { Boolean obj = fakeOuterBooleanSerialize(request, body); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -51,11 +55,14 @@ public Result fakeOuterBooleanSerializeHttp(Http.Request request, Boolean body) public Result fakeOuterCompositeSerializeHttp(Http.Request request, OuterComposite body) throws Exception { OuterComposite obj = fakeOuterCompositeSerialize(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -63,11 +70,14 @@ public Result fakeOuterCompositeSerializeHttp(Http.Request request, OuterComposi public Result fakeOuterNumberSerializeHttp(Http.Request request, BigDecimal body) throws Exception { BigDecimal obj = fakeOuterNumberSerialize(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -75,8 +85,9 @@ public Result fakeOuterNumberSerializeHttp(Http.Request request, BigDecimal body public Result fakeOuterStringSerializeHttp(Http.Request request, String body) throws Exception { String obj = fakeOuterStringSerialize(request, body); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -84,7 +95,7 @@ public Result fakeOuterStringSerializeHttp(Http.Request request, String body) th public Result testBodyWithFileSchemaHttp(Http.Request request, FileSchemaTestClass body) throws Exception { testBodyWithFileSchema(request, body); -return ok(); + return ok(); } @@ -92,7 +103,7 @@ public Result testBodyWithFileSchemaHttp(Http.Request request, FileSchemaTestCla public Result testBodyWithQueryParamsHttp(Http.Request request, @NotNull String query, User body) throws Exception { testBodyWithQueryParams(request, query, body); -return ok(); + return ok(); } @@ -100,11 +111,14 @@ public Result testBodyWithQueryParamsHttp(Http.Request request, @NotNull String public Result testClientModelHttp(Http.Request request, Client body) throws Exception { Client obj = testClientModel(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -112,7 +126,7 @@ public Result testClientModelHttp(Http.Request request, Client body) throws Exce public Result testEndpointParametersHttp(Http.Request request, BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, Http.MultipartFormData.FilePart binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws Exception { testEndpointParameters(request, number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); -return ok(); + return ok(); } @@ -120,7 +134,7 @@ public Result testEndpointParametersHttp(Http.Request request, BigDecimal number public Result testEnumParametersHttp(Http.Request request, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws Exception { testEnumParameters(request, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); -return ok(); + return ok(); } @@ -128,7 +142,7 @@ public Result testEnumParametersHttp(Http.Request request, List enumHead public Result testGroupParametersHttp(Http.Request request, @NotNull Integer requiredStringGroup, Boolean requiredBooleanGroup, @NotNull Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws Exception { testGroupParameters(request, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); -return ok(); + return ok(); } @@ -136,7 +150,7 @@ public Result testGroupParametersHttp(Http.Request request, @NotNull Integer req public Result testInlineAdditionalPropertiesHttp(Http.Request request, Map param) throws Exception { testInlineAdditionalProperties(request, param); -return ok(); + return ok(); } @@ -144,7 +158,7 @@ public Result testInlineAdditionalPropertiesHttp(Http.Request request, Map pipe, @NotNull List ioutil, @NotNull List http, @NotNull List url, @NotNull List context) throws Exception { testQueryParameterCollectionFormat(request, pipe, ioutil, http, url, context); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImpInterface.java index bc2a36108f83..17286d728b85 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImpInterface.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -21,15 +23,19 @@ @SuppressWarnings("RedundantThrows") public abstract class FakeClassnameTags123ApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result testClassnameHttp(Http.Request request, Client body) throws Exception { Client obj = testClassname(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java index c68340d59246..2819023e720e 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java @@ -16,7 +16,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -24,47 +26,70 @@ @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + addPet(request, body); -return ok(); + return ok(); } public abstract void addPet(Http.Request request, Pet body) throws Exception; public Result deletePetHttp(Http.Request request, Long petId, String apiKey) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + deletePet(request, petId, apiKey); -return ok(); + return ok(); } public abstract void deletePet(Http.Request request, Long petId, String apiKey) throws Exception; public Result findPetsByStatusHttp(Http.Request request, @NotNull List status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByStatus(request, status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract List findPetsByStatus(Http.Request request, @NotNull List status) throws Exception; public Result findPetsByTagsHttp(Http.Request request, @NotNull Set tags) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + Set obj = findPetsByTags(request, tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -72,51 +97,76 @@ public Result findPetsByTagsHttp(Http.Request request, @NotNull Set tags public Result getPetByIdHttp(Http.Request request, Long petId) throws Exception { Pet obj = getPetById(request, petId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract Pet getPetById(Http.Request request, Long petId) throws Exception; public Result updatePetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePet(request, body); -return ok(); + return ok(); } public abstract void updatePet(Http.Request request, Pet body) throws Exception; public Result updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception; public Result uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFile(request, petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract ModelApiResponse uploadFile(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception; public Result uploadFileWithRequiredFileHttp(Http.Request request, Long petId, Http.MultipartFormData.FilePart requiredFile, String additionalMetadata) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFileWithRequiredFile(request, petId, requiredFile, additionalMetadata); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImpInterface.java index c2a154007e45..67780d39c1cf 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImpInterface.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -22,11 +24,12 @@ @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result deleteOrderHttp(Http.Request request, String orderId) throws Exception { deleteOrder(request, orderId); -return ok(); + return ok(); } @@ -34,8 +37,9 @@ public Result deleteOrderHttp(Http.Request request, String orderId) throws Excep public Result getInventoryHttp(Http.Request request) throws Exception { Map obj = getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -43,11 +47,14 @@ public Result getInventoryHttp(Http.Request request) throws Exception { public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception { Order obj = getOrderById(request, orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -55,11 +62,14 @@ public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderI public Result placeOrderHttp(Http.Request request, Order body) throws Exception { Order obj = placeOrder(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java index 39d422cc1ea4..5ba04804d68a 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,11 +25,12 @@ @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createUserHttp(Http.Request request, User body) throws Exception { createUser(request, body); -return ok(); + return ok(); } @@ -35,7 +38,7 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { createUsersWithArrayInput(request, body); -return ok(); + return ok(); } @@ -43,7 +46,7 @@ public Result createUsersWithArrayInputHttp(Http.Request request, List bod public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { createUsersWithListInput(request, body); -return ok(); + return ok(); } @@ -51,7 +54,7 @@ public Result createUsersWithListInputHttp(Http.Request request, List body public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); -return ok(); + return ok(); } @@ -59,11 +62,14 @@ public Result deleteUserHttp(Http.Request request, String username) throws Excep public Result getUserByNameHttp(Http.Request request, String username) throws Exception { User obj = getUserByName(request, username); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,8 +77,9 @@ public Result getUserByNameHttp(Http.Request request, String username) throws Ex public Result loginUserHttp(Http.Request request, @NotNull String username, @NotNull String password) throws Exception { String obj = loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -80,7 +87,7 @@ public Result loginUserHttp(Http.Request request, @NotNull String username, @Not public Result logoutUserHttp(Http.Request request) throws Exception { logoutUser(request); -return ok(); + return ok(); } @@ -88,7 +95,7 @@ public Result logoutUserHttp(Http.Request request) throws Exception { public Result updateUserHttp(Http.Request request, String username, User body) throws Exception { updateUser(request, username, body); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/build.sbt b/samples/server/petstore/java-play-framework-fake-endpoints/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/build.sbt +++ b/samples/server/petstore/java-play-framework-fake-endpoints/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/FILES index f517461d8913..283bce384731 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/FILES @@ -20,6 +20,7 @@ app/controllers/UserApiControllerImpInterface.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/Module.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/Module.java index f1b062c29345..1439bbe30c1a 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/Module.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import controllers.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -9,5 +10,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/PetApiControllerImpInterface.java index afb1f19802f3..d98f6ae3fd10 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/PetApiControllerImpInterface.java @@ -15,43 +15,64 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + addPet(request, body); -return ok(); + return ok(); } public abstract void addPet(Http.Request request, Pet body) throws Exception; public Result deletePetHttp(Http.Request request, Long petId, String apiKey) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + deletePet(request, petId, apiKey); -return ok(); + return ok(); } public abstract void deletePet(Http.Request request, Long petId, String apiKey) throws Exception; public Result findPetsByStatusHttp(Http.Request request, List status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByStatus(request, status); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract List findPetsByStatus(Http.Request request, List status) throws Exception; public Result findPetsByTagsHttp(Http.Request request, List tags) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByTags(request, tags); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -59,33 +80,47 @@ public Result findPetsByTagsHttp(Http.Request request, List tags) throws public Result getPetByIdHttp(Http.Request request, Long petId) throws Exception { Pet obj = getPetById(request, petId); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract Pet getPetById(Http.Request request, Long petId) throws Exception; public Result updatePetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePet(request, body); -return ok(); + return ok(); } public abstract void updatePet(Http.Request request, Pet body) throws Exception; public Result updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception; public Result uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFile(request, petId, additionalMetadata, file); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/StoreApiControllerImpInterface.java index 313dcfd465b7..f846c7ec9c8b 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/StoreApiControllerImpInterface.java @@ -14,17 +14,20 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result deleteOrderHttp(Http.Request request, String orderId) throws Exception { deleteOrder(request, orderId); -return ok(); + return ok(); } @@ -32,8 +35,9 @@ public Result deleteOrderHttp(Http.Request request, String orderId) throws Excep public Result getInventoryHttp(Http.Request request) throws Exception { Map obj = getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -41,8 +45,9 @@ public Result getInventoryHttp(Http.Request request) throws Exception { public Result getOrderByIdHttp(Http.Request request, Long orderId) throws Exception { Order obj = getOrderById(request, orderId); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -50,8 +55,9 @@ public Result getOrderByIdHttp(Http.Request request, Long orderId) throws Except public Result placeOrderHttp(Http.Request request, Order body) throws Exception { Order obj = placeOrder(request, body); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImpInterface.java index 722d76055f70..f1590489fdd9 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImpInterface.java @@ -15,17 +15,20 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createUserHttp(Http.Request request, User body) throws Exception { createUser(request, body); -return ok(); + return ok(); } @@ -33,7 +36,7 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { createUsersWithArrayInput(request, body); -return ok(); + return ok(); } @@ -41,7 +44,7 @@ public Result createUsersWithArrayInputHttp(Http.Request request, List bod public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { createUsersWithListInput(request, body); -return ok(); + return ok(); } @@ -49,7 +52,7 @@ public Result createUsersWithListInputHttp(Http.Request request, List body public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); -return ok(); + return ok(); } @@ -57,8 +60,9 @@ public Result deleteUserHttp(Http.Request request, String username) throws Excep public Result getUserByNameHttp(Http.Request request, String username) throws Exception { User obj = getUserByName(request, username); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -66,8 +70,9 @@ public Result getUserByNameHttp(Http.Request request, String username) throws Ex public Result loginUserHttp(Http.Request request, String username, String password) throws Exception { String obj = loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -75,7 +80,7 @@ public Result loginUserHttp(Http.Request request, String username, String passwo public Result logoutUserHttp(Http.Request request) throws Exception { logoutUser(request); -return ok(); + return ok(); } @@ -83,7 +88,7 @@ public Result logoutUserHttp(Http.Request request) throws Exception { public Result updateUserHttp(Http.Request request, String username, User body) throws Exception { updateUser(request, username, body); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/build.sbt b/samples/server/petstore/java-play-framework-no-bean-validation/build.sbt index 2b72c7e17af4..5e356fcab668 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/build.sbt +++ b/samples/server/petstore/java-play-framework-no-bean-validation/build.sbt @@ -8,3 +8,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/FILES index 993e9b26d34d..384973dc5517 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/FILES @@ -19,6 +19,7 @@ app/controllers/UserApiControllerImp.java app/controllers/UserApiControllerImpInterface.java app/openapitools/ApiCall.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/Module.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/Module.java index f1b062c29345..1439bbe30c1a 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/Module.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import controllers.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -9,5 +10,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImpInterface.java index 956acccf5eba..846514e5ad1e 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,47 +25,70 @@ @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result addPetHttp(Http.Request request, Pet body) { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + addPet(request, body); -return ok(); + return ok(); } public abstract void addPet(Http.Request request, Pet body) ; public Result deletePetHttp(Http.Request request, Long petId, String apiKey) { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + deletePet(request, petId, apiKey); -return ok(); + return ok(); } public abstract void deletePet(Http.Request request, Long petId, String apiKey) ; public Result findPetsByStatusHttp(Http.Request request, @NotNull List status) { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByStatus(request, status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract List findPetsByStatus(Http.Request request, @NotNull List status) ; public Result findPetsByTagsHttp(Http.Request request, @NotNull List tags) { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByTags(request, tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,39 +96,57 @@ public Result findPetsByTagsHttp(Http.Request request, @NotNull List tag public Result getPetByIdHttp(Http.Request request, Long petId) { Pet obj = getPetById(request, petId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract Pet getPetById(Http.Request request, Long petId) ; public Result updatePetHttp(Http.Request request, Pet body) { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePet(request, body); -return ok(); + return ok(); } public abstract void updatePet(Http.Request request, Pet body) ; public Result updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) ; public Result uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFile(request, petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImpInterface.java index d0ceb3639bcf..31e5240767ad 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImpInterface.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -22,11 +24,12 @@ @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result deleteOrderHttp(Http.Request request, String orderId) { deleteOrder(request, orderId); -return ok(); + return ok(); } @@ -34,8 +37,9 @@ public Result deleteOrderHttp(Http.Request request, String orderId) { public Result getInventoryHttp(Http.Request request) { Map obj = getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -43,11 +47,14 @@ public Result getInventoryHttp(Http.Request request) { public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderId) { Order obj = getOrderById(request, orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -55,11 +62,14 @@ public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderI public Result placeOrderHttp(Http.Request request, Order body) { Order obj = placeOrder(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java index 4a83cce61987..f5dc87e54db3 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,11 +25,12 @@ @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createUserHttp(Http.Request request, User body) { createUser(request, body); -return ok(); + return ok(); } @@ -35,7 +38,7 @@ public Result createUserHttp(Http.Request request, User body) { public Result createUsersWithArrayInputHttp(Http.Request request, List body) { createUsersWithArrayInput(request, body); -return ok(); + return ok(); } @@ -43,7 +46,7 @@ public Result createUsersWithArrayInputHttp(Http.Request request, List bod public Result createUsersWithListInputHttp(Http.Request request, List body) { createUsersWithListInput(request, body); -return ok(); + return ok(); } @@ -51,7 +54,7 @@ public Result createUsersWithListInputHttp(Http.Request request, List body public Result deleteUserHttp(Http.Request request, String username) { deleteUser(request, username); -return ok(); + return ok(); } @@ -59,11 +62,14 @@ public Result deleteUserHttp(Http.Request request, String username) { public Result getUserByNameHttp(Http.Request request, String username) { User obj = getUserByName(request, username); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,8 +77,9 @@ public Result getUserByNameHttp(Http.Request request, String username) { public Result loginUserHttp(Http.Request request, @NotNull String username, @NotNull String password) { String obj = loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -80,7 +87,7 @@ public Result loginUserHttp(Http.Request request, @NotNull String username, @Not public Result logoutUserHttp(Http.Request request) { logoutUser(request); -return ok(); + return ok(); } @@ -88,7 +95,7 @@ public Result logoutUserHttp(Http.Request request) { public Result updateUserHttp(Http.Request request, String username, User body) { updateUser(request, username, body); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/build.sbt b/samples/server/petstore/java-play-framework-no-exception-handling/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/build.sbt +++ b/samples/server/petstore/java-play-framework-no-exception-handling/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/FILES index 2dfa912dd9ed..55a72489983f 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/FILES @@ -16,6 +16,7 @@ app/controllers/UserApiControllerImp.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java index ee2e9073da8d..c5a43c3bd588 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java @@ -18,6 +18,7 @@ import java.io.File; import play.libs.Files.TemporaryFile; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; @@ -30,12 +31,14 @@ public class PetApiController extends Controller { private final PetApiControllerImp imp; private final ObjectMapper mapper; private final Config configuration; + private final SecurityAPIUtils securityAPIUtils; @Inject - private PetApiController(Config configuration, PetApiControllerImp imp) { + private PetApiController(Config configuration, PetApiControllerImp imp, SecurityAPIUtils securityAPIUtils) { this.imp = imp; mapper = new ObjectMapper(); this.configuration = configuration; + this.securityAPIUtils = securityAPIUtils; } @ApiAction @@ -50,8 +53,12 @@ public Result addPet(Http.Request request) throws Exception { } else { throw new IllegalArgumentException("'body' parameter is required"); } + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + imp.addPet(request, body); -return ok(); + return ok(); } @@ -64,8 +71,12 @@ public Result deletePet(Http.Request request, Long petId) throws Exception { } else { apiKey = null; } + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + imp.deletePet(request, petId, apiKey); -return ok(); + return ok(); } @@ -83,14 +94,21 @@ public Result findPetsByStatus(Http.Request request) throws Exception { status.add(curParam); } } + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = imp.findPetsByStatus(request, status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -108,25 +126,35 @@ public Result findPetsByTags(Http.Request request) throws Exception { tags.add(curParam); } } + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = imp.findPetsByTags(request, tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @ApiAction public Result getPetById(Http.Request request, Long petId) throws Exception { - Pet obj = imp.getPetById(request, petId); - if (configuration.getBoolean("useOutputBeanValidation")) { + Pet obj = imp.getPetById(request, petId); + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -142,8 +170,12 @@ public Result updatePet(Http.Request request) throws Exception { } else { throw new IllegalArgumentException("'body' parameter is required"); } + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + imp.updatePet(request, body); -return ok(); + return ok(); } @@ -163,8 +195,12 @@ public Result updatePetWithForm(Http.Request request, Long petId) throws Excepti } else { status = null; } + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + imp.updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } @@ -179,12 +215,19 @@ public Result uploadFile(Http.Request request, Long petId) throws Exception { } Http.MultipartFormData bodyfile = request.body().asMultipartFormData(); Http.MultipartFormData.FilePart file = bodyfile.getFile("file"); + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = imp.uploadFile(request, petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiController.java index 43b28fd9728f..67f0cd4e3023 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiController.java @@ -17,6 +17,7 @@ import java.io.File; import play.libs.Files.TemporaryFile; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; @@ -29,37 +30,43 @@ public class StoreApiController extends Controller { private final StoreApiControllerImp imp; private final ObjectMapper mapper; private final Config configuration; + private final SecurityAPIUtils securityAPIUtils; @Inject - private StoreApiController(Config configuration, StoreApiControllerImp imp) { + private StoreApiController(Config configuration, StoreApiControllerImp imp, SecurityAPIUtils securityAPIUtils) { this.imp = imp; mapper = new ObjectMapper(); this.configuration = configuration; + this.securityAPIUtils = securityAPIUtils; } @ApiAction public Result deleteOrder(Http.Request request, String orderId) throws Exception { - imp.deleteOrder(request, orderId); -return ok(); + imp.deleteOrder(request, orderId); + return ok(); } @ApiAction public Result getInventory(Http.Request request) throws Exception { - Map obj = imp.getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + Map obj = imp.getInventory(request); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @ApiAction public Result getOrderById(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception { - Order obj = imp.getOrderById(request, orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { + Order obj = imp.getOrderById(request, orderId); + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -75,12 +82,15 @@ public Result placeOrder(Http.Request request) throws Exception { } else { throw new IllegalArgumentException("'body' parameter is required"); } - Order obj = imp.placeOrder(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + Order obj = imp.placeOrder(request, body); + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java index e8c0a2f4123e..740ead6864cb 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java @@ -18,6 +18,7 @@ import java.io.File; import play.libs.Files.TemporaryFile; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; @@ -30,12 +31,14 @@ public class UserApiController extends Controller { private final UserApiControllerImp imp; private final ObjectMapper mapper; private final Config configuration; + private final SecurityAPIUtils securityAPIUtils; @Inject - private UserApiController(Config configuration, UserApiControllerImp imp) { + private UserApiController(Config configuration, UserApiControllerImp imp, SecurityAPIUtils securityAPIUtils) { this.imp = imp; mapper = new ObjectMapper(); this.configuration = configuration; + this.securityAPIUtils = securityAPIUtils; } @ApiAction @@ -50,8 +53,8 @@ public Result createUser(Http.Request request) throws Exception { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.createUser(request, body); -return ok(); + imp.createUser(request, body); + return ok(); } @@ -69,8 +72,8 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.createUsersWithArrayInput(request, body); -return ok(); + imp.createUsersWithArrayInput(request, body); + return ok(); } @@ -88,26 +91,29 @@ public Result createUsersWithListInput(Http.Request request) throws Exception { } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.createUsersWithListInput(request, body); -return ok(); + imp.createUsersWithListInput(request, body); + return ok(); } @ApiAction public Result deleteUser(Http.Request request, String username) throws Exception { - imp.deleteUser(request, username); -return ok(); + imp.deleteUser(request, username); + return ok(); } @ApiAction public Result getUserByName(Http.Request request, String username) throws Exception { - User obj = imp.getUserByName(request, username); - if (configuration.getBoolean("useOutputBeanValidation")) { + User obj = imp.getUserByName(request, username); + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -127,16 +133,17 @@ public Result loginUser(Http.Request request) throws Exception { } else { throw new IllegalArgumentException("'password' parameter is required"); } - String obj = imp.loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + String obj = imp.loginUser(request, username, password); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @ApiAction public Result logoutUser(Http.Request request) throws Exception { - imp.logoutUser(request); -return ok(); + imp.logoutUser(request); + return ok(); } @@ -152,8 +159,8 @@ public Result updateUser(Http.Request request, String username) throws Exception } else { throw new IllegalArgumentException("'body' parameter is required"); } - imp.updateUser(request, username, body); -return ok(); + imp.updateUser(request, username, body); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-no-interface/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-interface/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-no-interface/build.sbt b/samples/server/petstore/java-play-framework-no-interface/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework-no-interface/build.sbt +++ b/samples/server/petstore/java-play-framework-no-interface/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/FILES index f517461d8913..283bce384731 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/FILES @@ -20,6 +20,7 @@ app/controllers/UserApiControllerImpInterface.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/Module.java b/samples/server/petstore/java-play-framework-no-nullable/app/Module.java index f1b062c29345..1439bbe30c1a 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/Module.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import controllers.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -9,5 +10,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImpInterface.java index 2e03eb9ec401..4ce570904a70 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,47 +25,70 @@ @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + addPet(request, body); -return ok(); + return ok(); } public abstract void addPet(Http.Request request, Pet body) throws Exception; public Result deletePetHttp(Http.Request request, Long petId, String apiKey) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + deletePet(request, petId, apiKey); -return ok(); + return ok(); } public abstract void deletePet(Http.Request request, Long petId, String apiKey) throws Exception; public Result findPetsByStatusHttp(Http.Request request, @NotNull List status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByStatus(request, status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract List findPetsByStatus(Http.Request request, @NotNull List status) throws Exception; public Result findPetsByTagsHttp(Http.Request request, @NotNull List tags) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByTags(request, tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,39 +96,57 @@ public Result findPetsByTagsHttp(Http.Request request, @NotNull List tag public Result getPetByIdHttp(Http.Request request, Long petId) throws Exception { Pet obj = getPetById(request, petId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract Pet getPetById(Http.Request request, Long petId) throws Exception; public Result updatePetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePet(request, body); -return ok(); + return ok(); } public abstract void updatePet(Http.Request request, Pet body) throws Exception; public Result updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception; public Result uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFile(request, petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImpInterface.java index c2a154007e45..67780d39c1cf 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImpInterface.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -22,11 +24,12 @@ @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result deleteOrderHttp(Http.Request request, String orderId) throws Exception { deleteOrder(request, orderId); -return ok(); + return ok(); } @@ -34,8 +37,9 @@ public Result deleteOrderHttp(Http.Request request, String orderId) throws Excep public Result getInventoryHttp(Http.Request request) throws Exception { Map obj = getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -43,11 +47,14 @@ public Result getInventoryHttp(Http.Request request) throws Exception { public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception { Order obj = getOrderById(request, orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -55,11 +62,14 @@ public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderI public Result placeOrderHttp(Http.Request request, Order body) throws Exception { Order obj = placeOrder(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java index 39d422cc1ea4..5ba04804d68a 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,11 +25,12 @@ @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createUserHttp(Http.Request request, User body) throws Exception { createUser(request, body); -return ok(); + return ok(); } @@ -35,7 +38,7 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { createUsersWithArrayInput(request, body); -return ok(); + return ok(); } @@ -43,7 +46,7 @@ public Result createUsersWithArrayInputHttp(Http.Request request, List bod public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { createUsersWithListInput(request, body); -return ok(); + return ok(); } @@ -51,7 +54,7 @@ public Result createUsersWithListInputHttp(Http.Request request, List body public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); -return ok(); + return ok(); } @@ -59,11 +62,14 @@ public Result deleteUserHttp(Http.Request request, String username) throws Excep public Result getUserByNameHttp(Http.Request request, String username) throws Exception { User obj = getUserByName(request, username); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,8 +77,9 @@ public Result getUserByNameHttp(Http.Request request, String username) throws Ex public Result loginUserHttp(Http.Request request, @NotNull String username, @NotNull String password) throws Exception { String obj = loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -80,7 +87,7 @@ public Result loginUserHttp(Http.Request request, @NotNull String username, @Not public Result logoutUserHttp(Http.Request request) throws Exception { logoutUser(request); -return ok(); + return ok(); } @@ -88,7 +95,7 @@ public Result logoutUserHttp(Http.Request request) throws Exception { public Result updateUserHttp(Http.Request request, String username, User body) throws Exception { updateUser(request, username, body); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-no-nullable/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-nullable/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-no-nullable/build.sbt b/samples/server/petstore/java-play-framework-no-nullable/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/build.sbt +++ b/samples/server/petstore/java-play-framework-no-nullable/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/FILES index 6aff32b0988e..f29376c2e653 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/FILES @@ -19,6 +19,7 @@ app/controllers/UserApiControllerImpInterface.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/Module.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/Module.java index f1b062c29345..1439bbe30c1a 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/Module.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import controllers.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -9,5 +10,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImpInterface.java index 2e03eb9ec401..4ce570904a70 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,47 +25,70 @@ @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + addPet(request, body); -return ok(); + return ok(); } public abstract void addPet(Http.Request request, Pet body) throws Exception; public Result deletePetHttp(Http.Request request, Long petId, String apiKey) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + deletePet(request, petId, apiKey); -return ok(); + return ok(); } public abstract void deletePet(Http.Request request, Long petId, String apiKey) throws Exception; public Result findPetsByStatusHttp(Http.Request request, @NotNull List status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByStatus(request, status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract List findPetsByStatus(Http.Request request, @NotNull List status) throws Exception; public Result findPetsByTagsHttp(Http.Request request, @NotNull List tags) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByTags(request, tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,39 +96,57 @@ public Result findPetsByTagsHttp(Http.Request request, @NotNull List tag public Result getPetByIdHttp(Http.Request request, Long petId) throws Exception { Pet obj = getPetById(request, petId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract Pet getPetById(Http.Request request, Long petId) throws Exception; public Result updatePetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePet(request, body); -return ok(); + return ok(); } public abstract void updatePet(Http.Request request, Pet body) throws Exception; public Result updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception; public Result uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFile(request, petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImpInterface.java index c2a154007e45..67780d39c1cf 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImpInterface.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -22,11 +24,12 @@ @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result deleteOrderHttp(Http.Request request, String orderId) throws Exception { deleteOrder(request, orderId); -return ok(); + return ok(); } @@ -34,8 +37,9 @@ public Result deleteOrderHttp(Http.Request request, String orderId) throws Excep public Result getInventoryHttp(Http.Request request) throws Exception { Map obj = getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -43,11 +47,14 @@ public Result getInventoryHttp(Http.Request request) throws Exception { public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception { Order obj = getOrderById(request, orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -55,11 +62,14 @@ public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderI public Result placeOrderHttp(Http.Request request, Order body) throws Exception { Order obj = placeOrder(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java index 39d422cc1ea4..5ba04804d68a 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,11 +25,12 @@ @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createUserHttp(Http.Request request, User body) throws Exception { createUser(request, body); -return ok(); + return ok(); } @@ -35,7 +38,7 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { createUsersWithArrayInput(request, body); -return ok(); + return ok(); } @@ -43,7 +46,7 @@ public Result createUsersWithArrayInputHttp(Http.Request request, List bod public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { createUsersWithListInput(request, body); -return ok(); + return ok(); } @@ -51,7 +54,7 @@ public Result createUsersWithListInputHttp(Http.Request request, List body public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); -return ok(); + return ok(); } @@ -59,11 +62,14 @@ public Result deleteUserHttp(Http.Request request, String username) throws Excep public Result getUserByNameHttp(Http.Request request, String username) throws Exception { User obj = getUserByName(request, username); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,8 +77,9 @@ public Result getUserByNameHttp(Http.Request request, String username) throws Ex public Result loginUserHttp(Http.Request request, @NotNull String username, @NotNull String password) throws Exception { String obj = loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -80,7 +87,7 @@ public Result loginUserHttp(Http.Request request, @NotNull String username, @Not public Result logoutUserHttp(Http.Request request) throws Exception { logoutUser(request); -return ok(); + return ok(); } @@ -88,7 +95,7 @@ public Result logoutUserHttp(Http.Request request) throws Exception { public Result updateUserHttp(Http.Request request, String username, User body) throws Exception { updateUser(request, username, body); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/build.sbt b/samples/server/petstore/java-play-framework-no-swagger-ui/build.sbt index 45bebc24cf09..fa1b6982eb18 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/build.sbt +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/build.sbt @@ -8,3 +8,6 @@ scalaVersion := "2.12.6" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/FILES index b77e91cccd0b..4ca86764f42c 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/FILES @@ -19,6 +19,7 @@ app/controllers/UserApiControllerImp.java app/controllers/UserApiControllerImpInterface.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/Module.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/Module.java index f1b062c29345..1439bbe30c1a 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/Module.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import controllers.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -9,5 +10,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImpInterface.java index 2e03eb9ec401..4ce570904a70 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,47 +25,70 @@ @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + addPet(request, body); -return ok(); + return ok(); } public abstract void addPet(Http.Request request, Pet body) throws Exception; public Result deletePetHttp(Http.Request request, Long petId, String apiKey) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + deletePet(request, petId, apiKey); -return ok(); + return ok(); } public abstract void deletePet(Http.Request request, Long petId, String apiKey) throws Exception; public Result findPetsByStatusHttp(Http.Request request, @NotNull List status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByStatus(request, status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract List findPetsByStatus(Http.Request request, @NotNull List status) throws Exception; public Result findPetsByTagsHttp(Http.Request request, @NotNull List tags) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByTags(request, tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,39 +96,57 @@ public Result findPetsByTagsHttp(Http.Request request, @NotNull List tag public Result getPetByIdHttp(Http.Request request, Long petId) throws Exception { Pet obj = getPetById(request, petId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract Pet getPetById(Http.Request request, Long petId) throws Exception; public Result updatePetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePet(request, body); -return ok(); + return ok(); } public abstract void updatePet(Http.Request request, Pet body) throws Exception; public Result updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception; public Result uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFile(request, petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImpInterface.java index c2a154007e45..67780d39c1cf 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImpInterface.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -22,11 +24,12 @@ @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result deleteOrderHttp(Http.Request request, String orderId) throws Exception { deleteOrder(request, orderId); -return ok(); + return ok(); } @@ -34,8 +37,9 @@ public Result deleteOrderHttp(Http.Request request, String orderId) throws Excep public Result getInventoryHttp(Http.Request request) throws Exception { Map obj = getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -43,11 +47,14 @@ public Result getInventoryHttp(Http.Request request) throws Exception { public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception { Order obj = getOrderById(request, orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -55,11 +62,14 @@ public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderI public Result placeOrderHttp(Http.Request request, Order body) throws Exception { Order obj = placeOrder(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java index 39d422cc1ea4..5ba04804d68a 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,11 +25,12 @@ @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createUserHttp(Http.Request request, User body) throws Exception { createUser(request, body); -return ok(); + return ok(); } @@ -35,7 +38,7 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { createUsersWithArrayInput(request, body); -return ok(); + return ok(); } @@ -43,7 +46,7 @@ public Result createUsersWithArrayInputHttp(Http.Request request, List bod public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { createUsersWithListInput(request, body); -return ok(); + return ok(); } @@ -51,7 +54,7 @@ public Result createUsersWithListInputHttp(Http.Request request, List body public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); -return ok(); + return ok(); } @@ -59,11 +62,14 @@ public Result deleteUserHttp(Http.Request request, String username) throws Excep public Result getUserByNameHttp(Http.Request request, String username) throws Exception { User obj = getUserByName(request, username); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,8 +77,9 @@ public Result getUserByNameHttp(Http.Request request, String username) throws Ex public Result loginUserHttp(Http.Request request, @NotNull String username, @NotNull String password) throws Exception { String obj = loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -80,7 +87,7 @@ public Result loginUserHttp(Http.Request request, @NotNull String username, @Not public Result logoutUserHttp(Http.Request request) throws Exception { logoutUser(request); -return ok(); + return ok(); } @@ -88,7 +95,7 @@ public Result logoutUserHttp(Http.Request request) throws Exception { public Result updateUserHttp(Http.Request request, String username, User body) throws Exception { updateUser(request, username, body); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/build.sbt b/samples/server/petstore/java-play-framework-no-wrap-calls/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/build.sbt +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/FILES b/samples/server/petstore/java-play-framework/.openapi-generator/FILES index f517461d8913..283bce384731 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework/.openapi-generator/FILES @@ -20,6 +20,7 @@ app/controllers/UserApiControllerImpInterface.java app/openapitools/ApiCall.java app/openapitools/ErrorHandler.java app/openapitools/OpenAPIUtils.java +app/openapitools/SecurityAPIUtils.java build.sbt conf/application.conf conf/logback.xml diff --git a/samples/server/petstore/java-play-framework/app/Module.java b/samples/server/petstore/java-play-framework/app/Module.java index f1b062c29345..1439bbe30c1a 100644 --- a/samples/server/petstore/java-play-framework/app/Module.java +++ b/samples/server/petstore/java-play-framework/app/Module.java @@ -1,6 +1,7 @@ import com.google.inject.AbstractModule; import controllers.*; +import openapitools.SecurityAPIUtils; public class Module extends AbstractModule { @@ -9,5 +10,6 @@ protected void configure() { bind(PetApiControllerImpInterface.class).to(PetApiControllerImp.class); bind(StoreApiControllerImpInterface.class).to(StoreApiControllerImp.class); bind(UserApiControllerImpInterface.class).to(UserApiControllerImp.class); + bind(SecurityAPIUtils.class); } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImpInterface.java index 2e03eb9ec401..4ce570904a70 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,47 +25,70 @@ @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result addPetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + addPet(request, body); -return ok(); + return ok(); } public abstract void addPet(Http.Request request, Pet body) throws Exception; public Result deletePetHttp(Http.Request request, Long petId, String apiKey) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + deletePet(request, petId, apiKey); -return ok(); + return ok(); } public abstract void deletePet(Http.Request request, Long petId, String apiKey) throws Exception; public Result findPetsByStatusHttp(Http.Request request, @NotNull List status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByStatus(request, status); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract List findPetsByStatus(Http.Request request, @NotNull List status) throws Exception; public Result findPetsByTagsHttp(Http.Request request, @NotNull List tags) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + List obj = findPetsByTags(request, tags); - if (configuration.getBoolean("useOutputBeanValidation")) { - for (Pet curItem : obj) { - OpenAPIUtils.validate(curItem); + + if (configuration.getBoolean("useOutputBeanValidation")) { + for (Pet curItem : obj) { + OpenAPIUtils.validate(curItem); + } } - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,39 +96,57 @@ public Result findPetsByTagsHttp(Http.Request request, @NotNull List tag public Result getPetByIdHttp(Http.Request request, Long petId) throws Exception { Pet obj = getPetById(request, petId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } public abstract Pet getPetById(Http.Request request, Long petId) throws Exception; public Result updatePetHttp(Http.Request request, Pet body) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePet(request, body); -return ok(); + return ok(); } public abstract void updatePet(Http.Request request, Pet body) throws Exception; public Result updatePetWithFormHttp(Http.Request request, Long petId, String name, String status) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + updatePetWithForm(request, petId, name, status); -return ok(); + return ok(); } public abstract void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception; public Result uploadFileHttp(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception { + if (!securityAPIUtils.isRequestTokenValid(request, "petstore_auth")) { + return unauthorized(); + } + ModelApiResponse obj = uploadFile(request, petId, additionalMetadata, file); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImpInterface.java index c2a154007e45..67780d39c1cf 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImpInterface.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -22,11 +24,12 @@ @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result deleteOrderHttp(Http.Request request, String orderId) throws Exception { deleteOrder(request, orderId); -return ok(); + return ok(); } @@ -34,8 +37,9 @@ public Result deleteOrderHttp(Http.Request request, String orderId) throws Excep public Result getInventoryHttp(Http.Request request) throws Exception { Map obj = getInventory(request); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -43,11 +47,14 @@ public Result getInventoryHttp(Http.Request request) throws Exception { public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception { Order obj = getOrderById(request, orderId); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -55,11 +62,14 @@ public Result getOrderByIdHttp(Http.Request request, @Min(1) @Max(5)Long orderI public Result placeOrderHttp(Http.Request request, Order body) throws Exception { Order obj = placeOrder(request, body); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java index 39d422cc1ea4..5ba04804d68a 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import openapitools.OpenAPIUtils; +import openapitools.SecurityAPIUtils; import static play.mvc.Results.ok; +import static play.mvc.Results.unauthorized; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; @@ -23,11 +25,12 @@ @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @Inject private Config configuration; + @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); public Result createUserHttp(Http.Request request, User body) throws Exception { createUser(request, body); -return ok(); + return ok(); } @@ -35,7 +38,7 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { createUsersWithArrayInput(request, body); -return ok(); + return ok(); } @@ -43,7 +46,7 @@ public Result createUsersWithArrayInputHttp(Http.Request request, List bod public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { createUsersWithListInput(request, body); -return ok(); + return ok(); } @@ -51,7 +54,7 @@ public Result createUsersWithListInputHttp(Http.Request request, List body public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); -return ok(); + return ok(); } @@ -59,11 +62,14 @@ public Result deleteUserHttp(Http.Request request, String username) throws Excep public Result getUserByNameHttp(Http.Request request, String username) throws Exception { User obj = getUserByName(request, username); - if (configuration.getBoolean("useOutputBeanValidation")) { + + if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); - } -JsonNode result = mapper.valueToTree(obj); -return ok(result); + } + + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -71,8 +77,9 @@ public Result getUserByNameHttp(Http.Request request, String username) throws Ex public Result loginUserHttp(Http.Request request, @NotNull String username, @NotNull String password) throws Exception { String obj = loginUser(request, username, password); -JsonNode result = mapper.valueToTree(obj); -return ok(result); + JsonNode result = mapper.valueToTree(obj); + + return ok(result); } @@ -80,7 +87,7 @@ public Result loginUserHttp(Http.Request request, @NotNull String username, @Not public Result logoutUserHttp(Http.Request request) throws Exception { logoutUser(request); -return ok(); + return ok(); } @@ -88,7 +95,7 @@ public Result logoutUserHttp(Http.Request request) throws Exception { public Result updateUserHttp(Http.Request request, String username, User body) throws Exception { updateUser(request, username, body); -return ok(); + return ok(); } diff --git a/samples/server/petstore/java-play-framework/app/openapitools/SecurityAPIUtils.java b/samples/server/petstore/java-play-framework/app/openapitools/SecurityAPIUtils.java new file mode 100644 index 000000000000..854be87f65a8 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/openapitools/SecurityAPIUtils.java @@ -0,0 +1,165 @@ +package openapitools; + +import com.auth0.jwk.Jwk; +import com.auth0.jwk.UrlJwkProvider; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import com.typesafe.config.Config; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import play.mvc.Http; + +import java.net.URL; +import java.security.PublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; + +@Singleton +public class SecurityAPIUtils { + private final String bearerPrefix = "Bearer "; + private final ObjectMapper mapper; + + private boolean useOnlineValidation = false; + + // Online validation + private HashMap tokenIntrospectEndpoints = new HashMap<>(); + private final String clientId; + private final String clientSecret; + + // Offline validation + private HashMap jwksEndpoints = new HashMap<>(); + private String tokenKeyId = ""; + private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes. + + @Inject + SecurityAPIUtils(Config configuration) { + mapper = new ObjectMapper(); + + clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : ""; + clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : ""; + + tokenIntrospectEndpoints.put("petstore_auth", ""); + + jwksEndpoints.put("petstore_auth", ""); + } + + private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) { + try { + Optional authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authToken.isPresent()) { + String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length()); + + HttpClientBuilder builder = HttpClientBuilder.create(); + HttpClient httpClient = builder.build(); + HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName)); + + List params = new ArrayList<>(); + params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix)); + params.add(new BasicNameValuePair("client_id", clientId)); + params.add(new BasicNameValuePair("client_secret", clientSecret)); + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + + HttpResponse response = httpClient.execute(httppost); + String responseJsonString = EntityUtils.toString(response.getEntity()); + HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class); + + return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active"); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) { + try { + Optional authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION); + + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return isTokenValidByOfflineCheck(bearerToken, securityMethodName); + } + } catch (Exception exception) { + return false; + } + + return false; + } + + public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + String issuer = jwt.getIssuer(); + String keyId = jwt.getKeyId(); + if (!tokenKeyId.equals(keyId)) { + if (securityMethodName == null) { + securityMethodName = jwksEndpoints.keySet().stream().findFirst().get(); + } + + Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId); + final PublicKey publicKey = jwk.getPublicKey(); + + if (!(publicKey instanceof RSAPublicKey)) { + throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId)); + } + + Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null); + tokenVerifier = JWT.require(algorithm) + .withIssuer(issuer) + .build(); + tokenKeyId = keyId; + } + + DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken); + + return true; + } catch (Exception exception) { + return false; + } + } + + public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) { + try { + Optional authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION); + if (authHeader.isPresent()) { + String bearerToken = authHeader.get().substring(bearerPrefix.length()); + return getOAuthUserIdFromToken(bearerToken); + } + } catch (Exception exception) { + return null; + } + + return null; + } + + public String getOAuthUserIdFromToken(String bearerToken) { + try { + DecodedJWT jwt = JWT.decode(bearerToken); + return jwt.getSubject(); + } catch (Exception exception) { + return null; + } + } + + public boolean isRequestTokenValid(Http.Request request, String securityMethodName) { + return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName); + } +} diff --git a/samples/server/petstore/java-play-framework/build.sbt b/samples/server/petstore/java-play-framework/build.sbt index b972893fc3f7..69dfa74cd8ad 100644 --- a/samples/server/petstore/java-play-framework/build.sbt +++ b/samples/server/petstore/java-play-framework/build.sbt @@ -9,3 +9,6 @@ scalaVersion := "2.12.6" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" libraryDependencies += guice +libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1" +libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0" +libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" From b0c0461d278fde69408d374edbd056e4d1558539 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 2 Jan 2022 20:54:05 +0800 Subject: [PATCH 046/175] update samples --- .../.openapi-generator/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file From e71ee1bf43741c81ee0bbd635e62e1e6d47b4688 Mon Sep 17 00:00:00 2001 From: cachescrubber <5127753+cachescrubber@users.noreply.github.com> Date: Sun, 2 Jan 2022 14:05:46 +0100 Subject: [PATCH 047/175] [Java Spring OAS3] Fix numerous OAS3 related Bugs (#11181) * Oas3: Remove swagger2 ApiModel and ApiModelProperty from imports when oas3 is true. * Oas3: Use either swagger v2 or v3; add test config * Oas3: allowableValues and defaultValues belong to the Schema annotation * Oas3: use swagger-core.version property in all pom.xml * gh-11165 remove io.swagger.v3.oas.annotations.parameters.RequestBody * gh-11168 add import for io.swagger.v3.oas.annotations.Hidden * Fix formParams.mustache, add dedicated test scripts for the spring generator using oas3. * Run ./bin/generate-samples.sh * Run ./bin/generate-samples.sh - new samples * fix indentation * Revert to threetenbp 2.9.10 because customInstantDeserializer.mustache is not compatible with threetenbp > 2.9.10. * apiController.mustache: pull in osa3 imports. * apiDelegate.mustache: remove io.swagger.annotations.* import * Remove Hidden (import and usage). Wrap atApiIgnore with useSpringfox. * fully qualify org.springframework.data.domain.Pageable because endorExtensions.x-spring-paginated is not set during import processing. * align spring-cloud and spring-boot pom.mustache regarding springfox and oas versions. * introduce dateTimeParam.mustache * Apply DateTimeFormat consistently across different parameter types * revert to springfox 2.9.2 * add newline after parameter * fix atSchema annotation (use empty description) * add more spring-*-oas3 test configs * Update bin/config/spring* test samples * Fix implicitHeader.mustache - add import, generate use paramDoc. * rename spring-boot-implicitHeaders-oal3.yaml to spring-boot-implicitHeaders-oas3.yaml * Add spring oas3 configs to samples.circleci profiles module list * Use groupId 'org.openapitools.openapi3' for oas3 configs * Run all spring test configs. * In OAS3, allowableValues is a String[] array. * formParams.mustache: Align spacing and newlines with other param templates * Support @Parameter(hidden = true) instead of ApiIgnore, Formatting: One parameter per line. * Format method level annotations in api.mustache * Introduce samples.circleci.spring profile * Generate all spring samples --- ...-boot-beanvalidation-no-nullable-oas3.yaml | 13 + bin/configs/spring-boot-delegate-oas3.yaml | 11 + .../spring-boot-implicitHeaders-oas3.yaml | 10 + bin/configs/spring-boot-oas3.yaml | 10 + bin/configs/spring-boot-reactive-oas3.yaml | 11 + bin/configs/spring-boot-useoptional-oas3.yaml | 10 + bin/configs/spring-cloud-async-oas3.yaml | 12 + bin/configs/spring-cloud-date-time-oas3.yaml | 12 + bin/configs/spring-cloud-date-time.yaml | 10 + bin/configs/spring-cloud-oas3-fakeapi.yaml | 12 + bin/configs/spring-cloud-oas3.yaml | 12 + ...d-petstore-feign-spring-pageable-oas3.yaml | 10 + .../codegen/languages/SpringCodegen.java | 12 + .../JavaSpring/allowableValues.mustache | 1 + .../main/resources/JavaSpring/api.mustache | 74 +- .../JavaSpring/apiController.mustache | 17 +- .../resources/JavaSpring/apiDelegate.mustache | 3 +- .../resources/JavaSpring/bodyParams.mustache | 2 +- .../JavaSpring/cookieParams.mustache | 2 +- .../JavaSpring/dateTimeParam.mustache | 1 + .../resources/JavaSpring/formParams.mustache | 2 +- .../JavaSpring/headerParams.mustache | 2 +- .../JavaSpring/implicitHeader.mustache | 2 +- .../libraries/spring-boot/pom.mustache | 55 +- .../spring-cloud/formParams.mustache | 2 +- .../libraries/spring-cloud/pom.mustache | 64 +- .../libraries/spring-mvc/pom.mustache | 9 +- .../resources/JavaSpring/paramDoc.mustache | 1 + .../resources/JavaSpring/pathParams.mustache | 2 +- .../resources/JavaSpring/queryParams.mustache | 2 +- .../date-time-parameter-types-for-testing.yml | 70 + pom.xml | 46 +- .../petstore/spring-cloud-async/pom.xml | 34 +- .../java/org/openapitools/api/PetApi.java | 259 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 3 + .../.openapi-generator/VERSION | 1 + .../petstore/spring-cloud-date-time/README.md | 26 + .../petstore/spring-cloud-date-time/pom.xml | 81 + .../java/org/openapitools/api/DefaultApi.java | 86 + .../spring-cloud-spring-pageable/pom.xml | 34 +- .../java/org/openapitools/api/PetApi.java | 261 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 183 +- samples/client/petstore/spring-cloud/pom.xml | 34 +- .../java/org/openapitools/api/PetApi.java | 259 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 201 +- samples/client/petstore/spring-stubs/pom.xml | 25 +- .../java/org/openapitools/api/PetApi.java | 259 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 16 + .../.openapi-generator/VERSION | 1 + .../petstore/spring-cloud-async/README.md | 53 + .../petstore/spring-cloud-async/pom.xml | 79 + .../java/org/openapitools/api/PetApi.java | 270 ++ .../org/openapitools/api/PetApiClient.java | 8 + .../java/org/openapitools/api/StoreApi.java | 140 + .../org/openapitools/api/StoreApiClient.java | 8 + .../java/org/openapitools/api/UserApi.java | 231 ++ .../org/openapitools/api/UserApiClient.java | 8 + .../ApiKeyRequestInterceptor.java | 31 + .../configuration/ClientConfiguration.java | 48 + .../java/org/openapitools/model/Category.java | 109 + .../openapitools/model/ModelApiResponse.java | 134 + .../java/org/openapitools/model/Order.java | 250 ++ .../main/java/org/openapitools/model/Pet.java | 270 ++ .../main/java/org/openapitools/model/Tag.java | 109 + .../java/org/openapitools/model/User.java | 259 ++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 3 + .../.openapi-generator/VERSION | 1 + .../petstore/spring-cloud-date-time/README.md | 26 + .../petstore/spring-cloud-date-time/pom.xml | 79 + .../java/org/openapitools/api/DefaultApi.java | 89 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 54 + .../.openapi-generator/VERSION | 1 + .../spring-cloud-oas3-fakeapi/README.md | 26 + .../spring-cloud-oas3-fakeapi/pom.xml | 79 + .../org/openapitools/api/AnotherFakeApi.java | 59 + .../java/org/openapitools/api/FakeApi.java | 443 ++++ .../api/FakeClassnameTags123Api.java | 62 + .../java/org/openapitools/api/PetApi.java | 307 +++ .../java/org/openapitools/api/StoreApi.java | 139 + .../java/org/openapitools/api/UserApi.java | 230 ++ .../model/AdditionalPropertiesAnyType.java | 86 + .../model/AdditionalPropertiesArray.java | 87 + .../model/AdditionalPropertiesBoolean.java | 86 + .../model/AdditionalPropertiesClass.java | 414 +++ .../model/AdditionalPropertiesInteger.java | 86 + .../model/AdditionalPropertiesNumber.java | 87 + .../model/AdditionalPropertiesObject.java | 86 + .../model/AdditionalPropertiesString.java | 86 + .../java/org/openapitools/model/Animal.java | 118 + .../model/ArrayOfArrayOfNumberOnly.java | 96 + .../openapitools/model/ArrayOfNumberOnly.java | 96 + .../org/openapitools/model/ArrayTest.java | 165 ++ .../java/org/openapitools/model/BigCat.java | 126 + .../org/openapitools/model/BigCatAllOf.java | 123 + .../openapitools/model/Capitalization.java | 208 ++ .../main/java/org/openapitools/model/Cat.java | 86 + .../java/org/openapitools/model/CatAllOf.java | 83 + .../java/org/openapitools/model/Category.java | 109 + .../org/openapitools/model/ClassModel.java | 84 + .../java/org/openapitools/model/Client.java | 83 + .../main/java/org/openapitools/model/Dog.java | 86 + .../java/org/openapitools/model/DogAllOf.java | 83 + .../org/openapitools/model/EnumArrays.java | 190 ++ .../org/openapitools/model/EnumClass.java | 55 + .../java/org/openapitools/model/EnumTest.java | 331 +++ .../model/FileSchemaTestClass.java | 121 + .../org/openapitools/model/FormatTest.java | 435 ++++ .../openapitools/model/HasOnlyReadOnly.java | 108 + .../java/org/openapitools/model/MapTest.java | 234 ++ ...ropertiesAndAdditionalPropertiesClass.java | 152 ++ .../openapitools/model/Model200Response.java | 109 + .../openapitools/model/ModelApiResponse.java | 133 + .../org/openapitools/model/ModelReturn.java | 84 + .../java/org/openapitools/model/Name.java | 160 ++ .../org/openapitools/model/NumberOnly.java | 85 + .../java/org/openapitools/model/Order.java | 249 ++ .../openapitools/model/OuterComposite.java | 135 + .../org/openapitools/model/OuterEnum.java | 55 + .../main/java/org/openapitools/model/Pet.java | 273 ++ .../org/openapitools/model/ReadOnlyFirst.java | 108 + .../openapitools/model/SpecialModelName.java | 83 + .../main/java/org/openapitools/model/Tag.java | 108 + .../openapitools/model/TypeHolderDefault.java | 198 ++ .../openapitools/model/TypeHolderExample.java | 224 ++ .../java/org/openapitools/model/User.java | 258 ++ .../java/org/openapitools/model/XmlItem.java | 872 +++++++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 16 + .../.openapi-generator/VERSION | 1 + .../spring-cloud-spring-pageable/README.md | 53 + .../spring-cloud-spring-pageable/pom.xml | 79 + .../java/org/openapitools/api/PetApi.java | 271 ++ .../org/openapitools/api/PetApiClient.java | 8 + .../java/org/openapitools/api/StoreApi.java | 139 + .../org/openapitools/api/StoreApiClient.java | 8 + .../java/org/openapitools/api/UserApi.java | 251 ++ .../org/openapitools/api/UserApiClient.java | 8 + .../ApiKeyRequestInterceptor.java | 31 + .../configuration/ClientConfiguration.java | 48 + .../java/org/openapitools/model/Category.java | 109 + .../openapitools/model/ModelApiResponse.java | 134 + .../java/org/openapitools/model/Order.java | 250 ++ .../main/java/org/openapitools/model/Pet.java | 270 ++ .../main/java/org/openapitools/model/Tag.java | 109 + .../java/org/openapitools/model/User.java | 259 ++ .../spring-cloud/.openapi-generator-ignore | 23 + .../spring-cloud/.openapi-generator/FILES | 11 + .../spring-cloud/.openapi-generator/VERSION | 1 + .../client/petstore/spring-cloud/README.md | 26 + .../client/petstore/spring-cloud/pom.xml | 79 + .../java/org/openapitools/api/PetApi.java | 275 ++ .../java/org/openapitools/api/StoreApi.java | 140 + .../java/org/openapitools/api/UserApi.java | 252 ++ .../java/org/openapitools/model/Category.java | 109 + .../openapitools/model/ModelApiResponse.java | 134 + .../java/org/openapitools/model/Order.java | 250 ++ .../main/java/org/openapitools/model/Pet.java | 270 ++ .../main/java/org/openapitools/model/Tag.java | 109 + .../java/org/openapitools/model/User.java | 259 ++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 68 + .../.openapi-generator/VERSION | 1 + .../README.md | 16 + .../pom.xml | 67 + .../org/openapitools/OpenAPI2SpringBoot.java | 59 + .../org/openapitools/RFC3339DateFormat.java | 38 + .../org/openapitools/api/AnotherFakeApi.java | 55 + .../api/AnotherFakeApiController.java | 63 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/FakeApi.java | 471 ++++ .../openapitools/api/FakeApiController.java | 360 +++ .../api/FakeClassnameTestApi.java | 58 + .../api/FakeClassnameTestApiController.java | 63 + .../java/org/openapitools/api/PetApi.java | 272 ++ .../openapitools/api/PetApiController.java | 221 ++ .../java/org/openapitools/api/StoreApi.java | 135 + .../openapitools/api/StoreApiController.java | 128 + .../java/org/openapitools/api/UserApi.java | 226 ++ .../openapitools/api/UserApiController.java | 178 ++ .../CustomInstantDeserializer.java | 232 ++ .../configuration/HomeController.java | 53 + .../configuration/JacksonConfiguration.java | 23 + .../model/AdditionalPropertiesAnyType.java | 84 + .../model/AdditionalPropertiesArray.java | 85 + .../model/AdditionalPropertiesBoolean.java | 84 + .../model/AdditionalPropertiesClass.java | 412 +++ .../model/AdditionalPropertiesInteger.java | 84 + .../model/AdditionalPropertiesNumber.java | 85 + .../model/AdditionalPropertiesObject.java | 84 + .../model/AdditionalPropertiesString.java | 84 + .../java/org/openapitools/model/Animal.java | 116 + .../model/ArrayOfArrayOfNumberOnly.java | 94 + .../openapitools/model/ArrayOfNumberOnly.java | 94 + .../org/openapitools/model/ArrayTest.java | 163 ++ .../java/org/openapitools/model/BigCat.java | 124 + .../org/openapitools/model/BigCatAllOf.java | 121 + .../openapitools/model/Capitalization.java | 206 ++ .../main/java/org/openapitools/model/Cat.java | 84 + .../java/org/openapitools/model/CatAllOf.java | 81 + .../java/org/openapitools/model/Category.java | 107 + .../org/openapitools/model/ClassModel.java | 82 + .../java/org/openapitools/model/Client.java | 81 + .../main/java/org/openapitools/model/Dog.java | 84 + .../java/org/openapitools/model/DogAllOf.java | 81 + .../org/openapitools/model/EnumArrays.java | 188 ++ .../org/openapitools/model/EnumClass.java | 53 + .../java/org/openapitools/model/EnumTest.java | 329 +++ .../model/FileSchemaTestClass.java | 119 + .../org/openapitools/model/FormatTest.java | 433 ++++ .../openapitools/model/HasOnlyReadOnly.java | 106 + .../java/org/openapitools/model/MapTest.java | 232 ++ ...ropertiesAndAdditionalPropertiesClass.java | 150 ++ .../openapitools/model/Model200Response.java | 107 + .../openapitools/model/ModelApiResponse.java | 131 + .../org/openapitools/model/ModelReturn.java | 82 + .../java/org/openapitools/model/Name.java | 158 ++ .../org/openapitools/model/NumberOnly.java | 83 + .../java/org/openapitools/model/Order.java | 247 ++ .../openapitools/model/OuterComposite.java | 133 + .../org/openapitools/model/OuterEnum.java | 53 + .../main/java/org/openapitools/model/Pet.java | 274 ++ .../org/openapitools/model/ReadOnlyFirst.java | 106 + .../openapitools/model/SpecialModelName.java | 81 + .../main/java/org/openapitools/model/Tag.java | 106 + .../openapitools/model/TypeHolderDefault.java | 199 ++ .../openapitools/model/TypeHolderExample.java | 225 ++ .../java/org/openapitools/model/User.java | 256 ++ .../java/org/openapitools/model/XmlItem.java | 870 +++++++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 2264 +++++++++++++++++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 72 + .../.openapi-generator/VERSION | 1 + .../petstore/springboot-delegate/README.md | 16 + .../petstore/springboot-delegate/pom.xml | 71 + .../org/openapitools/OpenAPI2SpringBoot.java | 63 + .../org/openapitools/RFC3339DateFormat.java | 38 + .../org/openapitools/api/AnotherFakeApi.java | 61 + .../api/AnotherFakeApiController.java | 22 + .../api/AnotherFakeApiDelegate.java | 47 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/FakeApi.java | 505 ++++ .../openapitools/api/FakeApiController.java | 22 + .../org/openapitools/api/FakeApiDelegate.java | 320 +++ .../api/FakeClassnameTestApi.java | 64 + .../api/FakeClassnameTestApiController.java | 22 + .../api/FakeClassnameTestApiDelegate.java | 47 + .../java/org/openapitools/api/PetApi.java | 292 +++ .../openapitools/api/PetApiController.java | 22 + .../org/openapitools/api/PetApiDelegate.java | 197 ++ .../java/org/openapitools/api/StoreApi.java | 147 ++ .../openapitools/api/StoreApiController.java | 22 + .../openapitools/api/StoreApiDelegate.java | 108 + .../java/org/openapitools/api/UserApi.java | 246 ++ .../openapitools/api/UserApiController.java | 22 + .../org/openapitools/api/UserApiDelegate.java | 148 ++ .../configuration/HomeController.java | 53 + .../model/AdditionalPropertiesAnyType.java | 86 + .../model/AdditionalPropertiesArray.java | 87 + .../model/AdditionalPropertiesBoolean.java | 86 + .../model/AdditionalPropertiesClass.java | 414 +++ .../model/AdditionalPropertiesInteger.java | 86 + .../model/AdditionalPropertiesNumber.java | 87 + .../model/AdditionalPropertiesObject.java | 86 + .../model/AdditionalPropertiesString.java | 86 + .../java/org/openapitools/model/Animal.java | 118 + .../model/ArrayOfArrayOfNumberOnly.java | 96 + .../openapitools/model/ArrayOfNumberOnly.java | 96 + .../org/openapitools/model/ArrayTest.java | 165 ++ .../java/org/openapitools/model/BigCat.java | 126 + .../org/openapitools/model/BigCatAllOf.java | 123 + .../openapitools/model/Capitalization.java | 208 ++ .../main/java/org/openapitools/model/Cat.java | 86 + .../java/org/openapitools/model/CatAllOf.java | 83 + .../java/org/openapitools/model/Category.java | 109 + .../org/openapitools/model/ClassModel.java | 84 + .../java/org/openapitools/model/Client.java | 83 + .../main/java/org/openapitools/model/Dog.java | 86 + .../java/org/openapitools/model/DogAllOf.java | 83 + .../org/openapitools/model/EnumArrays.java | 190 ++ .../org/openapitools/model/EnumClass.java | 55 + .../java/org/openapitools/model/EnumTest.java | 331 +++ .../model/FileSchemaTestClass.java | 121 + .../org/openapitools/model/FormatTest.java | 435 ++++ .../openapitools/model/HasOnlyReadOnly.java | 108 + .../java/org/openapitools/model/MapTest.java | 234 ++ ...ropertiesAndAdditionalPropertiesClass.java | 152 ++ .../openapitools/model/Model200Response.java | 109 + .../openapitools/model/ModelApiResponse.java | 133 + .../org/openapitools/model/ModelReturn.java | 84 + .../java/org/openapitools/model/Name.java | 160 ++ .../org/openapitools/model/NumberOnly.java | 85 + .../java/org/openapitools/model/Order.java | 249 ++ .../openapitools/model/OuterComposite.java | 135 + .../org/openapitools/model/OuterEnum.java | 55 + .../main/java/org/openapitools/model/Pet.java | 273 ++ .../org/openapitools/model/ReadOnlyFirst.java | 108 + .../openapitools/model/SpecialModelName.java | 83 + .../main/java/org/openapitools/model/Tag.java | 108 + .../openapitools/model/TypeHolderDefault.java | 198 ++ .../openapitools/model/TypeHolderExample.java | 224 ++ .../java/org/openapitools/model/User.java | 258 ++ .../java/org/openapitools/model/XmlItem.java | 872 +++++++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 2264 +++++++++++++++++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 66 + .../.openapi-generator/VERSION | 1 + .../springboot-implicitHeaders/README.md | 16 + .../springboot-implicitHeaders/pom.xml | 71 + .../org/openapitools/OpenAPI2SpringBoot.java | 63 + .../org/openapitools/RFC3339DateFormat.java | 38 + .../org/openapitools/api/AnotherFakeApi.java | 77 + .../api/AnotherFakeApiController.java | 24 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/FakeApi.java | 577 +++++ .../openapitools/api/FakeApiController.java | 24 + .../api/FakeClassnameTestApi.java | 80 + .../api/FakeClassnameTestApiController.java | 24 + .../java/org/openapitools/api/PetApi.java | 370 +++ .../openapitools/api/PetApiController.java | 24 + .../java/org/openapitools/api/StoreApi.java | 191 ++ .../openapitools/api/StoreApiController.java | 24 + .../java/org/openapitools/api/UserApi.java | 288 +++ .../openapitools/api/UserApiController.java | 24 + .../configuration/HomeController.java | 53 + .../model/AdditionalPropertiesAnyType.java | 86 + .../model/AdditionalPropertiesArray.java | 87 + .../model/AdditionalPropertiesBoolean.java | 86 + .../model/AdditionalPropertiesClass.java | 414 +++ .../model/AdditionalPropertiesInteger.java | 86 + .../model/AdditionalPropertiesNumber.java | 87 + .../model/AdditionalPropertiesObject.java | 86 + .../model/AdditionalPropertiesString.java | 86 + .../java/org/openapitools/model/Animal.java | 118 + .../model/ArrayOfArrayOfNumberOnly.java | 96 + .../openapitools/model/ArrayOfNumberOnly.java | 96 + .../org/openapitools/model/ArrayTest.java | 165 ++ .../java/org/openapitools/model/BigCat.java | 126 + .../org/openapitools/model/BigCatAllOf.java | 123 + .../openapitools/model/Capitalization.java | 208 ++ .../main/java/org/openapitools/model/Cat.java | 86 + .../java/org/openapitools/model/CatAllOf.java | 83 + .../java/org/openapitools/model/Category.java | 109 + .../org/openapitools/model/ClassModel.java | 84 + .../java/org/openapitools/model/Client.java | 83 + .../main/java/org/openapitools/model/Dog.java | 86 + .../java/org/openapitools/model/DogAllOf.java | 83 + .../org/openapitools/model/EnumArrays.java | 190 ++ .../org/openapitools/model/EnumClass.java | 55 + .../java/org/openapitools/model/EnumTest.java | 331 +++ .../model/FileSchemaTestClass.java | 121 + .../org/openapitools/model/FormatTest.java | 435 ++++ .../openapitools/model/HasOnlyReadOnly.java | 108 + .../java/org/openapitools/model/MapTest.java | 234 ++ ...ropertiesAndAdditionalPropertiesClass.java | 152 ++ .../openapitools/model/Model200Response.java | 109 + .../openapitools/model/ModelApiResponse.java | 133 + .../org/openapitools/model/ModelReturn.java | 84 + .../java/org/openapitools/model/Name.java | 160 ++ .../org/openapitools/model/NumberOnly.java | 85 + .../java/org/openapitools/model/Order.java | 249 ++ .../openapitools/model/OuterComposite.java | 135 + .../org/openapitools/model/OuterEnum.java | 55 + .../main/java/org/openapitools/model/Pet.java | 273 ++ .../org/openapitools/model/ReadOnlyFirst.java | 108 + .../openapitools/model/SpecialModelName.java | 83 + .../main/java/org/openapitools/model/Tag.java | 108 + .../openapitools/model/TypeHolderDefault.java | 198 ++ .../openapitools/model/TypeHolderExample.java | 224 ++ .../java/org/openapitools/model/User.java | 258 ++ .../java/org/openapitools/model/XmlItem.java | 872 +++++++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 2264 +++++++++++++++++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 72 + .../.openapi-generator/VERSION | 1 + .../petstore/springboot-reactive/README.md | 13 + .../petstore/springboot-reactive/pom.xml | 71 + .../org/openapitools/OpenAPI2SpringBoot.java | 63 + .../org/openapitools/RFC3339DateFormat.java | 38 + .../org/openapitools/api/AnotherFakeApi.java | 66 + .../api/AnotherFakeApiController.java | 22 + .../api/AnotherFakeApiDelegate.java | 52 + .../java/org/openapitools/api/ApiUtil.java | 20 + .../java/org/openapitools/api/FakeApi.java | 524 ++++ .../openapitools/api/FakeApiController.java | 22 + .../org/openapitools/api/FakeApiDelegate.java | 363 +++ .../api/FakeClassnameTestApi.java | 69 + .../api/FakeClassnameTestApiController.java | 22 + .../api/FakeClassnameTestApiDelegate.java | 52 + .../java/org/openapitools/api/PetApi.java | 304 +++ .../openapitools/api/PetApiController.java | 22 + .../org/openapitools/api/PetApiDelegate.java | 217 ++ .../java/org/openapitools/api/StoreApi.java | 154 ++ .../openapitools/api/StoreApiController.java | 22 + .../openapitools/api/StoreApiDelegate.java | 119 + .../java/org/openapitools/api/UserApi.java | 257 ++ .../openapitools/api/UserApiController.java | 22 + .../org/openapitools/api/UserApiDelegate.java | 173 ++ .../configuration/HomeController.java | 62 + .../model/AdditionalPropertiesAnyType.java | 86 + .../model/AdditionalPropertiesArray.java | 87 + .../model/AdditionalPropertiesBoolean.java | 86 + .../model/AdditionalPropertiesClass.java | 414 +++ .../model/AdditionalPropertiesInteger.java | 86 + .../model/AdditionalPropertiesNumber.java | 87 + .../model/AdditionalPropertiesObject.java | 86 + .../model/AdditionalPropertiesString.java | 86 + .../java/org/openapitools/model/Animal.java | 118 + .../model/ArrayOfArrayOfNumberOnly.java | 96 + .../openapitools/model/ArrayOfNumberOnly.java | 96 + .../org/openapitools/model/ArrayTest.java | 165 ++ .../java/org/openapitools/model/BigCat.java | 126 + .../org/openapitools/model/BigCatAllOf.java | 123 + .../openapitools/model/Capitalization.java | 208 ++ .../main/java/org/openapitools/model/Cat.java | 86 + .../java/org/openapitools/model/CatAllOf.java | 83 + .../java/org/openapitools/model/Category.java | 109 + .../org/openapitools/model/ClassModel.java | 84 + .../java/org/openapitools/model/Client.java | 83 + .../main/java/org/openapitools/model/Dog.java | 86 + .../java/org/openapitools/model/DogAllOf.java | 83 + .../org/openapitools/model/EnumArrays.java | 190 ++ .../org/openapitools/model/EnumClass.java | 55 + .../java/org/openapitools/model/EnumTest.java | 331 +++ .../model/FileSchemaTestClass.java | 121 + .../org/openapitools/model/FormatTest.java | 435 ++++ .../openapitools/model/HasOnlyReadOnly.java | 108 + .../java/org/openapitools/model/MapTest.java | 234 ++ ...ropertiesAndAdditionalPropertiesClass.java | 152 ++ .../openapitools/model/Model200Response.java | 109 + .../openapitools/model/ModelApiResponse.java | 133 + .../org/openapitools/model/ModelReturn.java | 84 + .../java/org/openapitools/model/Name.java | 160 ++ .../org/openapitools/model/NumberOnly.java | 85 + .../java/org/openapitools/model/Order.java | 249 ++ .../openapitools/model/OuterComposite.java | 135 + .../org/openapitools/model/OuterEnum.java | 55 + .../main/java/org/openapitools/model/Pet.java | 273 ++ .../org/openapitools/model/ReadOnlyFirst.java | 108 + .../openapitools/model/SpecialModelName.java | 83 + .../main/java/org/openapitools/model/Tag.java | 108 + .../openapitools/model/TypeHolderDefault.java | 198 ++ .../openapitools/model/TypeHolderExample.java | 224 ++ .../java/org/openapitools/model/User.java | 258 ++ .../java/org/openapitools/model/XmlItem.java | 872 +++++++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 2264 +++++++++++++++++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 66 + .../.openapi-generator/VERSION | 1 + .../petstore/springboot-useoptional/README.md | 16 + .../petstore/springboot-useoptional/pom.xml | 71 + .../org/openapitools/OpenAPI2SpringBoot.java | 63 + .../org/openapitools/RFC3339DateFormat.java | 38 + .../org/openapitools/api/AnotherFakeApi.java | 75 + .../api/AnotherFakeApiController.java | 24 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/FakeApi.java | 551 ++++ .../openapitools/api/FakeApiController.java | 24 + .../api/FakeClassnameTestApi.java | 78 + .../api/FakeClassnameTestApiController.java | 24 + .../java/org/openapitools/api/PetApi.java | 355 +++ .../openapitools/api/PetApiController.java | 24 + .../java/org/openapitools/api/StoreApi.java | 183 ++ .../openapitools/api/StoreApiController.java | 24 + .../java/org/openapitools/api/UserApi.java | 272 ++ .../openapitools/api/UserApiController.java | 24 + .../configuration/HomeController.java | 53 + .../model/AdditionalPropertiesAnyType.java | 86 + .../model/AdditionalPropertiesArray.java | 87 + .../model/AdditionalPropertiesBoolean.java | 86 + .../model/AdditionalPropertiesClass.java | 414 +++ .../model/AdditionalPropertiesInteger.java | 86 + .../model/AdditionalPropertiesNumber.java | 87 + .../model/AdditionalPropertiesObject.java | 86 + .../model/AdditionalPropertiesString.java | 86 + .../java/org/openapitools/model/Animal.java | 118 + .../model/ArrayOfArrayOfNumberOnly.java | 96 + .../openapitools/model/ArrayOfNumberOnly.java | 96 + .../org/openapitools/model/ArrayTest.java | 165 ++ .../java/org/openapitools/model/BigCat.java | 126 + .../org/openapitools/model/BigCatAllOf.java | 123 + .../openapitools/model/Capitalization.java | 208 ++ .../main/java/org/openapitools/model/Cat.java | 86 + .../java/org/openapitools/model/CatAllOf.java | 83 + .../java/org/openapitools/model/Category.java | 109 + .../org/openapitools/model/ClassModel.java | 84 + .../java/org/openapitools/model/Client.java | 83 + .../main/java/org/openapitools/model/Dog.java | 86 + .../java/org/openapitools/model/DogAllOf.java | 83 + .../org/openapitools/model/EnumArrays.java | 190 ++ .../org/openapitools/model/EnumClass.java | 55 + .../java/org/openapitools/model/EnumTest.java | 331 +++ .../model/FileSchemaTestClass.java | 121 + .../org/openapitools/model/FormatTest.java | 435 ++++ .../openapitools/model/HasOnlyReadOnly.java | 108 + .../java/org/openapitools/model/MapTest.java | 234 ++ ...ropertiesAndAdditionalPropertiesClass.java | 152 ++ .../openapitools/model/Model200Response.java | 109 + .../openapitools/model/ModelApiResponse.java | 133 + .../org/openapitools/model/ModelReturn.java | 84 + .../java/org/openapitools/model/Name.java | 160 ++ .../org/openapitools/model/NumberOnly.java | 85 + .../java/org/openapitools/model/Order.java | 249 ++ .../openapitools/model/OuterComposite.java | 135 + .../org/openapitools/model/OuterEnum.java | 55 + .../main/java/org/openapitools/model/Pet.java | 273 ++ .../org/openapitools/model/ReadOnlyFirst.java | 108 + .../openapitools/model/SpecialModelName.java | 83 + .../main/java/org/openapitools/model/Tag.java | 108 + .../openapitools/model/TypeHolderDefault.java | 198 ++ .../openapitools/model/TypeHolderExample.java | 224 ++ .../java/org/openapitools/model/User.java | 258 ++ .../java/org/openapitools/model/XmlItem.java | 872 +++++++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 2264 +++++++++++++++++ .../springboot/.openapi-generator-ignore | 23 + .../springboot/.openapi-generator/FILES | 20 + .../springboot/.openapi-generator/VERSION | 1 + .../server/petstore/springboot/README.md | 16 + .../server/petstore/springboot/pom.xml | 71 + .../org/openapitools/OpenAPI2SpringBoot.java | 63 + .../org/openapitools/RFC3339DateFormat.java | 38 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/PetApi.java | 382 +++ .../openapitools/api/PetApiController.java | 24 + .../java/org/openapitools/api/StoreApi.java | 184 ++ .../openapitools/api/StoreApiController.java | 24 + .../java/org/openapitools/api/UserApi.java | 294 +++ .../openapitools/api/UserApiController.java | 24 + .../configuration/HomeController.java | 53 + .../java/org/openapitools/model/Category.java | 109 + .../openapitools/model/ModelApiResponse.java | 134 + .../java/org/openapitools/model/Order.java | 250 ++ .../main/java/org/openapitools/model/Pet.java | 270 ++ .../main/java/org/openapitools/model/Tag.java | 109 + .../java/org/openapitools/model/User.java | 259 ++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 893 +++++++ .../petstore/spring-mvc-default-value/pom.xml | 32 +- .../org/openapitools/api/TestHeadersApi.java | 34 +- .../openapitools/api/TestQueryParamsApi.java | 36 +- .../petstore/spring-mvc-j8-async/pom.xml | 5 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 262 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../spring-mvc-j8-localdatetime/pom.xml | 5 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 262 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../petstore/spring-mvc-no-nullable/pom.xml | 5 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 262 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../spring-mvc-spring-pageable/pom.xml | 5 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 264 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- samples/server/petstore/spring-mvc/pom.xml | 5 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 262 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../api/AnotherFakeApiController.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../openapitools/api/FakeApiController.java | 167 +- .../api/FakeClassnameTestApi.java | 25 +- .../api/FakeClassnameTestApiController.java | 4 +- .../java/org/openapitools/api/PetApi.java | 262 +- .../openapitools/api/PetApiController.java | 59 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../openapitools/api/StoreApiController.java | 20 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../openapitools/api/UserApiController.java | 46 +- .../springboot-beanvalidation/pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 262 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../petstore/springboot-delegate-j8/pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../api/AnotherFakeApiDelegate.java | 1 - .../java/org/openapitools/api/FakeApi.java | 401 +-- .../org/openapitools/api/FakeApiDelegate.java | 1 - .../api/FakeClassnameTestApi.java | 25 +- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApi.java | 262 +- .../org/openapitools/api/PetApiDelegate.java | 1 - .../java/org/openapitools/api/StoreApi.java | 90 +- .../openapitools/api/StoreApiDelegate.java | 1 - .../java/org/openapitools/api/UserApi.java | 165 +- .../org/openapitools/api/UserApiDelegate.java | 1 - .../petstore/springboot-delegate/pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../api/AnotherFakeApiDelegate.java | 1 - .../java/org/openapitools/api/FakeApi.java | 401 +-- .../org/openapitools/api/FakeApiDelegate.java | 1 - .../api/FakeClassnameTestApi.java | 25 +- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApi.java | 262 +- .../org/openapitools/api/PetApiDelegate.java | 1 - .../java/org/openapitools/api/StoreApi.java | 90 +- .../openapitools/api/StoreApiDelegate.java | 1 - .../java/org/openapitools/api/UserApi.java | 165 +- .../org/openapitools/api/UserApiDelegate.java | 1 - .../springboot-implicitHeaders/pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 399 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 261 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../petstore/springboot-reactive/pom.xml | 30 +- .../org/openapitools/api/AnotherFakeApi.java | 20 +- .../api/AnotherFakeApiDelegate.java | 1 - .../java/org/openapitools/api/FakeApi.java | 416 +-- .../org/openapitools/api/FakeApiDelegate.java | 1 - .../api/FakeClassnameTestApi.java | 26 +- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApi.java | 270 +- .../org/openapitools/api/PetApiDelegate.java | 1 - .../java/org/openapitools/api/StoreApi.java | 93 +- .../openapitools/api/StoreApiDelegate.java | 1 - .../java/org/openapitools/api/UserApi.java | 172 +- .../org/openapitools/api/UserApiDelegate.java | 1 - .../pom.xml | 34 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../api/AnotherFakeApiController.java | 4 +- .../api/AnotherFakeApiDelegate.java | 1 - .../java/org/openapitools/api/FakeApi.java | 401 +-- .../openapitools/api/FakeApiController.java | 167 +- .../org/openapitools/api/FakeApiDelegate.java | 1 - .../api/FakeClassnameTestApi.java | 25 +- .../api/FakeClassnameTestApiController.java | 4 +- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApi.java | 264 +- .../openapitools/api/PetApiController.java | 61 +- .../org/openapitools/api/PetApiDelegate.java | 5 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../openapitools/api/StoreApiController.java | 20 +- .../openapitools/api/StoreApiDelegate.java | 1 - .../java/org/openapitools/api/UserApi.java | 165 +- .../openapitools/api/UserApiController.java | 46 +- .../org/openapitools/api/UserApiDelegate.java | 1 - .../pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../api/AnotherFakeApiDelegate.java | 1 - .../java/org/openapitools/api/FakeApi.java | 401 +-- .../org/openapitools/api/FakeApiDelegate.java | 1 - .../api/FakeClassnameTestApi.java | 25 +- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApi.java | 264 +- .../org/openapitools/api/PetApiDelegate.java | 5 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../openapitools/api/StoreApiDelegate.java | 1 - .../java/org/openapitools/api/UserApi.java | 165 +- .../org/openapitools/api/UserApiDelegate.java | 1 - .../pom.xml | 34 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../api/AnotherFakeApiController.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../openapitools/api/FakeApiController.java | 167 +- .../api/FakeClassnameTestApi.java | 25 +- .../api/FakeClassnameTestApiController.java | 4 +- .../java/org/openapitools/api/PetApi.java | 264 +- .../openapitools/api/PetApiController.java | 61 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../openapitools/api/StoreApiController.java | 20 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../openapitools/api/UserApiController.java | 46 +- .../springboot-spring-pageable/pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 264 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../petstore/springboot-useoptional/pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 262 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../petstore/springboot-virtualan/pom.xml | 32 +- .../virtualan/api/AnotherFakeApi.java | 19 +- .../openapitools/virtualan/api/FakeApi.java | 401 +-- .../virtualan/api/FakeClassnameTestApi.java | 25 +- .../openapitools/virtualan/api/PetApi.java | 262 +- .../openapitools/virtualan/api/StoreApi.java | 90 +- .../openapitools/virtualan/api/UserApi.java | 165 +- samples/server/petstore/springboot/pom.xml | 32 +- .../org/openapitools/api/AnotherFakeApi.java | 19 +- .../java/org/openapitools/api/FakeApi.java | 401 +-- .../api/FakeClassnameTestApi.java | 25 +- .../java/org/openapitools/api/PetApi.java | 262 +- .../java/org/openapitools/api/StoreApi.java | 90 +- .../java/org/openapitools/api/UserApi.java | 165 +- 728 files changed, 90985 insertions(+), 9405 deletions(-) create mode 100644 bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml create mode 100644 bin/configs/spring-boot-delegate-oas3.yaml create mode 100644 bin/configs/spring-boot-implicitHeaders-oas3.yaml create mode 100644 bin/configs/spring-boot-oas3.yaml create mode 100644 bin/configs/spring-boot-reactive-oas3.yaml create mode 100644 bin/configs/spring-boot-useoptional-oas3.yaml create mode 100644 bin/configs/spring-cloud-async-oas3.yaml create mode 100644 bin/configs/spring-cloud-date-time-oas3.yaml create mode 100644 bin/configs/spring-cloud-date-time.yaml create mode 100644 bin/configs/spring-cloud-oas3-fakeapi.yaml create mode 100644 bin/configs/spring-cloud-oas3.yaml create mode 100644 bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache create mode 100644 modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml create mode 100644 samples/client/petstore/spring-cloud-date-time/.openapi-generator-ignore create mode 100644 samples/client/petstore/spring-cloud-date-time/.openapi-generator/FILES create mode 100644 samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION create mode 100644 samples/client/petstore/spring-cloud-date-time/README.md create mode 100644 samples/client/petstore/spring-cloud-date-time/pom.xml create mode 100644 samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/README.md create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/pom.xml create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ClientConfiguration.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/spring-cloud-date-time/README.md create mode 100644 samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml create mode 100644 samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/README.md create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/README.md create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApiClient.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApiClient.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApiClient.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/configuration/ClientConfiguration.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/spring-cloud/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/spring-cloud/README.md create mode 100644 samples/openapi3/client/petstore/spring-cloud/pom.xml create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator-ignore create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/README.md create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/OpenAPI2SpringBoot.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/CustomInstantDeserializer.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/JacksonConfiguration.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/application.properties create mode 100644 samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml create mode 100644 samples/openapi3/server/petstore/springboot-delegate/.openapi-generator-ignore create mode 100644 samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES create mode 100644 samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION create mode 100644 samples/openapi3/server/petstore/springboot-delegate/README.md create mode 100644 samples/openapi3/server/petstore/springboot-delegate/pom.xml create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/OpenAPI2SpringBoot.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/resources/application.properties create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator-ignore create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/README.md create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/OpenAPI2SpringBoot.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/application.properties create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml create mode 100644 samples/openapi3/server/petstore/springboot-reactive/.openapi-generator-ignore create mode 100644 samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/FILES create mode 100644 samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION create mode 100644 samples/openapi3/server/petstore/springboot-reactive/README.md create mode 100644 samples/openapi3/server/petstore/springboot-reactive/pom.xml create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/OpenAPI2SpringBoot.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/resources/application.properties create mode 100644 samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator-ignore create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/FILES create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/README.md create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/pom.xml create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/OpenAPI2SpringBoot.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/application.properties create mode 100644 samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml create mode 100644 samples/openapi3/server/petstore/springboot/.openapi-generator-ignore create mode 100644 samples/openapi3/server/petstore/springboot/.openapi-generator/FILES create mode 100644 samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION create mode 100644 samples/openapi3/server/petstore/springboot/README.md create mode 100644 samples/openapi3/server/petstore/springboot/pom.xml create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/OpenAPI2SpringBoot.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/server/petstore/springboot/src/main/resources/application.properties create mode 100644 samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml diff --git a/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml b/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml new file mode 100644 index 000000000000..760305ec6cbf --- /dev/null +++ b/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml @@ -0,0 +1,13 @@ +generatorName: spring +outputDir: samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable +library: spring-boot +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + oas3: "true" + java8: "false" + useBeanValidation: true + artifactId: spring-boot-beanvalidation-no-nullable + hideGenerationTimestamp: "true" + openApiNullable: "false" diff --git a/bin/configs/spring-boot-delegate-oas3.yaml b/bin/configs/spring-boot-delegate-oas3.yaml new file mode 100644 index 000000000000..7d8631523d8a --- /dev/null +++ b/bin/configs/spring-boot-delegate-oas3.yaml @@ -0,0 +1,11 @@ +generatorName: spring +outputDir: samples/openapi3/server/petstore/springboot-delegate +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + oas3: "true" + artifactId: springboot-delegate + hideGenerationTimestamp: "true" + java8: true + delegatePattern: "true" diff --git a/bin/configs/spring-boot-implicitHeaders-oas3.yaml b/bin/configs/spring-boot-implicitHeaders-oas3.yaml new file mode 100644 index 000000000000..973561fad57e --- /dev/null +++ b/bin/configs/spring-boot-implicitHeaders-oas3.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/openapi3/server/petstore/springboot-implicitHeaders +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + oas3: "true" + artifactId: springboot-implicitHeaders + hideGenerationTimestamp: "true" + implicitHeaders: true diff --git a/bin/configs/spring-boot-oas3.yaml b/bin/configs/spring-boot-oas3.yaml new file mode 100644 index 000000000000..9a0f864b2713 --- /dev/null +++ b/bin/configs/spring-boot-oas3.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/openapi3/server/petstore/springboot +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + artifactId: springboot + snapshotVersion: "true" + oas3: "true" + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-reactive-oas3.yaml b/bin/configs/spring-boot-reactive-oas3.yaml new file mode 100644 index 000000000000..b3fc8278491a --- /dev/null +++ b/bin/configs/spring-boot-reactive-oas3.yaml @@ -0,0 +1,11 @@ +generatorName: spring +outputDir: samples/openapi3/server/petstore/springboot-reactive +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + oas3: "true" + artifactId: springboot-reactive + reactive: "true" + hideGenerationTimestamp: "true" + delegatePattern: "true" diff --git a/bin/configs/spring-boot-useoptional-oas3.yaml b/bin/configs/spring-boot-useoptional-oas3.yaml new file mode 100644 index 000000000000..6fd5755ca31c --- /dev/null +++ b/bin/configs/spring-boot-useoptional-oas3.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/openapi3/server/petstore/springboot-useoptional +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + oas3: "true" + useOptional: true + artifactId: spring-boot-useoptional + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-cloud-async-oas3.yaml b/bin/configs/spring-cloud-async-oas3.yaml new file mode 100644 index 000000000000..637e9b4d1626 --- /dev/null +++ b/bin/configs/spring-cloud-async-oas3.yaml @@ -0,0 +1,12 @@ +generatorName: spring +outputDir: samples/openapi3/client/petstore/spring-cloud-async +library: spring-cloud +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + oas3: "true" + async: "true" + java8: "true" + artifactId: petstore-spring-cloud + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-cloud-date-time-oas3.yaml b/bin/configs/spring-cloud-date-time-oas3.yaml new file mode 100644 index 000000000000..27cd8723133e --- /dev/null +++ b/bin/configs/spring-cloud-date-time-oas3.yaml @@ -0,0 +1,12 @@ +generatorName: spring +library: spring-cloud +outputDir: samples/openapi3/client/petstore/spring-cloud-date-time +inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + artifactId: spring-cloud-date-time-oas3 + interfaceOnly: "true" + singleContentTypes: "true" + hideGenerationTimestamp: "true" + oas3: "true" \ No newline at end of file diff --git a/bin/configs/spring-cloud-date-time.yaml b/bin/configs/spring-cloud-date-time.yaml new file mode 100644 index 000000000000..16686c8b9ac7 --- /dev/null +++ b/bin/configs/spring-cloud-date-time.yaml @@ -0,0 +1,10 @@ +generatorName: spring +library: spring-cloud +outputDir: samples/client/petstore/spring-cloud-date-time +inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: spring-cloud-date-time + interfaceOnly: "true" + singleContentTypes: "true" + hideGenerationTimestamp: "true" \ No newline at end of file diff --git a/bin/configs/spring-cloud-oas3-fakeapi.yaml b/bin/configs/spring-cloud-oas3-fakeapi.yaml new file mode 100644 index 000000000000..f12e8b601991 --- /dev/null +++ b/bin/configs/spring-cloud-oas3-fakeapi.yaml @@ -0,0 +1,12 @@ +generatorName: spring +library: spring-cloud +outputDir: samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + artifactId: spring-cloud-oas3 + interfaceOnly: "true" + singleContentTypes: "true" + hideGenerationTimestamp: "true" + oas3: "true" diff --git a/bin/configs/spring-cloud-oas3.yaml b/bin/configs/spring-cloud-oas3.yaml new file mode 100644 index 000000000000..3d627dcca254 --- /dev/null +++ b/bin/configs/spring-cloud-oas3.yaml @@ -0,0 +1,12 @@ +generatorName: spring +library: spring-cloud +outputDir: samples/openapi3/client/petstore/spring-cloud +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + artifactId: spring-cloud-oas3 + interfaceOnly: "true" + singleContentTypes: "true" + hideGenerationTimestamp: "true" + oas3: "true" diff --git a/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml b/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml new file mode 100644 index 000000000000..64f048226e83 --- /dev/null +++ b/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/openapi3/client/petstore/spring-cloud-spring-pageable +library: spring-cloud +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + oas3: "true" + artifactId: spring-cloud-spring-pageable + hideGenerationTimestamp: 'true' diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 297c458e3c23..f2695d08cd21 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -20,6 +20,7 @@ import static org.apache.commons.lang3.StringUtils.isNotEmpty; import static org.openapitools.codegen.utils.StringUtils.camelize; +import io.swagger.v3.oas.models.media.Schema; import java.io.File; import java.net.URL; import java.util.ArrayList; @@ -923,6 +924,17 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } } + @Override + public CodegenModel fromModel(String name, Schema model) { + CodegenModel codegenModel = super.fromModel(name, model); + if (oas3) { + // remove swagger2 imports + codegenModel.imports.remove("ApiModelProperty"); + codegenModel.imports.remove("ApiModel"); + } + return codegenModel; + } + @Override public Map postProcessModelsEnum(Map objs) { objs = super.postProcessModelsEnum(objs); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache new file mode 100644 index 000000000000..1cba2038d870 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache @@ -0,0 +1 @@ +{{#allowableValues}}allowableValues ={{#oas3}} { {{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}} }{{/oas3}}{{^oas3}} "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/oas3}}{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 6647b5f084e5..66c398753e04 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -10,9 +10,9 @@ package {{package}}; {{#oas3}} import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; @@ -120,29 +120,62 @@ public interface {{classname}} { @ApiVirtual {{/virtualService}} {{#oas3}} - @Operation(summary = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }, responses = { {{#responses}} @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = @Content(mediaType = "application/json", schema = @Schema(implementation = {{{baseType}}}.class)){{/baseType}}){{^-last}},{{/-last}}{{/responses}} }{{#hasAuthMethods}},security = { - {{#authMethods}}@SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes={ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} }{{/isOAuth}}){{^-last}},{{/-last}}{{/authMethods}} } {{/hasAuthMethods}}) - {{/oas3}}{{^oas3}} - @ApiOperation(value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, response = {{{.}}}.class{{/returnBaseType}}{{#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}}",{{/vendorExtensions.x-tags}} }) - @ApiResponses(value = { {{#responses}} - - @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) + @Operation( + summary = "{{{summary}}}", + tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }, + responses = { + {{#responses}} + @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = @Content(mediaType = "application/json", schema = @Schema(implementation = {{{baseType}}}.class)){{/baseType}}){{^-last}},{{/-last}} + {{/responses}} + }{{#hasAuthMethods}}, + security = { + {{#authMethods}} + @SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes={ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} }{{/isOAuth}}){{^-last}},{{/-last}} + {{/authMethods}} + }{{/hasAuthMethods}} + ) + {{/oas3}} + {{^oas3}} + @ApiOperation( + tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }, + value = "{{{summary}}}", + nickname = "{{{operationId}}}", + notes = "{{{notes}}}"{{#returnBaseType}}, + response = {{{.}}}.class{{/returnBaseType}}{{#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}} + ) + @ApiResponses({ + {{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}} + {{/responses}} + }) {{/oas3}} {{#implicitHeaders}} {{#oas3}} @Parameters({ + {{#headerParams}} + {{>paramDoc}}{{^-last}},{{/-last}} + {{/headerParams}} {{/oas3}} {{^oas3}} @ApiImplicitParams({ + {{#headerParams}} + {{>implicitHeader}}{{^-last}},{{/-last}} + {{/headerParams}} {{/oas3}} - {{#headerParams}} - {{>implicitHeader}} - {{/headerParams}} }) {{/implicitHeaders}} @RequestMapping( @@ -153,13 +186,18 @@ public interface {{classname}} { produces = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }{{/hasProduces}}{{#hasConsumes}}, consumes = { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }{{/hasConsumes}}{{/singleContentTypes}} ) - {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},{{/-last}}{{#-last}}{{#reactive}}, {{/reactive}}{{/-last}}{{/allParams}}{{#reactive}}{{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} { + {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}( + {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, + {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, + {{/hasParams}}{{#oas3}}@Parameter(hidden = true){{/oas3}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, + {{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore {{/useSpringfox}}final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}} + ){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} { {{#delegate-method}} return {{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, pageable{{/vendorExtensions.x-spring-paginated}}); } // Override this method - {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { + {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { {{/delegate-method}} {{^isDelegate}} {{>methodBody}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache index cfdf2b9772bd..0652a76d54ee 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache @@ -3,7 +3,18 @@ package {{package}}; {{^jdk8}} {{#imports}}import {{import}}; {{/imports}} +{{#oas3}} +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +{{/oas3}} +{{^oas3}} import io.swagger.annotations.*; +{{/oas3}} import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -118,7 +129,11 @@ public class {{classname}}Controller implements {{classname}} { {{/externalDocs}} * @see {{classname}}#{{operationId}} */ - public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},{{/-last}}{{/allParams}}{{#vendorExtensions.x-spring-paginated}}, @springfox.documentation.annotations.ApiIgnore final Pageable pageable{{/vendorExtensions.x-spring-paginated}}) { + public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}( + {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, + {{/-last}}{{/allParams}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, + {{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore {{/useSpringfox}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}} + ) { {{^isDelegate}} {{^async}} {{>methodBody}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache index ca990e7146b8..1a97106dc8fb 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache @@ -2,7 +2,6 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -import io.swagger.annotations.*; {{#vendorExtensions.x-spring-paginated}} import org.springframework.data.domain.Pageable; {{/vendorExtensions.x-spring-paginated}} @@ -73,7 +72,7 @@ public interface {{classname}}Delegate { */ {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, - {{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { + {{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { {{>methodBody}} }{{/jdk8-default-interface}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache index 7500b53a1bd1..137c4d86b7a3 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}{{#oas3}}@Parameter(name ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}} {{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}{{#allowableValues}}, {{#oas3}}schema = @Schema({{/oas3}}allowableValues = "{{{.}}}"{{#oas3}}){{/oas3}}{{/allowableValues}}) {{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache index d6bded4b731a..a4fe15cb9c2a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaEscapeDoubleQuote}}{{{value}}}{{/lambdaEscapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @CookieValue("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>paramDoc}} @CookieValue("{{baseName}}"){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache new file mode 100644 index 000000000000..3155e5619566 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache @@ -0,0 +1 @@ +{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache index 78df4981339e..ec6cac87c51d 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}){{>dateTimeParam}} {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{>paramDoc}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache index 4b10916d66d4..54891a27d570 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}{{#oas3}}@Parameter(description ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} +{{#isHeaderParam}}{{>paramDoc}} @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/implicitHeader.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/implicitHeader.mustache index a7a6851cb887..77e151eedaa6 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/implicitHeader.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/implicitHeader.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache index 2f75d1c0f63b..05447fe9563d 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache @@ -10,7 +10,10 @@ ${java.version} ${java.version} {{#useSpringfox}} - 2.9.2 + 2.9.2 + {{/useSpringfox}} + {{^useSpringfox}} + {{#oas3}}2.1.11{{/oas3}}{{^oas3}}1.6.3{{/oas3}} {{/useSpringfox}} {{#parentOverridden}} @@ -24,7 +27,7 @@ org.springframework.boot spring-boot-starter-parent - {{#java8}}2.3.3.RELEASE{{/java8}}{{^java8}}1.5.12.RELEASE{{/java8}} + 2.5.8 {{/parentOverridden}} @@ -34,13 +37,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - {{#apiFirst}} @@ -91,43 +87,25 @@ io.springfox springfox-swagger2 - ${springfox-version} - - - io.springfox - springfox-swagger-ui - ${springfox-version} - - - jakarta.xml.bind - jakarta.xml.bind-api + ${springfox.version} {{/useSpringfox}} {{^useSpringfox}} - - io.springfox - springfox-swagger2 - 2.8.0 - - - org.webjars - swagger-ui - 3.14.2 - {{#oas3}} io.swagger.core.v3 swagger-annotations - 2.1.2 + ${swagger-core-version} {{/oas3}} {{^oas3}} io.swagger swagger-annotations - 1.5.14 + ${swagger-core-version} {{/oas3}} + {{/useSpringfox}} com.google.code.findbugs @@ -138,9 +116,12 @@ com.fasterxml.jackson.dataformat jackson-dataformat-yaml - {{/useSpringfox}} {{#withXml}} + + jakarta.xml.bind + jakarta.xml.bind-api + com.fasterxml.jackson.dataformat jackson-dataformat-xml @@ -162,21 +143,21 @@ com.github.joschi.jackson jackson-datatype-threetenbp - 2.8.4 + 2.9.10 {{/threetenbp}} {{#openApiNullable}} org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 {{/openApiNullable}} {{#useBeanValidation}} - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation {{/useBeanValidation}} {{#virtualService}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache index ac337fecf6a8..2277efda1e1d 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required=true{{/required}} {{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}") @RequestParam("{{baseName}}") {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{>paramDoc}} @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}){{>dateTimeParam}} {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{>paramDoc}} @RequestParam("{{baseName}}") {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache index 1636e5918366..f9228dd345e2 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache @@ -9,7 +9,10 @@ {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} ${java.version} ${java.version} - 1.5.18 + {{#oas3}}2.1.11{{/oas3}}{{^oas3}}1.6.3{{/oas3}} + {{#useSpringfox}} + 2.9.2 + {{/useSpringfox}} {{#parentOverridden}} @@ -22,7 +25,7 @@ org.springframework.boot spring-boot-starter-parent - 2.5.5 + 2.6.2 {{/parentOverridden}} @@ -35,7 +38,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2020.0.4 + 2021.0.0 pom import @@ -44,27 +47,37 @@ {{/parentOverridden}} + {{#useSpringfox}} + + + io.springfox + springfox-swagger2 + ${springfox.version} + + {{/useSpringfox}} + {{^useSpringfox}} {{#oas3}} io.swagger.core.v3 swagger-annotations - 2.1.2 + ${swagger-core-version} {{/oas3}} {{^oas3}} io.swagger swagger-annotations -{{^parentOverridden}} ${swagger-core-version} -{{/parentOverridden}} {{/oas3}} + {{/useSpringfox}} com.google.code.findbugs jsr305 + {{^parentOverridden}} 3.0.2 + {{/parentOverridden}} org.springframework.cloud @@ -73,7 +86,9 @@ org.springframework.cloud spring-cloud-starter-oauth2 + {{^parentOverridden}} 2.2.5.RELEASE + {{/parentOverridden}} {{#withXml}} @@ -107,40 +122,31 @@ org.openapitools jackson-databind-nullable - {{^parentOverridden}} - 0.2.1 - {{/parentOverridden}} + {{^parentOverridden}} + 0.2.2 + {{/parentOverridden}} {{/openApiNullable}} - - org.springframework.boot - spring-boot-starter-test - test - -{{#hateoas}} - + {{#hateoas}} org.springframework.boot spring-boot-starter-hateoas -{{/hateoas}} -{{#useBeanValidation}} - - org.hibernate.validator - hibernate-validator - {{^parentOverridden}} - 6.0.16.Final - {{/parentOverridden}} - -{{/useBeanValidation}} + {{/hateoas}} + {{#useBeanValidation}} - io.springfox - springfox-swagger2 - 3.0.0 + org.springframework.boot + spring-boot-starter-validation + {{/useBeanValidation}} org.springframework.data spring-data-commons + + org.springframework.boot + spring-boot-starter-test + test + diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache index 9230b32c9d32..f0f17f6b2088 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache @@ -187,14 +187,14 @@ io.swagger.core.v3 swagger-annotations - 2.1.2 + ${swagger-core-version} {{/oas3}} {{^oas3}} io.swagger swagger-annotations - 1.5.14 + ${swagger-core-version} {{/oas3}} @@ -289,12 +289,12 @@ ${java.version} ${java.version} 1.3.5 - 2.3.3 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 4.0.4 - 2.8.0 + 2.9.2 2.9.9 2.8.4 {{#useBeanValidation}} @@ -305,5 +305,6 @@ 0.2.2 {{/openApiNullable}} 2.9.8 + {{#oas3}}2.1.11{{/oas3}}{{^oas3}}1.6.3{{/oas3}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache new file mode 100644 index 000000000000..7f3eb71e0b01 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache @@ -0,0 +1 @@ +{{#oas3}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}, schema = @Schema(description = ""{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}})){{/oas3}}{{^oas3}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/oas3}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache index cf75bb92edec..16888518c1b9 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{baseName}}", description ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaRemoveDoubleQuote}}{{{value}}}{{/lambdaRemoveDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}} +{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{>paramDoc}} @PathVariable("{{baseName}}"){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache index 557b3ca837a8..2e8911d8f531 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{#oas3}}schema = @Schema({{/oas3}}allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{#oas3}}){{/oas3}}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{#useBeanValidation}} @Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file 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 new file mode 100644 index 000000000000..f32cd9142666 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml @@ -0,0 +1,70 @@ +openapi: 3.0.3 +info: + title: Api Documentation + description: 'Demo Spring Mvc @DateTimeFormat across the different openapi parameter types' + version: '1.0' +paths: + /thingy/{date}: + post: + description: 'update with form data' + operationId: updatePetWithForm + parameters: + - name: date + in: path + description: 'A date path parameter' + required: true + schema: + type: string + format: date + example: '2021-01-01' + responses: + '405': + description: Invalid input + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + visitDate: + description: Updated last vist timestamp + type: string + format: date-time + get: + operationId: get + parameters: + - name: date + in: path + description: 'A date path parameter' + required: true + schema: + type: string + format: date + example: '2021-01-01' + - name: dateTime + description: 'A date-time query parameter' + in: query + required: true + schema: + type: string + format: date-time + example: '1996-12-19T16:39:57-08:00' + - name: X-Order-Date + in: header + description: 'A date header parameter' + required: true + schema: + type: string + format: date + example: '2021-01-01' + - name: loginDate + in: cookie + description: 'A date cookie parameter' + required: false + schema: + type: string + format: date + example: '2021-01-01' + responses: + '200': + description: OK \ No newline at end of file diff --git a/pom.xml b/pom.xml index c77ae7240b48..81e5c5c2b2a7 100644 --- a/pom.xml +++ b/pom.xml @@ -3,6 +3,7 @@ org.sonatype.oss oss-parent 5 + 4.0.0 org.openapitools @@ -1208,15 +1209,21 @@ samples/server/petstore/jaxrs-resteasy/joda samples/server/petstore/jaxrs-resteasy/default-value - samples/client/petstore/spring-cloud + samples/openapi3/client/petstore/spring-cloud + samples/client/petstore/spring-cloud-date-time + samples/openapi3/client/petstore/spring-cloud-date-time samples/server/petstore/springboot + samples/openapi3/server/petstore/springboot samples/server/petstore/springboot-beanvalidation samples/server/petstore/springboot-useoptional + samples/openapi3/server/petstore/springboot-useoptional samples/server/petstore/springboot-reactive + samples/openapi3/server/petstore/springboot-reactive + samples/server/petstore/springboot-implicitHeaders + samples/openapi3/server/petstore/springboot-implicitHeaders + samples/server/petstore/springboot-delegate + samples/openapi3/server/petstore/springboot-delegate samples/server/petstore/jaxrs-cxf samples/server/petstore/jaxrs-cxf-annotated-base-path samples/server/petstore/jaxrs-cxf-cdi @@ -1230,6 +1237,37 @@ samples/server/petstore/scala-finch + + samples.circleci.spring + + + env + samples.circleci.spring + + + + samples/server/petstore/spring-mvc + samples/server/petstore/spring-mvc-default-value + samples/server/petstore/spring-mvc-j8-async + samples/server/petstore/spring-mvc-j8-localdatetime + + samples/client/petstore/spring-cloud + samples/openapi3/client/petstore/spring-cloud + samples/client/petstore/spring-cloud-date-time + samples/openapi3/client/petstore/spring-cloud-date-time + samples/server/petstore/springboot + samples/openapi3/server/petstore/springboot + samples/server/petstore/springboot-beanvalidation + samples/server/petstore/springboot-useoptional + samples/openapi3/server/petstore/springboot-useoptional + samples/server/petstore/springboot-reactive + samples/openapi3/server/petstore/springboot-reactive + samples/server/petstore/springboot-implicitHeaders + samples/openapi3/server/petstore/springboot-implicitHeaders + samples/server/petstore/springboot-delegate + samples/openapi3/server/petstore/springboot-delegate + + samples.circleci.node3 diff --git a/samples/client/petstore/spring-cloud-async/pom.xml b/samples/client/petstore/spring-cloud-async/pom.xml index 254a8357fce7..6b400a3539fe 100644 --- a/samples/client/petstore/spring-cloud-async/pom.xml +++ b/samples/client/petstore/spring-cloud-async/pom.xml @@ -9,12 +9,13 @@ 1.8 ${java.version} ${java.version} - 1.5.18 + 1.6.3 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.5.5 + 2.6.2 src/main/java @@ -25,7 +26,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2020.0.4 + 2021.0.0 pom import @@ -33,10 +34,11 @@ + - io.swagger - swagger-annotations - ${swagger-core-version} + io.springfox + springfox-swagger2 + ${springfox.version} @@ -60,26 +62,20 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 org.springframework.boot - spring-boot-starter-test - test - - - org.hibernate.validator - hibernate-validator - 6.0.16.Final - - - io.springfox - springfox-swagger2 - 3.0.0 + spring-boot-starter-validation org.springframework.data spring-data-commons + + org.springframework.boot + spring-boot-starter-test + test + diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index c28311ac4c5b..ff55cadf21fc 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -33,23 +33,29 @@ public interface PetApi { * @param body Pet object that needs to be added to the store (required) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = "application/json" ) CompletableFuture> addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -59,24 +65,29 @@ CompletableFuture> addPet( * @param apiKey (optional) * @return Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - CompletableFuture> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -); + CompletableFuture> deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ); /** @@ -87,25 +98,32 @@ CompletableFuture> deletePet(@ApiParam(value = "Pet id to d * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = "application/json" ) - CompletableFuture>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -); + CompletableFuture>> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ); /** @@ -117,25 +135,32 @@ CompletableFuture>> findPetsByStatus(@NotNull @ApiParam * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = "application/json" ) - CompletableFuture>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -); + CompletableFuture>> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + ); /** @@ -147,26 +172,29 @@ CompletableFuture>> findPetsByTags(@NotNull @ApiParam(v * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = "application/json" ) - CompletableFuture> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -); + CompletableFuture> getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ); /** @@ -177,27 +205,31 @@ CompletableFuture> getPetById(@ApiParam(value = "ID of pet t * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = "application/json" ) CompletableFuture> updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -208,27 +240,31 @@ CompletableFuture> updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) - CompletableFuture> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name, - -@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); + CompletableFuture> updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) String status + ); /** @@ -239,27 +275,32 @@ CompletableFuture> updatePetWithForm(@ApiParam(value = "ID * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = "application/json", consumes = "multipart/form-data" ) - CompletableFuture> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, - -@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); + CompletableFuture> uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file + ); } 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 9ef191dabaa7..f968f9607750 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 @@ -35,20 +35,23 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) - CompletableFuture> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId - -); + CompletableFuture> deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + ); /** @@ -57,20 +60,28 @@ CompletableFuture> deleteOrder(@ApiParam(value = "ID of the * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = "application/json" ) - CompletableFuture>> getInventory(); + CompletableFuture>> getInventory( + + ); /** @@ -82,23 +93,26 @@ CompletableFuture> deleteOrder(@ApiParam(value = "ID of the * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", produces = "application/json" ) - CompletableFuture> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId - -); + CompletableFuture> getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + ); /** @@ -108,20 +122,24 @@ CompletableFuture> getOrderById(@Min(1L) @Max(5L) @ApiPara * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = "application/json" ) CompletableFuture> placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ); } diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 94f5c434042a..5ca513e5ffea 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -35,18 +35,22 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) CompletableFuture> createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ); /** @@ -55,18 +59,22 @@ CompletableFuture> createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) CompletableFuture> createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -75,18 +83,22 @@ CompletableFuture> createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) CompletableFuture> createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -97,20 +109,23 @@ CompletableFuture> createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - CompletableFuture> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -); + CompletableFuture> deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ); /** @@ -121,23 +136,26 @@ CompletableFuture> deleteUser(@ApiParam(value = "The name t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = "application/json" ) - CompletableFuture> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -); + CompletableFuture> getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ); /** @@ -148,23 +166,26 @@ CompletableFuture> getUserByName(@ApiParam(value = "The nam * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = "application/json" ) - CompletableFuture> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -); + CompletableFuture> loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ); /** @@ -172,16 +193,22 @@ CompletableFuture> loginUser(@NotNull @ApiParam(value = " * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - CompletableFuture> logoutUser(); + CompletableFuture> logoutUser( + + ); /** @@ -193,21 +220,23 @@ CompletableFuture> loginUser(@NotNull @ApiParam(value = " * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - CompletableFuture> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); + CompletableFuture> updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ); } diff --git a/samples/client/petstore/spring-cloud-date-time/.openapi-generator-ignore b/samples/client/petstore/spring-cloud-date-time/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/spring-cloud-date-time/.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/spring-cloud-date-time/.openapi-generator/FILES b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/FILES new file mode 100644 index 000000000000..0849e5aac50a --- /dev/null +++ b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/FILES @@ -0,0 +1,3 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/DefaultApi.java diff --git a/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-date-time/README.md b/samples/client/petstore/spring-cloud-date-time/README.md new file mode 100644 index 000000000000..a462be951ace --- /dev/null +++ b/samples/client/petstore/spring-cloud-date-time/README.md @@ -0,0 +1,26 @@ +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/samples/client/petstore/spring-cloud-date-time/pom.xml b/samples/client/petstore/spring-cloud-date-time/pom.xml new file mode 100644 index 000000000000..c01b2969fb37 --- /dev/null +++ b/samples/client/petstore/spring-cloud-date-time/pom.xml @@ -0,0 +1,81 @@ + + 4.0.0 + org.openapitools + spring-cloud-date-time + jar + spring-cloud-date-time + 1.0 + + 1.8 + ${java.version} + ${java.version} + 1.6.3 + 2.9.2 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.2 + + + src/main/java + + + + + + org.springframework.cloud + spring-cloud-starter-parent + 2021.0.0 + pom + import + + + + + + + + io.springfox + springfox-swagger2 + ${springfox.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-starter-oauth2 + 2.2.5.RELEASE + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.data + spring-data-commons + + + org.springframework.boot + spring-boot-starter-test + test + + + 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 new file mode 100644 index 000000000000..54e556cb9ed2 --- /dev/null +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -0,0 +1,86 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Api(value = "Default", description = "the Default API") +public interface DefaultApi { + + /** + * GET /thingy/{date} + * + * @param date A date path parameter (required) + * @param dateTime A date-time query parameter (required) + * @param xOrderDate A date header parameter (required) + * @param loginDate A date cookie parameter (optional) + * @return OK (status code 200) + */ + @ApiOperation( + tags = { }, + value = "", + nickname = "get", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "OK") + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/thingy/{date}" + ) + ResponseEntity get( + @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @ApiParam(value = "A date-time query parameter", required = true) @Valid @RequestParam(value = "dateTime", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "A date header parameter", required = true) @RequestHeader(value = "X-Order-Date", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate xOrderDate, + @ApiParam(value = "A date cookie parameter") @CookieValue("loginDate") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate loginDate + ); + + + /** + * POST /thingy/{date} + * update with form data + * + * @param date A date path parameter (required) + * @param visitDate Updated last vist timestamp (optional) + * @return Invalid input (status code 405) + */ + @ApiOperation( + tags = { }, + value = "", + nickname = "updatePetWithForm", + notes = "update with form data" + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/thingy/{date}", + consumes = "application/x-www-form-urlencoded" + ) + ResponseEntity updatePetWithForm( + @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "Updated last vist timestamp") @RequestParam(value="visitDate", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + ); + +} diff --git a/samples/client/petstore/spring-cloud-spring-pageable/pom.xml b/samples/client/petstore/spring-cloud-spring-pageable/pom.xml index 4d47a4864224..622e4334036f 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/pom.xml +++ b/samples/client/petstore/spring-cloud-spring-pageable/pom.xml @@ -9,12 +9,13 @@ 1.8 ${java.version} ${java.version} - 1.5.18 + 1.6.3 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.5.5 + 2.6.2 src/main/java @@ -25,7 +26,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2020.0.4 + 2021.0.0 pom import @@ -33,10 +34,11 @@ + - io.swagger - swagger-annotations - ${swagger-core-version} + io.springfox + springfox-swagger2 + ${springfox.version} @@ -60,26 +62,20 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 org.springframework.boot - spring-boot-starter-test - test - - - org.hibernate.validator - hibernate-validator - 6.0.16.Final - - - io.springfox - springfox-swagger2 - 3.0.0 + spring-boot-starter-validation org.springframework.data spring-data-commons + + org.springframework.boot + spring-boot-starter-test + test + diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index f71534f66c67..ac82a073506d 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -32,23 +32,29 @@ public interface PetApi { * @param body Pet object that needs to be added to the store (required) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = "application/json" ) ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -58,24 +64,29 @@ ResponseEntity addPet( * @param apiKey (optional) * @return Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -); + ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ); /** @@ -86,25 +97,33 @@ ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = "application/json" ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ); /** @@ -116,25 +135,33 @@ ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status va * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = "application/json" ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ); /** @@ -146,26 +173,29 @@ ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to fil * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = "application/json" ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -); + ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ); /** @@ -176,27 +206,31 @@ ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = "application/json" ) ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -207,27 +241,31 @@ ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name, - -@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); + ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) String status + ); /** @@ -238,27 +276,32 @@ ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs t * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = "application/json", consumes = "multipart/form-data" ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, - -@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); + ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file + ); } 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 1ee6df7a6e71..b4b4df339155 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 @@ -34,20 +34,23 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId - -); + ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + ); /** @@ -56,20 +59,28 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = "application/json" ) - ResponseEntity> getInventory(); + ResponseEntity> getInventory( + + ); /** @@ -81,23 +92,26 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", produces = "application/json" ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId - -); + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + ); /** @@ -107,20 +121,24 @@ ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pe * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = "application/json" ) ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ); } diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 1c8c6c49716b..fdd47d7f560c 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -34,18 +34,22 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ); /** @@ -54,18 +58,22 @@ ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -74,18 +82,22 @@ ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -96,20 +108,23 @@ ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -); + ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ); /** @@ -120,23 +135,26 @@ ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be del * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = "application/json" ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -); + ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ); /** @@ -147,23 +165,26 @@ ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = "application/json" ) - ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -); + ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ); /** @@ -171,16 +192,22 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - ResponseEntity logoutUser(); + ResponseEntity logoutUser( + + ); /** @@ -188,16 +215,22 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * * @return endpoint configuration response (status code 200) */ - - @ApiOperation(value = "logoutUserOptions", nickname = "logoutUserOptions", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "endpoint configuration response") }) + @ApiOperation( + tags = { "user" }, + value = "logoutUserOptions", + nickname = "logoutUserOptions", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "endpoint configuration response") + }) @RequestMapping( method = RequestMethod.OPTIONS, value = "/user/logout" ) - ResponseEntity logoutUserOptions(); + ResponseEntity logoutUserOptions( + + ); /** @@ -209,21 +242,23 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); + ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ); } diff --git a/samples/client/petstore/spring-cloud/pom.xml b/samples/client/petstore/spring-cloud/pom.xml index 254a8357fce7..6b400a3539fe 100644 --- a/samples/client/petstore/spring-cloud/pom.xml +++ b/samples/client/petstore/spring-cloud/pom.xml @@ -9,12 +9,13 @@ 1.8 ${java.version} ${java.version} - 1.5.18 + 1.6.3 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.5.5 + 2.6.2 src/main/java @@ -25,7 +26,7 @@ org.springframework.cloud spring-cloud-starter-parent - 2020.0.4 + 2021.0.0 pom import @@ -33,10 +34,11 @@ + - io.swagger - swagger-annotations - ${swagger-core-version} + io.springfox + springfox-swagger2 + ${springfox.version} @@ -60,26 +62,20 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 org.springframework.boot - spring-boot-starter-test - test - - - org.hibernate.validator - hibernate-validator - 6.0.16.Final - - - io.springfox - springfox-swagger2 - 3.0.0 + spring-boot-starter-validation org.springframework.data spring-data-commons + + org.springframework.boot + spring-boot-starter-test + test + diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 1e8c3492df93..a9cde131118a 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -33,17 +33,23 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", response = Pet.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + response = Pet.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", @@ -51,8 +57,8 @@ public interface PetApi { consumes = "application/json" ) ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet pet); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + ); /** @@ -62,24 +68,29 @@ ResponseEntity addPet( * @param apiKey (optional) * @return Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -); + ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ); /** @@ -90,24 +101,31 @@ ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = "application/json" ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -); + ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ); /** @@ -119,24 +137,31 @@ ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status va * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = "application/json" ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -); + ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + ); /** @@ -148,26 +173,29 @@ ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to fil * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = "application/json" ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -); + ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ); /** @@ -179,21 +207,25 @@ ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", response = Pet.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + response = Pet.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", @@ -201,8 +233,8 @@ ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required consumes = "application/json" ) ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet pet); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + ); /** @@ -213,27 +245,31 @@ ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name, - -@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); + ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) String status + ); /** @@ -244,27 +280,32 @@ ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs t * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = "application/json", consumes = "multipart/form-data" ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, - -@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); + ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file + ); } 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 b9ffd3aa63db..ab7dd8afc556 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 @@ -34,20 +34,23 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId - -); + ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + ); /** @@ -56,20 +59,28 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = "application/json" ) - ResponseEntity> getInventory(); + ResponseEntity> getInventory( + + ); /** @@ -81,23 +92,26 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", produces = "application/json" ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId - -); + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + ); /** @@ -107,13 +121,17 @@ ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pe * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", @@ -121,7 +139,7 @@ ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pe consumes = "application/json" ) ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order order); + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + ); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 05eacea86d52..e44789929a72 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -34,22 +34,26 @@ public interface UserApi { * @param user Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user.", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user", consumes = "application/json" ) ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User user); + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + ); /** @@ -58,22 +62,26 @@ ResponseEntity createUser( * @param user List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray", consumes = "application/json" ) ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List user); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + ); /** @@ -82,22 +90,26 @@ ResponseEntity createUsersWithArrayInput( * @param user List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList", consumes = "application/json" ) ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List user); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + ); /** @@ -108,23 +120,26 @@ ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user.", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -); + ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ); /** @@ -135,23 +150,26 @@ ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be del * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = "application/json" ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -); + ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ); /** @@ -162,23 +180,26 @@ ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = "application/json" ) - ResponseEntity loginUser(@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -); + ResponseEntity loginUser( + @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ); /** @@ -186,19 +207,25 @@ ResponseEntity loginUser(@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA- * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - ResponseEntity logoutUser(); + ResponseEntity logoutUser( + + ); /** @@ -210,25 +237,27 @@ ResponseEntity loginUser(@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA- * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user.", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}", consumes = "application/json" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User user); + ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + ); } diff --git a/samples/client/petstore/spring-stubs/pom.xml b/samples/client/petstore/spring-stubs/pom.xml index 2ae7301fc583..ef22a9c572a8 100644 --- a/samples/client/petstore/spring-stubs/pom.xml +++ b/samples/client/petstore/spring-stubs/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -32,16 +32,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -50,12 +51,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 4bc16c20f41d..a893c6896117 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -36,23 +36,29 @@ default Optional getRequest() { * @param body Pet object that needs to be added to the store (required) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = "application/json" ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,24 +71,29 @@ default ResponseEntity addPet( * @param apiKey (optional) * @return Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,25 +107,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = "application/json" ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -143,25 +161,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = "application/json" ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -190,26 +215,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = "application/json" ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -237,27 +265,31 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = "application/json" ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -271,27 +303,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -305,28 +341,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = "application/json", consumes = "multipart/form-data" ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 27b18c586c9f..1ffe7a38f36a 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 @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = "application/json" ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", produces = "application/json" ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = "application/json" ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 28042a4ca8f2..2baaed308ede 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = "application/json" ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = "application/json" ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator-ignore b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/.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/openapi3/client/petstore/spring-cloud-async/.openapi-generator/FILES b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/FILES new file mode 100644 index 000000000000..3510d2b2d276 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/FILES @@ -0,0 +1,16 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiClient.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiClient.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiClient.java +src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java +src/main/java/org/openapitools/configuration/ClientConfiguration.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java diff --git a/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-async/README.md b/samples/openapi3/client/petstore/spring-cloud-async/README.md new file mode 100644 index 000000000000..db2e65302794 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/README.md @@ -0,0 +1,53 @@ +# petstore-spring-cloud + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation + +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. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + org.openapitools.openapi3 + petstore-spring-cloud + 1.0.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "org.openapitools.openapi3:petstore-spring-cloud:1.0.0" +``` + +### Others + +At first generate the JAR by executing: + +mvn package + +Then manually install the following JARs: + +* target/petstore-spring-cloud-1.0.0.jar +* target/lib/*.jar diff --git a/samples/openapi3/client/petstore/spring-cloud-async/pom.xml b/samples/openapi3/client/petstore/spring-cloud-async/pom.xml new file mode 100644 index 000000000000..950b9bbe3531 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/pom.xml @@ -0,0 +1,79 @@ + + 4.0.0 + org.openapitools.openapi3 + petstore-spring-cloud + jar + petstore-spring-cloud + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.2 + + + src/main/java + + + + + + org.springframework.cloud + spring-cloud-starter-parent + 2021.0.0 + pom + import + + + + + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-starter-oauth2 + 2.2.5.RELEASE + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.data + spring-data-commons + + + org.springframework.boot + spring-boot-starter-test + test + + + 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 new file mode 100644 index 000000000000..88803c5bac2a --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,270 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Pet", description = "the Pet API") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = "application/json" + ) + CompletableFuture> addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + CompletableFuture> deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = "application/json" + ) + CompletableFuture>> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = "application/json" + ) + CompletableFuture>> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = "application/json" + ) + CompletableFuture> getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = "application/json" + ) + CompletableFuture> updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = "application/x-www-form-urlencoded" + ) + CompletableFuture> updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @RequestParam(value="name", required=false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @RequestParam(value="status", required=false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = "application/json", + consumes = "multipart/form-data" + ) + CompletableFuture> uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestParam("file") MultipartFile file + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java new file mode 100644 index 000000000000..f80fe4ddc678 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java @@ -0,0 +1,8 @@ +package org.openapitools.api; + +import org.springframework.cloud.openfeign.FeignClient; +import org.openapitools.configuration.ClientConfiguration; + +@FeignClient(name="${pet.name:pet}", url="${pet.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +public interface PetApiClient extends PetApi { +} 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 new file mode 100644 index 000000000000..da999d740a5a --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,140 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Store", description = "the Store API") +public interface StoreApi { + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + CompletableFuture> deleteOrder( + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("orderId") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = "application/json" + ) + CompletableFuture>> getInventory( + + ); + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = "application/json" + ) + CompletableFuture> getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("orderId") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = "application/json" + ) + CompletableFuture> placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java new file mode 100644 index 000000000000..71d613a871dd --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java @@ -0,0 +1,8 @@ +package org.openapitools.api; + +import org.springframework.cloud.openfeign.FeignClient; +import org.openapitools.configuration.ClientConfiguration; + +@FeignClient(name="${store.name:store}", url="${store.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +public interface StoreApiClient extends StoreApi { +} 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 new file mode 100644 index 000000000000..225627cbacc0 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,231 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "User", description = "the User API") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + CompletableFuture> createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + CompletableFuture> createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + CompletableFuture> createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + CompletableFuture> deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = "application/json" + ) + CompletableFuture> getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = "application/json" + ) + CompletableFuture> loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + CompletableFuture> logoutUser( + + ); + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + CompletableFuture> updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java new file mode 100644 index 000000000000..1db4598108db --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java @@ -0,0 +1,8 @@ +package org.openapitools.api; + +import org.springframework.cloud.openfeign.FeignClient; +import org.openapitools.configuration.ClientConfiguration; + +@FeignClient(name="${user.name:user}", url="${user.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +public interface UserApiClient extends UserApi { +} diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java new file mode 100644 index 000000000000..199278dcb539 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java @@ -0,0 +1,31 @@ +package org.openapitools.configuration; + +import feign.RequestInterceptor; +import feign.RequestTemplate; +import feign.Util; + + +public class ApiKeyRequestInterceptor implements RequestInterceptor { + private final String location; + private final String name; + private String value; + + public ApiKeyRequestInterceptor(String location, String name, String value) { + Util.checkNotNull(location, "location", new Object[0]); + Util.checkNotNull(name, "name", new Object[0]); + Util.checkNotNull(value, "value", new Object[0]); + this.location = location; + this.name = name; + this.value = value; + } + + @Override + public void apply(RequestTemplate requestTemplate) { + if(location.equals("header")) { + requestTemplate.header(name, value); + } else if(location.equals("query")) { + requestTemplate.query(name, value); + } + } + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ClientConfiguration.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ClientConfiguration.java new file mode 100644 index 000000000000..4a28661290d9 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/configuration/ClientConfiguration.java @@ -0,0 +1,48 @@ +package org.openapitools.configuration; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.cloud.openfeign.security.OAuth2FeignRequestInterceptor; +import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext; +import org.springframework.security.oauth2.client.OAuth2ClientContext; +import org.springframework.security.oauth2.client.token.grant.implicit.ImplicitResourceDetails; + +@Configuration +@EnableConfigurationProperties +public class ClientConfiguration { + + @Value("${openapipetstore.security.apiKey.key:}") + private String apiKeyKey; + + @Bean + @ConditionalOnProperty(name = "openapipetstore.security.apiKey.key") + public ApiKeyRequestInterceptor apiKeyRequestInterceptor() { + return new ApiKeyRequestInterceptor("header", "api_key", this.apiKeyKey); + } + + @Bean + @ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id") + public OAuth2FeignRequestInterceptor petstoreAuthRequestInterceptor(OAuth2ClientContext oAuth2ClientContext) { + return new OAuth2FeignRequestInterceptor(oAuth2ClientContext, petstoreAuthResourceDetails()); + } + + @Bean + @ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id") + public OAuth2ClientContext oAuth2ClientContext() { + return new DefaultOAuth2ClientContext(); + } + + @Bean + @ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id") + @ConfigurationProperties("openapipetstore.security.petstoreAuth") + public ImplicitResourceDetails petstoreAuthResourceDetails() { + ImplicitResourceDetails details = new ImplicitResourceDetails(); + details.setUserAuthorizationUri("http://petstore.swagger.io/api/oauth/dialog"); + return details; + } + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..cb69c674a1e4 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A category for a pet + */ +@Schema(name = "Category",description = "A category for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..0ef610e38f01 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,134 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Describes the result of uploading an image resource + */ +@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..528598b79ea7 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,250 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * An order for a pets from the pet store + */ +@Schema(name = "Order",description = "An order for a pets from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..7c2986fea846 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,270 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A pet for sale in the pet store + */ +@Schema(name = "Pet",description = "A pet for sale in the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + 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 + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + 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 + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..27166f687a27 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A tag for a pet + */ +@Schema(name = "Tag",description = "A tag for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..ba24f681c1df --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,259 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A User who is purchasing from the pet store + */ +@Schema(name = "User",description = "A User who is purchasing from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator-ignore b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/.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/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/FILES b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/FILES new file mode 100644 index 000000000000..0849e5aac50a --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/FILES @@ -0,0 +1,3 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/DefaultApi.java diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/README.md b/samples/openapi3/client/petstore/spring-cloud-date-time/README.md new file mode 100644 index 000000000000..a462be951ace --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/README.md @@ -0,0 +1,26 @@ +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml b/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml new file mode 100644 index 000000000000..9f8de9c14cdf --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml @@ -0,0 +1,79 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-cloud-date-time-oas3 + jar + spring-cloud-date-time-oas3 + 1.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.2 + + + src/main/java + + + + + + org.springframework.cloud + spring-cloud-starter-parent + 2021.0.0 + pom + import + + + + + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-starter-oauth2 + 2.2.5.RELEASE + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.data + spring-data-commons + + + org.springframework.boot + spring-boot-starter-test + test + + + 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 new file mode 100644 index 000000000000..7dbf104466fb --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -0,0 +1,89 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Default", description = "the Default API") +public interface DefaultApi { + + /** + * GET /thingy/{date} + * + * @param date A date path parameter (required) + * @param dateTime A date-time query parameter (required) + * @param xOrderDate A date header parameter (required) + * @param loginDate A date cookie parameter (optional) + * @return OK (status code 200) + */ + @Operation( + summary = "", + tags = { }, + responses = { + @ApiResponse(responseCode = "200", description = "OK") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/thingy/{date}" + ) + ResponseEntity get( + @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "dateTime", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true, schema = @Schema(description = "")) @RequestHeader(value = "X-Order-Date", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate xOrderDate, + @Parameter(name = "loginDate", description = "A date cookie parameter", schema = @Schema(description = "")) @CookieValue("loginDate") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate loginDate + ); + + + /** + * POST /thingy/{date} + * update with form data + * + * @param date A date path parameter (required) + * @param visitDate Updated last vist timestamp (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "", + tags = { }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/thingy/{date}", + consumes = "application/x-www-form-urlencoded" + ) + ResponseEntity updatePetWithForm( + @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "visitDate", description = "Updated last vist timestamp", schema = @Schema(description = "")) @RequestParam(value="visitDate", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator-ignore b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.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/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/FILES b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/FILES new file mode 100644 index 000000000000..5248511085f8 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/FILES @@ -0,0 +1,54 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +src/main/java/org/openapitools/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/model/Animal.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayTest.java +src/main/java/org/openapitools/model/BigCat.java +src/main/java/org/openapitools/model/BigCatAllOf.java +src/main/java/org/openapitools/model/Capitalization.java +src/main/java/org/openapitools/model/Cat.java +src/main/java/org/openapitools/model/CatAllOf.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ClassModel.java +src/main/java/org/openapitools/model/Client.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/DogAllOf.java +src/main/java/org/openapitools/model/EnumArrays.java +src/main/java/org/openapitools/model/EnumClass.java +src/main/java/org/openapitools/model/EnumTest.java +src/main/java/org/openapitools/model/FileSchemaTestClass.java +src/main/java/org/openapitools/model/FormatTest.java +src/main/java/org/openapitools/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/model/MapTest.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/model/Model200Response.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/ModelReturn.java +src/main/java/org/openapitools/model/Name.java +src/main/java/org/openapitools/model/NumberOnly.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/OuterComposite.java +src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/ReadOnlyFirst.java +src/main/java/org/openapitools/model/SpecialModelName.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/TypeHolderDefault.java +src/main/java/org/openapitools/model/TypeHolderExample.java +src/main/java/org/openapitools/model/User.java +src/main/java/org/openapitools/model/XmlItem.java diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/README.md b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/README.md new file mode 100644 index 000000000000..a462be951ace --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/README.md @@ -0,0 +1,26 @@ +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml new file mode 100644 index 000000000000..6cf023f501f2 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml @@ -0,0 +1,79 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-cloud-oas3 + jar + spring-cloud-oas3 + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.2 + + + src/main/java + + + + + + org.springframework.cloud + spring-cloud-starter-parent + 2021.0.0 + pom + import + + + + + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-starter-oauth2 + 2.2.5.RELEASE + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.data + spring-data-commons + + + org.springframework.boot + spring-boot-starter-test + test + + + 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 new file mode 100644 index 000000000000..9085e07967bc --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,59 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "AnotherFake", description = "the AnotherFake API") +public interface AnotherFakeApi { + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test special tags", + tags = { "$another-fake?" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/another-fake/dummy", + produces = "application/json", + consumes = "application/json" + ) + ResponseEntity call123testSpecialTags( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ); + +} 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 new file mode 100644 index 000000000000..a9d785eaea31 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,443 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Fake", description = "the Fake API") +public interface FakeApi { + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "creates an XmlItem", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/create_xml_item", + consumes = "application/xml" + ) + ResponseEntity createXmlItem( + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody XmlItem xmlItem + ); + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/boolean", + produces = "*/*" + ) + ResponseEntity fakeOuterBooleanSerialize( + @Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Boolean body + ); + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/composite", + produces = "*/*" + ) + ResponseEntity fakeOuterCompositeSerialize( + @Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) OuterComposite body + ); + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/number", + produces = "*/*" + ) + ResponseEntity fakeOuterNumberSerialize( + @Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) BigDecimal body + ); + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/string", + produces = "*/*" + ) + ResponseEntity fakeOuterStringSerialize( + @Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) String body + ); + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-file-schema", + consumes = "application/json" + ) + ResponseEntity testBodyWithFileSchema( + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody FileSchemaTestClass body + ); + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-query-params", + consumes = "application/json" + ) + ResponseEntity testBodyWithQueryParams( + @NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query, + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test \"client\" model", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake", + produces = "application/json", + consumes = "application/json" + ) + ResponseEntity testClientModel( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ); + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "http_basic_test") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake", + consumes = "application/x-www-form-urlencoded" + ) + ResponseEntity testEndpointParameters( + @Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @RequestParam(value="number", required=true) BigDecimal number, + @Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @RequestParam(value="double", required=true) Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @RequestParam(value="byte", required=true) byte[] _byte, + @Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @RequestParam(value="integer", required=false) Integer integer, + @Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @RequestParam(value="int32", required=false) Integer int32, + @Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @RequestParam(value="int64", required=false) Long int64, + @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @RequestParam(value="float", required=false) Float _float, + @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @RequestParam(value="string", required=false) String string, + @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestParam("binary") MultipartFile binary, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @RequestParam(value="date", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @RequestParam(value="dateTime", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @RequestParam(value="password", required=false) String password, + @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @RequestParam(value="callback", required=false) String paramCallback + ); + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @Operation( + summary = "To test enum parameters", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid request"), + @ApiResponse(responseCode = "404", description = "Not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake", + consumes = "application/x-www-form-urlencoded" + ) + ResponseEntity testEnumParameters( + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestParam(value="enum_form_string", required=false) String enumFormString + ); + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Someting wrong (status code 400) + */ + @Operation( + summary = "Fake endpoint to test group parameters (optional)", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Someting wrong") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/fake" + ) + ResponseEntity testGroupParameters( + @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ); + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test inline additionalProperties", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/inline-additionalProperties", + consumes = "application/json" + ) + ResponseEntity testInlineAdditionalProperties( + @Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Map param + ); + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test json serialization of form data", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake/jsonFormData", + consumes = "application/x-www-form-urlencoded" + ) + ResponseEntity testJsonFormData( + @Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @RequestParam(value="param", required=true) String param, + @Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @RequestParam(value="param2", required=true) String param2 + ); + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/test-query-parameters" + ) + ResponseEntity testQueryParameterCollectionFormat( + @NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List context + ); + +} 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 new file mode 100644 index 000000000000..4239438bd3c1 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -0,0 +1,62 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "FakeClassnameTags123", description = "the FakeClassnameTags123 API") +public interface FakeClassnameTags123Api { + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test class name in snake case", + tags = { "fake_classname_tags 123#$%^" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + }, + security = { + @SecurityRequirement(name = "api_key_query") + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake_classname_test", + produces = "application/json", + consumes = "application/json" + ) + ResponseEntity testClassname( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ); + +} 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 new file mode 100644 index 000000000000..c618e1e4d902 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,307 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Pet", description = "the Pet API") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = "application/json" + ) + ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = "application/json" + ) + ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = "application/json" + ) + ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set tags + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = "application/json" + ) + ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = "application/json" + ) + ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = "application/x-www-form-urlencoded" + ) + ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @RequestParam(value="name", required=false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @RequestParam(value="status", required=false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = "application/json", + consumes = "multipart/form-data" + ) + ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestParam("file") MultipartFile file + ); + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image (required)", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/{petId}/uploadImageWithRequiredFile", + produces = "application/json", + consumes = "multipart/form-data" + ) + ResponseEntity uploadFileWithRequiredFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestParam("requiredFile") MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata + ); + +} 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 new file mode 100644 index 000000000000..d8329e19d40b --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,139 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Store", description = "the Store API") +public interface StoreApi { + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{order_id}" + ) + ResponseEntity deleteOrder( + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = "application/json" + ) + ResponseEntity> getInventory( + + ); + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{order_id}", + produces = "application/json" + ) + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = "application/json" + ) + ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ); + +} 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 new file mode 100644 index 000000000000..665546ec700e --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,230 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "User", description = "the User API") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = "application/json" + ) + ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = "application/json" + ) + ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + ResponseEntity logoutUser( + + ); + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..0c57ae7dd14c --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesAnyType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesAnyType name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..b5285ec2f29b --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesArray + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesArray name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..f8ca38c286d5 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesBoolean + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesBoolean name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..dfd28ccb9963 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,414 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesClass { + @JsonProperty("map_string") + @Valid + private Map mapString = null; + + @JsonProperty("map_number") + @Valid + private Map mapNumber = null; + + @JsonProperty("map_integer") + @Valid + private Map mapInteger = null; + + @JsonProperty("map_boolean") + @Valid + private Map mapBoolean = null; + + @JsonProperty("map_array_integer") + @Valid + private Map> mapArrayInteger = null; + + @JsonProperty("map_array_anytype") + @Valid + private Map> mapArrayAnytype = null; + + @JsonProperty("map_map_string") + @Valid + private Map> mapMapString = null; + + @JsonProperty("map_map_anytype") + @Valid + private Map> mapMapAnytype = null; + + @JsonProperty("anytype_1") + private Object anytype1; + + @JsonProperty("anytype_2") + private Object anytype2; + + @JsonProperty("anytype_3") + private Object anytype3; + + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + @Schema(name = "mapString", defaultValue = "") + + + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + @Schema(name = "mapNumber", defaultValue = "") + + @Valid + + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + @Schema(name = "mapInteger", defaultValue = "") + + + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + @Schema(name = "mapBoolean", defaultValue = "") + + + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + @Schema(name = "mapArrayInteger", defaultValue = "") + + @Valid + + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + @Schema(name = "mapArrayAnytype", defaultValue = "") + + @Valid + + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + @Schema(name = "mapMapString", defaultValue = "") + + @Valid + + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + @Schema(name = "mapMapAnytype", defaultValue = "") + + @Valid + + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + @Schema(name = "anytype1", defaultValue = "") + + + public Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = anytype2; + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + @Schema(name = "anytype2", defaultValue = "") + + + public Object getAnytype2() { + return anytype2; + } + + public void setAnytype2(Object anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClass anytype3(Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + @Schema(name = "anytype3", defaultValue = "") + + + public Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..5fea577ab44b --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesInteger + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesInteger name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..e6eee612a24f --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesNumber + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesNumber name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..d7116bd7572c --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..d2022be266fb --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesString + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesString name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java new file mode 100644 index 000000000000..6f096d5069ed --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java @@ -0,0 +1,118 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +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 org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Animal + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), +}) + +public class Animal { + @JsonProperty("className") + private String className; + + @JsonProperty("color") + private String color = "red"; + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @Schema(name = "className", required = true, defaultValue = "") + @NotNull + + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + @Schema(name = "color", defaultValue = "") + + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..ebe36ad761a9 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") + @Valid + private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + @Schema(name = "arrayArrayNumber", defaultValue = "") + + @Valid + + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..8158dd44ab88 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") + @Valid + private List arrayNumber = null; + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + @Schema(name = "arrayNumber", defaultValue = "") + + @Valid + + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 000000000000..420010561bcd --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,165 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayTest { + @JsonProperty("array_of_string") + @Valid + private List arrayOfString = null; + + @JsonProperty("array_array_of_integer") + @Valid + private List> arrayArrayOfInteger = null; + + @JsonProperty("array_array_of_model") + @Valid + private List> arrayArrayOfModel = null; + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + @Schema(name = "arrayOfString", defaultValue = "") + + + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + @Schema(name = "arrayArrayOfInteger", defaultValue = "") + + @Valid + + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + @Schema(name = "arrayArrayOfModel", defaultValue = "") + + @Valid + + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java new file mode 100644 index 000000000000..7f4a080ad8d2 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,126 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.BigCatAllOf; +import org.openapitools.model.Cat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCat extends Cat { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java new file mode 100644 index 000000000000..d0a47ab5127c --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -0,0 +1,123 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCatAllOf { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCatAllOf kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatAllOf bigCatAllOf = (BigCatAllOf) o; + return Objects.equals(this.kind, bigCatAllOf.kind); + } + + @Override + public int hashCode() { + return Objects.hash(kind); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java new file mode 100644 index 000000000000..92d9a7245f16 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,208 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Capitalization + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Capitalization { + @JsonProperty("smallCamel") + private String smallCamel; + + @JsonProperty("CapitalCamel") + private String capitalCamel; + + @JsonProperty("small_Snake") + private String smallSnake; + + @JsonProperty("Capital_Snake") + private String capitalSnake; + + @JsonProperty("SCA_ETH_Flow_Points") + private String scAETHFlowPoints; + + @JsonProperty("ATT_NAME") + private String ATT_NAME; + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + @Schema(name = "smallCamel", defaultValue = "") + + + public String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + @Schema(name = "capitalCamel", defaultValue = "") + + + public String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + @Schema(name = "smallSnake", defaultValue = "") + + + public String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + @Schema(name = "capitalSnake", defaultValue = "") + + + public String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + @Schema(name = "scAETHFlowPoints", defaultValue = "") + + + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") + + + public String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java new file mode 100644 index 000000000000..2e496fb4accd --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.CatAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Cat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Cat extends Animal { + @JsonProperty("declawed") + private Boolean declawed; + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java new file mode 100644 index 000000000000..b732a62b1bc3 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * CatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class CatAllOf { + @JsonProperty("declawed") + private Boolean declawed; + + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); + } + + @Override + public int hashCode() { + return Objects.hash(declawed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..038fc8df3afd --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Category + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name = "default-name"; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + 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/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java new file mode 100644 index 000000000000..fa2a736f4fb5 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model with \"_class\" property + */ +@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ClassModel { + @JsonProperty("_class") + private String propertyClass; + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java new file mode 100644 index 000000000000..e11bd4ff1b13 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Client { + @JsonProperty("client") + private String client; + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + @Schema(name = "client", defaultValue = "") + + + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..ed5dc71a4ba2 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.DogAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Dog + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Dog extends Animal { + @JsonProperty("breed") + private String breed; + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java new file mode 100644 index 000000000000..2c99bc376c34 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * DogAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class DogAllOf { + @JsonProperty("breed") + private String breed; + + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); + } + + @Override + public int hashCode() { + return Objects.hash(breed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 000000000000..e1b2df0716a2 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,190 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumArrays + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumArrays { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("just_symbol") + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("array_enum") + @Valid + private List arrayEnum = null; + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + @Schema(name = "justSymbol", defaultValue = "") + + + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + @Schema(name = "arrayEnum", defaultValue = "") + + + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java new file mode 100644 index 000000000000..e3d30c1ad453 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java new file mode 100644 index 000000000000..938af53e2b81 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,331 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnum; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumTest { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string") + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string_required") + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_integer") + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_number") + private EnumNumberEnum enumNumber; + + @JsonProperty("outerEnum") + private OuterEnum outerEnum; + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + @Schema(name = "enumString", defaultValue = "") + + + public EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @Schema(name = "enumStringRequired", required = true, defaultValue = "") + @NotNull + + + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + @Schema(name = "enumInteger", defaultValue = "") + + + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + @Schema(name = "enumNumber", defaultValue = "") + + + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + @Schema(name = "outerEnum", defaultValue = "") + + @Valid + + public OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..0d1e9ca8495c --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,121 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FileSchemaTestClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FileSchemaTestClass { + @JsonProperty("file") + private java.io.File file; + + @JsonProperty("files") + @Valid + private List files = null; + + public FileSchemaTestClass file(java.io.File file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + @Schema(name = "file", defaultValue = "") + + @Valid + + public java.io.File getFile() { + return file; + } + + public void setFile(java.io.File file) { + this.file = file; + } + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + @Schema(name = "files", defaultValue = "") + + @Valid + + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java new file mode 100644 index 000000000000..6546370cd329 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,435 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FormatTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FormatTest { + @JsonProperty("integer") + private Integer integer; + + @JsonProperty("int32") + private Integer int32; + + @JsonProperty("int64") + private Long int64; + + @JsonProperty("number") + private BigDecimal number; + + @JsonProperty("float") + private Float _float; + + @JsonProperty("double") + private Double _double; + + @JsonProperty("string") + private String string; + + @JsonProperty("byte") + private byte[] _byte; + + @JsonProperty("binary") + private org.springframework.core.io.Resource binary; + + @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + private LocalDate date; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("password") + private String password; + + @JsonProperty("BigDecimal") + private BigDecimal bigDecimal; + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + @Schema(name = "integer", defaultValue = "") + +@Min(10) @Max(100) + public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + @Schema(name = "int32", defaultValue = "") + +@Min(20) @Max(200) + public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + @Schema(name = "int64", defaultValue = "") + + + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @Schema(name = "number", required = true, defaultValue = "") + @NotNull + + @Valid +@DecimalMin("32.1") @DecimalMax("543.2") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + @Schema(name = "_float", defaultValue = "") + +@DecimalMin("54.3") @DecimalMax("987.6") + public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + @Schema(name = "_double", defaultValue = "") + +@DecimalMin("67.8") @DecimalMax("123.4") + public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + @Schema(name = "string", defaultValue = "") + +@Pattern(regexp = "/[a-z]/i") + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @Schema(name = "_byte", required = true, defaultValue = "") + @NotNull + + + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + @Schema(name = "binary", defaultValue = "") + + @Valid + + public org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @Schema(name = "date", required = true, defaultValue = "") + @NotNull + + @Valid + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", required = true, defaultValue = "") + @NotNull + +@Size(min = 10, max = 64) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + @Schema(name = "bigDecimal", defaultValue = "") + + @Valid + + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..dfb615a529fc --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * HasOnlyReadOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class HasOnlyReadOnly { + @JsonProperty("bar") + private String bar; + + @JsonProperty("foo") + private String foo; + + public HasOnlyReadOnly bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public HasOnlyReadOnly foo(String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + @Schema(name = "foo", readOnly = true, defaultValue = "") + + + public String getFoo() { + return foo; + } + + public void setFoo(String foo) { + this.foo = foo; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java new file mode 100644 index 000000000000..3ff73062758f --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,234 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MapTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MapTest { + @JsonProperty("map_map_of_string") + @Valid + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("map_of_enum_string") + @Valid + private Map mapOfEnumString = null; + + @JsonProperty("direct_map") + @Valid + private Map directMap = null; + + @JsonProperty("indirect_map") + @Valid + private Map indirectMap = null; + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + @Schema(name = "mapMapOfString", defaultValue = "") + + @Valid + + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + @Schema(name = "mapOfEnumString", defaultValue = "") + + + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + @Schema(name = "directMap", defaultValue = "") + + + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + @Schema(name = "indirectMap", defaultValue = "") + + + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..03a7be43cc4a --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,152 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("map") + @Valid + private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + @Schema(name = "map", defaultValue = "") + + @Valid + + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java new file mode 100644 index 000000000000..77bf91649b08 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name starting with number + */ +@Schema(name = "200_response",description = "Model for testing model name starting with number") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Model200Response { + @JsonProperty("name") + private Integer name; + + @JsonProperty("class") + private String propertyClass; + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..2443600df226 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,133 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ModelApiResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java new file mode 100644 index 000000000000..0301a47e9f3e --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing reserved words + */ +@Schema(name = "Return",description = "Model for testing reserved words") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelReturn { + @JsonProperty("return") + private Integer _return; + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + @Schema(name = "_return", defaultValue = "") + + + public Integer getReturn() { + return _return; + } + + public void setReturn(Integer _return) { + this._return = _return; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java new file mode 100644 index 000000000000..62a16f80ee07 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,160 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name same as property name + */ +@Schema(name = "Name",description = "Model for testing model name same as property name") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Name { + @JsonProperty("name") + private Integer name; + + @JsonProperty("snake_case") + private Integer snakeCase; + + @JsonProperty("property") + private String property; + + @JsonProperty("123Number") + private Integer _123number; + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Name snakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + @Schema(name = "snakeCase", readOnly = true, defaultValue = "") + + + public Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @Schema(name = "property", defaultValue = "") + + + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public Name _123number(Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + @Schema(name = "_123number", readOnly = true, defaultValue = "") + + + public Integer get123number() { + return _123number; + } + + public void set123number(Integer _123number) { + this._123number = _123number; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java new file mode 100644 index 000000000000..521fad80d5a7 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * NumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class NumberOnly { + @JsonProperty("JustNumber") + private BigDecimal justNumber; + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + @Schema(name = "justNumber", defaultValue = "") + + @Valid + + public BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..05071bdfe2bf --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,249 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Order + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 000000000000..a721a3dde6a0 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * OuterComposite + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OuterComposite { + @JsonProperty("my_number") + private BigDecimal myNumber; + + @JsonProperty("my_string") + private String myString; + + @JsonProperty("my_boolean") + private Boolean myBoolean; + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + @Schema(name = "myNumber", defaultValue = "") + + @Valid + + public BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + @Schema(name = "myString", defaultValue = "") + + + public String getMyString() { + return myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + @Schema(name = "myBoolean", defaultValue = "") + + + public Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 000000000000..ba0cca8a5e81 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..988eb317134d --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,273 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private Set photoUrls = new LinkedHashSet<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..1c51770a8e66 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ReadOnlyFirst + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ReadOnlyFirst { + @JsonProperty("bar") + private String bar; + + @JsonProperty("baz") + private String baz; + + public ReadOnlyFirst bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + @Schema(name = "baz", defaultValue = "") + + + public String getBaz() { + return baz; + } + + public void setBaz(String baz) { + this.baz = baz; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 000000000000..75f4be4e9f8f --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * SpecialModelName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class SpecialModelName { + @JsonProperty("$special[property.name]") + private Long $specialPropertyName; + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + @Schema(name = "$specialPropertyName", defaultValue = "") + + + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName $specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..8722df999bfc --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Tag + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java new file mode 100644 index 000000000000..19e9bf310f76 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,198 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderDefault + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderDefault { + @JsonProperty("string_item") + private String stringItem = "what"; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem = true; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java new file mode 100644 index 000000000000..c9a3762bc74b --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,224 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderExample + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderExample { + @JsonProperty("string_item") + private String stringItem; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("float_item") + private Float floatItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..83152a155535 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,258 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * User + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java new file mode 100644 index 000000000000..59a183db0f62 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,872 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * XmlItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class XmlItem { + @JsonProperty("attribute_string") + private String attributeString; + + @JsonProperty("attribute_number") + private BigDecimal attributeNumber; + + @JsonProperty("attribute_integer") + private Integer attributeInteger; + + @JsonProperty("attribute_boolean") + private Boolean attributeBoolean; + + @JsonProperty("wrapped_array") + @Valid + private List wrappedArray = null; + + @JsonProperty("name_string") + private String nameString; + + @JsonProperty("name_number") + private BigDecimal nameNumber; + + @JsonProperty("name_integer") + private Integer nameInteger; + + @JsonProperty("name_boolean") + private Boolean nameBoolean; + + @JsonProperty("name_array") + @Valid + private List nameArray = null; + + @JsonProperty("name_wrapped_array") + @Valid + private List nameWrappedArray = null; + + @JsonProperty("prefix_string") + private String prefixString; + + @JsonProperty("prefix_number") + private BigDecimal prefixNumber; + + @JsonProperty("prefix_integer") + private Integer prefixInteger; + + @JsonProperty("prefix_boolean") + private Boolean prefixBoolean; + + @JsonProperty("prefix_array") + @Valid + private List prefixArray = null; + + @JsonProperty("prefix_wrapped_array") + @Valid + private List prefixWrappedArray = null; + + @JsonProperty("namespace_string") + private String namespaceString; + + @JsonProperty("namespace_number") + private BigDecimal namespaceNumber; + + @JsonProperty("namespace_integer") + private Integer namespaceInteger; + + @JsonProperty("namespace_boolean") + private Boolean namespaceBoolean; + + @JsonProperty("namespace_array") + @Valid + private List namespaceArray = null; + + @JsonProperty("namespace_wrapped_array") + @Valid + private List namespaceWrappedArray = null; + + @JsonProperty("prefix_ns_string") + private String prefixNsString; + + @JsonProperty("prefix_ns_number") + private BigDecimal prefixNsNumber; + + @JsonProperty("prefix_ns_integer") + private Integer prefixNsInteger; + + @JsonProperty("prefix_ns_boolean") + private Boolean prefixNsBoolean; + + @JsonProperty("prefix_ns_array") + @Valid + private List prefixNsArray = null; + + @JsonProperty("prefix_ns_wrapped_array") + @Valid + private List prefixNsWrappedArray = null; + + public XmlItem attributeString(String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + @Schema(name = "attributeString", example = "string", defaultValue = "") + + + public String getAttributeString() { + return attributeString; + } + + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + @Schema(name = "attributeInteger", example = "-2", defaultValue = "") + + + public Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + @Schema(name = "attributeBoolean", example = "true", defaultValue = "") + + + public Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + @Schema(name = "wrappedArray", defaultValue = "") + + + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + @Schema(name = "nameString", example = "string", defaultValue = "") + + + public String getNameString() { + return nameString; + } + + public void setNameString(String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + @Schema(name = "nameNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + @Schema(name = "nameInteger", example = "-2", defaultValue = "") + + + public Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + @Schema(name = "nameBoolean", example = "true", defaultValue = "") + + + public Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + @Schema(name = "nameArray", defaultValue = "") + + + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + @Schema(name = "nameWrappedArray", defaultValue = "") + + + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + @Schema(name = "prefixString", example = "string", defaultValue = "") + + + public String getPrefixString() { + return prefixString; + } + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + @Schema(name = "prefixInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + @Schema(name = "prefixBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + @Schema(name = "prefixArray", defaultValue = "") + + + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + @Schema(name = "prefixWrappedArray", defaultValue = "") + + + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + @Schema(name = "namespaceString", example = "string", defaultValue = "") + + + public String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") + + + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") + + + public Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + @Schema(name = "namespaceArray", defaultValue = "") + + + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + @Schema(name = "namespaceWrappedArray", defaultValue = "") + + + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + @Schema(name = "prefixNsString", example = "string", defaultValue = "") + + + public String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + @Schema(name = "prefixNsArray", defaultValue = "") + + + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + @Schema(name = "prefixNsWrappedArray", defaultValue = "") + + + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator-ignore b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.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/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/FILES b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/FILES new file mode 100644 index 000000000000..3510d2b2d276 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/FILES @@ -0,0 +1,16 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiClient.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiClient.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiClient.java +src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java +src/main/java/org/openapitools/configuration/ClientConfiguration.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/README.md b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/README.md new file mode 100644 index 000000000000..5a67356a900b --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/README.md @@ -0,0 +1,53 @@ +# spring-cloud-spring-pageable + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation + +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. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + org.openapitools.openapi3 + spring-cloud-spring-pageable + 1.0.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "org.openapitools.openapi3:spring-cloud-spring-pageable:1.0.0" +``` + +### Others + +At first generate the JAR by executing: + +mvn package + +Then manually install the following JARs: + +* target/spring-cloud-spring-pageable-1.0.0.jar +* target/lib/*.jar diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml new file mode 100644 index 000000000000..648e8d7f9950 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml @@ -0,0 +1,79 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-cloud-spring-pageable + jar + spring-cloud-spring-pageable + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.2 + + + src/main/java + + + + + + org.springframework.cloud + spring-cloud-starter-parent + 2021.0.0 + pom + import + + + + + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-starter-oauth2 + 2.2.5.RELEASE + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.data + spring-data-commons + + + org.springframework.boot + spring-boot-starter-test + test + + + 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 new file mode 100644 index 000000000000..9eb95c97b891 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,271 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Pet", description = "the Pet API") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = "application/json" + ) + ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = "application/json" + ) + ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status, + final org.springframework.data.domain.Pageable pageable + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = "application/json" + ) + ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags, + final org.springframework.data.domain.Pageable pageable + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = "application/json" + ) + ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = "application/json" + ) + ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = "application/x-www-form-urlencoded" + ) + ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @RequestParam(value="name", required=false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @RequestParam(value="status", required=false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = "application/json", + consumes = "multipart/form-data" + ) + ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestParam("file") MultipartFile file + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApiClient.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApiClient.java new file mode 100644 index 000000000000..f80fe4ddc678 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApiClient.java @@ -0,0 +1,8 @@ +package org.openapitools.api; + +import org.springframework.cloud.openfeign.FeignClient; +import org.openapitools.configuration.ClientConfiguration; + +@FeignClient(name="${pet.name:pet}", url="${pet.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +public interface PetApiClient extends PetApi { +} 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 new file mode 100644 index 000000000000..a11117a8c9fa --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,139 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Store", description = "the Store API") +public interface StoreApi { + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + ResponseEntity deleteOrder( + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("orderId") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = "application/json" + ) + ResponseEntity> getInventory( + + ); + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = "application/json" + ) + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("orderId") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = "application/json" + ) + ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApiClient.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApiClient.java new file mode 100644 index 000000000000..71d613a871dd --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApiClient.java @@ -0,0 +1,8 @@ +package org.openapitools.api; + +import org.springframework.cloud.openfeign.FeignClient; +import org.openapitools.configuration.ClientConfiguration; + +@FeignClient(name="${store.name:store}", url="${store.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +public interface StoreApiClient extends StoreApi { +} 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 new file mode 100644 index 000000000000..f583fb099e73 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,251 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "User", description = "the User API") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = "application/json" + ) + ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = "application/json" + ) + ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + ResponseEntity logoutUser( + + ); + + + /** + * OPTIONS /user/logout : logoutUserOptions + * + * @return endpoint configuration response (status code 200) + */ + @Operation( + summary = "logoutUserOptions", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "endpoint configuration response") + } + ) + @RequestMapping( + method = RequestMethod.OPTIONS, + value = "/user/logout" + ) + ResponseEntity logoutUserOptions( + + ); + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApiClient.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApiClient.java new file mode 100644 index 000000000000..1db4598108db --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApiClient.java @@ -0,0 +1,8 @@ +package org.openapitools.api; + +import org.springframework.cloud.openfeign.FeignClient; +import org.openapitools.configuration.ClientConfiguration; + +@FeignClient(name="${user.name:user}", url="${user.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +public interface UserApiClient extends UserApi { +} diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java new file mode 100644 index 000000000000..199278dcb539 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java @@ -0,0 +1,31 @@ +package org.openapitools.configuration; + +import feign.RequestInterceptor; +import feign.RequestTemplate; +import feign.Util; + + +public class ApiKeyRequestInterceptor implements RequestInterceptor { + private final String location; + private final String name; + private String value; + + public ApiKeyRequestInterceptor(String location, String name, String value) { + Util.checkNotNull(location, "location", new Object[0]); + Util.checkNotNull(name, "name", new Object[0]); + Util.checkNotNull(value, "value", new Object[0]); + this.location = location; + this.name = name; + this.value = value; + } + + @Override + public void apply(RequestTemplate requestTemplate) { + if(location.equals("header")) { + requestTemplate.header(name, value); + } else if(location.equals("query")) { + requestTemplate.query(name, value); + } + } + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/configuration/ClientConfiguration.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/configuration/ClientConfiguration.java new file mode 100644 index 000000000000..4a28661290d9 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/configuration/ClientConfiguration.java @@ -0,0 +1,48 @@ +package org.openapitools.configuration; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.cloud.openfeign.security.OAuth2FeignRequestInterceptor; +import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext; +import org.springframework.security.oauth2.client.OAuth2ClientContext; +import org.springframework.security.oauth2.client.token.grant.implicit.ImplicitResourceDetails; + +@Configuration +@EnableConfigurationProperties +public class ClientConfiguration { + + @Value("${openapipetstore.security.apiKey.key:}") + private String apiKeyKey; + + @Bean + @ConditionalOnProperty(name = "openapipetstore.security.apiKey.key") + public ApiKeyRequestInterceptor apiKeyRequestInterceptor() { + return new ApiKeyRequestInterceptor("header", "api_key", this.apiKeyKey); + } + + @Bean + @ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id") + public OAuth2FeignRequestInterceptor petstoreAuthRequestInterceptor(OAuth2ClientContext oAuth2ClientContext) { + return new OAuth2FeignRequestInterceptor(oAuth2ClientContext, petstoreAuthResourceDetails()); + } + + @Bean + @ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id") + public OAuth2ClientContext oAuth2ClientContext() { + return new DefaultOAuth2ClientContext(); + } + + @Bean + @ConditionalOnProperty("openapipetstore.security.petstoreAuth.client-id") + @ConfigurationProperties("openapipetstore.security.petstoreAuth") + public ImplicitResourceDetails petstoreAuthResourceDetails() { + ImplicitResourceDetails details = new ImplicitResourceDetails(); + details.setUserAuthorizationUri("http://petstore.swagger.io/api/oauth/dialog"); + return details; + } + +} diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..cb69c674a1e4 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A category for a pet + */ +@Schema(name = "Category",description = "A category for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..0ef610e38f01 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,134 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Describes the result of uploading an image resource + */ +@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..528598b79ea7 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,250 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * An order for a pets from the pet store + */ +@Schema(name = "Order",description = "An order for a pets from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..7c2986fea846 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,270 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A pet for sale in the pet store + */ +@Schema(name = "Pet",description = "A pet for sale in the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + 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 + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + 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 + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..27166f687a27 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A tag for a pet + */ +@Schema(name = "Tag",description = "A tag for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..ba24f681c1df --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,259 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A User who is purchasing from the pet store + */ +@Schema(name = "User",description = "A User who is purchasing from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud/.openapi-generator-ignore b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/.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/openapi3/client/petstore/spring-cloud/.openapi-generator/FILES b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/FILES new file mode 100644 index 000000000000..5e5e7f604560 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/FILES @@ -0,0 +1,11 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java diff --git a/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud/README.md b/samples/openapi3/client/petstore/spring-cloud/README.md new file mode 100644 index 000000000000..a462be951ace --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/README.md @@ -0,0 +1,26 @@ +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/samples/openapi3/client/petstore/spring-cloud/pom.xml b/samples/openapi3/client/petstore/spring-cloud/pom.xml new file mode 100644 index 000000000000..6cf023f501f2 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/pom.xml @@ -0,0 +1,79 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-cloud-oas3 + jar + spring-cloud-oas3 + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.2 + + + src/main/java + + + + + + org.springframework.cloud + spring-cloud-starter-parent + 2021.0.0 + pom + import + + + + + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-starter-oauth2 + 2.2.5.RELEASE + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.data + spring-data-commons + + + org.springframework.boot + spring-boot-starter-test + test + + + 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 new file mode 100644 index 000000000000..90dfd2c5f8e9 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,275 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Pet", description = "the Pet API") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + produces = "application/json", + consumes = "application/json" + ) + ResponseEntity addPet( + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet pet + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = "application/json" + ) + ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = "application/json" + ) + ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = "application/json" + ) + ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + produces = "application/json", + consumes = "application/json" + ) + ResponseEntity updatePet( + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet pet + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = "application/x-www-form-urlencoded" + ) + ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @RequestParam(value="name", required=false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @RequestParam(value="status", required=false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = "application/json", + consumes = "multipart/form-data" + ) + ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestParam("file") MultipartFile file + ); + +} 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 new file mode 100644 index 000000000000..c42b27e3a5b8 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,140 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Store", description = "the Store API") +public interface StoreApi { + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + ResponseEntity deleteOrder( + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("orderId") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = "application/json" + ) + ResponseEntity> getInventory( + + ); + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = "application/json" + ) + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("orderId") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * @param order order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = "application/json", + consumes = "application/json" + ) + ResponseEntity placeOrder( + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order order + ); + +} 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 new file mode 100644 index 000000000000..5b0522ee7758 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,252 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "User", description = "the User API") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param user Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user", + consumes = "application/json" + ) + ResponseEntity createUser( + @Parameter(name = "User", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User user + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray", + consumes = "application/json" + ) + ResponseEntity createUsersWithArrayInput( + @Parameter(name = "User", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List user + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList", + consumes = "application/json" + ) + ResponseEntity createUsersWithListInput( + @Parameter(name = "User", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List user + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = "application/json" + ) + ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = "application/json" + ) + ResponseEntity loginUser( + @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + ResponseEntity logoutUser( + + ); + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}", + consumes = "application/json" + ) + ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "User", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User user + ); + +} diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..463de0ed39a3 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A category for a pet + */ +@Schema(name = "Category",description = "A category for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + +@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + 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/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..0ef610e38f01 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,134 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Describes the result of uploading an image resource + */ +@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..528598b79ea7 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,250 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * An order for a pets from the pet store + */ +@Schema(name = "Order",description = "An order for a pets from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..7c2986fea846 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,270 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A pet for sale in the pet store + */ +@Schema(name = "Pet",description = "A pet for sale in the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + 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 + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + 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 + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..27166f687a27 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A tag for a pet + */ +@Schema(name = "Tag",description = "A tag for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..ba24f681c1df --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,259 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A User who is purchasing from the pet store + */ +@Schema(name = "User",description = "A User who is purchasing from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator-ignore b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.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/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES new file mode 100644 index 000000000000..0616dc9030d3 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES @@ -0,0 +1,68 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenAPI2SpringBoot.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/AnotherFakeApiController.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeApiController.java +src/main/java/org/openapitools/api/FakeClassnameTestApi.java +src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiController.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiController.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiController.java +src/main/java/org/openapitools/configuration/CustomInstantDeserializer.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/configuration/JacksonConfiguration.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +src/main/java/org/openapitools/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/model/Animal.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayTest.java +src/main/java/org/openapitools/model/BigCat.java +src/main/java/org/openapitools/model/BigCatAllOf.java +src/main/java/org/openapitools/model/Capitalization.java +src/main/java/org/openapitools/model/Cat.java +src/main/java/org/openapitools/model/CatAllOf.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ClassModel.java +src/main/java/org/openapitools/model/Client.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/DogAllOf.java +src/main/java/org/openapitools/model/EnumArrays.java +src/main/java/org/openapitools/model/EnumClass.java +src/main/java/org/openapitools/model/EnumTest.java +src/main/java/org/openapitools/model/FileSchemaTestClass.java +src/main/java/org/openapitools/model/FormatTest.java +src/main/java/org/openapitools/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/model/MapTest.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/model/Model200Response.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/ModelReturn.java +src/main/java/org/openapitools/model/Name.java +src/main/java/org/openapitools/model/NumberOnly.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/OuterComposite.java +src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/ReadOnlyFirst.java +src/main/java/org/openapitools/model/SpecialModelName.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/TypeHolderDefault.java +src/main/java/org/openapitools/model/TypeHolderExample.java +src/main/java/org/openapitools/model/User.java +src/main/java/org/openapitools/model/XmlItem.java +src/main/resources/application.properties +src/main/resources/openapi.yaml diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/README.md b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/README.md new file mode 100644 index 000000000000..befc961488ae --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/README.md @@ -0,0 +1,16 @@ +# OpenAPI generated server + +Spring Boot Server + + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:80/ + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml new file mode 100644 index 000000000000..737d7740cd59 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml @@ -0,0 +1,67 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-boot-beanvalidation-no-nullable + jar + spring-boot-beanvalidation-no-nullable + 1.0.0 + + 1.7 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.github.joschi.jackson + jackson-datatype-threetenbp + 2.9.10 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/OpenAPI2SpringBoot.java new file mode 100644 index 000000000000..8f6282c8d10f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -0,0 +1,59 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebMvcConfigurer webConfigurer() { + return new WebMvcConfigurerAdapter() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); + } + }; + } + + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +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.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(); + } + + @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 this; + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..81ca2e8ee07c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,55 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "another-fake", description = "the another-fake API") +public interface AnotherFakeApi { + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test special tags", + tags = { "$another-fake?" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/another-fake/dummy", + produces = { "application/json" }, + consumes = { "application/json" } + ) + ResponseEntity call123testSpecialTags( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ); + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java new file mode 100644 index 000000000000..7968826328d7 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -0,0 +1,63 @@ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class AnotherFakeApiController implements AnotherFakeApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public AnotherFakeApiController(NativeWebRequest request) { + this.request = request; + } + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see AnotherFakeApi#call123testSpecialTags + */ + public ResponseEntity call123testSpecialTags( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} 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 new file mode 100644 index 000000000000..d634215d030b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,471 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import org.threeten.bp.LocalDate; +import java.util.Map; +import org.openapitools.model.ModelApiResponse; +import org.threeten.bp.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake", description = "the fake API") +public interface FakeApi { + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "creates an XmlItem", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/create_xml_item", + consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } + ) + ResponseEntity createXmlItem( + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody XmlItem xmlItem + ); + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/boolean", + produces = { "*/*" } + ) + ResponseEntity fakeOuterBooleanSerialize( + @Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Boolean body + ); + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/composite", + produces = { "*/*" } + ) + ResponseEntity fakeOuterCompositeSerialize( + @Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) OuterComposite body + ); + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/number", + produces = { "*/*" } + ) + ResponseEntity fakeOuterNumberSerialize( + @Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) BigDecimal body + ); + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/string", + produces = { "*/*" } + ) + ResponseEntity fakeOuterStringSerialize( + @Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) String body + ); + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-file-schema", + consumes = { "application/json" } + ) + ResponseEntity testBodyWithFileSchema( + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody FileSchemaTestClass body + ); + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-query-params", + consumes = { "application/json" } + ) + ResponseEntity testBodyWithQueryParams( + @NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query, + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test \"client\" model", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake", + produces = { "application/json" }, + consumes = { "application/json" } + ) + ResponseEntity testClientModel( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ); + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "http_basic_test") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + ResponseEntity testEndpointParameters( + @Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "double", required = true) Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "integer", required = false) Integer integer, + @Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int32", required = false) Integer int32, + @Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, + @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, + @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, + @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback + ); + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @Operation( + summary = "To test enum parameters", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid request"), + @ApiResponse(responseCode = "404", description = "Not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + ResponseEntity testEnumParameters( + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ); + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Someting wrong (status code 400) + */ + @Operation( + summary = "Fake endpoint to test group parameters (optional)", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Someting wrong") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/fake" + ) + ResponseEntity testGroupParameters( + @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ); + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test inline additionalProperties", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/inline-additionalProperties", + consumes = { "application/json" } + ) + ResponseEntity testInlineAdditionalProperties( + @Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Map param + ); + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test json serialization of form data", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake/jsonFormData", + consumes = { "application/x-www-form-urlencoded" } + ) + ResponseEntity testJsonFormData( + @Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param", required = true) String param, + @Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param2", required = true) String param2 + ); + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/test-query-parameters" + ) + ResponseEntity testQueryParameterCollectionFormat( + @NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List context + ); + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image (required)", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + ResponseEntity uploadFileWithRequiredFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ); + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java new file mode 100644 index 000000000000..362ff5ff5e3a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -0,0 +1,360 @@ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import org.threeten.bp.LocalDate; +import java.util.Map; +import org.openapitools.model.ModelApiResponse; +import org.threeten.bp.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeApiController implements FakeApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public FakeApiController(NativeWebRequest request) { + this.request = request; + } + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + * @see FakeApi#createXmlItem + */ + public ResponseEntity createXmlItem( + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody XmlItem xmlItem + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + * @see FakeApi#fakeOuterBooleanSerialize + */ + public ResponseEntity fakeOuterBooleanSerialize( + @Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Boolean body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + * @see FakeApi#fakeOuterCompositeSerialize + */ + public ResponseEntity fakeOuterCompositeSerialize( + @Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) OuterComposite body + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; + ApiUtil.setExampleResponse(request, "*/*", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + * @see FakeApi#fakeOuterNumberSerialize + */ + public ResponseEntity fakeOuterNumberSerialize( + @Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) BigDecimal body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + * @see FakeApi#fakeOuterStringSerialize + */ + public ResponseEntity fakeOuterStringSerialize( + @Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) String body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + * @see FakeApi#testBodyWithFileSchema + */ + public ResponseEntity testBodyWithFileSchema( + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody FileSchemaTestClass body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + * @see FakeApi#testBodyWithQueryParams + */ + public ResponseEntity testBodyWithQueryParams( + @NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query, + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see FakeApi#testClientModel + */ + public ResponseEntity testClientModel( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see FakeApi#testEndpointParameters + */ + public ResponseEntity testEndpointParameters( + @Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "double", required = true) Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "integer", required = false) Integer integer, + @Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int32", required = false) Integer int32, + @Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, + @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, + @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, + @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + * @see FakeApi#testEnumParameters + */ + public ResponseEntity testEnumParameters( + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Someting wrong (status code 400) + * @see FakeApi#testGroupParameters + */ + public ResponseEntity testGroupParameters( + @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + * @see FakeApi#testInlineAdditionalProperties + */ + public ResponseEntity testInlineAdditionalProperties( + @Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Map param + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + * @see FakeApi#testJsonFormData + */ + public ResponseEntity testJsonFormData( + @Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param", required = true) String param, + @Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + * @see FakeApi#testQueryParameterCollectionFormat + */ + public ResponseEntity testQueryParameterCollectionFormat( + @NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List context + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + * @see FakeApi#uploadFileWithRequiredFile + */ + public ResponseEntity uploadFileWithRequiredFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..5f640ca78deb --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -0,0 +1,58 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake_classname_test", description = "the fake_classname_test API") +public interface FakeClassnameTestApi { + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test class name in snake case", + tags = { "fake_classname_tags 123#$%^" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + }, + security = { + @SecurityRequirement(name = "api_key_query") + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake_classname_test", + produces = { "application/json" }, + consumes = { "application/json" } + ) + ResponseEntity testClassname( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ); + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java new file mode 100644 index 000000000000..1f416d5ab25f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -0,0 +1,63 @@ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeClassnameTestApiController implements FakeClassnameTestApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public FakeClassnameTestApiController(NativeWebRequest request) { + this.request = request; + } + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see FakeClassnameTestApi#testClassname + */ + public ResponseEntity testClassname( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..d4cbbab6f7b1 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,272 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = { "application/xml", "application/json" } + ) + ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = { "application/xml", "application/json" } + ) + ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set tags + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = { "application/xml", "application/json" } + ) + ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = { "application/x-www-form-urlencoded" } + ) + ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ); + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java new file mode 100644 index 000000000000..47d4ffcdb9d9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -0,0 +1,221 @@ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class PetApiController implements PetApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public PetApiController(NativeWebRequest request) { + this.request = request; + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + * @see PetApi#addPet + */ + public ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + * @see PetApi#deletePet + */ + public ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + * @see PetApi#findPetsByStatus + */ + public ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + * @see PetApi#findPetsByTags + */ + public ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * @see PetApi#getPetById + */ + public ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + * @see PetApi#updatePet + */ + public ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + * @see PetApi#updatePetWithForm + */ + public ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + * @see PetApi#uploadFile + */ + public ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..26389c13ef58 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,135 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{order_id}" + ) + ResponseEntity deleteOrder( + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = { "application/json" } + ) + ResponseEntity> getInventory( + + ); + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{order_id}", + produces = { "application/xml", "application/json" } + ) + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = { "application/xml", "application/json" } + ) + ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ); + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java new file mode 100644 index 000000000000..91b88d0652f3 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -0,0 +1,128 @@ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class StoreApiController implements StoreApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public StoreApiController(NativeWebRequest request) { + this.request = request; + } + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + * @see StoreApi#deleteOrder + */ + public ResponseEntity deleteOrder( + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + * @see StoreApi#getInventory + */ + public ResponseEntity> getInventory( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + * @see StoreApi#getOrderById + */ + public ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + * @see StoreApi#placeOrder + */ + public ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..3cdc6eeed919 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,226 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import org.threeten.bp.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = { "application/xml", "application/json" } + ) + ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = { "application/xml", "application/json" } + ) + ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + ResponseEntity logoutUser( + + ); + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ); + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java new file mode 100644 index 000000000000..c77024353b9c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -0,0 +1,178 @@ +package org.openapitools.api; + +import java.util.List; +import org.threeten.bp.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class UserApiController implements UserApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public UserApiController(NativeWebRequest request) { + this.request = request; + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUser + */ + public ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUsersWithArrayInput + */ + public ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUsersWithListInput + */ + public ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#deleteUser + */ + public ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#getUserByName + */ + public ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + * @see UserApi#loginUser + */ + public ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + * @see UserApi#logoutUser + */ + public ResponseEntity logoutUser( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#updateUser + */ + public ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/CustomInstantDeserializer.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/CustomInstantDeserializer.java new file mode 100644 index 000000000000..8f936b311447 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/CustomInstantDeserializer.java @@ -0,0 +1,232 @@ +package org.openapitools.configuration; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonTokenId; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; +import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; +import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; +import com.fasterxml.jackson.datatype.threetenbp.function.Function; +import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; +import org.threeten.bp.Instant; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.ZoneId; +import org.threeten.bp.ZonedDateTime; +import org.threeten.bp.format.DateTimeFormatter; +import org.threeten.bp.temporal.Temporal; +import org.threeten.bp.temporal.TemporalAccessor; + +import java.io.IOException; +import java.math.BigDecimal; + +/** + * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s. + * Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format. + * + * @author Nick Williams + */ +public class CustomInstantDeserializer + extends ThreeTenDateTimeDeserializerBase { + private static final long serialVersionUID = 1L; + + public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer( + Instant.class, DateTimeFormatter.ISO_INSTANT, + new Function() { + @Override + public Instant apply(TemporalAccessor temporalAccessor) { + return Instant.from(temporalAccessor); + } + }, + new Function() { + @Override + public Instant apply(FromIntegerArguments a) { + return Instant.ofEpochMilli(a.value); + } + }, + new Function() { + @Override + public Instant apply(FromDecimalArguments a) { + return Instant.ofEpochSecond(a.integer, a.fraction); + } + }, + null + ); + + public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer( + OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, + new Function() { + @Override + public OffsetDateTime apply(TemporalAccessor temporalAccessor) { + return OffsetDateTime.from(temporalAccessor); + } + }, + new Function() { + @Override + public OffsetDateTime apply(FromIntegerArguments a) { + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); + } + }, + new Function() { + @Override + public OffsetDateTime apply(FromDecimalArguments a) { + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); + } + }, + new BiFunction() { + @Override + public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { + return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); + } + } + ); + + public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer( + ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, + new Function() { + @Override + public ZonedDateTime apply(TemporalAccessor temporalAccessor) { + return ZonedDateTime.from(temporalAccessor); + } + }, + new Function() { + @Override + public ZonedDateTime apply(FromIntegerArguments a) { + return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); + } + }, + new Function() { + @Override + public ZonedDateTime apply(FromDecimalArguments a) { + return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); + } + }, + new BiFunction() { + @Override + public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { + return zonedDateTime.withZoneSameInstant(zoneId); + } + } + ); + + protected final Function fromMilliseconds; + + protected final Function fromNanoseconds; + + protected final Function parsedToValue; + + protected final BiFunction adjust; + + protected CustomInstantDeserializer(Class supportedType, + DateTimeFormatter parser, + Function parsedToValue, + Function fromMilliseconds, + Function fromNanoseconds, + BiFunction adjust) { + super(supportedType, parser); + this.parsedToValue = parsedToValue; + this.fromMilliseconds = fromMilliseconds; + this.fromNanoseconds = fromNanoseconds; + this.adjust = adjust == null ? new BiFunction() { + @Override + public T apply(T t, ZoneId zoneId) { + return t; + } + } : adjust; + } + + @SuppressWarnings("unchecked") + protected CustomInstantDeserializer(CustomInstantDeserializer base, DateTimeFormatter f) { + super((Class) base.handledType(), f); + parsedToValue = base.parsedToValue; + fromMilliseconds = base.fromMilliseconds; + fromNanoseconds = base.fromNanoseconds; + adjust = base.adjust; + } + + @Override + protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) { + if (dtf == _formatter) { + return this; + } + return new CustomInstantDeserializer(this, dtf); + } + + @Override + public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { + //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only + //string values have to be adjusted to the configured TZ. + switch (parser.getCurrentTokenId()) { + case JsonTokenId.ID_NUMBER_FLOAT: { + BigDecimal value = parser.getDecimalValue(); + long seconds = value.longValue(); + int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); + return fromNanoseconds.apply(new FromDecimalArguments( + seconds, nanoseconds, getZone(context))); + } + + case JsonTokenId.ID_NUMBER_INT: { + long timestamp = parser.getLongValue(); + if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) { + return this.fromNanoseconds.apply(new FromDecimalArguments( + timestamp, 0, this.getZone(context) + )); + } + return this.fromMilliseconds.apply(new FromIntegerArguments( + timestamp, this.getZone(context) + )); + } + + case JsonTokenId.ID_STRING: { + String string = parser.getText().trim(); + if (string.length() == 0) { + return null; + } + if (string.endsWith("+0000")) { + string = string.substring(0, string.length() - 5) + "Z"; + } + T value; + try { + TemporalAccessor acc = _formatter.parse(string); + value = parsedToValue.apply(acc); + if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) { + return adjust.apply(value, this.getZone(context)); + } + } catch (DateTimeException e) { + throw _peelDTE(e); + } + return value; + } + } + throw context.mappingException("Expected type float, integer, or string."); + } + + private ZoneId getZone(DeserializationContext context) { + // Instants are always in UTC, so don't waste compute cycles + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); + } + + private static class FromIntegerArguments { + public final long value; + public final ZoneId zoneId; + + private FromIntegerArguments(long value, ZoneId zoneId) { + this.value = value; + this.zoneId = zoneId; + } + } + + private static class FromDecimalArguments { + public final long integer; + public final int fraction; + public final ZoneId zoneId; + + private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) { + this.integer = integer; + this.fraction = fraction; + this.zoneId = zoneId; + } + } +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..34bae16b8986 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,53 @@ +package org.openapitools.configuration; + +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Controller; +import org.springframework.util.StreamUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + private static YAMLMapper yamlMapper = new YAMLMapper(); + + @Value("classpath:/openapi.yaml") + private Resource openapi; + + @Bean + public String openapiContent() throws IOException { + try(InputStream is = openapi.getInputStream()) { + return StreamUtils.copyToString(is, Charset.defaultCharset()); + } + } + + @GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi") + @ResponseBody + public String openapiYaml() throws IOException { + return openapiContent(); + } + + @GetMapping(value = "/openapi.json", produces = "application/json") + @ResponseBody + public Object openapiJson() throws IOException { + return yamlMapper.readValue(openapiContent(), Object.class); + } + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui/index.html?url=../openapi.json"; + } + + +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/JacksonConfiguration.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/JacksonConfiguration.java new file mode 100644 index 000000000000..b481a87518f4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/JacksonConfiguration.java @@ -0,0 +1,23 @@ +package org.openapitools.configuration; + +import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.threeten.bp.Instant; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.ZonedDateTime; + +@Configuration +public class JacksonConfiguration { + + @Bean + @ConditionalOnMissingBean(ThreeTenModule.class) + ThreeTenModule threeTenModule() { + ThreeTenModule module = new ThreeTenModule(); + module.addDeserializer(Instant.class, CustomInstantDeserializer.INSTANT); + module.addDeserializer(OffsetDateTime.class, CustomInstantDeserializer.OFFSET_DATE_TIME); + module.addDeserializer(ZonedDateTime.class, CustomInstantDeserializer.ZONED_DATE_TIME); + return module; + } +} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..70f6bb0d1c47 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesAnyType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesAnyType name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..ceb28401cd5e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesArray + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesArray name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..9455c14cd5fd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesBoolean + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesBoolean name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..69e4ba3737e9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,412 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesClass { + @JsonProperty("map_string") + @Valid + private Map mapString = null; + + @JsonProperty("map_number") + @Valid + private Map mapNumber = null; + + @JsonProperty("map_integer") + @Valid + private Map mapInteger = null; + + @JsonProperty("map_boolean") + @Valid + private Map mapBoolean = null; + + @JsonProperty("map_array_integer") + @Valid + private Map> mapArrayInteger = null; + + @JsonProperty("map_array_anytype") + @Valid + private Map> mapArrayAnytype = null; + + @JsonProperty("map_map_string") + @Valid + private Map> mapMapString = null; + + @JsonProperty("map_map_anytype") + @Valid + private Map> mapMapAnytype = null; + + @JsonProperty("anytype_1") + private Object anytype1; + + @JsonProperty("anytype_2") + private Object anytype2; + + @JsonProperty("anytype_3") + private Object anytype3; + + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + @Schema(name = "mapString", defaultValue = "") + + + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + @Schema(name = "mapNumber", defaultValue = "") + + @Valid + + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + @Schema(name = "mapInteger", defaultValue = "") + + + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + @Schema(name = "mapBoolean", defaultValue = "") + + + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + @Schema(name = "mapArrayInteger", defaultValue = "") + + @Valid + + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + @Schema(name = "mapArrayAnytype", defaultValue = "") + + @Valid + + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + @Schema(name = "mapMapString", defaultValue = "") + + @Valid + + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + @Schema(name = "mapMapAnytype", defaultValue = "") + + @Valid + + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + @Schema(name = "anytype1", defaultValue = "") + + + public Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = anytype2; + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + @Schema(name = "anytype2", defaultValue = "") + + + public Object getAnytype2() { + return anytype2; + } + + public void setAnytype2(Object anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClass anytype3(Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + @Schema(name = "anytype3", defaultValue = "") + + + public Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..fb06ae322e26 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesInteger + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesInteger name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..71868e473357 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesNumber + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesNumber name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..75db554b3295 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..aa62e4fbb2ea --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesString + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesString name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java new file mode 100644 index 000000000000..26eeb264a74d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -0,0 +1,116 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +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 javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Animal + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), +}) + +public class Animal { + @JsonProperty("className") + private String className; + + @JsonProperty("color") + private String color = "red"; + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @Schema(name = "className", required = true, defaultValue = "") + @NotNull + + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + @Schema(name = "color", defaultValue = "") + + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..436750d2ef67 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,94 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") + @Valid + private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + @Schema(name = "arrayArrayNumber", defaultValue = "") + + @Valid + + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..da9c15f73dd1 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,94 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") + @Valid + private List arrayNumber = null; + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + @Schema(name = "arrayNumber", defaultValue = "") + + @Valid + + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 000000000000..6e995d00cb8d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,163 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayTest { + @JsonProperty("array_of_string") + @Valid + private List arrayOfString = null; + + @JsonProperty("array_array_of_integer") + @Valid + private List> arrayArrayOfInteger = null; + + @JsonProperty("array_array_of_model") + @Valid + private List> arrayArrayOfModel = null; + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + @Schema(name = "arrayOfString", defaultValue = "") + + + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + @Schema(name = "arrayArrayOfInteger", defaultValue = "") + + @Valid + + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + @Schema(name = "arrayArrayOfModel", defaultValue = "") + + @Valid + + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java new file mode 100644 index 000000000000..1ca8388a6ce4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,124 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.BigCatAllOf; +import org.openapitools.model.Cat; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCat extends Cat { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java new file mode 100644 index 000000000000..f39298398eb9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -0,0 +1,121 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCatAllOf { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCatAllOf kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatAllOf bigCatAllOf = (BigCatAllOf) o; + return Objects.equals(this.kind, bigCatAllOf.kind); + } + + @Override + public int hashCode() { + return Objects.hash(kind); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java new file mode 100644 index 000000000000..ac4b97258888 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,206 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Capitalization + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Capitalization { + @JsonProperty("smallCamel") + private String smallCamel; + + @JsonProperty("CapitalCamel") + private String capitalCamel; + + @JsonProperty("small_Snake") + private String smallSnake; + + @JsonProperty("Capital_Snake") + private String capitalSnake; + + @JsonProperty("SCA_ETH_Flow_Points") + private String scAETHFlowPoints; + + @JsonProperty("ATT_NAME") + private String ATT_NAME; + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + @Schema(name = "smallCamel", defaultValue = "") + + + public String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + @Schema(name = "capitalCamel", defaultValue = "") + + + public String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + @Schema(name = "smallSnake", defaultValue = "") + + + public String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + @Schema(name = "capitalSnake", defaultValue = "") + + + public String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + @Schema(name = "scAETHFlowPoints", defaultValue = "") + + + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") + + + public String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java new file mode 100644 index 000000000000..e41f36a626bd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.CatAllOf; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Cat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Cat extends Animal { + @JsonProperty("declawed") + private Boolean declawed; + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java new file mode 100644 index 000000000000..9bc555ab0007 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -0,0 +1,81 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * CatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class CatAllOf { + @JsonProperty("declawed") + private Boolean declawed; + + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); + } + + @Override + public int hashCode() { + return Objects.hash(declawed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..03a760ee3fd5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,107 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Category + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name = "default-name"; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + 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/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java new file mode 100644 index 000000000000..878a45986a82 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,82 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model with \"_class\" property + */ +@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ClassModel { + @JsonProperty("_class") + private String propertyClass; + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java new file mode 100644 index 000000000000..74b85fd28234 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,81 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Client { + @JsonProperty("client") + private String client; + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + @Schema(name = "client", defaultValue = "") + + + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..1dbce140c902 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.DogAllOf; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Dog + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Dog extends Animal { + @JsonProperty("breed") + private String breed; + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java new file mode 100644 index 000000000000..0af97ffbaf41 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -0,0 +1,81 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * DogAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class DogAllOf { + @JsonProperty("breed") + private String breed; + + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); + } + + @Override + public int hashCode() { + return Objects.hash(breed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 000000000000..ef006f92c684 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,188 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumArrays + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumArrays { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("just_symbol") + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("array_enum") + @Valid + private List arrayEnum = null; + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + @Schema(name = "justSymbol", defaultValue = "") + + + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + @Schema(name = "arrayEnum", defaultValue = "") + + + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java new file mode 100644 index 000000000000..f5edf59363ac --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,53 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java new file mode 100644 index 000000000000..f67ec5d041aa --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,329 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnum; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumTest { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string") + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string_required") + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_integer") + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_number") + private EnumNumberEnum enumNumber; + + @JsonProperty("outerEnum") + private OuterEnum outerEnum; + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + @Schema(name = "enumString", defaultValue = "") + + + public EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @Schema(name = "enumStringRequired", required = true, defaultValue = "") + @NotNull + + + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + @Schema(name = "enumInteger", defaultValue = "") + + + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + @Schema(name = "enumNumber", defaultValue = "") + + + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + @Schema(name = "outerEnum", defaultValue = "") + + @Valid + + public OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..2de2ee314c03 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,119 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FileSchemaTestClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FileSchemaTestClass { + @JsonProperty("file") + private java.io.File file; + + @JsonProperty("files") + @Valid + private List files = null; + + public FileSchemaTestClass file(java.io.File file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + @Schema(name = "file", defaultValue = "") + + @Valid + + public java.io.File getFile() { + return file; + } + + public void setFile(java.io.File file) { + this.file = file; + } + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + @Schema(name = "files", defaultValue = "") + + @Valid + + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java new file mode 100644 index 000000000000..e0203457d83b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,433 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FormatTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FormatTest { + @JsonProperty("integer") + private Integer integer; + + @JsonProperty("int32") + private Integer int32; + + @JsonProperty("int64") + private Long int64; + + @JsonProperty("number") + private BigDecimal number; + + @JsonProperty("float") + private Float _float; + + @JsonProperty("double") + private Double _double; + + @JsonProperty("string") + private String string; + + @JsonProperty("byte") + private byte[] _byte; + + @JsonProperty("binary") + private org.springframework.core.io.Resource binary; + + @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + private LocalDate date; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("password") + private String password; + + @JsonProperty("BigDecimal") + private BigDecimal bigDecimal; + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + @Schema(name = "integer", defaultValue = "") + +@Min(10) @Max(100) + public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + @Schema(name = "int32", defaultValue = "") + +@Min(20) @Max(200) + public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + @Schema(name = "int64", defaultValue = "") + + + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @Schema(name = "number", required = true, defaultValue = "") + @NotNull + + @Valid +@DecimalMin("32.1") @DecimalMax("543.2") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + @Schema(name = "_float", defaultValue = "") + +@DecimalMin("54.3") @DecimalMax("987.6") + public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + @Schema(name = "_double", defaultValue = "") + +@DecimalMin("67.8") @DecimalMax("123.4") + public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + @Schema(name = "string", defaultValue = "") + +@Pattern(regexp = "/[a-z]/i") + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @Schema(name = "_byte", required = true, defaultValue = "") + @NotNull + + + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + @Schema(name = "binary", defaultValue = "") + + @Valid + + public org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @Schema(name = "date", required = true, defaultValue = "") + @NotNull + + @Valid + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", required = true, defaultValue = "") + @NotNull + +@Size(min = 10, max = 64) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + @Schema(name = "bigDecimal", defaultValue = "") + + @Valid + + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..d2f0afa1d4ae --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * HasOnlyReadOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class HasOnlyReadOnly { + @JsonProperty("bar") + private String bar; + + @JsonProperty("foo") + private String foo; + + public HasOnlyReadOnly bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public HasOnlyReadOnly foo(String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + @Schema(name = "foo", readOnly = true, defaultValue = "") + + + public String getFoo() { + return foo; + } + + public void setFoo(String foo) { + this.foo = foo; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java new file mode 100644 index 000000000000..ed29ea575eef --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,232 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MapTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MapTest { + @JsonProperty("map_map_of_string") + @Valid + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("map_of_enum_string") + @Valid + private Map mapOfEnumString = null; + + @JsonProperty("direct_map") + @Valid + private Map directMap = null; + + @JsonProperty("indirect_map") + @Valid + private Map indirectMap = null; + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + @Schema(name = "mapMapOfString", defaultValue = "") + + @Valid + + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + @Schema(name = "mapOfEnumString", defaultValue = "") + + + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + @Schema(name = "directMap", defaultValue = "") + + + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + @Schema(name = "indirectMap", defaultValue = "") + + + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..e846cf63782d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,150 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import org.threeten.bp.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("map") + @Valid + private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + @Schema(name = "map", defaultValue = "") + + @Valid + + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java new file mode 100644 index 000000000000..8aa5b96e1dae --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,107 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name starting with number + */ +@Schema(name = "200_response",description = "Model for testing model name starting with number") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Model200Response { + @JsonProperty("name") + private Integer name; + + @JsonProperty("class") + private String propertyClass; + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..86af4aba24a0 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,131 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ModelApiResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java new file mode 100644 index 000000000000..06bc8e6627cf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -0,0 +1,82 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing reserved words + */ +@Schema(name = "Return",description = "Model for testing reserved words") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelReturn { + @JsonProperty("return") + private Integer _return; + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + @Schema(name = "_return", defaultValue = "") + + + public Integer getReturn() { + return _return; + } + + public void setReturn(Integer _return) { + this._return = _return; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java new file mode 100644 index 000000000000..5e755ef8dd18 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,158 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name same as property name + */ +@Schema(name = "Name",description = "Model for testing model name same as property name") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Name { + @JsonProperty("name") + private Integer name; + + @JsonProperty("snake_case") + private Integer snakeCase; + + @JsonProperty("property") + private String property; + + @JsonProperty("123Number") + private Integer _123number; + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Name snakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + @Schema(name = "snakeCase", readOnly = true, defaultValue = "") + + + public Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @Schema(name = "property", defaultValue = "") + + + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public Name _123number(Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + @Schema(name = "_123number", readOnly = true, defaultValue = "") + + + public Integer get123number() { + return _123number; + } + + public void set123number(Integer _123number) { + this._123number = _123number; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java new file mode 100644 index 000000000000..88b9009b1dc1 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * NumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class NumberOnly { + @JsonProperty("JustNumber") + private BigDecimal justNumber; + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + @Schema(name = "justNumber", defaultValue = "") + + @Valid + + public BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..5c9bb7ae7e4a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,247 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.threeten.bp.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Order + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 000000000000..cea0bf2f7578 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,133 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * OuterComposite + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OuterComposite { + @JsonProperty("my_number") + private BigDecimal myNumber; + + @JsonProperty("my_string") + private String myString; + + @JsonProperty("my_boolean") + private Boolean myBoolean; + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + @Schema(name = "myNumber", defaultValue = "") + + @Valid + + public BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + @Schema(name = "myString", defaultValue = "") + + + public String getMyString() { + return myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + @Schema(name = "myBoolean", defaultValue = "") + + + public Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 000000000000..72e7826828f3 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,53 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..9ca656bd9170 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,274 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private Set photoUrls = new LinkedHashSet(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..15b221c739be --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ReadOnlyFirst + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ReadOnlyFirst { + @JsonProperty("bar") + private String bar; + + @JsonProperty("baz") + private String baz; + + public ReadOnlyFirst bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + @Schema(name = "baz", defaultValue = "") + + + public String getBaz() { + return baz; + } + + public void setBaz(String baz) { + this.baz = baz; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 000000000000..56ced4dc6f0a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,81 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * SpecialModelName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class SpecialModelName { + @JsonProperty("$special[property.name]") + private Long $specialPropertyName; + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + @Schema(name = "$specialPropertyName", defaultValue = "") + + + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName $specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..f98b6a0b281d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Tag + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java new file mode 100644 index 000000000000..d346c36b80aa --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,199 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderDefault + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderDefault { + @JsonProperty("string_item") + private String stringItem = "what"; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem = true; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList(); + + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java new file mode 100644 index 000000000000..c62a0e4dc71f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,225 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderExample + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderExample { + @JsonProperty("string_item") + private String stringItem; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("float_item") + private Float floatItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList(); + + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..155bdf978d59 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,256 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * User + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java new file mode 100644 index 000000000000..9f829a1a26fe --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,870 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * XmlItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class XmlItem { + @JsonProperty("attribute_string") + private String attributeString; + + @JsonProperty("attribute_number") + private BigDecimal attributeNumber; + + @JsonProperty("attribute_integer") + private Integer attributeInteger; + + @JsonProperty("attribute_boolean") + private Boolean attributeBoolean; + + @JsonProperty("wrapped_array") + @Valid + private List wrappedArray = null; + + @JsonProperty("name_string") + private String nameString; + + @JsonProperty("name_number") + private BigDecimal nameNumber; + + @JsonProperty("name_integer") + private Integer nameInteger; + + @JsonProperty("name_boolean") + private Boolean nameBoolean; + + @JsonProperty("name_array") + @Valid + private List nameArray = null; + + @JsonProperty("name_wrapped_array") + @Valid + private List nameWrappedArray = null; + + @JsonProperty("prefix_string") + private String prefixString; + + @JsonProperty("prefix_number") + private BigDecimal prefixNumber; + + @JsonProperty("prefix_integer") + private Integer prefixInteger; + + @JsonProperty("prefix_boolean") + private Boolean prefixBoolean; + + @JsonProperty("prefix_array") + @Valid + private List prefixArray = null; + + @JsonProperty("prefix_wrapped_array") + @Valid + private List prefixWrappedArray = null; + + @JsonProperty("namespace_string") + private String namespaceString; + + @JsonProperty("namespace_number") + private BigDecimal namespaceNumber; + + @JsonProperty("namespace_integer") + private Integer namespaceInteger; + + @JsonProperty("namespace_boolean") + private Boolean namespaceBoolean; + + @JsonProperty("namespace_array") + @Valid + private List namespaceArray = null; + + @JsonProperty("namespace_wrapped_array") + @Valid + private List namespaceWrappedArray = null; + + @JsonProperty("prefix_ns_string") + private String prefixNsString; + + @JsonProperty("prefix_ns_number") + private BigDecimal prefixNsNumber; + + @JsonProperty("prefix_ns_integer") + private Integer prefixNsInteger; + + @JsonProperty("prefix_ns_boolean") + private Boolean prefixNsBoolean; + + @JsonProperty("prefix_ns_array") + @Valid + private List prefixNsArray = null; + + @JsonProperty("prefix_ns_wrapped_array") + @Valid + private List prefixNsWrappedArray = null; + + public XmlItem attributeString(String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + @Schema(name = "attributeString", example = "string", defaultValue = "") + + + public String getAttributeString() { + return attributeString; + } + + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + @Schema(name = "attributeInteger", example = "-2", defaultValue = "") + + + public Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + @Schema(name = "attributeBoolean", example = "true", defaultValue = "") + + + public Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + @Schema(name = "wrappedArray", defaultValue = "") + + + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + @Schema(name = "nameString", example = "string", defaultValue = "") + + + public String getNameString() { + return nameString; + } + + public void setNameString(String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + @Schema(name = "nameNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + @Schema(name = "nameInteger", example = "-2", defaultValue = "") + + + public Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + @Schema(name = "nameBoolean", example = "true", defaultValue = "") + + + public Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + @Schema(name = "nameArray", defaultValue = "") + + + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + @Schema(name = "nameWrappedArray", defaultValue = "") + + + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + @Schema(name = "prefixString", example = "string", defaultValue = "") + + + public String getPrefixString() { + return prefixString; + } + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + @Schema(name = "prefixInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + @Schema(name = "prefixBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + @Schema(name = "prefixArray", defaultValue = "") + + + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + @Schema(name = "prefixWrappedArray", defaultValue = "") + + + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + @Schema(name = "namespaceString", example = "string", defaultValue = "") + + + public String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") + + + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") + + + public Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + @Schema(name = "namespaceArray", defaultValue = "") + + + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + @Schema(name = "namespaceWrappedArray", defaultValue = "") + + + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + @Schema(name = "prefixNsString", example = "string", defaultValue = "") + + + public String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + @Schema(name = "prefixNsArray", defaultValue = "") + + + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + @Schema(name = "prefixNsWrappedArray", defaultValue = "") + + + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/application.properties b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/application.properties new file mode 100644 index 000000000000..9d06609db665 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=80 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false 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 new file mode 100644 index 000000000000..d6386dc39bf4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -0,0 +1,2264 @@ +openapi: 3.0.1 +info: + description: 'This spec is mainly for testing Petstore server and contains fake + endpoints, models. Please do not use this for any other purpose. Special characters: + " \' + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +servers: +- url: http://petstore.swagger.io:80/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + post: + operationId: addPet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + put: + operationId: updatePet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + "405": + content: {} + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + content: {} + description: Invalid status value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + uniqueItems: true + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + description: successful operation + "400": + content: {} + description: Invalid tag value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + responses: + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /store/order: + post: + operationId: placeOrder + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: store + /store/order/{order_id}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: order_id + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + in: path + name: order_id + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Find purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Create user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + in: query + name: username + required: true + schema: + type: string + - description: The password for login in clear text + in: query + name: password + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + format: int32 + type: integer + X-Expires-After: + description: date in UTC when token expires + schema: + format: date-time + type: string + "400": + content: {} + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/logout: + get: + operationId: logoutUser + responses: + default: + content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Delete user + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + in: path + name: username + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + content: {} + description: Invalid user supplied + "404": + content: {} + description: User not found + summary: Updated user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /fake_classname_test: + patch: + description: To test class name in snake case + operationId: testClassname + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + security: + - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake_classname_tags 123#$%^ + /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: Required String in group parameters + in: query + name: required_string_group + required: true + schema: + type: integer + - description: Required Boolean in group parameters + in: header + name: required_boolean_group + required: true + schema: + type: boolean + - description: Required Integer in group parameters + in: query + name: required_int64_group + required: true + schema: + format: int64 + type: integer + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + "400": + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-accepts: application/json + x-tags: + - tag: fake + get: + description: To test enum parameters + operationId: testEnumParameters + parameters: + - description: Header parameter enum test (string array) + explode: false + in: header + name: enum_header_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: simple + - description: Header parameter enum test (string) + in: header + name: enum_header_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (string array) + explode: false + in: query + name: enum_query_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: form + - description: Query parameter enum test (string) + in: query + name: enum_query_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (double) + in: query + name: enum_query_integer + schema: + enum: + - 1 + - -2 + format: int32 + type: integer + - description: Query parameter enum test (double) + in: query + name: enum_query_double + schema: + enum: + - 1.1 + - -1.2 + format: double + type: number + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string + responses: + "400": + content: {} + description: Invalid request + "404": + content: {} + description: Not found + summary: To test enum parameters + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + post: + description: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + integer: + description: None + format: int32 + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + required: true + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + security: + - http_basic_test: [] + summary: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/outer/number: + post: + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Output number + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/string: + post: + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Output string + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/boolean: + post: + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Output boolean + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/composite: + post: + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Output composite + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/jsonFormData: + get: + operationId: testJsonFormData + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + required: true + responses: + "200": + content: {} + description: successful operation + summary: test json serialization of form data + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/inline-additionalProperties: + post: + operationId: testInlineAdditionalProperties + requestBody: + content: + application/json: + schema: + additionalProperties: + type: string + type: object + description: request body + required: true + responses: + "200": + content: {} + description: successful operation + summary: test inline additionalProperties + tags: + - fake + x-codegen-request-body-name: param + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - in: query + name: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/create_xml_item: + post: + description: this route creates an XmlItem + operationId: createXmlItem + requestBody: + content: + application/xml: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + description: XmlItem Body + required: true + responses: + "200": + content: {} + description: successful operation + summary: creates an XmlItem + tags: + - fake + x-codegen-request-body-name: XmlItem + x-contentType: application/xml + x-accepts: application/json + x-tags: + - tag: fake + /another-fake/dummy: + patch: + description: To test special tags and operation ID starting with number + operationId: 123_test_@#$%_special_tags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: $another-fake? + /fake/body-with-file-schema: + put: + description: For this test, the body for this request much reference a schema + named `File`. + operationId: testBodyWithFileSchema + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/test-query-parameters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: false + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + - in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: {} + description: Success + tags: + - fake + x-accepts: application/json + x-tags: + - tag: fake + /fake/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image (required) + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet +components: + schemas: + Order: + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + type: object + xml: + name: Order + Category: + example: + name: default-name + id: 6 + properties: + id: + format: int64 + type: integer + name: + default: default-name + type: string + required: + - name + type: object + xml: + name: Category + User: + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + type: object + xml: + name: User + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: default-name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + uniqueItems: true + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + ApiResponse: + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + type: object + $special[model.name]: + properties: + $special[property.name]: + format: int64 + type: integer + type: object + xml: + name: $special[model.name] + Return: + description: Model for testing reserved words + properties: + return: + format: int32 + type: integer + type: object + xml: + name: Return + Name: + description: Model for testing model name same as property name + properties: + name: + format: int32 + type: integer + snake_case: + format: int32 + readOnly: true + type: integer + property: + type: string + "123Number": + readOnly: true + type: integer + required: + - name + type: object + xml: + name: Name + "200_response": + description: Model for testing model name starting with number + properties: + name: + format: int32 + type: integer + class: + type: string + type: object + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + type: object + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Dog_allOf' + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Cat_allOf' + BigCat: + allOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/BigCat_allOf' + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array + format_test: + properties: + integer: + maximum: 1E+2 + minimum: 1E+1 + type: integer + int32: + format: int32 + maximum: 2E+2 + minimum: 2E+1 + type: integer + int64: + format: int64 + type: integer + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + format: float + maximum: 987.6 + minimum: 54.3 + type: number + double: + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + pattern: /[a-z]/i + type: string + byte: + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + binary: + format: binary + type: string + date: + format: date + type: string + dateTime: + format: date-time + type: string + uuid: + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + format: uuid + type: string + password: + format: password + maxLength: 64 + minLength: 10 + type: string + BigDecimal: + format: number + type: string + required: + - byte + - date + - number + - password + type: object + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + Enum_Test: + properties: + enum_string: + enum: + - UPPER + - lower + - "" + type: string + enum_string_required: + enum: + - UPPER + - lower + - "" + type: string + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' + required: + - enum_string_required + type: object + AdditionalPropertiesClass: + properties: + map_string: + additionalProperties: + type: string + type: object + map_number: + additionalProperties: + type: number + type: object + map_integer: + additionalProperties: + type: integer + type: object + map_boolean: + additionalProperties: + type: boolean + type: object + map_array_integer: + additionalProperties: + items: + type: integer + type: array + type: object + map_array_anytype: + additionalProperties: + items: + properties: {} + type: object + type: array + type: object + map_map_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_map_anytype: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + type: object + anytype_1: + properties: {} + type: object + anytype_2: + type: object + anytype_3: + properties: {} + type: object + type: object + AdditionalPropertiesString: + additionalProperties: + type: string + properties: + name: + type: string + type: object + AdditionalPropertiesInteger: + additionalProperties: + type: integer + properties: + name: + type: string + type: object + AdditionalPropertiesNumber: + additionalProperties: + type: number + properties: + name: + type: string + type: object + AdditionalPropertiesBoolean: + additionalProperties: + type: boolean + properties: + name: + type: string + type: object + AdditionalPropertiesArray: + additionalProperties: + items: + properties: {} + type: object + type: array + properties: + name: + type: string + type: object + AdditionalPropertiesObject: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + properties: + name: + type: string + type: object + AdditionalPropertiesAnyType: + additionalProperties: + properties: {} + type: object + properties: + name: + type: string + type: object + MixedPropertiesAndAdditionalPropertiesClass: + properties: + uuid: + format: uuid + type: string + dateTime: + format: date-time + type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + List: + properties: + "123-list": + type: string + type: object + Client: + example: + client: client + properties: + client: + type: string + type: object + ReadOnlyFirst: + properties: + bar: + readOnly: true + type: string + baz: + type: string + type: object + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object + Capitalization: + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + direct_map: + additionalProperties: + type: boolean + type: object + indirect_map: + additionalProperties: + type: boolean + type: object + type: object + ArrayTest: + properties: + array_of_string: + items: + type: string + type: array + array_array_of_integer: + items: + items: + format: int64 + type: integer + type: array + type: array + array_array_of_model: + items: + items: + $ref: '#/components/schemas/ReadOnlyFirst' + type: array + type: array + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object + ArrayOfNumberOnly: + properties: + ArrayNumber: + items: + type: number + type: array + type: object + ArrayOfArrayOfNumberOnly: + properties: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array + type: object + EnumArrays: + properties: + just_symbol: + enum: + - '>=' + - $ + type: string + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterEnum: + enum: + - placed + - approved + - delivered + type: string + OuterComposite: + example: + my_string: my_string + my_number: 0.8008281904610115 + my_boolean: true + properties: + my_number: + type: number + my_string: + type: string + my_boolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + type: object + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + type: object + FileSchemaTestClass: + example: + file: + sourceURI: sourceURI + files: + - sourceURI: sourceURI + - sourceURI: sourceURI + properties: + file: + $ref: '#/components/schemas/File' + files: + items: + $ref: '#/components/schemas/File' + type: array + type: object + File: + description: Must be named `File` for test. + example: + sourceURI: sourceURI + properties: + sourceURI: + description: Test capitalization + type: string + type: object + TypeHolderDefault: + properties: + string_item: + default: what + type: string + number_item: + type: number + integer_item: + type: integer + bool_item: + default: true + type: boolean + array_item: + items: + type: integer + type: array + required: + - array_item + - bool_item + - integer_item + - number_item + - string_item + type: object + TypeHolderExample: + properties: + string_item: + example: what + type: string + number_item: + example: 1.234 + type: number + float_item: + example: 1.234 + format: float + type: number + integer_item: + example: -2 + type: integer + bool_item: + example: true + type: boolean + array_item: + example: + - 0 + - 1 + - 2 + - 3 + items: + type: integer + type: array + required: + - array_item + - bool_item + - float_item + - integer_item + - number_item + - string_item + type: object + XmlItem: + properties: + attribute_string: + example: string + type: string + xml: + attribute: true + attribute_number: + example: 1.234 + type: number + xml: + attribute: true + attribute_integer: + example: -2 + type: integer + xml: + attribute: true + attribute_boolean: + example: true + type: boolean + xml: + attribute: true + wrapped_array: + items: + type: integer + type: array + xml: + wrapped: true + name_string: + example: string + type: string + xml: + name: xml_name_string + name_number: + example: 1.234 + type: number + xml: + name: xml_name_number + name_integer: + example: -2 + type: integer + xml: + name: xml_name_integer + name_boolean: + example: true + type: boolean + xml: + name: xml_name_boolean + name_array: + items: + type: integer + xml: + name: xml_name_array_item + type: array + name_wrapped_array: + items: + type: integer + xml: + name: xml_name_wrapped_array_item + type: array + xml: + name: xml_name_wrapped_array + wrapped: true + prefix_string: + example: string + type: string + xml: + prefix: ab + prefix_number: + example: 1.234 + type: number + xml: + prefix: cd + prefix_integer: + example: -2 + type: integer + xml: + prefix: ef + prefix_boolean: + example: true + type: boolean + xml: + prefix: gh + prefix_array: + items: + type: integer + xml: + prefix: ij + type: array + prefix_wrapped_array: + items: + type: integer + xml: + prefix: mn + type: array + xml: + prefix: kl + wrapped: true + namespace_string: + example: string + type: string + xml: + namespace: http://a.com/schema + namespace_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + namespace_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + namespace_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + namespace_array: + items: + type: integer + xml: + namespace: http://e.com/schema + type: array + namespace_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + type: array + xml: + namespace: http://f.com/schema + wrapped: true + prefix_ns_string: + example: string + type: string + xml: + namespace: http://a.com/schema + prefix: a + prefix_ns_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + prefix: b + prefix_ns_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + prefix: c + prefix_ns_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + prefix: d + prefix_ns_array: + items: + type: integer + xml: + namespace: http://e.com/schema + prefix: e + type: array + prefix_ns_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + prefix: g + type: array + xml: + namespace: http://f.com/schema + prefix: f + wrapped: true + type: object + xml: + namespace: http://a.com/schema + prefix: pre + Dog_allOf: + properties: + breed: + type: string + type: object + Cat_allOf: + properties: + declawed: + type: boolean + type: object + BigCat_allOf: + properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey + api_key_query: + in: query + name: api_key_query + type: apiKey + http_basic_test: + scheme: basic + type: http +x-original-swagger-version: "2.0" diff --git a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator-ignore b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/.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/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES new file mode 100644 index 000000000000..9df6c44a3213 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES @@ -0,0 +1,72 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenAPI2SpringBoot.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/AnotherFakeApiController.java +src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeApiController.java +src/main/java/org/openapitools/api/FakeApiDelegate.java +src/main/java/org/openapitools/api/FakeClassnameTestApi.java +src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiController.java +src/main/java/org/openapitools/api/PetApiDelegate.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiController.java +src/main/java/org/openapitools/api/StoreApiDelegate.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiController.java +src/main/java/org/openapitools/api/UserApiDelegate.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +src/main/java/org/openapitools/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/model/Animal.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayTest.java +src/main/java/org/openapitools/model/BigCat.java +src/main/java/org/openapitools/model/BigCatAllOf.java +src/main/java/org/openapitools/model/Capitalization.java +src/main/java/org/openapitools/model/Cat.java +src/main/java/org/openapitools/model/CatAllOf.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ClassModel.java +src/main/java/org/openapitools/model/Client.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/DogAllOf.java +src/main/java/org/openapitools/model/EnumArrays.java +src/main/java/org/openapitools/model/EnumClass.java +src/main/java/org/openapitools/model/EnumTest.java +src/main/java/org/openapitools/model/FileSchemaTestClass.java +src/main/java/org/openapitools/model/FormatTest.java +src/main/java/org/openapitools/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/model/MapTest.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/model/Model200Response.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/ModelReturn.java +src/main/java/org/openapitools/model/Name.java +src/main/java/org/openapitools/model/NumberOnly.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/OuterComposite.java +src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/ReadOnlyFirst.java +src/main/java/org/openapitools/model/SpecialModelName.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/TypeHolderDefault.java +src/main/java/org/openapitools/model/TypeHolderExample.java +src/main/java/org/openapitools/model/User.java +src/main/java/org/openapitools/model/XmlItem.java +src/main/resources/application.properties +src/main/resources/openapi.yaml diff --git a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-delegate/README.md b/samples/openapi3/server/petstore/springboot-delegate/README.md new file mode 100644 index 000000000000..befc961488ae --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/README.md @@ -0,0 +1,16 @@ +# OpenAPI generated server + +Spring Boot Server + + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:80/ + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-delegate/pom.xml b/samples/openapi3/server/petstore/springboot-delegate/pom.xml new file mode 100644 index 000000000000..35758ea64964 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/pom.xml @@ -0,0 +1,71 @@ + + 4.0.0 + org.openapitools.openapi3 + springboot-delegate + jar + springboot-delegate + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/OpenAPI2SpringBoot.java new file mode 100644 index 000000000000..cb088f451935 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -0,0 +1,63 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebMvcConfigurer webConfigurer() { + return new WebMvcConfigurer() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); + } + }; + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +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.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(); + } + + @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 this; + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..b36ef3022ad8 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,61 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "another-fake", description = "the another-fake API") +public interface AnotherFakeApi { + + default AnotherFakeApiDelegate getDelegate() { + return new AnotherFakeApiDelegate() {}; + } + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test special tags", + tags = { "$another-fake?" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/another-fake/dummy", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity call123testSpecialTags( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + return getDelegate().call123testSpecialTags(body); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java new file mode 100644 index 000000000000..df11134c8067 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class AnotherFakeApiController implements AnotherFakeApi { + + private final AnotherFakeApiDelegate delegate; + + public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); + } + + @Override + public AnotherFakeApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java new file mode 100644 index 000000000000..a86542ddf223 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -0,0 +1,47 @@ +package org.openapitools.api; + +import org.openapitools.model.Client; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link AnotherFakeApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface AnotherFakeApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see AnotherFakeApi#call123testSpecialTags + */ + default ResponseEntity call123testSpecialTags(Client body) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} 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 new file mode 100644 index 000000000000..a1667f68fd91 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,505 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import org.openapitools.model.ModelApiResponse; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake", description = "the fake API") +public interface FakeApi { + + default FakeApiDelegate getDelegate() { + return new FakeApiDelegate() {}; + } + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "creates an XmlItem", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/create_xml_item", + consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } + ) + default ResponseEntity createXmlItem( + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody XmlItem xmlItem + ) { + return getDelegate().createXmlItem(xmlItem); + } + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/boolean", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterBooleanSerialize( + @Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Boolean body + ) { + return getDelegate().fakeOuterBooleanSerialize(body); + } + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/composite", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterCompositeSerialize( + @Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) OuterComposite body + ) { + return getDelegate().fakeOuterCompositeSerialize(body); + } + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/number", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterNumberSerialize( + @Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) BigDecimal body + ) { + return getDelegate().fakeOuterNumberSerialize(body); + } + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/string", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterStringSerialize( + @Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) String body + ) { + return getDelegate().fakeOuterStringSerialize(body); + } + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-file-schema", + consumes = { "application/json" } + ) + default ResponseEntity testBodyWithFileSchema( + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody FileSchemaTestClass body + ) { + return getDelegate().testBodyWithFileSchema(body); + } + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-query-params", + consumes = { "application/json" } + ) + default ResponseEntity testBodyWithQueryParams( + @NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query, + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return getDelegate().testBodyWithQueryParams(query, body); + } + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test \"client\" model", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity testClientModel( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + return getDelegate().testClientModel(body); + } + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "http_basic_test") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testEndpointParameters( + @Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "double", required = true) Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "integer", required = false) Integer integer, + @Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int32", required = false) Integer int32, + @Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, + @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, + @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, + @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { + return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + } + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @Operation( + summary = "To test enum parameters", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid request"), + @ApiResponse(responseCode = "404", description = "Not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testEnumParameters( + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { + return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Someting wrong (status code 400) + */ + @Operation( + summary = "Fake endpoint to test group parameters (optional)", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Someting wrong") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/fake" + ) + default ResponseEntity testGroupParameters( + @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { + return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test inline additionalProperties", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/inline-additionalProperties", + consumes = { "application/json" } + ) + default ResponseEntity testInlineAdditionalProperties( + @Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Map param + ) { + return getDelegate().testInlineAdditionalProperties(param); + } + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test json serialization of form data", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake/jsonFormData", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testJsonFormData( + @Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param", required = true) String param, + @Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { + return getDelegate().testJsonFormData(param, param2); + } + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/test-query-parameters" + ) + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List context + ) { + return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image (required)", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default ResponseEntity uploadFileWithRequiredFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { + return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java new file mode 100644 index 000000000000..6b22c1aba661 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeApiController implements FakeApi { + + private final FakeApiDelegate delegate; + + public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); + } + + @Override + public FakeApiDelegate getDelegate() { + return delegate; + } + +} 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 new file mode 100644 index 000000000000..d3a949e65d81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -0,0 +1,320 @@ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import org.openapitools.model.ModelApiResponse; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link FakeApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface FakeApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + * @see FakeApi#createXmlItem + */ + default ResponseEntity createXmlItem(XmlItem xmlItem) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + * @see FakeApi#fakeOuterBooleanSerialize + */ + default ResponseEntity fakeOuterBooleanSerialize(Boolean body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + * @see FakeApi#fakeOuterCompositeSerialize + */ + default ResponseEntity fakeOuterCompositeSerialize(OuterComposite body) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; + ApiUtil.setExampleResponse(request, "*/*", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + * @see FakeApi#fakeOuterNumberSerialize + */ + default ResponseEntity fakeOuterNumberSerialize(BigDecimal body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + * @see FakeApi#fakeOuterStringSerialize + */ + default ResponseEntity fakeOuterStringSerialize(String body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + * @see FakeApi#testBodyWithFileSchema + */ + default ResponseEntity testBodyWithFileSchema(FileSchemaTestClass body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + * @see FakeApi#testBodyWithQueryParams + */ + default ResponseEntity testBodyWithQueryParams(String query, + User body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see FakeApi#testClientModel + */ + default ResponseEntity testClientModel(Client body) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see FakeApi#testEndpointParameters + */ + default ResponseEntity testEndpointParameters(BigDecimal number, + Double _double, + String patternWithoutDelimiter, + byte[] _byte, + Integer integer, + Integer int32, + Long int64, + Float _float, + String string, + MultipartFile binary, + LocalDate date, + OffsetDateTime dateTime, + String password, + String paramCallback) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + * @see FakeApi#testEnumParameters + */ + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + String enumHeaderString, + List enumQueryStringArray, + String enumQueryString, + Integer enumQueryInteger, + Double enumQueryDouble, + List enumFormStringArray, + String enumFormString) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Someting wrong (status code 400) + * @see FakeApi#testGroupParameters + */ + default ResponseEntity testGroupParameters(Integer requiredStringGroup, + Boolean requiredBooleanGroup, + Long requiredInt64Group, + Integer stringGroup, + Boolean booleanGroup, + Long int64Group) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + * @see FakeApi#testInlineAdditionalProperties + */ + default ResponseEntity testInlineAdditionalProperties(Map param) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + * @see FakeApi#testJsonFormData + */ + default ResponseEntity testJsonFormData(String param, + String param2) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + * @see FakeApi#testQueryParameterCollectionFormat + */ + default ResponseEntity testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + * @see FakeApi#uploadFileWithRequiredFile + */ + default ResponseEntity uploadFileWithRequiredFile(Long petId, + MultipartFile requiredFile, + String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..52e3ba4f096d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -0,0 +1,64 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake_classname_test", description = "the fake_classname_test API") +public interface FakeClassnameTestApi { + + default FakeClassnameTestApiDelegate getDelegate() { + return new FakeClassnameTestApiDelegate() {}; + } + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test class name in snake case", + tags = { "fake_classname_tags 123#$%^" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + }, + security = { + @SecurityRequirement(name = "api_key_query") + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake_classname_test", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity testClassname( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + return getDelegate().testClassname(body); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java new file mode 100644 index 000000000000..58497641e4c5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeClassnameTestApiController implements FakeClassnameTestApi { + + private final FakeClassnameTestApiDelegate delegate; + + public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); + } + + @Override + public FakeClassnameTestApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java new file mode 100644 index 000000000000..ed5a6bfc09a0 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -0,0 +1,47 @@ +package org.openapitools.api; + +import org.openapitools.model.Client; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link FakeClassnameTestApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface FakeClassnameTestApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see FakeClassnameTestApi#testClassname + */ + default ResponseEntity testClassname(Client body) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..7ddf343bfc3a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,292 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + default PetApiDelegate getDelegate() { + return new PetApiDelegate() {}; + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return getDelegate().addPet(body); + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + default ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ) { + return getDelegate().deletePet(petId, apiKey); + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ) { + return getDelegate().findPetsByStatus(status); + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { + return getDelegate().findPetsByTags(tags); + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + return getDelegate().getPetById(petId); + } + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return getDelegate().updatePet(body); + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ) { + return getDelegate().updatePetWithForm(petId, name, status); + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ) { + return getDelegate().uploadFile(petId, additionalMetadata, file); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java new file mode 100644 index 000000000000..5fa088c6f10b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class PetApiController implements PetApi { + + private final PetApiDelegate delegate; + + public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); + } + + @Override + public PetApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java new file mode 100644 index 000000000000..e3adc7d4bca7 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -0,0 +1,197 @@ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link PetApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface PetApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + * @see PetApi#addPet + */ + default ResponseEntity addPet(Pet body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + * @see PetApi#deletePet + */ + default ResponseEntity deletePet(Long petId, + String apiKey) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + * @see PetApi#findPetsByStatus + */ + default ResponseEntity> findPetsByStatus(List status) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + * @see PetApi#findPetsByTags + */ + default ResponseEntity> findPetsByTags(Set tags) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * @see PetApi#getPetById + */ + default ResponseEntity getPetById(Long petId) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + * @see PetApi#updatePet + */ + default ResponseEntity updatePet(Pet body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + * @see PetApi#updatePetWithForm + */ + default ResponseEntity updatePetWithForm(Long petId, + String name, + String status) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + * @see PetApi#uploadFile + */ + default ResponseEntity uploadFile(Long petId, + String additionalMetadata, + MultipartFile file) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..de9cf4c59e2a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,147 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default StoreApiDelegate getDelegate() { + return new StoreApiDelegate() {}; + } + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{order_id}" + ) + default ResponseEntity deleteOrder( + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId + ) { + return getDelegate().deleteOrder(orderId); + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = { "application/json" } + ) + default ResponseEntity> getInventory( + + ) { + return getDelegate().getInventory(); + } + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{order_id}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId + ) { + return getDelegate().getOrderById(orderId); + } + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ) { + return getDelegate().placeOrder(body); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java new file mode 100644 index 000000000000..9e08c646ae92 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class StoreApiController implements StoreApi { + + private final StoreApiDelegate delegate; + + public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); + } + + @Override + public StoreApiDelegate getDelegate() { + return delegate; + } + +} 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 new file mode 100644 index 000000000000..dfe4bb314961 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -0,0 +1,108 @@ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link StoreApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface StoreApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + * @see StoreApi#deleteOrder + */ + default ResponseEntity deleteOrder(String orderId) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + * @see StoreApi#getInventory + */ + default ResponseEntity> getInventory() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + * @see StoreApi#getOrderById + */ + default ResponseEntity getOrderById(Long orderId) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + * @see StoreApi#placeOrder + */ + default ResponseEntity placeOrder(Order body) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..e7dd25c6b5db --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,246 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default UserApiDelegate getDelegate() { + return new UserApiDelegate() {}; + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + default ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return getDelegate().createUser(body); + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + default ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return getDelegate().createUsersWithArrayInput(body); + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + default ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return getDelegate().createUsersWithListInput(body); + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + default ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return getDelegate().deleteUser(username); + } + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return getDelegate().getUserByName(username); + } + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ) { + return getDelegate().loginUser(username, password); + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + default ResponseEntity logoutUser( + + ) { + return getDelegate().logoutUser(); + } + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + default ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return getDelegate().updateUser(username, body); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java new file mode 100644 index 000000000000..bc2d33598fd9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class UserApiController implements UserApi { + + private final UserApiDelegate delegate; + + public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); + } + + @Override + public UserApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java new file mode 100644 index 000000000000..2efbd71c9dc9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -0,0 +1,148 @@ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link UserApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface UserApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUser + */ + default ResponseEntity createUser(User body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUsersWithArrayInput + */ + default ResponseEntity createUsersWithArrayInput(List body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUsersWithListInput + */ + default ResponseEntity createUsersWithListInput(List body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#deleteUser + */ + default ResponseEntity deleteUser(String username) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#getUserByName + */ + default ResponseEntity getUserByName(String username) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + * @see UserApi#loginUser + */ + default ResponseEntity loginUser(String username, + String password) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + * @see UserApi#logoutUser + */ + default ResponseEntity logoutUser() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#updateUser + */ + default ResponseEntity updateUser(String username, + User body) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..34bae16b8986 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,53 @@ +package org.openapitools.configuration; + +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Controller; +import org.springframework.util.StreamUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + private static YAMLMapper yamlMapper = new YAMLMapper(); + + @Value("classpath:/openapi.yaml") + private Resource openapi; + + @Bean + public String openapiContent() throws IOException { + try(InputStream is = openapi.getInputStream()) { + return StreamUtils.copyToString(is, Charset.defaultCharset()); + } + } + + @GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi") + @ResponseBody + public String openapiYaml() throws IOException { + return openapiContent(); + } + + @GetMapping(value = "/openapi.json", produces = "application/json") + @ResponseBody + public Object openapiJson() throws IOException { + return yamlMapper.readValue(openapiContent(), Object.class); + } + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui/index.html?url=../openapi.json"; + } + + +} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..0c57ae7dd14c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesAnyType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesAnyType name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..b5285ec2f29b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesArray + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesArray name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..f8ca38c286d5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesBoolean + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesBoolean name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..dfd28ccb9963 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,414 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesClass { + @JsonProperty("map_string") + @Valid + private Map mapString = null; + + @JsonProperty("map_number") + @Valid + private Map mapNumber = null; + + @JsonProperty("map_integer") + @Valid + private Map mapInteger = null; + + @JsonProperty("map_boolean") + @Valid + private Map mapBoolean = null; + + @JsonProperty("map_array_integer") + @Valid + private Map> mapArrayInteger = null; + + @JsonProperty("map_array_anytype") + @Valid + private Map> mapArrayAnytype = null; + + @JsonProperty("map_map_string") + @Valid + private Map> mapMapString = null; + + @JsonProperty("map_map_anytype") + @Valid + private Map> mapMapAnytype = null; + + @JsonProperty("anytype_1") + private Object anytype1; + + @JsonProperty("anytype_2") + private Object anytype2; + + @JsonProperty("anytype_3") + private Object anytype3; + + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + @Schema(name = "mapString", defaultValue = "") + + + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + @Schema(name = "mapNumber", defaultValue = "") + + @Valid + + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + @Schema(name = "mapInteger", defaultValue = "") + + + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + @Schema(name = "mapBoolean", defaultValue = "") + + + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + @Schema(name = "mapArrayInteger", defaultValue = "") + + @Valid + + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + @Schema(name = "mapArrayAnytype", defaultValue = "") + + @Valid + + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + @Schema(name = "mapMapString", defaultValue = "") + + @Valid + + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + @Schema(name = "mapMapAnytype", defaultValue = "") + + @Valid + + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + @Schema(name = "anytype1", defaultValue = "") + + + public Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = anytype2; + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + @Schema(name = "anytype2", defaultValue = "") + + + public Object getAnytype2() { + return anytype2; + } + + public void setAnytype2(Object anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClass anytype3(Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + @Schema(name = "anytype3", defaultValue = "") + + + public Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..5fea577ab44b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesInteger + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesInteger name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..e6eee612a24f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesNumber + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesNumber name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..d7116bd7572c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..d2022be266fb --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesString + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesString name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java new file mode 100644 index 000000000000..6f096d5069ed --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -0,0 +1,118 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +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 org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Animal + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), +}) + +public class Animal { + @JsonProperty("className") + private String className; + + @JsonProperty("color") + private String color = "red"; + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @Schema(name = "className", required = true, defaultValue = "") + @NotNull + + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + @Schema(name = "color", defaultValue = "") + + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..ebe36ad761a9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") + @Valid + private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + @Schema(name = "arrayArrayNumber", defaultValue = "") + + @Valid + + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..8158dd44ab88 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") + @Valid + private List arrayNumber = null; + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + @Schema(name = "arrayNumber", defaultValue = "") + + @Valid + + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 000000000000..420010561bcd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,165 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayTest { + @JsonProperty("array_of_string") + @Valid + private List arrayOfString = null; + + @JsonProperty("array_array_of_integer") + @Valid + private List> arrayArrayOfInteger = null; + + @JsonProperty("array_array_of_model") + @Valid + private List> arrayArrayOfModel = null; + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + @Schema(name = "arrayOfString", defaultValue = "") + + + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + @Schema(name = "arrayArrayOfInteger", defaultValue = "") + + @Valid + + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + @Schema(name = "arrayArrayOfModel", defaultValue = "") + + @Valid + + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java new file mode 100644 index 000000000000..7f4a080ad8d2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,126 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.BigCatAllOf; +import org.openapitools.model.Cat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCat extends Cat { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java new file mode 100644 index 000000000000..d0a47ab5127c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -0,0 +1,123 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCatAllOf { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCatAllOf kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatAllOf bigCatAllOf = (BigCatAllOf) o; + return Objects.equals(this.kind, bigCatAllOf.kind); + } + + @Override + public int hashCode() { + return Objects.hash(kind); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java new file mode 100644 index 000000000000..92d9a7245f16 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,208 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Capitalization + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Capitalization { + @JsonProperty("smallCamel") + private String smallCamel; + + @JsonProperty("CapitalCamel") + private String capitalCamel; + + @JsonProperty("small_Snake") + private String smallSnake; + + @JsonProperty("Capital_Snake") + private String capitalSnake; + + @JsonProperty("SCA_ETH_Flow_Points") + private String scAETHFlowPoints; + + @JsonProperty("ATT_NAME") + private String ATT_NAME; + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + @Schema(name = "smallCamel", defaultValue = "") + + + public String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + @Schema(name = "capitalCamel", defaultValue = "") + + + public String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + @Schema(name = "smallSnake", defaultValue = "") + + + public String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + @Schema(name = "capitalSnake", defaultValue = "") + + + public String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + @Schema(name = "scAETHFlowPoints", defaultValue = "") + + + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") + + + public String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java new file mode 100644 index 000000000000..2e496fb4accd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.CatAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Cat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Cat extends Animal { + @JsonProperty("declawed") + private Boolean declawed; + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java new file mode 100644 index 000000000000..b732a62b1bc3 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * CatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class CatAllOf { + @JsonProperty("declawed") + private Boolean declawed; + + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); + } + + @Override + public int hashCode() { + return Objects.hash(declawed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..038fc8df3afd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Category + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name = "default-name"; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + 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/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java new file mode 100644 index 000000000000..fa2a736f4fb5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model with \"_class\" property + */ +@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ClassModel { + @JsonProperty("_class") + private String propertyClass; + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java new file mode 100644 index 000000000000..e11bd4ff1b13 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Client { + @JsonProperty("client") + private String client; + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + @Schema(name = "client", defaultValue = "") + + + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..ed5dc71a4ba2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.DogAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Dog + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Dog extends Animal { + @JsonProperty("breed") + private String breed; + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java new file mode 100644 index 000000000000..2c99bc376c34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * DogAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class DogAllOf { + @JsonProperty("breed") + private String breed; + + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); + } + + @Override + public int hashCode() { + return Objects.hash(breed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 000000000000..e1b2df0716a2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,190 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumArrays + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumArrays { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("just_symbol") + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("array_enum") + @Valid + private List arrayEnum = null; + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + @Schema(name = "justSymbol", defaultValue = "") + + + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + @Schema(name = "arrayEnum", defaultValue = "") + + + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java new file mode 100644 index 000000000000..e3d30c1ad453 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java new file mode 100644 index 000000000000..938af53e2b81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,331 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnum; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumTest { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string") + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string_required") + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_integer") + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_number") + private EnumNumberEnum enumNumber; + + @JsonProperty("outerEnum") + private OuterEnum outerEnum; + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + @Schema(name = "enumString", defaultValue = "") + + + public EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @Schema(name = "enumStringRequired", required = true, defaultValue = "") + @NotNull + + + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + @Schema(name = "enumInteger", defaultValue = "") + + + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + @Schema(name = "enumNumber", defaultValue = "") + + + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + @Schema(name = "outerEnum", defaultValue = "") + + @Valid + + public OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..0d1e9ca8495c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,121 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FileSchemaTestClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FileSchemaTestClass { + @JsonProperty("file") + private java.io.File file; + + @JsonProperty("files") + @Valid + private List files = null; + + public FileSchemaTestClass file(java.io.File file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + @Schema(name = "file", defaultValue = "") + + @Valid + + public java.io.File getFile() { + return file; + } + + public void setFile(java.io.File file) { + this.file = file; + } + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + @Schema(name = "files", defaultValue = "") + + @Valid + + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java new file mode 100644 index 000000000000..6546370cd329 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,435 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FormatTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FormatTest { + @JsonProperty("integer") + private Integer integer; + + @JsonProperty("int32") + private Integer int32; + + @JsonProperty("int64") + private Long int64; + + @JsonProperty("number") + private BigDecimal number; + + @JsonProperty("float") + private Float _float; + + @JsonProperty("double") + private Double _double; + + @JsonProperty("string") + private String string; + + @JsonProperty("byte") + private byte[] _byte; + + @JsonProperty("binary") + private org.springframework.core.io.Resource binary; + + @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + private LocalDate date; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("password") + private String password; + + @JsonProperty("BigDecimal") + private BigDecimal bigDecimal; + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + @Schema(name = "integer", defaultValue = "") + +@Min(10) @Max(100) + public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + @Schema(name = "int32", defaultValue = "") + +@Min(20) @Max(200) + public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + @Schema(name = "int64", defaultValue = "") + + + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @Schema(name = "number", required = true, defaultValue = "") + @NotNull + + @Valid +@DecimalMin("32.1") @DecimalMax("543.2") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + @Schema(name = "_float", defaultValue = "") + +@DecimalMin("54.3") @DecimalMax("987.6") + public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + @Schema(name = "_double", defaultValue = "") + +@DecimalMin("67.8") @DecimalMax("123.4") + public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + @Schema(name = "string", defaultValue = "") + +@Pattern(regexp = "/[a-z]/i") + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @Schema(name = "_byte", required = true, defaultValue = "") + @NotNull + + + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + @Schema(name = "binary", defaultValue = "") + + @Valid + + public org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @Schema(name = "date", required = true, defaultValue = "") + @NotNull + + @Valid + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", required = true, defaultValue = "") + @NotNull + +@Size(min = 10, max = 64) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + @Schema(name = "bigDecimal", defaultValue = "") + + @Valid + + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..dfb615a529fc --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * HasOnlyReadOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class HasOnlyReadOnly { + @JsonProperty("bar") + private String bar; + + @JsonProperty("foo") + private String foo; + + public HasOnlyReadOnly bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public HasOnlyReadOnly foo(String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + @Schema(name = "foo", readOnly = true, defaultValue = "") + + + public String getFoo() { + return foo; + } + + public void setFoo(String foo) { + this.foo = foo; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java new file mode 100644 index 000000000000..3ff73062758f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,234 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MapTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MapTest { + @JsonProperty("map_map_of_string") + @Valid + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("map_of_enum_string") + @Valid + private Map mapOfEnumString = null; + + @JsonProperty("direct_map") + @Valid + private Map directMap = null; + + @JsonProperty("indirect_map") + @Valid + private Map indirectMap = null; + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + @Schema(name = "mapMapOfString", defaultValue = "") + + @Valid + + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + @Schema(name = "mapOfEnumString", defaultValue = "") + + + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + @Schema(name = "directMap", defaultValue = "") + + + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + @Schema(name = "indirectMap", defaultValue = "") + + + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..03a7be43cc4a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,152 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("map") + @Valid + private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + @Schema(name = "map", defaultValue = "") + + @Valid + + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java new file mode 100644 index 000000000000..77bf91649b08 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name starting with number + */ +@Schema(name = "200_response",description = "Model for testing model name starting with number") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Model200Response { + @JsonProperty("name") + private Integer name; + + @JsonProperty("class") + private String propertyClass; + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..2443600df226 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,133 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ModelApiResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java new file mode 100644 index 000000000000..0301a47e9f3e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing reserved words + */ +@Schema(name = "Return",description = "Model for testing reserved words") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelReturn { + @JsonProperty("return") + private Integer _return; + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + @Schema(name = "_return", defaultValue = "") + + + public Integer getReturn() { + return _return; + } + + public void setReturn(Integer _return) { + this._return = _return; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java new file mode 100644 index 000000000000..62a16f80ee07 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,160 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name same as property name + */ +@Schema(name = "Name",description = "Model for testing model name same as property name") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Name { + @JsonProperty("name") + private Integer name; + + @JsonProperty("snake_case") + private Integer snakeCase; + + @JsonProperty("property") + private String property; + + @JsonProperty("123Number") + private Integer _123number; + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Name snakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + @Schema(name = "snakeCase", readOnly = true, defaultValue = "") + + + public Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @Schema(name = "property", defaultValue = "") + + + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public Name _123number(Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + @Schema(name = "_123number", readOnly = true, defaultValue = "") + + + public Integer get123number() { + return _123number; + } + + public void set123number(Integer _123number) { + this._123number = _123number; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java new file mode 100644 index 000000000000..521fad80d5a7 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * NumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class NumberOnly { + @JsonProperty("JustNumber") + private BigDecimal justNumber; + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + @Schema(name = "justNumber", defaultValue = "") + + @Valid + + public BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..05071bdfe2bf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,249 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Order + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 000000000000..a721a3dde6a0 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * OuterComposite + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OuterComposite { + @JsonProperty("my_number") + private BigDecimal myNumber; + + @JsonProperty("my_string") + private String myString; + + @JsonProperty("my_boolean") + private Boolean myBoolean; + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + @Schema(name = "myNumber", defaultValue = "") + + @Valid + + public BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + @Schema(name = "myString", defaultValue = "") + + + public String getMyString() { + return myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + @Schema(name = "myBoolean", defaultValue = "") + + + public Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 000000000000..ba0cca8a5e81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..988eb317134d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,273 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private Set photoUrls = new LinkedHashSet<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..1c51770a8e66 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ReadOnlyFirst + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ReadOnlyFirst { + @JsonProperty("bar") + private String bar; + + @JsonProperty("baz") + private String baz; + + public ReadOnlyFirst bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + @Schema(name = "baz", defaultValue = "") + + + public String getBaz() { + return baz; + } + + public void setBaz(String baz) { + this.baz = baz; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 000000000000..75f4be4e9f8f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * SpecialModelName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class SpecialModelName { + @JsonProperty("$special[property.name]") + private Long $specialPropertyName; + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + @Schema(name = "$specialPropertyName", defaultValue = "") + + + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName $specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..8722df999bfc --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Tag + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java new file mode 100644 index 000000000000..19e9bf310f76 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,198 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderDefault + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderDefault { + @JsonProperty("string_item") + private String stringItem = "what"; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem = true; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java new file mode 100644 index 000000000000..c9a3762bc74b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,224 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderExample + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderExample { + @JsonProperty("string_item") + private String stringItem; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("float_item") + private Float floatItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..83152a155535 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,258 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * User + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java new file mode 100644 index 000000000000..59a183db0f62 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,872 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * XmlItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class XmlItem { + @JsonProperty("attribute_string") + private String attributeString; + + @JsonProperty("attribute_number") + private BigDecimal attributeNumber; + + @JsonProperty("attribute_integer") + private Integer attributeInteger; + + @JsonProperty("attribute_boolean") + private Boolean attributeBoolean; + + @JsonProperty("wrapped_array") + @Valid + private List wrappedArray = null; + + @JsonProperty("name_string") + private String nameString; + + @JsonProperty("name_number") + private BigDecimal nameNumber; + + @JsonProperty("name_integer") + private Integer nameInteger; + + @JsonProperty("name_boolean") + private Boolean nameBoolean; + + @JsonProperty("name_array") + @Valid + private List nameArray = null; + + @JsonProperty("name_wrapped_array") + @Valid + private List nameWrappedArray = null; + + @JsonProperty("prefix_string") + private String prefixString; + + @JsonProperty("prefix_number") + private BigDecimal prefixNumber; + + @JsonProperty("prefix_integer") + private Integer prefixInteger; + + @JsonProperty("prefix_boolean") + private Boolean prefixBoolean; + + @JsonProperty("prefix_array") + @Valid + private List prefixArray = null; + + @JsonProperty("prefix_wrapped_array") + @Valid + private List prefixWrappedArray = null; + + @JsonProperty("namespace_string") + private String namespaceString; + + @JsonProperty("namespace_number") + private BigDecimal namespaceNumber; + + @JsonProperty("namespace_integer") + private Integer namespaceInteger; + + @JsonProperty("namespace_boolean") + private Boolean namespaceBoolean; + + @JsonProperty("namespace_array") + @Valid + private List namespaceArray = null; + + @JsonProperty("namespace_wrapped_array") + @Valid + private List namespaceWrappedArray = null; + + @JsonProperty("prefix_ns_string") + private String prefixNsString; + + @JsonProperty("prefix_ns_number") + private BigDecimal prefixNsNumber; + + @JsonProperty("prefix_ns_integer") + private Integer prefixNsInteger; + + @JsonProperty("prefix_ns_boolean") + private Boolean prefixNsBoolean; + + @JsonProperty("prefix_ns_array") + @Valid + private List prefixNsArray = null; + + @JsonProperty("prefix_ns_wrapped_array") + @Valid + private List prefixNsWrappedArray = null; + + public XmlItem attributeString(String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + @Schema(name = "attributeString", example = "string", defaultValue = "") + + + public String getAttributeString() { + return attributeString; + } + + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + @Schema(name = "attributeInteger", example = "-2", defaultValue = "") + + + public Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + @Schema(name = "attributeBoolean", example = "true", defaultValue = "") + + + public Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + @Schema(name = "wrappedArray", defaultValue = "") + + + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + @Schema(name = "nameString", example = "string", defaultValue = "") + + + public String getNameString() { + return nameString; + } + + public void setNameString(String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + @Schema(name = "nameNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + @Schema(name = "nameInteger", example = "-2", defaultValue = "") + + + public Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + @Schema(name = "nameBoolean", example = "true", defaultValue = "") + + + public Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + @Schema(name = "nameArray", defaultValue = "") + + + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + @Schema(name = "nameWrappedArray", defaultValue = "") + + + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + @Schema(name = "prefixString", example = "string", defaultValue = "") + + + public String getPrefixString() { + return prefixString; + } + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + @Schema(name = "prefixInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + @Schema(name = "prefixBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + @Schema(name = "prefixArray", defaultValue = "") + + + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + @Schema(name = "prefixWrappedArray", defaultValue = "") + + + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + @Schema(name = "namespaceString", example = "string", defaultValue = "") + + + public String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") + + + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") + + + public Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + @Schema(name = "namespaceArray", defaultValue = "") + + + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + @Schema(name = "namespaceWrappedArray", defaultValue = "") + + + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + @Schema(name = "prefixNsString", example = "string", defaultValue = "") + + + public String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + @Schema(name = "prefixNsArray", defaultValue = "") + + + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + @Schema(name = "prefixNsWrappedArray", defaultValue = "") + + + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/application.properties b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/application.properties new file mode 100644 index 000000000000..9d06609db665 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=80 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false 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 new file mode 100644 index 000000000000..d6386dc39bf4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -0,0 +1,2264 @@ +openapi: 3.0.1 +info: + description: 'This spec is mainly for testing Petstore server and contains fake + endpoints, models. Please do not use this for any other purpose. Special characters: + " \' + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +servers: +- url: http://petstore.swagger.io:80/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + post: + operationId: addPet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + put: + operationId: updatePet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + "405": + content: {} + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + content: {} + description: Invalid status value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + uniqueItems: true + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + description: successful operation + "400": + content: {} + description: Invalid tag value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + responses: + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /store/order: + post: + operationId: placeOrder + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: store + /store/order/{order_id}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: order_id + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + in: path + name: order_id + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Find purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Create user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + in: query + name: username + required: true + schema: + type: string + - description: The password for login in clear text + in: query + name: password + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + format: int32 + type: integer + X-Expires-After: + description: date in UTC when token expires + schema: + format: date-time + type: string + "400": + content: {} + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/logout: + get: + operationId: logoutUser + responses: + default: + content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Delete user + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + in: path + name: username + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + content: {} + description: Invalid user supplied + "404": + content: {} + description: User not found + summary: Updated user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /fake_classname_test: + patch: + description: To test class name in snake case + operationId: testClassname + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + security: + - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake_classname_tags 123#$%^ + /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: Required String in group parameters + in: query + name: required_string_group + required: true + schema: + type: integer + - description: Required Boolean in group parameters + in: header + name: required_boolean_group + required: true + schema: + type: boolean + - description: Required Integer in group parameters + in: query + name: required_int64_group + required: true + schema: + format: int64 + type: integer + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + "400": + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-accepts: application/json + x-tags: + - tag: fake + get: + description: To test enum parameters + operationId: testEnumParameters + parameters: + - description: Header parameter enum test (string array) + explode: false + in: header + name: enum_header_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: simple + - description: Header parameter enum test (string) + in: header + name: enum_header_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (string array) + explode: false + in: query + name: enum_query_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: form + - description: Query parameter enum test (string) + in: query + name: enum_query_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (double) + in: query + name: enum_query_integer + schema: + enum: + - 1 + - -2 + format: int32 + type: integer + - description: Query parameter enum test (double) + in: query + name: enum_query_double + schema: + enum: + - 1.1 + - -1.2 + format: double + type: number + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string + responses: + "400": + content: {} + description: Invalid request + "404": + content: {} + description: Not found + summary: To test enum parameters + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + post: + description: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + integer: + description: None + format: int32 + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + required: true + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + security: + - http_basic_test: [] + summary: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/outer/number: + post: + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Output number + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/string: + post: + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Output string + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/boolean: + post: + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Output boolean + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/composite: + post: + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Output composite + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/jsonFormData: + get: + operationId: testJsonFormData + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + required: true + responses: + "200": + content: {} + description: successful operation + summary: test json serialization of form data + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/inline-additionalProperties: + post: + operationId: testInlineAdditionalProperties + requestBody: + content: + application/json: + schema: + additionalProperties: + type: string + type: object + description: request body + required: true + responses: + "200": + content: {} + description: successful operation + summary: test inline additionalProperties + tags: + - fake + x-codegen-request-body-name: param + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - in: query + name: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/create_xml_item: + post: + description: this route creates an XmlItem + operationId: createXmlItem + requestBody: + content: + application/xml: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + description: XmlItem Body + required: true + responses: + "200": + content: {} + description: successful operation + summary: creates an XmlItem + tags: + - fake + x-codegen-request-body-name: XmlItem + x-contentType: application/xml + x-accepts: application/json + x-tags: + - tag: fake + /another-fake/dummy: + patch: + description: To test special tags and operation ID starting with number + operationId: 123_test_@#$%_special_tags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: $another-fake? + /fake/body-with-file-schema: + put: + description: For this test, the body for this request much reference a schema + named `File`. + operationId: testBodyWithFileSchema + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/test-query-parameters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: false + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + - in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: {} + description: Success + tags: + - fake + x-accepts: application/json + x-tags: + - tag: fake + /fake/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image (required) + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet +components: + schemas: + Order: + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + type: object + xml: + name: Order + Category: + example: + name: default-name + id: 6 + properties: + id: + format: int64 + type: integer + name: + default: default-name + type: string + required: + - name + type: object + xml: + name: Category + User: + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + type: object + xml: + name: User + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: default-name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + uniqueItems: true + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + ApiResponse: + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + type: object + $special[model.name]: + properties: + $special[property.name]: + format: int64 + type: integer + type: object + xml: + name: $special[model.name] + Return: + description: Model for testing reserved words + properties: + return: + format: int32 + type: integer + type: object + xml: + name: Return + Name: + description: Model for testing model name same as property name + properties: + name: + format: int32 + type: integer + snake_case: + format: int32 + readOnly: true + type: integer + property: + type: string + "123Number": + readOnly: true + type: integer + required: + - name + type: object + xml: + name: Name + "200_response": + description: Model for testing model name starting with number + properties: + name: + format: int32 + type: integer + class: + type: string + type: object + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + type: object + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Dog_allOf' + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Cat_allOf' + BigCat: + allOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/BigCat_allOf' + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array + format_test: + properties: + integer: + maximum: 1E+2 + minimum: 1E+1 + type: integer + int32: + format: int32 + maximum: 2E+2 + minimum: 2E+1 + type: integer + int64: + format: int64 + type: integer + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + format: float + maximum: 987.6 + minimum: 54.3 + type: number + double: + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + pattern: /[a-z]/i + type: string + byte: + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + binary: + format: binary + type: string + date: + format: date + type: string + dateTime: + format: date-time + type: string + uuid: + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + format: uuid + type: string + password: + format: password + maxLength: 64 + minLength: 10 + type: string + BigDecimal: + format: number + type: string + required: + - byte + - date + - number + - password + type: object + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + Enum_Test: + properties: + enum_string: + enum: + - UPPER + - lower + - "" + type: string + enum_string_required: + enum: + - UPPER + - lower + - "" + type: string + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' + required: + - enum_string_required + type: object + AdditionalPropertiesClass: + properties: + map_string: + additionalProperties: + type: string + type: object + map_number: + additionalProperties: + type: number + type: object + map_integer: + additionalProperties: + type: integer + type: object + map_boolean: + additionalProperties: + type: boolean + type: object + map_array_integer: + additionalProperties: + items: + type: integer + type: array + type: object + map_array_anytype: + additionalProperties: + items: + properties: {} + type: object + type: array + type: object + map_map_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_map_anytype: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + type: object + anytype_1: + properties: {} + type: object + anytype_2: + type: object + anytype_3: + properties: {} + type: object + type: object + AdditionalPropertiesString: + additionalProperties: + type: string + properties: + name: + type: string + type: object + AdditionalPropertiesInteger: + additionalProperties: + type: integer + properties: + name: + type: string + type: object + AdditionalPropertiesNumber: + additionalProperties: + type: number + properties: + name: + type: string + type: object + AdditionalPropertiesBoolean: + additionalProperties: + type: boolean + properties: + name: + type: string + type: object + AdditionalPropertiesArray: + additionalProperties: + items: + properties: {} + type: object + type: array + properties: + name: + type: string + type: object + AdditionalPropertiesObject: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + properties: + name: + type: string + type: object + AdditionalPropertiesAnyType: + additionalProperties: + properties: {} + type: object + properties: + name: + type: string + type: object + MixedPropertiesAndAdditionalPropertiesClass: + properties: + uuid: + format: uuid + type: string + dateTime: + format: date-time + type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + List: + properties: + "123-list": + type: string + type: object + Client: + example: + client: client + properties: + client: + type: string + type: object + ReadOnlyFirst: + properties: + bar: + readOnly: true + type: string + baz: + type: string + type: object + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object + Capitalization: + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + direct_map: + additionalProperties: + type: boolean + type: object + indirect_map: + additionalProperties: + type: boolean + type: object + type: object + ArrayTest: + properties: + array_of_string: + items: + type: string + type: array + array_array_of_integer: + items: + items: + format: int64 + type: integer + type: array + type: array + array_array_of_model: + items: + items: + $ref: '#/components/schemas/ReadOnlyFirst' + type: array + type: array + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object + ArrayOfNumberOnly: + properties: + ArrayNumber: + items: + type: number + type: array + type: object + ArrayOfArrayOfNumberOnly: + properties: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array + type: object + EnumArrays: + properties: + just_symbol: + enum: + - '>=' + - $ + type: string + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterEnum: + enum: + - placed + - approved + - delivered + type: string + OuterComposite: + example: + my_string: my_string + my_number: 0.8008281904610115 + my_boolean: true + properties: + my_number: + type: number + my_string: + type: string + my_boolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + type: object + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + type: object + FileSchemaTestClass: + example: + file: + sourceURI: sourceURI + files: + - sourceURI: sourceURI + - sourceURI: sourceURI + properties: + file: + $ref: '#/components/schemas/File' + files: + items: + $ref: '#/components/schemas/File' + type: array + type: object + File: + description: Must be named `File` for test. + example: + sourceURI: sourceURI + properties: + sourceURI: + description: Test capitalization + type: string + type: object + TypeHolderDefault: + properties: + string_item: + default: what + type: string + number_item: + type: number + integer_item: + type: integer + bool_item: + default: true + type: boolean + array_item: + items: + type: integer + type: array + required: + - array_item + - bool_item + - integer_item + - number_item + - string_item + type: object + TypeHolderExample: + properties: + string_item: + example: what + type: string + number_item: + example: 1.234 + type: number + float_item: + example: 1.234 + format: float + type: number + integer_item: + example: -2 + type: integer + bool_item: + example: true + type: boolean + array_item: + example: + - 0 + - 1 + - 2 + - 3 + items: + type: integer + type: array + required: + - array_item + - bool_item + - float_item + - integer_item + - number_item + - string_item + type: object + XmlItem: + properties: + attribute_string: + example: string + type: string + xml: + attribute: true + attribute_number: + example: 1.234 + type: number + xml: + attribute: true + attribute_integer: + example: -2 + type: integer + xml: + attribute: true + attribute_boolean: + example: true + type: boolean + xml: + attribute: true + wrapped_array: + items: + type: integer + type: array + xml: + wrapped: true + name_string: + example: string + type: string + xml: + name: xml_name_string + name_number: + example: 1.234 + type: number + xml: + name: xml_name_number + name_integer: + example: -2 + type: integer + xml: + name: xml_name_integer + name_boolean: + example: true + type: boolean + xml: + name: xml_name_boolean + name_array: + items: + type: integer + xml: + name: xml_name_array_item + type: array + name_wrapped_array: + items: + type: integer + xml: + name: xml_name_wrapped_array_item + type: array + xml: + name: xml_name_wrapped_array + wrapped: true + prefix_string: + example: string + type: string + xml: + prefix: ab + prefix_number: + example: 1.234 + type: number + xml: + prefix: cd + prefix_integer: + example: -2 + type: integer + xml: + prefix: ef + prefix_boolean: + example: true + type: boolean + xml: + prefix: gh + prefix_array: + items: + type: integer + xml: + prefix: ij + type: array + prefix_wrapped_array: + items: + type: integer + xml: + prefix: mn + type: array + xml: + prefix: kl + wrapped: true + namespace_string: + example: string + type: string + xml: + namespace: http://a.com/schema + namespace_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + namespace_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + namespace_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + namespace_array: + items: + type: integer + xml: + namespace: http://e.com/schema + type: array + namespace_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + type: array + xml: + namespace: http://f.com/schema + wrapped: true + prefix_ns_string: + example: string + type: string + xml: + namespace: http://a.com/schema + prefix: a + prefix_ns_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + prefix: b + prefix_ns_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + prefix: c + prefix_ns_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + prefix: d + prefix_ns_array: + items: + type: integer + xml: + namespace: http://e.com/schema + prefix: e + type: array + prefix_ns_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + prefix: g + type: array + xml: + namespace: http://f.com/schema + prefix: f + wrapped: true + type: object + xml: + namespace: http://a.com/schema + prefix: pre + Dog_allOf: + properties: + breed: + type: string + type: object + Cat_allOf: + properties: + declawed: + type: boolean + type: object + BigCat_allOf: + properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey + api_key_query: + in: query + name: api_key_query + type: apiKey + http_basic_test: + scheme: basic + type: http +x-original-swagger-version: "2.0" diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator-ignore b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/.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/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES new file mode 100644 index 000000000000..e4c32719b541 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES @@ -0,0 +1,66 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenAPI2SpringBoot.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/AnotherFakeApiController.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeApiController.java +src/main/java/org/openapitools/api/FakeClassnameTestApi.java +src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiController.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiController.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiController.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +src/main/java/org/openapitools/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/model/Animal.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayTest.java +src/main/java/org/openapitools/model/BigCat.java +src/main/java/org/openapitools/model/BigCatAllOf.java +src/main/java/org/openapitools/model/Capitalization.java +src/main/java/org/openapitools/model/Cat.java +src/main/java/org/openapitools/model/CatAllOf.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ClassModel.java +src/main/java/org/openapitools/model/Client.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/DogAllOf.java +src/main/java/org/openapitools/model/EnumArrays.java +src/main/java/org/openapitools/model/EnumClass.java +src/main/java/org/openapitools/model/EnumTest.java +src/main/java/org/openapitools/model/FileSchemaTestClass.java +src/main/java/org/openapitools/model/FormatTest.java +src/main/java/org/openapitools/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/model/MapTest.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/model/Model200Response.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/ModelReturn.java +src/main/java/org/openapitools/model/Name.java +src/main/java/org/openapitools/model/NumberOnly.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/OuterComposite.java +src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/ReadOnlyFirst.java +src/main/java/org/openapitools/model/SpecialModelName.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/TypeHolderDefault.java +src/main/java/org/openapitools/model/TypeHolderExample.java +src/main/java/org/openapitools/model/User.java +src/main/java/org/openapitools/model/XmlItem.java +src/main/resources/application.properties +src/main/resources/openapi.yaml diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/README.md b/samples/openapi3/server/petstore/springboot-implicitHeaders/README.md new file mode 100644 index 000000000000..befc961488ae --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/README.md @@ -0,0 +1,16 @@ +# OpenAPI generated server + +Spring Boot Server + + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:80/ + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml b/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml new file mode 100644 index 000000000000..1034cd0499da --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml @@ -0,0 +1,71 @@ + + 4.0.0 + org.openapitools.openapi3 + springboot-implicitHeaders + jar + springboot-implicitHeaders + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/OpenAPI2SpringBoot.java new file mode 100644 index 000000000000..cb088f451935 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -0,0 +1,63 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebMvcConfigurer webConfigurer() { + return new WebMvcConfigurer() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); + } + }; + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +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.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(); + } + + @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 this; + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..82a5df22e20e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,77 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "another-fake", description = "the another-fake API") +public interface AnotherFakeApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test special tags", + tags = { "$another-fake?" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/another-fake/dummy", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity call123testSpecialTags( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java new file mode 100644 index 000000000000..d8efcca7f8a4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class AnotherFakeApiController implements AnotherFakeApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public AnotherFakeApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} 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 new file mode 100644 index 000000000000..456caa3cf66f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,577 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import org.openapitools.model.ModelApiResponse; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake", description = "the fake API") +public interface FakeApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "creates an XmlItem", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/create_xml_item", + consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } + ) + default ResponseEntity createXmlItem( + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody XmlItem xmlItem + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/boolean", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterBooleanSerialize( + @Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Boolean body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/composite", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterCompositeSerialize( + @Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) OuterComposite body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; + ApiUtil.setExampleResponse(request, "*/*", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/number", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterNumberSerialize( + @Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) BigDecimal body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/string", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterStringSerialize( + @Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) String body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-file-schema", + consumes = { "application/json" } + ) + default ResponseEntity testBodyWithFileSchema( + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody FileSchemaTestClass body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-query-params", + consumes = { "application/json" } + ) + default ResponseEntity testBodyWithQueryParams( + @NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query, + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test \"client\" model", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity testClientModel( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "http_basic_test") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testEndpointParameters( + @Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "double", required = true) Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "integer", required = false) Integer integer, + @Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int32", required = false) Integer int32, + @Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, + @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, + @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, + @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @Operation( + summary = "To test enum parameters", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid request"), + @ApiResponse(responseCode = "404", description = "Not found") + } + ) + @Parameters({ + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })), + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testEnumParameters( + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @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) + */ + @Operation( + summary = "Fake endpoint to test group parameters (optional)", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Someting wrong") + } + ) + @Parameters({ + @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")), + @Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) + }) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/fake" + ) + default ResponseEntity testGroupParameters( + @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test inline additionalProperties", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/inline-additionalProperties", + consumes = { "application/json" } + ) + default ResponseEntity testInlineAdditionalProperties( + @Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Map param + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test json serialization of form data", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake/jsonFormData", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testJsonFormData( + @Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param", required = true) String param, + @Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/test-query-parameters" + ) + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List context + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image (required)", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default ResponseEntity uploadFileWithRequiredFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java new file mode 100644 index 000000000000..c4b88419aabe --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeApiController implements FakeApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public FakeApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..8f1db4a34810 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -0,0 +1,80 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake_classname_test", description = "the fake_classname_test API") +public interface FakeClassnameTestApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test class name in snake case", + tags = { "fake_classname_tags 123#$%^" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + }, + security = { + @SecurityRequirement(name = "api_key_query") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake_classname_test", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity testClassname( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java new file mode 100644 index 000000000000..85458b255da5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeClassnameTestApiController implements FakeClassnameTestApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public FakeClassnameTestApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..67abf9f8cb5e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,370 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @Parameters({ + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) + }) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + default ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java new file mode 100644 index 000000000000..e72c57e3cbec --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class PetApiController implements PetApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public PetApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..ce360c31059f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,191 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{order_id}" + ) + default ResponseEntity deleteOrder( + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = { "application/json" } + ) + default ResponseEntity> getInventory( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{order_id}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java new file mode 100644 index 000000000000..1293b5c8f6e4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class StoreApiController implements StoreApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public StoreApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..3f0113d6d1ad --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,288 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + default ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + default ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + default ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + default ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + default ResponseEntity logoutUser( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @Parameters({ + }) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + default ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java new file mode 100644 index 000000000000..3f6c4d9a2d6f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class UserApiController implements UserApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public UserApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..34bae16b8986 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,53 @@ +package org.openapitools.configuration; + +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Controller; +import org.springframework.util.StreamUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + private static YAMLMapper yamlMapper = new YAMLMapper(); + + @Value("classpath:/openapi.yaml") + private Resource openapi; + + @Bean + public String openapiContent() throws IOException { + try(InputStream is = openapi.getInputStream()) { + return StreamUtils.copyToString(is, Charset.defaultCharset()); + } + } + + @GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi") + @ResponseBody + public String openapiYaml() throws IOException { + return openapiContent(); + } + + @GetMapping(value = "/openapi.json", produces = "application/json") + @ResponseBody + public Object openapiJson() throws IOException { + return yamlMapper.readValue(openapiContent(), Object.class); + } + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui/index.html?url=../openapi.json"; + } + + +} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..0c57ae7dd14c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesAnyType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesAnyType name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..b5285ec2f29b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesArray + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesArray name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..f8ca38c286d5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesBoolean + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesBoolean name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..dfd28ccb9963 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,414 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesClass { + @JsonProperty("map_string") + @Valid + private Map mapString = null; + + @JsonProperty("map_number") + @Valid + private Map mapNumber = null; + + @JsonProperty("map_integer") + @Valid + private Map mapInteger = null; + + @JsonProperty("map_boolean") + @Valid + private Map mapBoolean = null; + + @JsonProperty("map_array_integer") + @Valid + private Map> mapArrayInteger = null; + + @JsonProperty("map_array_anytype") + @Valid + private Map> mapArrayAnytype = null; + + @JsonProperty("map_map_string") + @Valid + private Map> mapMapString = null; + + @JsonProperty("map_map_anytype") + @Valid + private Map> mapMapAnytype = null; + + @JsonProperty("anytype_1") + private Object anytype1; + + @JsonProperty("anytype_2") + private Object anytype2; + + @JsonProperty("anytype_3") + private Object anytype3; + + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + @Schema(name = "mapString", defaultValue = "") + + + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + @Schema(name = "mapNumber", defaultValue = "") + + @Valid + + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + @Schema(name = "mapInteger", defaultValue = "") + + + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + @Schema(name = "mapBoolean", defaultValue = "") + + + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + @Schema(name = "mapArrayInteger", defaultValue = "") + + @Valid + + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + @Schema(name = "mapArrayAnytype", defaultValue = "") + + @Valid + + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + @Schema(name = "mapMapString", defaultValue = "") + + @Valid + + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + @Schema(name = "mapMapAnytype", defaultValue = "") + + @Valid + + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + @Schema(name = "anytype1", defaultValue = "") + + + public Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = anytype2; + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + @Schema(name = "anytype2", defaultValue = "") + + + public Object getAnytype2() { + return anytype2; + } + + public void setAnytype2(Object anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClass anytype3(Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + @Schema(name = "anytype3", defaultValue = "") + + + public Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..5fea577ab44b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesInteger + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesInteger name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..e6eee612a24f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesNumber + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesNumber name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..d7116bd7572c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..d2022be266fb --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesString + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesString name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java new file mode 100644 index 000000000000..6f096d5069ed --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -0,0 +1,118 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +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 org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Animal + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), +}) + +public class Animal { + @JsonProperty("className") + private String className; + + @JsonProperty("color") + private String color = "red"; + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @Schema(name = "className", required = true, defaultValue = "") + @NotNull + + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + @Schema(name = "color", defaultValue = "") + + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..ebe36ad761a9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") + @Valid + private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + @Schema(name = "arrayArrayNumber", defaultValue = "") + + @Valid + + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..8158dd44ab88 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") + @Valid + private List arrayNumber = null; + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + @Schema(name = "arrayNumber", defaultValue = "") + + @Valid + + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 000000000000..420010561bcd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,165 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayTest { + @JsonProperty("array_of_string") + @Valid + private List arrayOfString = null; + + @JsonProperty("array_array_of_integer") + @Valid + private List> arrayArrayOfInteger = null; + + @JsonProperty("array_array_of_model") + @Valid + private List> arrayArrayOfModel = null; + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + @Schema(name = "arrayOfString", defaultValue = "") + + + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + @Schema(name = "arrayArrayOfInteger", defaultValue = "") + + @Valid + + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + @Schema(name = "arrayArrayOfModel", defaultValue = "") + + @Valid + + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java new file mode 100644 index 000000000000..7f4a080ad8d2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,126 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.BigCatAllOf; +import org.openapitools.model.Cat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCat extends Cat { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java new file mode 100644 index 000000000000..d0a47ab5127c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -0,0 +1,123 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCatAllOf { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCatAllOf kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatAllOf bigCatAllOf = (BigCatAllOf) o; + return Objects.equals(this.kind, bigCatAllOf.kind); + } + + @Override + public int hashCode() { + return Objects.hash(kind); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java new file mode 100644 index 000000000000..92d9a7245f16 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,208 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Capitalization + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Capitalization { + @JsonProperty("smallCamel") + private String smallCamel; + + @JsonProperty("CapitalCamel") + private String capitalCamel; + + @JsonProperty("small_Snake") + private String smallSnake; + + @JsonProperty("Capital_Snake") + private String capitalSnake; + + @JsonProperty("SCA_ETH_Flow_Points") + private String scAETHFlowPoints; + + @JsonProperty("ATT_NAME") + private String ATT_NAME; + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + @Schema(name = "smallCamel", defaultValue = "") + + + public String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + @Schema(name = "capitalCamel", defaultValue = "") + + + public String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + @Schema(name = "smallSnake", defaultValue = "") + + + public String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + @Schema(name = "capitalSnake", defaultValue = "") + + + public String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + @Schema(name = "scAETHFlowPoints", defaultValue = "") + + + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") + + + public String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java new file mode 100644 index 000000000000..2e496fb4accd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.CatAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Cat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Cat extends Animal { + @JsonProperty("declawed") + private Boolean declawed; + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java new file mode 100644 index 000000000000..b732a62b1bc3 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * CatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class CatAllOf { + @JsonProperty("declawed") + private Boolean declawed; + + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); + } + + @Override + public int hashCode() { + return Objects.hash(declawed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..038fc8df3afd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Category + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name = "default-name"; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + 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/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java new file mode 100644 index 000000000000..fa2a736f4fb5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model with \"_class\" property + */ +@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ClassModel { + @JsonProperty("_class") + private String propertyClass; + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java new file mode 100644 index 000000000000..e11bd4ff1b13 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Client { + @JsonProperty("client") + private String client; + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + @Schema(name = "client", defaultValue = "") + + + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..ed5dc71a4ba2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.DogAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Dog + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Dog extends Animal { + @JsonProperty("breed") + private String breed; + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java new file mode 100644 index 000000000000..2c99bc376c34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * DogAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class DogAllOf { + @JsonProperty("breed") + private String breed; + + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); + } + + @Override + public int hashCode() { + return Objects.hash(breed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 000000000000..e1b2df0716a2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,190 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumArrays + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumArrays { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("just_symbol") + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("array_enum") + @Valid + private List arrayEnum = null; + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + @Schema(name = "justSymbol", defaultValue = "") + + + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + @Schema(name = "arrayEnum", defaultValue = "") + + + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java new file mode 100644 index 000000000000..e3d30c1ad453 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java new file mode 100644 index 000000000000..938af53e2b81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,331 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnum; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumTest { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string") + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string_required") + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_integer") + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_number") + private EnumNumberEnum enumNumber; + + @JsonProperty("outerEnum") + private OuterEnum outerEnum; + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + @Schema(name = "enumString", defaultValue = "") + + + public EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @Schema(name = "enumStringRequired", required = true, defaultValue = "") + @NotNull + + + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + @Schema(name = "enumInteger", defaultValue = "") + + + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + @Schema(name = "enumNumber", defaultValue = "") + + + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + @Schema(name = "outerEnum", defaultValue = "") + + @Valid + + public OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..0d1e9ca8495c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,121 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FileSchemaTestClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FileSchemaTestClass { + @JsonProperty("file") + private java.io.File file; + + @JsonProperty("files") + @Valid + private List files = null; + + public FileSchemaTestClass file(java.io.File file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + @Schema(name = "file", defaultValue = "") + + @Valid + + public java.io.File getFile() { + return file; + } + + public void setFile(java.io.File file) { + this.file = file; + } + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + @Schema(name = "files", defaultValue = "") + + @Valid + + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java new file mode 100644 index 000000000000..6546370cd329 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,435 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FormatTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FormatTest { + @JsonProperty("integer") + private Integer integer; + + @JsonProperty("int32") + private Integer int32; + + @JsonProperty("int64") + private Long int64; + + @JsonProperty("number") + private BigDecimal number; + + @JsonProperty("float") + private Float _float; + + @JsonProperty("double") + private Double _double; + + @JsonProperty("string") + private String string; + + @JsonProperty("byte") + private byte[] _byte; + + @JsonProperty("binary") + private org.springframework.core.io.Resource binary; + + @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + private LocalDate date; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("password") + private String password; + + @JsonProperty("BigDecimal") + private BigDecimal bigDecimal; + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + @Schema(name = "integer", defaultValue = "") + +@Min(10) @Max(100) + public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + @Schema(name = "int32", defaultValue = "") + +@Min(20) @Max(200) + public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + @Schema(name = "int64", defaultValue = "") + + + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @Schema(name = "number", required = true, defaultValue = "") + @NotNull + + @Valid +@DecimalMin("32.1") @DecimalMax("543.2") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + @Schema(name = "_float", defaultValue = "") + +@DecimalMin("54.3") @DecimalMax("987.6") + public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + @Schema(name = "_double", defaultValue = "") + +@DecimalMin("67.8") @DecimalMax("123.4") + public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + @Schema(name = "string", defaultValue = "") + +@Pattern(regexp = "/[a-z]/i") + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @Schema(name = "_byte", required = true, defaultValue = "") + @NotNull + + + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + @Schema(name = "binary", defaultValue = "") + + @Valid + + public org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @Schema(name = "date", required = true, defaultValue = "") + @NotNull + + @Valid + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", required = true, defaultValue = "") + @NotNull + +@Size(min = 10, max = 64) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + @Schema(name = "bigDecimal", defaultValue = "") + + @Valid + + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..dfb615a529fc --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * HasOnlyReadOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class HasOnlyReadOnly { + @JsonProperty("bar") + private String bar; + + @JsonProperty("foo") + private String foo; + + public HasOnlyReadOnly bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public HasOnlyReadOnly foo(String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + @Schema(name = "foo", readOnly = true, defaultValue = "") + + + public String getFoo() { + return foo; + } + + public void setFoo(String foo) { + this.foo = foo; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java new file mode 100644 index 000000000000..3ff73062758f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,234 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MapTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MapTest { + @JsonProperty("map_map_of_string") + @Valid + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("map_of_enum_string") + @Valid + private Map mapOfEnumString = null; + + @JsonProperty("direct_map") + @Valid + private Map directMap = null; + + @JsonProperty("indirect_map") + @Valid + private Map indirectMap = null; + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + @Schema(name = "mapMapOfString", defaultValue = "") + + @Valid + + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + @Schema(name = "mapOfEnumString", defaultValue = "") + + + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + @Schema(name = "directMap", defaultValue = "") + + + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + @Schema(name = "indirectMap", defaultValue = "") + + + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..03a7be43cc4a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,152 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("map") + @Valid + private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + @Schema(name = "map", defaultValue = "") + + @Valid + + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java new file mode 100644 index 000000000000..77bf91649b08 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name starting with number + */ +@Schema(name = "200_response",description = "Model for testing model name starting with number") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Model200Response { + @JsonProperty("name") + private Integer name; + + @JsonProperty("class") + private String propertyClass; + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..2443600df226 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,133 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ModelApiResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java new file mode 100644 index 000000000000..0301a47e9f3e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing reserved words + */ +@Schema(name = "Return",description = "Model for testing reserved words") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelReturn { + @JsonProperty("return") + private Integer _return; + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + @Schema(name = "_return", defaultValue = "") + + + public Integer getReturn() { + return _return; + } + + public void setReturn(Integer _return) { + this._return = _return; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java new file mode 100644 index 000000000000..62a16f80ee07 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,160 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name same as property name + */ +@Schema(name = "Name",description = "Model for testing model name same as property name") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Name { + @JsonProperty("name") + private Integer name; + + @JsonProperty("snake_case") + private Integer snakeCase; + + @JsonProperty("property") + private String property; + + @JsonProperty("123Number") + private Integer _123number; + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Name snakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + @Schema(name = "snakeCase", readOnly = true, defaultValue = "") + + + public Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @Schema(name = "property", defaultValue = "") + + + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public Name _123number(Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + @Schema(name = "_123number", readOnly = true, defaultValue = "") + + + public Integer get123number() { + return _123number; + } + + public void set123number(Integer _123number) { + this._123number = _123number; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java new file mode 100644 index 000000000000..521fad80d5a7 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * NumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class NumberOnly { + @JsonProperty("JustNumber") + private BigDecimal justNumber; + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + @Schema(name = "justNumber", defaultValue = "") + + @Valid + + public BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..05071bdfe2bf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,249 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Order + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 000000000000..a721a3dde6a0 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * OuterComposite + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OuterComposite { + @JsonProperty("my_number") + private BigDecimal myNumber; + + @JsonProperty("my_string") + private String myString; + + @JsonProperty("my_boolean") + private Boolean myBoolean; + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + @Schema(name = "myNumber", defaultValue = "") + + @Valid + + public BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + @Schema(name = "myString", defaultValue = "") + + + public String getMyString() { + return myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + @Schema(name = "myBoolean", defaultValue = "") + + + public Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 000000000000..ba0cca8a5e81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..988eb317134d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,273 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private Set photoUrls = new LinkedHashSet<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..1c51770a8e66 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ReadOnlyFirst + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ReadOnlyFirst { + @JsonProperty("bar") + private String bar; + + @JsonProperty("baz") + private String baz; + + public ReadOnlyFirst bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + @Schema(name = "baz", defaultValue = "") + + + public String getBaz() { + return baz; + } + + public void setBaz(String baz) { + this.baz = baz; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 000000000000..75f4be4e9f8f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * SpecialModelName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class SpecialModelName { + @JsonProperty("$special[property.name]") + private Long $specialPropertyName; + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + @Schema(name = "$specialPropertyName", defaultValue = "") + + + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName $specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..8722df999bfc --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Tag + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java new file mode 100644 index 000000000000..19e9bf310f76 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,198 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderDefault + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderDefault { + @JsonProperty("string_item") + private String stringItem = "what"; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem = true; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java new file mode 100644 index 000000000000..c9a3762bc74b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,224 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderExample + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderExample { + @JsonProperty("string_item") + private String stringItem; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("float_item") + private Float floatItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..83152a155535 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,258 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * User + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java new file mode 100644 index 000000000000..59a183db0f62 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,872 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * XmlItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class XmlItem { + @JsonProperty("attribute_string") + private String attributeString; + + @JsonProperty("attribute_number") + private BigDecimal attributeNumber; + + @JsonProperty("attribute_integer") + private Integer attributeInteger; + + @JsonProperty("attribute_boolean") + private Boolean attributeBoolean; + + @JsonProperty("wrapped_array") + @Valid + private List wrappedArray = null; + + @JsonProperty("name_string") + private String nameString; + + @JsonProperty("name_number") + private BigDecimal nameNumber; + + @JsonProperty("name_integer") + private Integer nameInteger; + + @JsonProperty("name_boolean") + private Boolean nameBoolean; + + @JsonProperty("name_array") + @Valid + private List nameArray = null; + + @JsonProperty("name_wrapped_array") + @Valid + private List nameWrappedArray = null; + + @JsonProperty("prefix_string") + private String prefixString; + + @JsonProperty("prefix_number") + private BigDecimal prefixNumber; + + @JsonProperty("prefix_integer") + private Integer prefixInteger; + + @JsonProperty("prefix_boolean") + private Boolean prefixBoolean; + + @JsonProperty("prefix_array") + @Valid + private List prefixArray = null; + + @JsonProperty("prefix_wrapped_array") + @Valid + private List prefixWrappedArray = null; + + @JsonProperty("namespace_string") + private String namespaceString; + + @JsonProperty("namespace_number") + private BigDecimal namespaceNumber; + + @JsonProperty("namespace_integer") + private Integer namespaceInteger; + + @JsonProperty("namespace_boolean") + private Boolean namespaceBoolean; + + @JsonProperty("namespace_array") + @Valid + private List namespaceArray = null; + + @JsonProperty("namespace_wrapped_array") + @Valid + private List namespaceWrappedArray = null; + + @JsonProperty("prefix_ns_string") + private String prefixNsString; + + @JsonProperty("prefix_ns_number") + private BigDecimal prefixNsNumber; + + @JsonProperty("prefix_ns_integer") + private Integer prefixNsInteger; + + @JsonProperty("prefix_ns_boolean") + private Boolean prefixNsBoolean; + + @JsonProperty("prefix_ns_array") + @Valid + private List prefixNsArray = null; + + @JsonProperty("prefix_ns_wrapped_array") + @Valid + private List prefixNsWrappedArray = null; + + public XmlItem attributeString(String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + @Schema(name = "attributeString", example = "string", defaultValue = "") + + + public String getAttributeString() { + return attributeString; + } + + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + @Schema(name = "attributeInteger", example = "-2", defaultValue = "") + + + public Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + @Schema(name = "attributeBoolean", example = "true", defaultValue = "") + + + public Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + @Schema(name = "wrappedArray", defaultValue = "") + + + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + @Schema(name = "nameString", example = "string", defaultValue = "") + + + public String getNameString() { + return nameString; + } + + public void setNameString(String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + @Schema(name = "nameNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + @Schema(name = "nameInteger", example = "-2", defaultValue = "") + + + public Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + @Schema(name = "nameBoolean", example = "true", defaultValue = "") + + + public Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + @Schema(name = "nameArray", defaultValue = "") + + + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + @Schema(name = "nameWrappedArray", defaultValue = "") + + + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + @Schema(name = "prefixString", example = "string", defaultValue = "") + + + public String getPrefixString() { + return prefixString; + } + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + @Schema(name = "prefixInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + @Schema(name = "prefixBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + @Schema(name = "prefixArray", defaultValue = "") + + + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + @Schema(name = "prefixWrappedArray", defaultValue = "") + + + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + @Schema(name = "namespaceString", example = "string", defaultValue = "") + + + public String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") + + + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") + + + public Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + @Schema(name = "namespaceArray", defaultValue = "") + + + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + @Schema(name = "namespaceWrappedArray", defaultValue = "") + + + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + @Schema(name = "prefixNsString", example = "string", defaultValue = "") + + + public String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + @Schema(name = "prefixNsArray", defaultValue = "") + + + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + @Schema(name = "prefixNsWrappedArray", defaultValue = "") + + + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/application.properties b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/application.properties new file mode 100644 index 000000000000..9d06609db665 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=80 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false 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 new file mode 100644 index 000000000000..d6386dc39bf4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -0,0 +1,2264 @@ +openapi: 3.0.1 +info: + description: 'This spec is mainly for testing Petstore server and contains fake + endpoints, models. Please do not use this for any other purpose. Special characters: + " \' + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +servers: +- url: http://petstore.swagger.io:80/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + post: + operationId: addPet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + put: + operationId: updatePet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + "405": + content: {} + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + content: {} + description: Invalid status value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + uniqueItems: true + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + description: successful operation + "400": + content: {} + description: Invalid tag value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + responses: + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /store/order: + post: + operationId: placeOrder + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: store + /store/order/{order_id}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: order_id + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + in: path + name: order_id + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Find purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Create user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + in: query + name: username + required: true + schema: + type: string + - description: The password for login in clear text + in: query + name: password + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + format: int32 + type: integer + X-Expires-After: + description: date in UTC when token expires + schema: + format: date-time + type: string + "400": + content: {} + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/logout: + get: + operationId: logoutUser + responses: + default: + content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Delete user + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + in: path + name: username + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + content: {} + description: Invalid user supplied + "404": + content: {} + description: User not found + summary: Updated user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /fake_classname_test: + patch: + description: To test class name in snake case + operationId: testClassname + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + security: + - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake_classname_tags 123#$%^ + /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: Required String in group parameters + in: query + name: required_string_group + required: true + schema: + type: integer + - description: Required Boolean in group parameters + in: header + name: required_boolean_group + required: true + schema: + type: boolean + - description: Required Integer in group parameters + in: query + name: required_int64_group + required: true + schema: + format: int64 + type: integer + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + "400": + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-accepts: application/json + x-tags: + - tag: fake + get: + description: To test enum parameters + operationId: testEnumParameters + parameters: + - description: Header parameter enum test (string array) + explode: false + in: header + name: enum_header_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: simple + - description: Header parameter enum test (string) + in: header + name: enum_header_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (string array) + explode: false + in: query + name: enum_query_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: form + - description: Query parameter enum test (string) + in: query + name: enum_query_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (double) + in: query + name: enum_query_integer + schema: + enum: + - 1 + - -2 + format: int32 + type: integer + - description: Query parameter enum test (double) + in: query + name: enum_query_double + schema: + enum: + - 1.1 + - -1.2 + format: double + type: number + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string + responses: + "400": + content: {} + description: Invalid request + "404": + content: {} + description: Not found + summary: To test enum parameters + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + post: + description: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + integer: + description: None + format: int32 + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + required: true + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + security: + - http_basic_test: [] + summary: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/outer/number: + post: + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Output number + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/string: + post: + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Output string + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/boolean: + post: + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Output boolean + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/composite: + post: + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Output composite + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/jsonFormData: + get: + operationId: testJsonFormData + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + required: true + responses: + "200": + content: {} + description: successful operation + summary: test json serialization of form data + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/inline-additionalProperties: + post: + operationId: testInlineAdditionalProperties + requestBody: + content: + application/json: + schema: + additionalProperties: + type: string + type: object + description: request body + required: true + responses: + "200": + content: {} + description: successful operation + summary: test inline additionalProperties + tags: + - fake + x-codegen-request-body-name: param + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - in: query + name: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/create_xml_item: + post: + description: this route creates an XmlItem + operationId: createXmlItem + requestBody: + content: + application/xml: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + description: XmlItem Body + required: true + responses: + "200": + content: {} + description: successful operation + summary: creates an XmlItem + tags: + - fake + x-codegen-request-body-name: XmlItem + x-contentType: application/xml + x-accepts: application/json + x-tags: + - tag: fake + /another-fake/dummy: + patch: + description: To test special tags and operation ID starting with number + operationId: 123_test_@#$%_special_tags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: $another-fake? + /fake/body-with-file-schema: + put: + description: For this test, the body for this request much reference a schema + named `File`. + operationId: testBodyWithFileSchema + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/test-query-parameters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: false + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + - in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: {} + description: Success + tags: + - fake + x-accepts: application/json + x-tags: + - tag: fake + /fake/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image (required) + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet +components: + schemas: + Order: + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + type: object + xml: + name: Order + Category: + example: + name: default-name + id: 6 + properties: + id: + format: int64 + type: integer + name: + default: default-name + type: string + required: + - name + type: object + xml: + name: Category + User: + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + type: object + xml: + name: User + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: default-name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + uniqueItems: true + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + ApiResponse: + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + type: object + $special[model.name]: + properties: + $special[property.name]: + format: int64 + type: integer + type: object + xml: + name: $special[model.name] + Return: + description: Model for testing reserved words + properties: + return: + format: int32 + type: integer + type: object + xml: + name: Return + Name: + description: Model for testing model name same as property name + properties: + name: + format: int32 + type: integer + snake_case: + format: int32 + readOnly: true + type: integer + property: + type: string + "123Number": + readOnly: true + type: integer + required: + - name + type: object + xml: + name: Name + "200_response": + description: Model for testing model name starting with number + properties: + name: + format: int32 + type: integer + class: + type: string + type: object + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + type: object + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Dog_allOf' + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Cat_allOf' + BigCat: + allOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/BigCat_allOf' + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array + format_test: + properties: + integer: + maximum: 1E+2 + minimum: 1E+1 + type: integer + int32: + format: int32 + maximum: 2E+2 + minimum: 2E+1 + type: integer + int64: + format: int64 + type: integer + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + format: float + maximum: 987.6 + minimum: 54.3 + type: number + double: + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + pattern: /[a-z]/i + type: string + byte: + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + binary: + format: binary + type: string + date: + format: date + type: string + dateTime: + format: date-time + type: string + uuid: + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + format: uuid + type: string + password: + format: password + maxLength: 64 + minLength: 10 + type: string + BigDecimal: + format: number + type: string + required: + - byte + - date + - number + - password + type: object + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + Enum_Test: + properties: + enum_string: + enum: + - UPPER + - lower + - "" + type: string + enum_string_required: + enum: + - UPPER + - lower + - "" + type: string + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' + required: + - enum_string_required + type: object + AdditionalPropertiesClass: + properties: + map_string: + additionalProperties: + type: string + type: object + map_number: + additionalProperties: + type: number + type: object + map_integer: + additionalProperties: + type: integer + type: object + map_boolean: + additionalProperties: + type: boolean + type: object + map_array_integer: + additionalProperties: + items: + type: integer + type: array + type: object + map_array_anytype: + additionalProperties: + items: + properties: {} + type: object + type: array + type: object + map_map_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_map_anytype: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + type: object + anytype_1: + properties: {} + type: object + anytype_2: + type: object + anytype_3: + properties: {} + type: object + type: object + AdditionalPropertiesString: + additionalProperties: + type: string + properties: + name: + type: string + type: object + AdditionalPropertiesInteger: + additionalProperties: + type: integer + properties: + name: + type: string + type: object + AdditionalPropertiesNumber: + additionalProperties: + type: number + properties: + name: + type: string + type: object + AdditionalPropertiesBoolean: + additionalProperties: + type: boolean + properties: + name: + type: string + type: object + AdditionalPropertiesArray: + additionalProperties: + items: + properties: {} + type: object + type: array + properties: + name: + type: string + type: object + AdditionalPropertiesObject: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + properties: + name: + type: string + type: object + AdditionalPropertiesAnyType: + additionalProperties: + properties: {} + type: object + properties: + name: + type: string + type: object + MixedPropertiesAndAdditionalPropertiesClass: + properties: + uuid: + format: uuid + type: string + dateTime: + format: date-time + type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + List: + properties: + "123-list": + type: string + type: object + Client: + example: + client: client + properties: + client: + type: string + type: object + ReadOnlyFirst: + properties: + bar: + readOnly: true + type: string + baz: + type: string + type: object + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object + Capitalization: + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + direct_map: + additionalProperties: + type: boolean + type: object + indirect_map: + additionalProperties: + type: boolean + type: object + type: object + ArrayTest: + properties: + array_of_string: + items: + type: string + type: array + array_array_of_integer: + items: + items: + format: int64 + type: integer + type: array + type: array + array_array_of_model: + items: + items: + $ref: '#/components/schemas/ReadOnlyFirst' + type: array + type: array + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object + ArrayOfNumberOnly: + properties: + ArrayNumber: + items: + type: number + type: array + type: object + ArrayOfArrayOfNumberOnly: + properties: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array + type: object + EnumArrays: + properties: + just_symbol: + enum: + - '>=' + - $ + type: string + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterEnum: + enum: + - placed + - approved + - delivered + type: string + OuterComposite: + example: + my_string: my_string + my_number: 0.8008281904610115 + my_boolean: true + properties: + my_number: + type: number + my_string: + type: string + my_boolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + type: object + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + type: object + FileSchemaTestClass: + example: + file: + sourceURI: sourceURI + files: + - sourceURI: sourceURI + - sourceURI: sourceURI + properties: + file: + $ref: '#/components/schemas/File' + files: + items: + $ref: '#/components/schemas/File' + type: array + type: object + File: + description: Must be named `File` for test. + example: + sourceURI: sourceURI + properties: + sourceURI: + description: Test capitalization + type: string + type: object + TypeHolderDefault: + properties: + string_item: + default: what + type: string + number_item: + type: number + integer_item: + type: integer + bool_item: + default: true + type: boolean + array_item: + items: + type: integer + type: array + required: + - array_item + - bool_item + - integer_item + - number_item + - string_item + type: object + TypeHolderExample: + properties: + string_item: + example: what + type: string + number_item: + example: 1.234 + type: number + float_item: + example: 1.234 + format: float + type: number + integer_item: + example: -2 + type: integer + bool_item: + example: true + type: boolean + array_item: + example: + - 0 + - 1 + - 2 + - 3 + items: + type: integer + type: array + required: + - array_item + - bool_item + - float_item + - integer_item + - number_item + - string_item + type: object + XmlItem: + properties: + attribute_string: + example: string + type: string + xml: + attribute: true + attribute_number: + example: 1.234 + type: number + xml: + attribute: true + attribute_integer: + example: -2 + type: integer + xml: + attribute: true + attribute_boolean: + example: true + type: boolean + xml: + attribute: true + wrapped_array: + items: + type: integer + type: array + xml: + wrapped: true + name_string: + example: string + type: string + xml: + name: xml_name_string + name_number: + example: 1.234 + type: number + xml: + name: xml_name_number + name_integer: + example: -2 + type: integer + xml: + name: xml_name_integer + name_boolean: + example: true + type: boolean + xml: + name: xml_name_boolean + name_array: + items: + type: integer + xml: + name: xml_name_array_item + type: array + name_wrapped_array: + items: + type: integer + xml: + name: xml_name_wrapped_array_item + type: array + xml: + name: xml_name_wrapped_array + wrapped: true + prefix_string: + example: string + type: string + xml: + prefix: ab + prefix_number: + example: 1.234 + type: number + xml: + prefix: cd + prefix_integer: + example: -2 + type: integer + xml: + prefix: ef + prefix_boolean: + example: true + type: boolean + xml: + prefix: gh + prefix_array: + items: + type: integer + xml: + prefix: ij + type: array + prefix_wrapped_array: + items: + type: integer + xml: + prefix: mn + type: array + xml: + prefix: kl + wrapped: true + namespace_string: + example: string + type: string + xml: + namespace: http://a.com/schema + namespace_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + namespace_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + namespace_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + namespace_array: + items: + type: integer + xml: + namespace: http://e.com/schema + type: array + namespace_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + type: array + xml: + namespace: http://f.com/schema + wrapped: true + prefix_ns_string: + example: string + type: string + xml: + namespace: http://a.com/schema + prefix: a + prefix_ns_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + prefix: b + prefix_ns_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + prefix: c + prefix_ns_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + prefix: d + prefix_ns_array: + items: + type: integer + xml: + namespace: http://e.com/schema + prefix: e + type: array + prefix_ns_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + prefix: g + type: array + xml: + namespace: http://f.com/schema + prefix: f + wrapped: true + type: object + xml: + namespace: http://a.com/schema + prefix: pre + Dog_allOf: + properties: + breed: + type: string + type: object + Cat_allOf: + properties: + declawed: + type: boolean + type: object + BigCat_allOf: + properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey + api_key_query: + in: query + name: api_key_query + type: apiKey + http_basic_test: + scheme: basic + type: http +x-original-swagger-version: "2.0" diff --git a/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator-ignore b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/.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/openapi3/server/petstore/springboot-reactive/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/FILES new file mode 100644 index 000000000000..9df6c44a3213 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/FILES @@ -0,0 +1,72 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenAPI2SpringBoot.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/AnotherFakeApiController.java +src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeApiController.java +src/main/java/org/openapitools/api/FakeApiDelegate.java +src/main/java/org/openapitools/api/FakeClassnameTestApi.java +src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiController.java +src/main/java/org/openapitools/api/PetApiDelegate.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiController.java +src/main/java/org/openapitools/api/StoreApiDelegate.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiController.java +src/main/java/org/openapitools/api/UserApiDelegate.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +src/main/java/org/openapitools/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/model/Animal.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayTest.java +src/main/java/org/openapitools/model/BigCat.java +src/main/java/org/openapitools/model/BigCatAllOf.java +src/main/java/org/openapitools/model/Capitalization.java +src/main/java/org/openapitools/model/Cat.java +src/main/java/org/openapitools/model/CatAllOf.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ClassModel.java +src/main/java/org/openapitools/model/Client.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/DogAllOf.java +src/main/java/org/openapitools/model/EnumArrays.java +src/main/java/org/openapitools/model/EnumClass.java +src/main/java/org/openapitools/model/EnumTest.java +src/main/java/org/openapitools/model/FileSchemaTestClass.java +src/main/java/org/openapitools/model/FormatTest.java +src/main/java/org/openapitools/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/model/MapTest.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/model/Model200Response.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/ModelReturn.java +src/main/java/org/openapitools/model/Name.java +src/main/java/org/openapitools/model/NumberOnly.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/OuterComposite.java +src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/ReadOnlyFirst.java +src/main/java/org/openapitools/model/SpecialModelName.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/TypeHolderDefault.java +src/main/java/org/openapitools/model/TypeHolderExample.java +src/main/java/org/openapitools/model/User.java +src/main/java/org/openapitools/model/XmlItem.java +src/main/resources/application.properties +src/main/resources/openapi.yaml diff --git a/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-reactive/README.md b/samples/openapi3/server/petstore/springboot-reactive/README.md new file mode 100644 index 000000000000..55dc732c1b00 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/README.md @@ -0,0 +1,13 @@ +# OpenAPI generated server + +Spring Boot Server + + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + +Start your server as a simple java application + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-reactive/pom.xml b/samples/openapi3/server/petstore/springboot-reactive/pom.xml new file mode 100644 index 000000000000..a6268c2794f7 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/pom.xml @@ -0,0 +1,71 @@ + + 4.0.0 + org.openapitools.openapi3 + springboot-reactive + jar + springboot-reactive + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-webflux + + + org.springframework.data + spring-data-commons + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/OpenAPI2SpringBoot.java new file mode 100644 index 000000000000..254af0225142 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -0,0 +1,63 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.reactive.config.CorsRegistry; +import org.springframework.web.reactive.config.ResourceHandlerRegistry; +import org.springframework.web.reactive.config.WebFluxConfigurer; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebFluxConfigurer webConfigurer() { + return new WebFluxConfigurer() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); + } + }; + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +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.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(); + } + + @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 this; + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..c7e2bb2b25a2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,66 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "another-fake", description = "the another-fake API") +public interface AnotherFakeApi { + + default AnotherFakeApiDelegate getDelegate() { + return new AnotherFakeApiDelegate() {}; + } + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test special tags", + tags = { "$another-fake?" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/another-fake/dummy", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default Mono> call123testSpecialTags( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().call123testSpecialTags(body, exchange); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java new file mode 100644 index 000000000000..df11134c8067 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class AnotherFakeApiController implements AnotherFakeApi { + + private final AnotherFakeApiDelegate delegate; + + public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); + } + + @Override + public AnotherFakeApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java new file mode 100644 index 000000000000..2ef11c811c11 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -0,0 +1,52 @@ +package org.openapitools.api; + +import org.openapitools.model.Client; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link AnotherFakeApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface AnotherFakeApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see AnotherFakeApi#call123testSpecialTags + */ + default Mono> call123testSpecialTags(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..7ed3b0ab28d9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,20 @@ +package org.openapitools.api; + +import java.nio.charset.StandardCharsets; +import org.springframework.core.io.buffer.DefaultDataBuffer; +import org.springframework.core.io.buffer.DefaultDataBufferFactory; +import org.springframework.http.MediaType; +import org.springframework.http.server.reactive.ServerHttpResponse; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Mono; + +public class ApiUtil { + public static Mono getExampleResponse(ServerWebExchange exchange, MediaType mediaType, String example) { + ServerHttpResponse response = exchange.getResponse(); + response.getHeaders().setContentType(mediaType); + + byte[] exampleBytes = example.getBytes(StandardCharsets.UTF_8); + DefaultDataBuffer data = new DefaultDataBufferFactory().wrap(exampleBytes); + return response.writeWith(Mono.just(data)); + } +} 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 new file mode 100644 index 000000000000..729f78eb8246 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,524 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import org.openapitools.model.ModelApiResponse; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake", description = "the fake API") +public interface FakeApi { + + default FakeApiDelegate getDelegate() { + return new FakeApiDelegate() {}; + } + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "creates an XmlItem", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/create_xml_item", + consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } + ) + default Mono> createXmlItem( + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono xmlItem, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().createXmlItem(xmlItem, exchange); + } + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/boolean", + produces = { "*/*" } + ) + default Mono> fakeOuterBooleanSerialize( + @Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().fakeOuterBooleanSerialize(body, exchange); + } + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/composite", + produces = { "*/*" } + ) + default Mono> fakeOuterCompositeSerialize( + @Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().fakeOuterCompositeSerialize(body, exchange); + } + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/number", + produces = { "*/*" } + ) + default Mono> fakeOuterNumberSerialize( + @Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().fakeOuterNumberSerialize(body, exchange); + } + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/string", + produces = { "*/*" } + ) + default Mono> fakeOuterStringSerialize( + @Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().fakeOuterStringSerialize(body, exchange); + } + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-file-schema", + consumes = { "application/json" } + ) + default Mono> testBodyWithFileSchema( + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testBodyWithFileSchema(body, exchange); + } + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-query-params", + consumes = { "application/json" } + ) + default Mono> testBodyWithQueryParams( + @NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query, + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testBodyWithQueryParams(query, body, exchange); + } + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test \"client\" model", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default Mono> testClientModel( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testClientModel(body, exchange); + } + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "http_basic_test") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + default Mono> testEndpointParameters( + @Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "double", required = true) Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "integer", required = false) Integer integer, + @Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int32", required = false) Integer int32, + @Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, + @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, + @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) Flux binary, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, + @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, exchange); + } + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @Operation( + summary = "To test enum parameters", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid request"), + @ApiResponse(responseCode = "404", description = "Not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + default Mono> testEnumParameters( + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); + } + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Someting wrong (status code 400) + */ + @Operation( + summary = "Fake endpoint to test group parameters (optional)", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Someting wrong") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/fake" + ) + default Mono> testGroupParameters( + @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, exchange); + } + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test inline additionalProperties", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/inline-additionalProperties", + consumes = { "application/json" } + ) + default Mono> testInlineAdditionalProperties( + @Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono> param, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testInlineAdditionalProperties(param, exchange); + } + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test json serialization of form data", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake/jsonFormData", + consumes = { "application/x-www-form-urlencoded" } + ) + default Mono> testJsonFormData( + @Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param", required = true) String param, + @Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param2", required = true) String param2, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testJsonFormData(param, param2, exchange); + } + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/test-query-parameters" + ) + default Mono> testQueryParameterCollectionFormat( + @NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List context, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange); + } + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image (required)", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default Mono> uploadFileWithRequiredFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestPart(value = "requiredFile", required = true) Flux requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, exchange); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java new file mode 100644 index 000000000000..6b22c1aba661 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeApiController implements FakeApi { + + private final FakeApiDelegate delegate; + + public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); + } + + @Override + public FakeApiDelegate getDelegate() { + return delegate; + } + +} 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 new file mode 100644 index 000000000000..dbe78fa1c7f9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -0,0 +1,363 @@ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import org.openapitools.model.ModelApiResponse; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link FakeApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface FakeApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + * @see FakeApi#createXmlItem + */ + default Mono> createXmlItem(Mono xmlItem, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + * @see FakeApi#fakeOuterBooleanSerialize + */ + default Mono> fakeOuterBooleanSerialize(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + * @see FakeApi#fakeOuterCompositeSerialize + */ + default Mono> fakeOuterCompositeSerialize(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + * @see FakeApi#fakeOuterNumberSerialize + */ + default Mono> fakeOuterNumberSerialize(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + * @see FakeApi#fakeOuterStringSerialize + */ + default Mono> fakeOuterStringSerialize(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + * @see FakeApi#testBodyWithFileSchema + */ + default Mono> testBodyWithFileSchema(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + * @see FakeApi#testBodyWithQueryParams + */ + default Mono> testBodyWithQueryParams(String query, + Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see FakeApi#testClientModel + */ + default Mono> testClientModel(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see FakeApi#testEndpointParameters + */ + default Mono> testEndpointParameters(BigDecimal number, + Double _double, + String patternWithoutDelimiter, + byte[] _byte, + Integer integer, + Integer int32, + Long int64, + Float _float, + String string, + Flux binary, + LocalDate date, + OffsetDateTime dateTime, + String password, + String paramCallback, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + * @see FakeApi#testEnumParameters + */ + default Mono> testEnumParameters(List enumHeaderStringArray, + String enumHeaderString, + List enumQueryStringArray, + String enumQueryString, + Integer enumQueryInteger, + Double enumQueryDouble, + List enumFormStringArray, + String enumFormString, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Someting wrong (status code 400) + * @see FakeApi#testGroupParameters + */ + default Mono> testGroupParameters(Integer requiredStringGroup, + Boolean requiredBooleanGroup, + Long requiredInt64Group, + Integer stringGroup, + Boolean booleanGroup, + Long int64Group, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + * @see FakeApi#testInlineAdditionalProperties + */ + default Mono> testInlineAdditionalProperties(Mono> param, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + * @see FakeApi#testJsonFormData + */ + default Mono> testJsonFormData(String param, + String param2, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + * @see FakeApi#testQueryParameterCollectionFormat + */ + default Mono> testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + * @see FakeApi#uploadFileWithRequiredFile + */ + default Mono> uploadFileWithRequiredFile(Long petId, + Flux requiredFile, + String additionalMetadata, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + +} 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 new file mode 100644 index 000000000000..229cba518a2a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -0,0 +1,69 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake_classname_test", description = "the fake_classname_test API") +public interface FakeClassnameTestApi { + + default FakeClassnameTestApiDelegate getDelegate() { + return new FakeClassnameTestApiDelegate() {}; + } + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test class name in snake case", + tags = { "fake_classname_tags 123#$%^" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + }, + security = { + @SecurityRequirement(name = "api_key_query") + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake_classname_test", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default Mono> testClassname( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().testClassname(body, exchange); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java new file mode 100644 index 000000000000..58497641e4c5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeClassnameTestApiController implements FakeClassnameTestApi { + + private final FakeClassnameTestApiDelegate delegate; + + public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); + } + + @Override + public FakeClassnameTestApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java new file mode 100644 index 000000000000..4127d96d9e3e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -0,0 +1,52 @@ +package org.openapitools.api; + +import org.openapitools.model.Client; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link FakeClassnameTestApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface FakeClassnameTestApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + * @see FakeClassnameTestApi#testClassname + */ + default Mono> testClassname(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + +} 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 new file mode 100644 index 000000000000..150f20d9401e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,304 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + default PetApiDelegate getDelegate() { + return new PetApiDelegate() {}; + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + default Mono> addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().addPet(body, exchange); + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + default Mono> deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().deletePet(petId, apiKey, exchange); + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = { "application/xml", "application/json" } + ) + default Mono>> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().findPetsByStatus(status, exchange); + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = { "application/xml", "application/json" } + ) + default Mono>> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set tags, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().findPetsByTags(tags, exchange); + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = { "application/xml", "application/json" } + ) + default Mono> getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().getPetById(petId, exchange); + } + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + default Mono> updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().updatePet(body, exchange); + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = { "application/x-www-form-urlencoded" } + ) + default Mono> updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().updatePetWithForm(petId, name, status, exchange); + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default Mono> uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) Flux file, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().uploadFile(petId, additionalMetadata, file, exchange); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java new file mode 100644 index 000000000000..5fa088c6f10b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class PetApiController implements PetApi { + + private final PetApiDelegate delegate; + + public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); + } + + @Override + public PetApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java new file mode 100644 index 000000000000..8dc1be776ea0 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -0,0 +1,217 @@ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link PetApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface PetApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + * @see PetApi#addPet + */ + default Mono> addPet(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + * @see PetApi#deletePet + */ + default Mono> deletePet(Long petId, + String apiKey, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + * @see PetApi#findPetsByStatus + */ + default Mono>> findPetsByStatus(List status, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + * @see PetApi#findPetsByTags + */ + default Mono>> findPetsByTags(Set tags, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * @see PetApi#getPetById + */ + default Mono> getPetById(Long petId, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + * @see PetApi#updatePet + */ + default Mono> updatePet(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + * @see PetApi#updatePetWithForm + */ + default Mono> updatePetWithForm(Long petId, + String name, + String status, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + * @see PetApi#uploadFile + */ + default Mono> uploadFile(Long petId, + String additionalMetadata, + Flux file, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + +} 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 new file mode 100644 index 000000000000..056bfb145d45 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,154 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default StoreApiDelegate getDelegate() { + return new StoreApiDelegate() {}; + } + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{order_id}" + ) + default Mono> deleteOrder( + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().deleteOrder(orderId, exchange); + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = { "application/json" } + ) + default Mono>> getInventory( + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().getInventory(exchange); + } + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{order_id}", + produces = { "application/xml", "application/json" } + ) + default Mono> getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().getOrderById(orderId, exchange); + } + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = { "application/xml", "application/json" } + ) + default Mono> placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().placeOrder(body, exchange); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java new file mode 100644 index 000000000000..9e08c646ae92 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class StoreApiController implements StoreApi { + + private final StoreApiDelegate delegate; + + public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); + } + + @Override + public StoreApiDelegate getDelegate() { + return delegate; + } + +} 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 new file mode 100644 index 000000000000..02daadf024a1 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -0,0 +1,119 @@ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link StoreApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface StoreApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + * @see StoreApi#deleteOrder + */ + default Mono> deleteOrder(String orderId, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + * @see StoreApi#getInventory + */ + default Mono>> getInventory(ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + * @see StoreApi#getOrderById + */ + default Mono> getOrderById(Long orderId, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + * @see StoreApi#placeOrder + */ + default Mono> placeOrder(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + +} 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 new file mode 100644 index 000000000000..1bdbac92e64c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,257 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default UserApiDelegate getDelegate() { + return new UserApiDelegate() {}; + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + default Mono> createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().createUser(body, exchange); + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + default Mono> createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody Flux body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().createUsersWithArrayInput(body, exchange); + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + default Mono> createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody Flux body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().createUsersWithListInput(body, exchange); + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + default Mono> deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().deleteUser(username, exchange); + } + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = { "application/xml", "application/json" } + ) + default Mono> getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().getUserByName(username, exchange); + } + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = { "application/xml", "application/json" } + ) + default Mono> loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().loginUser(username, password, exchange); + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + default Mono> logoutUser( + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().logoutUser(exchange); + } + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + default Mono> updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody Mono body, + @Parameter(hidden = true) final ServerWebExchange exchange + ) { + return getDelegate().updateUser(username, body, exchange); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java new file mode 100644 index 000000000000..bc2d33598fd9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class UserApiController implements UserApi { + + private final UserApiDelegate delegate; + + public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); + } + + @Override + public UserApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java new file mode 100644 index 000000000000..3985dd30ecdf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -0,0 +1,173 @@ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import org.springframework.http.codec.multipart.Part; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * A delegate to be called by the {@link UserApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface UserApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUser + */ + default Mono> createUser(Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUsersWithArrayInput + */ + default Mono> createUsersWithArrayInput(Flux body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUsersWithListInput + */ + default Mono> createUsersWithListInput(Flux body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#deleteUser + */ + default Mono> deleteUser(String username, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#getUserByName + */ + default Mono> getUserByName(String username, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + result = ApiUtil.getExampleResponse(exchange, mediaType, exampleString); + break; + } + } + return result.then(Mono.empty()); + + } + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + * @see UserApi#loginUser + */ + default Mono> loginUser(String username, + String password, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + * @see UserApi#logoutUser + */ + default Mono> logoutUser(ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#updateUser + */ + default Mono> updateUser(String username, + Mono body, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(Mono.empty()); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..b1e5bfc21ee5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,62 @@ +package org.openapitools.configuration; + +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Controller; +import org.springframework.util.StreamUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.reactive.function.server.RouterFunction; +import org.springframework.web.reactive.function.server.ServerResponse; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.nio.charset.Charset; + +import static org.springframework.web.reactive.function.server.RequestPredicates.GET; +import static org.springframework.web.reactive.function.server.RouterFunctions.route; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + private static YAMLMapper yamlMapper = new YAMLMapper(); + + @Value("classpath:/openapi.yaml") + private Resource openapi; + + @Bean + public String openapiContent() throws IOException { + try(InputStream is = openapi.getInputStream()) { + return StreamUtils.copyToString(is, Charset.defaultCharset()); + } + } + + @GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi") + @ResponseBody + public String openapiYaml() throws IOException { + return openapiContent(); + } + + @GetMapping(value = "/openapi.json", produces = "application/json") + @ResponseBody + public Object openapiJson() throws IOException { + return yamlMapper.readValue(openapiContent(), Object.class); + } + + @Bean + RouterFunction index() { + return route( + GET("/"), + req -> ServerResponse.temporaryRedirect(URI.create("swagger-ui/index.html?url=../openapi.json")).build() + ); + } + + +} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..0c57ae7dd14c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesAnyType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesAnyType name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..b5285ec2f29b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesArray + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesArray name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..f8ca38c286d5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesBoolean + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesBoolean name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..dfd28ccb9963 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,414 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesClass { + @JsonProperty("map_string") + @Valid + private Map mapString = null; + + @JsonProperty("map_number") + @Valid + private Map mapNumber = null; + + @JsonProperty("map_integer") + @Valid + private Map mapInteger = null; + + @JsonProperty("map_boolean") + @Valid + private Map mapBoolean = null; + + @JsonProperty("map_array_integer") + @Valid + private Map> mapArrayInteger = null; + + @JsonProperty("map_array_anytype") + @Valid + private Map> mapArrayAnytype = null; + + @JsonProperty("map_map_string") + @Valid + private Map> mapMapString = null; + + @JsonProperty("map_map_anytype") + @Valid + private Map> mapMapAnytype = null; + + @JsonProperty("anytype_1") + private Object anytype1; + + @JsonProperty("anytype_2") + private Object anytype2; + + @JsonProperty("anytype_3") + private Object anytype3; + + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + @Schema(name = "mapString", defaultValue = "") + + + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + @Schema(name = "mapNumber", defaultValue = "") + + @Valid + + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + @Schema(name = "mapInteger", defaultValue = "") + + + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + @Schema(name = "mapBoolean", defaultValue = "") + + + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + @Schema(name = "mapArrayInteger", defaultValue = "") + + @Valid + + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + @Schema(name = "mapArrayAnytype", defaultValue = "") + + @Valid + + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + @Schema(name = "mapMapString", defaultValue = "") + + @Valid + + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + @Schema(name = "mapMapAnytype", defaultValue = "") + + @Valid + + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + @Schema(name = "anytype1", defaultValue = "") + + + public Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = anytype2; + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + @Schema(name = "anytype2", defaultValue = "") + + + public Object getAnytype2() { + return anytype2; + } + + public void setAnytype2(Object anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClass anytype3(Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + @Schema(name = "anytype3", defaultValue = "") + + + public Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..5fea577ab44b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesInteger + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesInteger name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..e6eee612a24f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesNumber + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesNumber name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..d7116bd7572c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..d2022be266fb --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesString + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesString name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java new file mode 100644 index 000000000000..6f096d5069ed --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -0,0 +1,118 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +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 org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Animal + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), +}) + +public class Animal { + @JsonProperty("className") + private String className; + + @JsonProperty("color") + private String color = "red"; + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @Schema(name = "className", required = true, defaultValue = "") + @NotNull + + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + @Schema(name = "color", defaultValue = "") + + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..ebe36ad761a9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") + @Valid + private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + @Schema(name = "arrayArrayNumber", defaultValue = "") + + @Valid + + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..8158dd44ab88 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") + @Valid + private List arrayNumber = null; + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + @Schema(name = "arrayNumber", defaultValue = "") + + @Valid + + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 000000000000..420010561bcd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,165 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayTest { + @JsonProperty("array_of_string") + @Valid + private List arrayOfString = null; + + @JsonProperty("array_array_of_integer") + @Valid + private List> arrayArrayOfInteger = null; + + @JsonProperty("array_array_of_model") + @Valid + private List> arrayArrayOfModel = null; + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + @Schema(name = "arrayOfString", defaultValue = "") + + + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + @Schema(name = "arrayArrayOfInteger", defaultValue = "") + + @Valid + + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + @Schema(name = "arrayArrayOfModel", defaultValue = "") + + @Valid + + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java new file mode 100644 index 000000000000..7f4a080ad8d2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,126 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.BigCatAllOf; +import org.openapitools.model.Cat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCat extends Cat { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java new file mode 100644 index 000000000000..d0a47ab5127c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -0,0 +1,123 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCatAllOf { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCatAllOf kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatAllOf bigCatAllOf = (BigCatAllOf) o; + return Objects.equals(this.kind, bigCatAllOf.kind); + } + + @Override + public int hashCode() { + return Objects.hash(kind); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java new file mode 100644 index 000000000000..92d9a7245f16 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,208 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Capitalization + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Capitalization { + @JsonProperty("smallCamel") + private String smallCamel; + + @JsonProperty("CapitalCamel") + private String capitalCamel; + + @JsonProperty("small_Snake") + private String smallSnake; + + @JsonProperty("Capital_Snake") + private String capitalSnake; + + @JsonProperty("SCA_ETH_Flow_Points") + private String scAETHFlowPoints; + + @JsonProperty("ATT_NAME") + private String ATT_NAME; + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + @Schema(name = "smallCamel", defaultValue = "") + + + public String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + @Schema(name = "capitalCamel", defaultValue = "") + + + public String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + @Schema(name = "smallSnake", defaultValue = "") + + + public String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + @Schema(name = "capitalSnake", defaultValue = "") + + + public String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + @Schema(name = "scAETHFlowPoints", defaultValue = "") + + + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") + + + public String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java new file mode 100644 index 000000000000..2e496fb4accd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.CatAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Cat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Cat extends Animal { + @JsonProperty("declawed") + private Boolean declawed; + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java new file mode 100644 index 000000000000..b732a62b1bc3 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * CatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class CatAllOf { + @JsonProperty("declawed") + private Boolean declawed; + + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); + } + + @Override + public int hashCode() { + return Objects.hash(declawed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..038fc8df3afd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Category + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name = "default-name"; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + 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/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java new file mode 100644 index 000000000000..fa2a736f4fb5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model with \"_class\" property + */ +@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ClassModel { + @JsonProperty("_class") + private String propertyClass; + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java new file mode 100644 index 000000000000..e11bd4ff1b13 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Client { + @JsonProperty("client") + private String client; + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + @Schema(name = "client", defaultValue = "") + + + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..ed5dc71a4ba2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.DogAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Dog + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Dog extends Animal { + @JsonProperty("breed") + private String breed; + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java new file mode 100644 index 000000000000..2c99bc376c34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * DogAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class DogAllOf { + @JsonProperty("breed") + private String breed; + + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); + } + + @Override + public int hashCode() { + return Objects.hash(breed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 000000000000..e1b2df0716a2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,190 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumArrays + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumArrays { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("just_symbol") + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("array_enum") + @Valid + private List arrayEnum = null; + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + @Schema(name = "justSymbol", defaultValue = "") + + + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + @Schema(name = "arrayEnum", defaultValue = "") + + + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java new file mode 100644 index 000000000000..e3d30c1ad453 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java new file mode 100644 index 000000000000..938af53e2b81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,331 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnum; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumTest { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string") + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string_required") + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_integer") + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_number") + private EnumNumberEnum enumNumber; + + @JsonProperty("outerEnum") + private OuterEnum outerEnum; + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + @Schema(name = "enumString", defaultValue = "") + + + public EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @Schema(name = "enumStringRequired", required = true, defaultValue = "") + @NotNull + + + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + @Schema(name = "enumInteger", defaultValue = "") + + + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + @Schema(name = "enumNumber", defaultValue = "") + + + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + @Schema(name = "outerEnum", defaultValue = "") + + @Valid + + public OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..0d1e9ca8495c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,121 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FileSchemaTestClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FileSchemaTestClass { + @JsonProperty("file") + private java.io.File file; + + @JsonProperty("files") + @Valid + private List files = null; + + public FileSchemaTestClass file(java.io.File file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + @Schema(name = "file", defaultValue = "") + + @Valid + + public java.io.File getFile() { + return file; + } + + public void setFile(java.io.File file) { + this.file = file; + } + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + @Schema(name = "files", defaultValue = "") + + @Valid + + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java new file mode 100644 index 000000000000..6546370cd329 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,435 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FormatTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FormatTest { + @JsonProperty("integer") + private Integer integer; + + @JsonProperty("int32") + private Integer int32; + + @JsonProperty("int64") + private Long int64; + + @JsonProperty("number") + private BigDecimal number; + + @JsonProperty("float") + private Float _float; + + @JsonProperty("double") + private Double _double; + + @JsonProperty("string") + private String string; + + @JsonProperty("byte") + private byte[] _byte; + + @JsonProperty("binary") + private org.springframework.core.io.Resource binary; + + @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + private LocalDate date; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("password") + private String password; + + @JsonProperty("BigDecimal") + private BigDecimal bigDecimal; + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + @Schema(name = "integer", defaultValue = "") + +@Min(10) @Max(100) + public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + @Schema(name = "int32", defaultValue = "") + +@Min(20) @Max(200) + public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + @Schema(name = "int64", defaultValue = "") + + + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @Schema(name = "number", required = true, defaultValue = "") + @NotNull + + @Valid +@DecimalMin("32.1") @DecimalMax("543.2") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + @Schema(name = "_float", defaultValue = "") + +@DecimalMin("54.3") @DecimalMax("987.6") + public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + @Schema(name = "_double", defaultValue = "") + +@DecimalMin("67.8") @DecimalMax("123.4") + public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + @Schema(name = "string", defaultValue = "") + +@Pattern(regexp = "/[a-z]/i") + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @Schema(name = "_byte", required = true, defaultValue = "") + @NotNull + + + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + @Schema(name = "binary", defaultValue = "") + + @Valid + + public org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @Schema(name = "date", required = true, defaultValue = "") + @NotNull + + @Valid + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", required = true, defaultValue = "") + @NotNull + +@Size(min = 10, max = 64) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + @Schema(name = "bigDecimal", defaultValue = "") + + @Valid + + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..dfb615a529fc --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * HasOnlyReadOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class HasOnlyReadOnly { + @JsonProperty("bar") + private String bar; + + @JsonProperty("foo") + private String foo; + + public HasOnlyReadOnly bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public HasOnlyReadOnly foo(String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + @Schema(name = "foo", readOnly = true, defaultValue = "") + + + public String getFoo() { + return foo; + } + + public void setFoo(String foo) { + this.foo = foo; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java new file mode 100644 index 000000000000..3ff73062758f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,234 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MapTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MapTest { + @JsonProperty("map_map_of_string") + @Valid + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("map_of_enum_string") + @Valid + private Map mapOfEnumString = null; + + @JsonProperty("direct_map") + @Valid + private Map directMap = null; + + @JsonProperty("indirect_map") + @Valid + private Map indirectMap = null; + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + @Schema(name = "mapMapOfString", defaultValue = "") + + @Valid + + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + @Schema(name = "mapOfEnumString", defaultValue = "") + + + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + @Schema(name = "directMap", defaultValue = "") + + + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + @Schema(name = "indirectMap", defaultValue = "") + + + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..03a7be43cc4a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,152 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("map") + @Valid + private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + @Schema(name = "map", defaultValue = "") + + @Valid + + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java new file mode 100644 index 000000000000..77bf91649b08 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name starting with number + */ +@Schema(name = "200_response",description = "Model for testing model name starting with number") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Model200Response { + @JsonProperty("name") + private Integer name; + + @JsonProperty("class") + private String propertyClass; + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..2443600df226 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,133 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ModelApiResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java new file mode 100644 index 000000000000..0301a47e9f3e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing reserved words + */ +@Schema(name = "Return",description = "Model for testing reserved words") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelReturn { + @JsonProperty("return") + private Integer _return; + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + @Schema(name = "_return", defaultValue = "") + + + public Integer getReturn() { + return _return; + } + + public void setReturn(Integer _return) { + this._return = _return; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java new file mode 100644 index 000000000000..62a16f80ee07 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,160 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name same as property name + */ +@Schema(name = "Name",description = "Model for testing model name same as property name") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Name { + @JsonProperty("name") + private Integer name; + + @JsonProperty("snake_case") + private Integer snakeCase; + + @JsonProperty("property") + private String property; + + @JsonProperty("123Number") + private Integer _123number; + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Name snakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + @Schema(name = "snakeCase", readOnly = true, defaultValue = "") + + + public Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @Schema(name = "property", defaultValue = "") + + + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public Name _123number(Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + @Schema(name = "_123number", readOnly = true, defaultValue = "") + + + public Integer get123number() { + return _123number; + } + + public void set123number(Integer _123number) { + this._123number = _123number; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java new file mode 100644 index 000000000000..521fad80d5a7 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * NumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class NumberOnly { + @JsonProperty("JustNumber") + private BigDecimal justNumber; + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + @Schema(name = "justNumber", defaultValue = "") + + @Valid + + public BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..05071bdfe2bf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,249 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Order + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 000000000000..a721a3dde6a0 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * OuterComposite + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OuterComposite { + @JsonProperty("my_number") + private BigDecimal myNumber; + + @JsonProperty("my_string") + private String myString; + + @JsonProperty("my_boolean") + private Boolean myBoolean; + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + @Schema(name = "myNumber", defaultValue = "") + + @Valid + + public BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + @Schema(name = "myString", defaultValue = "") + + + public String getMyString() { + return myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + @Schema(name = "myBoolean", defaultValue = "") + + + public Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 000000000000..ba0cca8a5e81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..988eb317134d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,273 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private Set photoUrls = new LinkedHashSet<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..1c51770a8e66 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ReadOnlyFirst + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ReadOnlyFirst { + @JsonProperty("bar") + private String bar; + + @JsonProperty("baz") + private String baz; + + public ReadOnlyFirst bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + @Schema(name = "baz", defaultValue = "") + + + public String getBaz() { + return baz; + } + + public void setBaz(String baz) { + this.baz = baz; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 000000000000..75f4be4e9f8f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * SpecialModelName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class SpecialModelName { + @JsonProperty("$special[property.name]") + private Long $specialPropertyName; + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + @Schema(name = "$specialPropertyName", defaultValue = "") + + + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName $specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..8722df999bfc --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Tag + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java new file mode 100644 index 000000000000..19e9bf310f76 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,198 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderDefault + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderDefault { + @JsonProperty("string_item") + private String stringItem = "what"; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem = true; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java new file mode 100644 index 000000000000..c9a3762bc74b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,224 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderExample + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderExample { + @JsonProperty("string_item") + private String stringItem; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("float_item") + private Float floatItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..83152a155535 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,258 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * User + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java new file mode 100644 index 000000000000..59a183db0f62 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,872 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * XmlItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class XmlItem { + @JsonProperty("attribute_string") + private String attributeString; + + @JsonProperty("attribute_number") + private BigDecimal attributeNumber; + + @JsonProperty("attribute_integer") + private Integer attributeInteger; + + @JsonProperty("attribute_boolean") + private Boolean attributeBoolean; + + @JsonProperty("wrapped_array") + @Valid + private List wrappedArray = null; + + @JsonProperty("name_string") + private String nameString; + + @JsonProperty("name_number") + private BigDecimal nameNumber; + + @JsonProperty("name_integer") + private Integer nameInteger; + + @JsonProperty("name_boolean") + private Boolean nameBoolean; + + @JsonProperty("name_array") + @Valid + private List nameArray = null; + + @JsonProperty("name_wrapped_array") + @Valid + private List nameWrappedArray = null; + + @JsonProperty("prefix_string") + private String prefixString; + + @JsonProperty("prefix_number") + private BigDecimal prefixNumber; + + @JsonProperty("prefix_integer") + private Integer prefixInteger; + + @JsonProperty("prefix_boolean") + private Boolean prefixBoolean; + + @JsonProperty("prefix_array") + @Valid + private List prefixArray = null; + + @JsonProperty("prefix_wrapped_array") + @Valid + private List prefixWrappedArray = null; + + @JsonProperty("namespace_string") + private String namespaceString; + + @JsonProperty("namespace_number") + private BigDecimal namespaceNumber; + + @JsonProperty("namespace_integer") + private Integer namespaceInteger; + + @JsonProperty("namespace_boolean") + private Boolean namespaceBoolean; + + @JsonProperty("namespace_array") + @Valid + private List namespaceArray = null; + + @JsonProperty("namespace_wrapped_array") + @Valid + private List namespaceWrappedArray = null; + + @JsonProperty("prefix_ns_string") + private String prefixNsString; + + @JsonProperty("prefix_ns_number") + private BigDecimal prefixNsNumber; + + @JsonProperty("prefix_ns_integer") + private Integer prefixNsInteger; + + @JsonProperty("prefix_ns_boolean") + private Boolean prefixNsBoolean; + + @JsonProperty("prefix_ns_array") + @Valid + private List prefixNsArray = null; + + @JsonProperty("prefix_ns_wrapped_array") + @Valid + private List prefixNsWrappedArray = null; + + public XmlItem attributeString(String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + @Schema(name = "attributeString", example = "string", defaultValue = "") + + + public String getAttributeString() { + return attributeString; + } + + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + @Schema(name = "attributeInteger", example = "-2", defaultValue = "") + + + public Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + @Schema(name = "attributeBoolean", example = "true", defaultValue = "") + + + public Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + @Schema(name = "wrappedArray", defaultValue = "") + + + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + @Schema(name = "nameString", example = "string", defaultValue = "") + + + public String getNameString() { + return nameString; + } + + public void setNameString(String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + @Schema(name = "nameNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + @Schema(name = "nameInteger", example = "-2", defaultValue = "") + + + public Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + @Schema(name = "nameBoolean", example = "true", defaultValue = "") + + + public Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + @Schema(name = "nameArray", defaultValue = "") + + + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + @Schema(name = "nameWrappedArray", defaultValue = "") + + + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + @Schema(name = "prefixString", example = "string", defaultValue = "") + + + public String getPrefixString() { + return prefixString; + } + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + @Schema(name = "prefixInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + @Schema(name = "prefixBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + @Schema(name = "prefixArray", defaultValue = "") + + + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + @Schema(name = "prefixWrappedArray", defaultValue = "") + + + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + @Schema(name = "namespaceString", example = "string", defaultValue = "") + + + public String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") + + + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") + + + public Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + @Schema(name = "namespaceArray", defaultValue = "") + + + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + @Schema(name = "namespaceWrappedArray", defaultValue = "") + + + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + @Schema(name = "prefixNsString", example = "string", defaultValue = "") + + + public String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + @Schema(name = "prefixNsArray", defaultValue = "") + + + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + @Schema(name = "prefixNsWrappedArray", defaultValue = "") + + + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/application.properties b/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/application.properties new file mode 100644 index 000000000000..9d06609db665 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=80 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false 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 new file mode 100644 index 000000000000..d6386dc39bf4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -0,0 +1,2264 @@ +openapi: 3.0.1 +info: + description: 'This spec is mainly for testing Petstore server and contains fake + endpoints, models. Please do not use this for any other purpose. Special characters: + " \' + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +servers: +- url: http://petstore.swagger.io:80/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + post: + operationId: addPet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + put: + operationId: updatePet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + "405": + content: {} + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + content: {} + description: Invalid status value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + uniqueItems: true + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + description: successful operation + "400": + content: {} + description: Invalid tag value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + responses: + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /store/order: + post: + operationId: placeOrder + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: store + /store/order/{order_id}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: order_id + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + in: path + name: order_id + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Find purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Create user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + in: query + name: username + required: true + schema: + type: string + - description: The password for login in clear text + in: query + name: password + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + format: int32 + type: integer + X-Expires-After: + description: date in UTC when token expires + schema: + format: date-time + type: string + "400": + content: {} + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/logout: + get: + operationId: logoutUser + responses: + default: + content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Delete user + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + in: path + name: username + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + content: {} + description: Invalid user supplied + "404": + content: {} + description: User not found + summary: Updated user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /fake_classname_test: + patch: + description: To test class name in snake case + operationId: testClassname + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + security: + - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake_classname_tags 123#$%^ + /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: Required String in group parameters + in: query + name: required_string_group + required: true + schema: + type: integer + - description: Required Boolean in group parameters + in: header + name: required_boolean_group + required: true + schema: + type: boolean + - description: Required Integer in group parameters + in: query + name: required_int64_group + required: true + schema: + format: int64 + type: integer + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + "400": + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-accepts: application/json + x-tags: + - tag: fake + get: + description: To test enum parameters + operationId: testEnumParameters + parameters: + - description: Header parameter enum test (string array) + explode: false + in: header + name: enum_header_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: simple + - description: Header parameter enum test (string) + in: header + name: enum_header_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (string array) + explode: false + in: query + name: enum_query_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: form + - description: Query parameter enum test (string) + in: query + name: enum_query_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (double) + in: query + name: enum_query_integer + schema: + enum: + - 1 + - -2 + format: int32 + type: integer + - description: Query parameter enum test (double) + in: query + name: enum_query_double + schema: + enum: + - 1.1 + - -1.2 + format: double + type: number + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string + responses: + "400": + content: {} + description: Invalid request + "404": + content: {} + description: Not found + summary: To test enum parameters + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + post: + description: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + integer: + description: None + format: int32 + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + required: true + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + security: + - http_basic_test: [] + summary: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/outer/number: + post: + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Output number + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/string: + post: + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Output string + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/boolean: + post: + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Output boolean + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/composite: + post: + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Output composite + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/jsonFormData: + get: + operationId: testJsonFormData + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + required: true + responses: + "200": + content: {} + description: successful operation + summary: test json serialization of form data + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/inline-additionalProperties: + post: + operationId: testInlineAdditionalProperties + requestBody: + content: + application/json: + schema: + additionalProperties: + type: string + type: object + description: request body + required: true + responses: + "200": + content: {} + description: successful operation + summary: test inline additionalProperties + tags: + - fake + x-codegen-request-body-name: param + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - in: query + name: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/create_xml_item: + post: + description: this route creates an XmlItem + operationId: createXmlItem + requestBody: + content: + application/xml: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + description: XmlItem Body + required: true + responses: + "200": + content: {} + description: successful operation + summary: creates an XmlItem + tags: + - fake + x-codegen-request-body-name: XmlItem + x-contentType: application/xml + x-accepts: application/json + x-tags: + - tag: fake + /another-fake/dummy: + patch: + description: To test special tags and operation ID starting with number + operationId: 123_test_@#$%_special_tags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: $another-fake? + /fake/body-with-file-schema: + put: + description: For this test, the body for this request much reference a schema + named `File`. + operationId: testBodyWithFileSchema + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/test-query-parameters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: false + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + - in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: {} + description: Success + tags: + - fake + x-accepts: application/json + x-tags: + - tag: fake + /fake/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image (required) + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet +components: + schemas: + Order: + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + type: object + xml: + name: Order + Category: + example: + name: default-name + id: 6 + properties: + id: + format: int64 + type: integer + name: + default: default-name + type: string + required: + - name + type: object + xml: + name: Category + User: + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + type: object + xml: + name: User + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: default-name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + uniqueItems: true + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + ApiResponse: + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + type: object + $special[model.name]: + properties: + $special[property.name]: + format: int64 + type: integer + type: object + xml: + name: $special[model.name] + Return: + description: Model for testing reserved words + properties: + return: + format: int32 + type: integer + type: object + xml: + name: Return + Name: + description: Model for testing model name same as property name + properties: + name: + format: int32 + type: integer + snake_case: + format: int32 + readOnly: true + type: integer + property: + type: string + "123Number": + readOnly: true + type: integer + required: + - name + type: object + xml: + name: Name + "200_response": + description: Model for testing model name starting with number + properties: + name: + format: int32 + type: integer + class: + type: string + type: object + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + type: object + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Dog_allOf' + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Cat_allOf' + BigCat: + allOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/BigCat_allOf' + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array + format_test: + properties: + integer: + maximum: 1E+2 + minimum: 1E+1 + type: integer + int32: + format: int32 + maximum: 2E+2 + minimum: 2E+1 + type: integer + int64: + format: int64 + type: integer + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + format: float + maximum: 987.6 + minimum: 54.3 + type: number + double: + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + pattern: /[a-z]/i + type: string + byte: + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + binary: + format: binary + type: string + date: + format: date + type: string + dateTime: + format: date-time + type: string + uuid: + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + format: uuid + type: string + password: + format: password + maxLength: 64 + minLength: 10 + type: string + BigDecimal: + format: number + type: string + required: + - byte + - date + - number + - password + type: object + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + Enum_Test: + properties: + enum_string: + enum: + - UPPER + - lower + - "" + type: string + enum_string_required: + enum: + - UPPER + - lower + - "" + type: string + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' + required: + - enum_string_required + type: object + AdditionalPropertiesClass: + properties: + map_string: + additionalProperties: + type: string + type: object + map_number: + additionalProperties: + type: number + type: object + map_integer: + additionalProperties: + type: integer + type: object + map_boolean: + additionalProperties: + type: boolean + type: object + map_array_integer: + additionalProperties: + items: + type: integer + type: array + type: object + map_array_anytype: + additionalProperties: + items: + properties: {} + type: object + type: array + type: object + map_map_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_map_anytype: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + type: object + anytype_1: + properties: {} + type: object + anytype_2: + type: object + anytype_3: + properties: {} + type: object + type: object + AdditionalPropertiesString: + additionalProperties: + type: string + properties: + name: + type: string + type: object + AdditionalPropertiesInteger: + additionalProperties: + type: integer + properties: + name: + type: string + type: object + AdditionalPropertiesNumber: + additionalProperties: + type: number + properties: + name: + type: string + type: object + AdditionalPropertiesBoolean: + additionalProperties: + type: boolean + properties: + name: + type: string + type: object + AdditionalPropertiesArray: + additionalProperties: + items: + properties: {} + type: object + type: array + properties: + name: + type: string + type: object + AdditionalPropertiesObject: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + properties: + name: + type: string + type: object + AdditionalPropertiesAnyType: + additionalProperties: + properties: {} + type: object + properties: + name: + type: string + type: object + MixedPropertiesAndAdditionalPropertiesClass: + properties: + uuid: + format: uuid + type: string + dateTime: + format: date-time + type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + List: + properties: + "123-list": + type: string + type: object + Client: + example: + client: client + properties: + client: + type: string + type: object + ReadOnlyFirst: + properties: + bar: + readOnly: true + type: string + baz: + type: string + type: object + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object + Capitalization: + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + direct_map: + additionalProperties: + type: boolean + type: object + indirect_map: + additionalProperties: + type: boolean + type: object + type: object + ArrayTest: + properties: + array_of_string: + items: + type: string + type: array + array_array_of_integer: + items: + items: + format: int64 + type: integer + type: array + type: array + array_array_of_model: + items: + items: + $ref: '#/components/schemas/ReadOnlyFirst' + type: array + type: array + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object + ArrayOfNumberOnly: + properties: + ArrayNumber: + items: + type: number + type: array + type: object + ArrayOfArrayOfNumberOnly: + properties: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array + type: object + EnumArrays: + properties: + just_symbol: + enum: + - '>=' + - $ + type: string + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterEnum: + enum: + - placed + - approved + - delivered + type: string + OuterComposite: + example: + my_string: my_string + my_number: 0.8008281904610115 + my_boolean: true + properties: + my_number: + type: number + my_string: + type: string + my_boolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + type: object + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + type: object + FileSchemaTestClass: + example: + file: + sourceURI: sourceURI + files: + - sourceURI: sourceURI + - sourceURI: sourceURI + properties: + file: + $ref: '#/components/schemas/File' + files: + items: + $ref: '#/components/schemas/File' + type: array + type: object + File: + description: Must be named `File` for test. + example: + sourceURI: sourceURI + properties: + sourceURI: + description: Test capitalization + type: string + type: object + TypeHolderDefault: + properties: + string_item: + default: what + type: string + number_item: + type: number + integer_item: + type: integer + bool_item: + default: true + type: boolean + array_item: + items: + type: integer + type: array + required: + - array_item + - bool_item + - integer_item + - number_item + - string_item + type: object + TypeHolderExample: + properties: + string_item: + example: what + type: string + number_item: + example: 1.234 + type: number + float_item: + example: 1.234 + format: float + type: number + integer_item: + example: -2 + type: integer + bool_item: + example: true + type: boolean + array_item: + example: + - 0 + - 1 + - 2 + - 3 + items: + type: integer + type: array + required: + - array_item + - bool_item + - float_item + - integer_item + - number_item + - string_item + type: object + XmlItem: + properties: + attribute_string: + example: string + type: string + xml: + attribute: true + attribute_number: + example: 1.234 + type: number + xml: + attribute: true + attribute_integer: + example: -2 + type: integer + xml: + attribute: true + attribute_boolean: + example: true + type: boolean + xml: + attribute: true + wrapped_array: + items: + type: integer + type: array + xml: + wrapped: true + name_string: + example: string + type: string + xml: + name: xml_name_string + name_number: + example: 1.234 + type: number + xml: + name: xml_name_number + name_integer: + example: -2 + type: integer + xml: + name: xml_name_integer + name_boolean: + example: true + type: boolean + xml: + name: xml_name_boolean + name_array: + items: + type: integer + xml: + name: xml_name_array_item + type: array + name_wrapped_array: + items: + type: integer + xml: + name: xml_name_wrapped_array_item + type: array + xml: + name: xml_name_wrapped_array + wrapped: true + prefix_string: + example: string + type: string + xml: + prefix: ab + prefix_number: + example: 1.234 + type: number + xml: + prefix: cd + prefix_integer: + example: -2 + type: integer + xml: + prefix: ef + prefix_boolean: + example: true + type: boolean + xml: + prefix: gh + prefix_array: + items: + type: integer + xml: + prefix: ij + type: array + prefix_wrapped_array: + items: + type: integer + xml: + prefix: mn + type: array + xml: + prefix: kl + wrapped: true + namespace_string: + example: string + type: string + xml: + namespace: http://a.com/schema + namespace_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + namespace_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + namespace_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + namespace_array: + items: + type: integer + xml: + namespace: http://e.com/schema + type: array + namespace_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + type: array + xml: + namespace: http://f.com/schema + wrapped: true + prefix_ns_string: + example: string + type: string + xml: + namespace: http://a.com/schema + prefix: a + prefix_ns_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + prefix: b + prefix_ns_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + prefix: c + prefix_ns_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + prefix: d + prefix_ns_array: + items: + type: integer + xml: + namespace: http://e.com/schema + prefix: e + type: array + prefix_ns_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + prefix: g + type: array + xml: + namespace: http://f.com/schema + prefix: f + wrapped: true + type: object + xml: + namespace: http://a.com/schema + prefix: pre + Dog_allOf: + properties: + breed: + type: string + type: object + Cat_allOf: + properties: + declawed: + type: boolean + type: object + BigCat_allOf: + properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey + api_key_query: + in: query + name: api_key_query + type: apiKey + http_basic_test: + scheme: basic + type: http +x-original-swagger-version: "2.0" diff --git a/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator-ignore b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/.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/openapi3/server/petstore/springboot-useoptional/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/FILES new file mode 100644 index 000000000000..e4c32719b541 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/FILES @@ -0,0 +1,66 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenAPI2SpringBoot.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/AnotherFakeApiController.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeApiController.java +src/main/java/org/openapitools/api/FakeClassnameTestApi.java +src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiController.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiController.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiController.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +src/main/java/org/openapitools/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/model/Animal.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayTest.java +src/main/java/org/openapitools/model/BigCat.java +src/main/java/org/openapitools/model/BigCatAllOf.java +src/main/java/org/openapitools/model/Capitalization.java +src/main/java/org/openapitools/model/Cat.java +src/main/java/org/openapitools/model/CatAllOf.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ClassModel.java +src/main/java/org/openapitools/model/Client.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/DogAllOf.java +src/main/java/org/openapitools/model/EnumArrays.java +src/main/java/org/openapitools/model/EnumClass.java +src/main/java/org/openapitools/model/EnumTest.java +src/main/java/org/openapitools/model/FileSchemaTestClass.java +src/main/java/org/openapitools/model/FormatTest.java +src/main/java/org/openapitools/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/model/MapTest.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/model/Model200Response.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/ModelReturn.java +src/main/java/org/openapitools/model/Name.java +src/main/java/org/openapitools/model/NumberOnly.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/OuterComposite.java +src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/ReadOnlyFirst.java +src/main/java/org/openapitools/model/SpecialModelName.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/TypeHolderDefault.java +src/main/java/org/openapitools/model/TypeHolderExample.java +src/main/java/org/openapitools/model/User.java +src/main/java/org/openapitools/model/XmlItem.java +src/main/resources/application.properties +src/main/resources/openapi.yaml diff --git a/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-useoptional/README.md b/samples/openapi3/server/petstore/springboot-useoptional/README.md new file mode 100644 index 000000000000..befc961488ae --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/README.md @@ -0,0 +1,16 @@ +# OpenAPI generated server + +Spring Boot Server + + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:80/ + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-useoptional/pom.xml b/samples/openapi3/server/petstore/springboot-useoptional/pom.xml new file mode 100644 index 000000000000..800e0576cb50 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/pom.xml @@ -0,0 +1,71 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-boot-useoptional + jar + spring-boot-useoptional + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/OpenAPI2SpringBoot.java new file mode 100644 index 000000000000..cb088f451935 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -0,0 +1,63 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebMvcConfigurer webConfigurer() { + return new WebMvcConfigurer() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); + } + }; + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +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.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(); + } + + @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 this; + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..ccd404fbf320 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,75 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "another-fake", description = "the another-fake API") +public interface AnotherFakeApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test special tags", + tags = { "$another-fake?" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/another-fake/dummy", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity call123testSpecialTags( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java new file mode 100644 index 000000000000..d8efcca7f8a4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class AnotherFakeApiController implements AnotherFakeApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public AnotherFakeApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} 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 new file mode 100644 index 000000000000..720457848da9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,551 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import org.openapitools.model.ModelApiResponse; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake", description = "the fake API") +public interface FakeApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "creates an XmlItem", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/create_xml_item", + consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } + ) + default ResponseEntity createXmlItem( + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody XmlItem xmlItem + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/boolean", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterBooleanSerialize( + @Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Boolean body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param body Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/composite", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterCompositeSerialize( + @Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) OuterComposite body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; + ApiUtil.setExampleResponse(request, "*/*", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/number", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterNumberSerialize( + @Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) BigDecimal body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/outer/string", + produces = { "*/*" } + ) + default ResponseEntity fakeOuterStringSerialize( + @Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) String body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-file-schema", + consumes = { "application/json" } + ) + default ResponseEntity testBodyWithFileSchema( + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody FileSchemaTestClass body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param body (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/body-with-query-params", + consumes = { "application/json" } + ) + default ResponseEntity testBodyWithQueryParams( + @NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query, + @Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test \"client\" model", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity testClientModel( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "http_basic_test") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testEndpointParameters( + @Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "double", required = true) Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "integer", required = false) Integer integer, + @Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int32", required = false) Integer int32, + @Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, + @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, + @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, + @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @Operation( + summary = "To test enum parameters", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid request"), + @ApiResponse(responseCode = "404", description = "Not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testEnumParameters( + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestHeader(value = "enum_header_string", required = false) Optional enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Someting wrong (status code 400) + */ + @Operation( + summary = "Fake endpoint to test group parameters (optional)", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "400", description = "Someting wrong") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/fake" + ) + default ResponseEntity testGroupParameters( + @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup, + @Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) @RequestHeader(value = "boolean_group", required = false) Optional booleanGroup, + @Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * @param param request body (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test inline additionalProperties", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/inline-additionalProperties", + consumes = { "application/json" } + ) + default ResponseEntity testInlineAdditionalProperties( + @Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Map param + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "test json serialization of form data", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/fake/jsonFormData", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity testJsonFormData( + @Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param", required = true) String param, + @Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @Operation( + summary = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "Success") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/fake/test-query-parameters" + ) + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List context + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image (required)", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default ResponseEntity uploadFileWithRequiredFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java new file mode 100644 index 000000000000..c4b88419aabe --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeApiController implements FakeApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public FakeApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..62e378597251 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -0,0 +1,78 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "fake_classname_test", description = "the fake_classname_test API") +public interface FakeClassnameTestApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param body client model (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "To test class name in snake case", + tags = { "fake_classname_tags 123#$%^" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) + }, + security = { + @SecurityRequirement(name = "api_key_query") + } + ) + @RequestMapping( + method = RequestMethod.PATCH, + value = "/fake_classname_test", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity testClassname( + @Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"client\" : \"client\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java new file mode 100644 index 000000000000..85458b255da5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class FakeClassnameTestApiController implements FakeClassnameTestApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public FakeClassnameTestApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..f28b85a83435 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,355 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import java.util.Set; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + default ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) Optional apiKey + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation"), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java new file mode 100644 index 000000000000..e72c57e3cbec --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class PetApiController implements PetApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public PetApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..de9b9d16f830 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,183 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * 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 + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{order_id}" + ) + default ResponseEntity deleteOrder( + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = { "application/json" } + ) + default ResponseEntity> getInventory( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{order_id}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java new file mode 100644 index 000000000000..1293b5c8f6e4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class StoreApiController implements StoreApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public StoreApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..5a85648b515c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,272 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + default ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + default ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + default ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + default ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + default ResponseEntity logoutUser( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + default ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java new file mode 100644 index 000000000000..3f6c4d9a2d6f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class UserApiController implements UserApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public UserApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..34bae16b8986 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,53 @@ +package org.openapitools.configuration; + +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Controller; +import org.springframework.util.StreamUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + private static YAMLMapper yamlMapper = new YAMLMapper(); + + @Value("classpath:/openapi.yaml") + private Resource openapi; + + @Bean + public String openapiContent() throws IOException { + try(InputStream is = openapi.getInputStream()) { + return StreamUtils.copyToString(is, Charset.defaultCharset()); + } + } + + @GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi") + @ResponseBody + public String openapiYaml() throws IOException { + return openapiContent(); + } + + @GetMapping(value = "/openapi.json", produces = "application/json") + @ResponseBody + public Object openapiJson() throws IOException { + return yamlMapper.readValue(openapiContent(), Object.class); + } + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui/index.html?url=../openapi.json"; + } + + +} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..0c57ae7dd14c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesAnyType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesAnyType name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..b5285ec2f29b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesArray + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesArray name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..f8ca38c286d5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesBoolean + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesBoolean name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..dfd28ccb9963 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,414 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesClass { + @JsonProperty("map_string") + @Valid + private Map mapString = null; + + @JsonProperty("map_number") + @Valid + private Map mapNumber = null; + + @JsonProperty("map_integer") + @Valid + private Map mapInteger = null; + + @JsonProperty("map_boolean") + @Valid + private Map mapBoolean = null; + + @JsonProperty("map_array_integer") + @Valid + private Map> mapArrayInteger = null; + + @JsonProperty("map_array_anytype") + @Valid + private Map> mapArrayAnytype = null; + + @JsonProperty("map_map_string") + @Valid + private Map> mapMapString = null; + + @JsonProperty("map_map_anytype") + @Valid + private Map> mapMapAnytype = null; + + @JsonProperty("anytype_1") + private Object anytype1; + + @JsonProperty("anytype_2") + private Object anytype2; + + @JsonProperty("anytype_3") + private Object anytype3; + + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + @Schema(name = "mapString", defaultValue = "") + + + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + @Schema(name = "mapNumber", defaultValue = "") + + @Valid + + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + @Schema(name = "mapInteger", defaultValue = "") + + + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + @Schema(name = "mapBoolean", defaultValue = "") + + + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + @Schema(name = "mapArrayInteger", defaultValue = "") + + @Valid + + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + @Schema(name = "mapArrayAnytype", defaultValue = "") + + @Valid + + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + @Schema(name = "mapMapString", defaultValue = "") + + @Valid + + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + @Schema(name = "mapMapAnytype", defaultValue = "") + + @Valid + + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + @Schema(name = "anytype1", defaultValue = "") + + + public Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = anytype2; + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + @Schema(name = "anytype2", defaultValue = "") + + + public Object getAnytype2() { + return anytype2; + } + + public void setAnytype2(Object anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClass anytype3(Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + @Schema(name = "anytype3", defaultValue = "") + + + public Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..5fea577ab44b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesInteger + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesInteger name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..e6eee612a24f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesNumber + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesNumber name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..d7116bd7572c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..d2022be266fb --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * AdditionalPropertiesString + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") + private String name; + + public AdditionalPropertiesString name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + 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; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java new file mode 100644 index 000000000000..6f096d5069ed --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -0,0 +1,118 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +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 org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Animal + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), +}) + +public class Animal { + @JsonProperty("className") + private String className; + + @JsonProperty("color") + private String color = "red"; + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @Schema(name = "className", required = true, defaultValue = "") + @NotNull + + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + @Schema(name = "color", defaultValue = "") + + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..ebe36ad761a9 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") + @Valid + private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + @Schema(name = "arrayArrayNumber", defaultValue = "") + + @Valid + + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..8158dd44ab88 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayOfNumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") + @Valid + private List arrayNumber = null; + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + @Schema(name = "arrayNumber", defaultValue = "") + + @Valid + + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 000000000000..420010561bcd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,165 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ArrayTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ArrayTest { + @JsonProperty("array_of_string") + @Valid + private List arrayOfString = null; + + @JsonProperty("array_array_of_integer") + @Valid + private List> arrayArrayOfInteger = null; + + @JsonProperty("array_array_of_model") + @Valid + private List> arrayArrayOfModel = null; + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + @Schema(name = "arrayOfString", defaultValue = "") + + + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + @Schema(name = "arrayArrayOfInteger", defaultValue = "") + + @Valid + + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + @Schema(name = "arrayArrayOfModel", defaultValue = "") + + @Valid + + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java new file mode 100644 index 000000000000..7f4a080ad8d2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,126 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.BigCatAllOf; +import org.openapitools.model.Cat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCat extends Cat { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java new file mode 100644 index 000000000000..d0a47ab5127c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -0,0 +1,123 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * BigCatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class BigCatAllOf { + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("kind") + private KindEnum kind; + + public BigCatAllOf kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @Schema(name = "kind", defaultValue = "") + + + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatAllOf bigCatAllOf = (BigCatAllOf) o; + return Objects.equals(this.kind, bigCatAllOf.kind); + } + + @Override + public int hashCode() { + return Objects.hash(kind); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java new file mode 100644 index 000000000000..92d9a7245f16 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,208 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Capitalization + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Capitalization { + @JsonProperty("smallCamel") + private String smallCamel; + + @JsonProperty("CapitalCamel") + private String capitalCamel; + + @JsonProperty("small_Snake") + private String smallSnake; + + @JsonProperty("Capital_Snake") + private String capitalSnake; + + @JsonProperty("SCA_ETH_Flow_Points") + private String scAETHFlowPoints; + + @JsonProperty("ATT_NAME") + private String ATT_NAME; + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + @Schema(name = "smallCamel", defaultValue = "") + + + public String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + @Schema(name = "capitalCamel", defaultValue = "") + + + public String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + @Schema(name = "smallSnake", defaultValue = "") + + + public String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + @Schema(name = "capitalSnake", defaultValue = "") + + + public String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + @Schema(name = "scAETHFlowPoints", defaultValue = "") + + + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") + + + public String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java new file mode 100644 index 000000000000..2e496fb4accd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.CatAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Cat + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Cat extends Animal { + @JsonProperty("declawed") + private Boolean declawed; + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java new file mode 100644 index 000000000000..b732a62b1bc3 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * CatAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class CatAllOf { + @JsonProperty("declawed") + private Boolean declawed; + + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @Schema(name = "declawed", defaultValue = "") + + + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); + } + + @Override + public int hashCode() { + return Objects.hash(declawed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..038fc8df3afd --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Category + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name = "default-name"; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + 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/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java new file mode 100644 index 000000000000..fa2a736f4fb5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model with \"_class\" property + */ +@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ClassModel { + @JsonProperty("_class") + private String propertyClass; + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java new file mode 100644 index 000000000000..e11bd4ff1b13 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Client { + @JsonProperty("client") + private String client; + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + @Schema(name = "client", defaultValue = "") + + + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..ed5dc71a4ba2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,86 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.model.Animal; +import org.openapitools.model.DogAllOf; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Dog + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Dog extends Animal { + @JsonProperty("breed") + private String breed; + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java new file mode 100644 index 000000000000..2c99bc376c34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * DogAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class DogAllOf { + @JsonProperty("breed") + private String breed; + + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @Schema(name = "breed", defaultValue = "") + + + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); + } + + @Override + public int hashCode() { + return Objects.hash(breed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 000000000000..e1b2df0716a2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,190 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumArrays + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumArrays { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("just_symbol") + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("array_enum") + @Valid + private List arrayEnum = null; + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + @Schema(name = "justSymbol", defaultValue = "") + + + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + @Schema(name = "arrayEnum", defaultValue = "") + + + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java new file mode 100644 index 000000000000..e3d30c1ad453 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java new file mode 100644 index 000000000000..938af53e2b81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,331 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnum; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * EnumTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class EnumTest { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string") + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_string_required") + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_integer") + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("enum_number") + private EnumNumberEnum enumNumber; + + @JsonProperty("outerEnum") + private OuterEnum outerEnum; + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + @Schema(name = "enumString", defaultValue = "") + + + public EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @Schema(name = "enumStringRequired", required = true, defaultValue = "") + @NotNull + + + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + @Schema(name = "enumInteger", defaultValue = "") + + + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + @Schema(name = "enumNumber", defaultValue = "") + + + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + @Schema(name = "outerEnum", defaultValue = "") + + @Valid + + public OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..0d1e9ca8495c --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,121 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FileSchemaTestClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FileSchemaTestClass { + @JsonProperty("file") + private java.io.File file; + + @JsonProperty("files") + @Valid + private List files = null; + + public FileSchemaTestClass file(java.io.File file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + @Schema(name = "file", defaultValue = "") + + @Valid + + public java.io.File getFile() { + return file; + } + + public void setFile(java.io.File file) { + this.file = file; + } + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + @Schema(name = "files", defaultValue = "") + + @Valid + + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java new file mode 100644 index 000000000000..6546370cd329 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,435 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * FormatTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class FormatTest { + @JsonProperty("integer") + private Integer integer; + + @JsonProperty("int32") + private Integer int32; + + @JsonProperty("int64") + private Long int64; + + @JsonProperty("number") + private BigDecimal number; + + @JsonProperty("float") + private Float _float; + + @JsonProperty("double") + private Double _double; + + @JsonProperty("string") + private String string; + + @JsonProperty("byte") + private byte[] _byte; + + @JsonProperty("binary") + private org.springframework.core.io.Resource binary; + + @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + private LocalDate date; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("password") + private String password; + + @JsonProperty("BigDecimal") + private BigDecimal bigDecimal; + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + @Schema(name = "integer", defaultValue = "") + +@Min(10) @Max(100) + public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + @Schema(name = "int32", defaultValue = "") + +@Min(20) @Max(200) + public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + @Schema(name = "int64", defaultValue = "") + + + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @Schema(name = "number", required = true, defaultValue = "") + @NotNull + + @Valid +@DecimalMin("32.1") @DecimalMax("543.2") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + @Schema(name = "_float", defaultValue = "") + +@DecimalMin("54.3") @DecimalMax("987.6") + public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + @Schema(name = "_double", defaultValue = "") + +@DecimalMin("67.8") @DecimalMax("123.4") + public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + @Schema(name = "string", defaultValue = "") + +@Pattern(regexp = "/[a-z]/i") + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @Schema(name = "_byte", required = true, defaultValue = "") + @NotNull + + + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + @Schema(name = "binary", defaultValue = "") + + @Valid + + public org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @Schema(name = "date", required = true, defaultValue = "") + @NotNull + + @Valid + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", required = true, defaultValue = "") + @NotNull + +@Size(min = 10, max = 64) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + @Schema(name = "bigDecimal", defaultValue = "") + + @Valid + + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..dfb615a529fc --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * HasOnlyReadOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class HasOnlyReadOnly { + @JsonProperty("bar") + private String bar; + + @JsonProperty("foo") + private String foo; + + public HasOnlyReadOnly bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public HasOnlyReadOnly foo(String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + @Schema(name = "foo", readOnly = true, defaultValue = "") + + + public String getFoo() { + return foo; + } + + public void setFoo(String foo) { + this.foo = foo; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java new file mode 100644 index 000000000000..3ff73062758f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,234 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MapTest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MapTest { + @JsonProperty("map_map_of_string") + @Valid + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("map_of_enum_string") + @Valid + private Map mapOfEnumString = null; + + @JsonProperty("direct_map") + @Valid + private Map directMap = null; + + @JsonProperty("indirect_map") + @Valid + private Map indirectMap = null; + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + @Schema(name = "mapMapOfString", defaultValue = "") + + @Valid + + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + @Schema(name = "mapOfEnumString", defaultValue = "") + + + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + @Schema(name = "directMap", defaultValue = "") + + + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + @Schema(name = "indirectMap", defaultValue = "") + + + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..03a7be43cc4a --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,152 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") + private UUID uuid; + + @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + @JsonProperty("map") + @Valid + private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @Schema(name = "uuid", defaultValue = "") + + @Valid + + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Schema(name = "dateTime", defaultValue = "") + + @Valid + + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + @Schema(name = "map", defaultValue = "") + + @Valid + + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java new file mode 100644 index 000000000000..77bf91649b08 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name starting with number + */ +@Schema(name = "200_response",description = "Model for testing model name starting with number") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Model200Response { + @JsonProperty("name") + private Integer name; + + @JsonProperty("class") + private String propertyClass; + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", defaultValue = "") + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + @Schema(name = "propertyClass", defaultValue = "") + + + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..2443600df226 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,133 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ModelApiResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java new file mode 100644 index 000000000000..0301a47e9f3e --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing reserved words + */ +@Schema(name = "Return",description = "Model for testing reserved words") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelReturn { + @JsonProperty("return") + private Integer _return; + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + @Schema(name = "_return", defaultValue = "") + + + public Integer getReturn() { + return _return; + } + + public void setReturn(Integer _return) { + this._return = _return; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java new file mode 100644 index 000000000000..62a16f80ee07 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,160 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Model for testing model name same as property name + */ +@Schema(name = "Name",description = "Model for testing model name same as property name") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Name { + @JsonProperty("name") + private Integer name; + + @JsonProperty("snake_case") + private Integer snakeCase; + + @JsonProperty("property") + private String property; + + @JsonProperty("123Number") + private Integer _123number; + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", required = true, defaultValue = "") + @NotNull + + + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Name snakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + @Schema(name = "snakeCase", readOnly = true, defaultValue = "") + + + public Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @Schema(name = "property", defaultValue = "") + + + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public Name _123number(Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + @Schema(name = "_123number", readOnly = true, defaultValue = "") + + + public Integer get123number() { + return _123number; + } + + public void set123number(Integer _123number) { + this._123number = _123number; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java new file mode 100644 index 000000000000..521fad80d5a7 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * NumberOnly + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class NumberOnly { + @JsonProperty("JustNumber") + private BigDecimal justNumber; + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + @Schema(name = "justNumber", defaultValue = "") + + @Valid + + public BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..05071bdfe2bf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,249 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Order + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 000000000000..a721a3dde6a0 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * OuterComposite + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OuterComposite { + @JsonProperty("my_number") + private BigDecimal myNumber; + + @JsonProperty("my_string") + private String myString; + + @JsonProperty("my_boolean") + private Boolean myBoolean; + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + @Schema(name = "myNumber", defaultValue = "") + + @Valid + + public BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + @Schema(name = "myString", defaultValue = "") + + + public String getMyString() { + return myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + @Schema(name = "myBoolean", defaultValue = "") + + + public Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 000000000000..ba0cca8a5e81 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,55 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..988eb317134d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,273 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private Set photoUrls = new LinkedHashSet<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..1c51770a8e66 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * ReadOnlyFirst + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ReadOnlyFirst { + @JsonProperty("bar") + private String bar; + + @JsonProperty("baz") + private String baz; + + public ReadOnlyFirst bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + @Schema(name = "bar", readOnly = true, defaultValue = "") + + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + @Schema(name = "baz", defaultValue = "") + + + public String getBaz() { + return baz; + } + + public void setBaz(String baz) { + this.baz = baz; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 000000000000..75f4be4e9f8f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * SpecialModelName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class SpecialModelName { + @JsonProperty("$special[property.name]") + private Long $specialPropertyName; + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + @Schema(name = "$specialPropertyName", defaultValue = "") + + + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName $specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..8722df999bfc --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Tag + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java new file mode 100644 index 000000000000..19e9bf310f76 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,198 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderDefault + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderDefault { + @JsonProperty("string_item") + private String stringItem = "what"; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem = true; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java new file mode 100644 index 000000000000..c9a3762bc74b --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,224 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * TypeHolderExample + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class TypeHolderExample { + @JsonProperty("string_item") + private String stringItem; + + @JsonProperty("number_item") + private BigDecimal numberItem; + + @JsonProperty("float_item") + private Float floatItem; + + @JsonProperty("integer_item") + private Integer integerItem; + + @JsonProperty("bool_item") + private Boolean boolItem; + + @JsonProperty("array_item") + @Valid + private List arrayItem = new ArrayList<>(); + + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") + @NotNull + + + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + @Valid + + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") + @NotNull + + + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") + @NotNull + + + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") + @NotNull + + + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") + @NotNull + + + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..83152a155535 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,258 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * User + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java new file mode 100644 index 000000000000..59a183db0f62 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,872 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * XmlItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class XmlItem { + @JsonProperty("attribute_string") + private String attributeString; + + @JsonProperty("attribute_number") + private BigDecimal attributeNumber; + + @JsonProperty("attribute_integer") + private Integer attributeInteger; + + @JsonProperty("attribute_boolean") + private Boolean attributeBoolean; + + @JsonProperty("wrapped_array") + @Valid + private List wrappedArray = null; + + @JsonProperty("name_string") + private String nameString; + + @JsonProperty("name_number") + private BigDecimal nameNumber; + + @JsonProperty("name_integer") + private Integer nameInteger; + + @JsonProperty("name_boolean") + private Boolean nameBoolean; + + @JsonProperty("name_array") + @Valid + private List nameArray = null; + + @JsonProperty("name_wrapped_array") + @Valid + private List nameWrappedArray = null; + + @JsonProperty("prefix_string") + private String prefixString; + + @JsonProperty("prefix_number") + private BigDecimal prefixNumber; + + @JsonProperty("prefix_integer") + private Integer prefixInteger; + + @JsonProperty("prefix_boolean") + private Boolean prefixBoolean; + + @JsonProperty("prefix_array") + @Valid + private List prefixArray = null; + + @JsonProperty("prefix_wrapped_array") + @Valid + private List prefixWrappedArray = null; + + @JsonProperty("namespace_string") + private String namespaceString; + + @JsonProperty("namespace_number") + private BigDecimal namespaceNumber; + + @JsonProperty("namespace_integer") + private Integer namespaceInteger; + + @JsonProperty("namespace_boolean") + private Boolean namespaceBoolean; + + @JsonProperty("namespace_array") + @Valid + private List namespaceArray = null; + + @JsonProperty("namespace_wrapped_array") + @Valid + private List namespaceWrappedArray = null; + + @JsonProperty("prefix_ns_string") + private String prefixNsString; + + @JsonProperty("prefix_ns_number") + private BigDecimal prefixNsNumber; + + @JsonProperty("prefix_ns_integer") + private Integer prefixNsInteger; + + @JsonProperty("prefix_ns_boolean") + private Boolean prefixNsBoolean; + + @JsonProperty("prefix_ns_array") + @Valid + private List prefixNsArray = null; + + @JsonProperty("prefix_ns_wrapped_array") + @Valid + private List prefixNsWrappedArray = null; + + public XmlItem attributeString(String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + @Schema(name = "attributeString", example = "string", defaultValue = "") + + + public String getAttributeString() { + return attributeString; + } + + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + @Schema(name = "attributeInteger", example = "-2", defaultValue = "") + + + public Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + @Schema(name = "attributeBoolean", example = "true", defaultValue = "") + + + public Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + @Schema(name = "wrappedArray", defaultValue = "") + + + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + @Schema(name = "nameString", example = "string", defaultValue = "") + + + public String getNameString() { + return nameString; + } + + public void setNameString(String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + @Schema(name = "nameNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + @Schema(name = "nameInteger", example = "-2", defaultValue = "") + + + public Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + @Schema(name = "nameBoolean", example = "true", defaultValue = "") + + + public Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + @Schema(name = "nameArray", defaultValue = "") + + + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + @Schema(name = "nameWrappedArray", defaultValue = "") + + + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + @Schema(name = "prefixString", example = "string", defaultValue = "") + + + public String getPrefixString() { + return prefixString; + } + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + @Schema(name = "prefixInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + @Schema(name = "prefixBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + @Schema(name = "prefixArray", defaultValue = "") + + + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + @Schema(name = "prefixWrappedArray", defaultValue = "") + + + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + @Schema(name = "namespaceString", example = "string", defaultValue = "") + + + public String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") + + + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") + + + public Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + @Schema(name = "namespaceArray", defaultValue = "") + + + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + @Schema(name = "namespaceWrappedArray", defaultValue = "") + + + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + @Schema(name = "prefixNsString", example = "string", defaultValue = "") + + + public String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") + + @Valid + + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") + + + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") + + + public Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + @Schema(name = "prefixNsArray", defaultValue = "") + + + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + @Schema(name = "prefixNsWrappedArray", defaultValue = "") + + + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/application.properties b/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/application.properties new file mode 100644 index 000000000000..9d06609db665 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=80 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false 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 new file mode 100644 index 000000000000..d6386dc39bf4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -0,0 +1,2264 @@ +openapi: 3.0.1 +info: + description: 'This spec is mainly for testing Petstore server and contains fake + endpoints, models. Please do not use this for any other purpose. Special characters: + " \' + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +servers: +- url: http://petstore.swagger.io:80/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + post: + operationId: addPet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + put: + operationId: updatePet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + "405": + content: {} + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + content: {} + description: Invalid status value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + uniqueItems: true + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + uniqueItems: true + description: successful operation + "400": + content: {} + description: Invalid tag value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: {} + description: successful operation + "400": + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + responses: + "405": + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /store/order: + post: + operationId: placeOrder + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: store + /store/order/{order_id}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: order_id + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + in: path + name: order_id + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + content: {} + description: Invalid ID supplied + "404": + content: {} + description: Order not found + summary: Find purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Create user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + responses: + default: + content: {} + description: successful operation + summary: Creates list of users with given input array + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + in: query + name: username + required: true + schema: + type: string + - description: The password for login in clear text + in: query + name: password + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + format: int32 + type: integer + X-Expires-After: + description: date in UTC when token expires + schema: + format: date-time + type: string + "400": + content: {} + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/logout: + get: + operationId: logoutUser + responses: + default: + content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Delete user + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + in: path + name: username + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + content: {} + description: Invalid user supplied + "404": + content: {} + description: User not found + summary: Updated user + tags: + - user + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: application/json + x-tags: + - tag: user + /fake_classname_test: + patch: + description: To test class name in snake case + operationId: testClassname + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + security: + - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake_classname_tags 123#$%^ + /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: Required String in group parameters + in: query + name: required_string_group + required: true + schema: + type: integer + - description: Required Boolean in group parameters + in: header + name: required_boolean_group + required: true + schema: + type: boolean + - description: Required Integer in group parameters + in: query + name: required_int64_group + required: true + schema: + format: int64 + type: integer + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + "400": + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-accepts: application/json + x-tags: + - tag: fake + get: + description: To test enum parameters + operationId: testEnumParameters + parameters: + - description: Header parameter enum test (string array) + explode: false + in: header + name: enum_header_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: simple + - description: Header parameter enum test (string) + in: header + name: enum_header_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (string array) + explode: false + in: query + name: enum_query_string_array + schema: + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + style: form + - description: Query parameter enum test (string) + in: query + name: enum_query_string + schema: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + - description: Query parameter enum test (double) + in: query + name: enum_query_integer + schema: + enum: + - 1 + - -2 + format: int32 + type: integer + - description: Query parameter enum test (double) + in: query + name: enum_query_double + schema: + enum: + - 1.1 + - -1.2 + format: double + type: number + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string + responses: + "400": + content: {} + description: Invalid request + "404": + content: {} + description: Not found + summary: To test enum parameters + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + post: + description: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + integer: + description: None + format: int32 + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + required: true + responses: + "400": + content: {} + description: Invalid username supplied + "404": + content: {} + description: User not found + security: + - http_basic_test: [] + summary: |- + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/outer/number: + post: + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + description: Output number + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/string: + post: + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + description: Output string + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/boolean: + post: + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Output boolean + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/outer/composite: + post: + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + required: false + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + description: Output composite + tags: + - fake + x-codegen-request-body-name: body + x-contentType: '*/*' + x-accepts: '*/*' + x-tags: + - tag: fake + /fake/jsonFormData: + get: + operationId: testJsonFormData + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + required: true + responses: + "200": + content: {} + description: successful operation + summary: test json serialization of form data + tags: + - fake + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: fake + /fake/inline-additionalProperties: + post: + operationId: testInlineAdditionalProperties + requestBody: + content: + application/json: + schema: + additionalProperties: + type: string + type: object + description: request body + required: true + responses: + "200": + content: {} + description: successful operation + summary: test inline additionalProperties + tags: + - fake + x-codegen-request-body-name: param + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - in: query + name: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/create_xml_item: + post: + description: this route creates an XmlItem + operationId: createXmlItem + requestBody: + content: + application/xml: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + application/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-8: + schema: + $ref: '#/components/schemas/XmlItem' + text/xml; charset=utf-16: + schema: + $ref: '#/components/schemas/XmlItem' + description: XmlItem Body + required: true + responses: + "200": + content: {} + description: successful operation + summary: creates an XmlItem + tags: + - fake + x-codegen-request-body-name: XmlItem + x-contentType: application/xml + x-accepts: application/json + x-tags: + - tag: fake + /another-fake/dummy: + patch: + description: To test special tags and operation ID starting with number + operationId: 123_test_@#$%_special_tags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: $another-fake? + /fake/body-with-file-schema: + put: + description: For this test, the body for this request much reference a schema + named `File`. + operationId: testBodyWithFileSchema + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + responses: + "200": + content: {} + description: Success + tags: + - fake + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: fake + /fake/test-query-parameters: + put: + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - explode: false + in: query + name: pipe + required: true + schema: + items: + type: string + type: array + style: form + - in: query + name: ioutil + required: true + schema: + items: + type: string + type: array + - in: query + name: http + required: true + schema: + items: + type: string + type: array + style: spaceDelimited + - explode: false + in: query + name: url + required: true + schema: + items: + type: string + type: array + style: form + - explode: true + in: query + name: context + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: {} + description: Success + tags: + - fake + x-accepts: application/json + x-tags: + - tag: fake + /fake/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image (required) + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet +components: + schemas: + Order: + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + type: object + xml: + name: Order + Category: + example: + name: default-name + id: 6 + properties: + id: + format: int64 + type: integer + name: + default: default-name + type: string + required: + - name + type: object + xml: + name: Category + User: + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + type: object + xml: + name: User + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: default-name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + uniqueItems: true + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + ApiResponse: + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + type: object + $special[model.name]: + properties: + $special[property.name]: + format: int64 + type: integer + type: object + xml: + name: $special[model.name] + Return: + description: Model for testing reserved words + properties: + return: + format: int32 + type: integer + type: object + xml: + name: Return + Name: + description: Model for testing model name same as property name + properties: + name: + format: int32 + type: integer + snake_case: + format: int32 + readOnly: true + type: integer + property: + type: string + "123Number": + readOnly: true + type: integer + required: + - name + type: object + xml: + name: Name + "200_response": + description: Model for testing model name starting with number + properties: + name: + format: int32 + type: integer + class: + type: string + type: object + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + type: object + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Dog_allOf' + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - $ref: '#/components/schemas/Cat_allOf' + BigCat: + allOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/BigCat_allOf' + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array + format_test: + properties: + integer: + maximum: 1E+2 + minimum: 1E+1 + type: integer + int32: + format: int32 + maximum: 2E+2 + minimum: 2E+1 + type: integer + int64: + format: int64 + type: integer + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + format: float + maximum: 987.6 + minimum: 54.3 + type: number + double: + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + pattern: /[a-z]/i + type: string + byte: + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + binary: + format: binary + type: string + date: + format: date + type: string + dateTime: + format: date-time + type: string + uuid: + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + format: uuid + type: string + password: + format: password + maxLength: 64 + minLength: 10 + type: string + BigDecimal: + format: number + type: string + required: + - byte + - date + - number + - password + type: object + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + Enum_Test: + properties: + enum_string: + enum: + - UPPER + - lower + - "" + type: string + enum_string_required: + enum: + - UPPER + - lower + - "" + type: string + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' + required: + - enum_string_required + type: object + AdditionalPropertiesClass: + properties: + map_string: + additionalProperties: + type: string + type: object + map_number: + additionalProperties: + type: number + type: object + map_integer: + additionalProperties: + type: integer + type: object + map_boolean: + additionalProperties: + type: boolean + type: object + map_array_integer: + additionalProperties: + items: + type: integer + type: array + type: object + map_array_anytype: + additionalProperties: + items: + properties: {} + type: object + type: array + type: object + map_map_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_map_anytype: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + type: object + anytype_1: + properties: {} + type: object + anytype_2: + type: object + anytype_3: + properties: {} + type: object + type: object + AdditionalPropertiesString: + additionalProperties: + type: string + properties: + name: + type: string + type: object + AdditionalPropertiesInteger: + additionalProperties: + type: integer + properties: + name: + type: string + type: object + AdditionalPropertiesNumber: + additionalProperties: + type: number + properties: + name: + type: string + type: object + AdditionalPropertiesBoolean: + additionalProperties: + type: boolean + properties: + name: + type: string + type: object + AdditionalPropertiesArray: + additionalProperties: + items: + properties: {} + type: object + type: array + properties: + name: + type: string + type: object + AdditionalPropertiesObject: + additionalProperties: + additionalProperties: + properties: {} + type: object + type: object + properties: + name: + type: string + type: object + AdditionalPropertiesAnyType: + additionalProperties: + properties: {} + type: object + properties: + name: + type: string + type: object + MixedPropertiesAndAdditionalPropertiesClass: + properties: + uuid: + format: uuid + type: string + dateTime: + format: date-time + type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + List: + properties: + "123-list": + type: string + type: object + Client: + example: + client: client + properties: + client: + type: string + type: object + ReadOnlyFirst: + properties: + bar: + readOnly: true + type: string + baz: + type: string + type: object + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object + Capitalization: + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + direct_map: + additionalProperties: + type: boolean + type: object + indirect_map: + additionalProperties: + type: boolean + type: object + type: object + ArrayTest: + properties: + array_of_string: + items: + type: string + type: array + array_array_of_integer: + items: + items: + format: int64 + type: integer + type: array + type: array + array_array_of_model: + items: + items: + $ref: '#/components/schemas/ReadOnlyFirst' + type: array + type: array + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object + ArrayOfNumberOnly: + properties: + ArrayNumber: + items: + type: number + type: array + type: object + ArrayOfArrayOfNumberOnly: + properties: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array + type: object + EnumArrays: + properties: + just_symbol: + enum: + - '>=' + - $ + type: string + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterEnum: + enum: + - placed + - approved + - delivered + type: string + OuterComposite: + example: + my_string: my_string + my_number: 0.8008281904610115 + my_boolean: true + properties: + my_number: + type: number + my_string: + type: string + my_boolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + type: object + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + type: object + FileSchemaTestClass: + example: + file: + sourceURI: sourceURI + files: + - sourceURI: sourceURI + - sourceURI: sourceURI + properties: + file: + $ref: '#/components/schemas/File' + files: + items: + $ref: '#/components/schemas/File' + type: array + type: object + File: + description: Must be named `File` for test. + example: + sourceURI: sourceURI + properties: + sourceURI: + description: Test capitalization + type: string + type: object + TypeHolderDefault: + properties: + string_item: + default: what + type: string + number_item: + type: number + integer_item: + type: integer + bool_item: + default: true + type: boolean + array_item: + items: + type: integer + type: array + required: + - array_item + - bool_item + - integer_item + - number_item + - string_item + type: object + TypeHolderExample: + properties: + string_item: + example: what + type: string + number_item: + example: 1.234 + type: number + float_item: + example: 1.234 + format: float + type: number + integer_item: + example: -2 + type: integer + bool_item: + example: true + type: boolean + array_item: + example: + - 0 + - 1 + - 2 + - 3 + items: + type: integer + type: array + required: + - array_item + - bool_item + - float_item + - integer_item + - number_item + - string_item + type: object + XmlItem: + properties: + attribute_string: + example: string + type: string + xml: + attribute: true + attribute_number: + example: 1.234 + type: number + xml: + attribute: true + attribute_integer: + example: -2 + type: integer + xml: + attribute: true + attribute_boolean: + example: true + type: boolean + xml: + attribute: true + wrapped_array: + items: + type: integer + type: array + xml: + wrapped: true + name_string: + example: string + type: string + xml: + name: xml_name_string + name_number: + example: 1.234 + type: number + xml: + name: xml_name_number + name_integer: + example: -2 + type: integer + xml: + name: xml_name_integer + name_boolean: + example: true + type: boolean + xml: + name: xml_name_boolean + name_array: + items: + type: integer + xml: + name: xml_name_array_item + type: array + name_wrapped_array: + items: + type: integer + xml: + name: xml_name_wrapped_array_item + type: array + xml: + name: xml_name_wrapped_array + wrapped: true + prefix_string: + example: string + type: string + xml: + prefix: ab + prefix_number: + example: 1.234 + type: number + xml: + prefix: cd + prefix_integer: + example: -2 + type: integer + xml: + prefix: ef + prefix_boolean: + example: true + type: boolean + xml: + prefix: gh + prefix_array: + items: + type: integer + xml: + prefix: ij + type: array + prefix_wrapped_array: + items: + type: integer + xml: + prefix: mn + type: array + xml: + prefix: kl + wrapped: true + namespace_string: + example: string + type: string + xml: + namespace: http://a.com/schema + namespace_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + namespace_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + namespace_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + namespace_array: + items: + type: integer + xml: + namespace: http://e.com/schema + type: array + namespace_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + type: array + xml: + namespace: http://f.com/schema + wrapped: true + prefix_ns_string: + example: string + type: string + xml: + namespace: http://a.com/schema + prefix: a + prefix_ns_number: + example: 1.234 + type: number + xml: + namespace: http://b.com/schema + prefix: b + prefix_ns_integer: + example: -2 + type: integer + xml: + namespace: http://c.com/schema + prefix: c + prefix_ns_boolean: + example: true + type: boolean + xml: + namespace: http://d.com/schema + prefix: d + prefix_ns_array: + items: + type: integer + xml: + namespace: http://e.com/schema + prefix: e + type: array + prefix_ns_wrapped_array: + items: + type: integer + xml: + namespace: http://g.com/schema + prefix: g + type: array + xml: + namespace: http://f.com/schema + prefix: f + wrapped: true + type: object + xml: + namespace: http://a.com/schema + prefix: pre + Dog_allOf: + properties: + breed: + type: string + type: object + Cat_allOf: + properties: + declawed: + type: boolean + type: object + BigCat_allOf: + properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey + api_key_query: + in: query + name: api_key_query + type: apiKey + http_basic_test: + scheme: basic + type: http +x-original-swagger-version: "2.0" diff --git a/samples/openapi3/server/petstore/springboot/.openapi-generator-ignore b/samples/openapi3/server/petstore/springboot/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/.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/openapi3/server/petstore/springboot/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot/.openapi-generator/FILES new file mode 100644 index 000000000000..7de4a0d86c09 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/.openapi-generator/FILES @@ -0,0 +1,20 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenAPI2SpringBoot.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiController.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiController.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiController.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java +src/main/resources/application.properties +src/main/resources/openapi.yaml diff --git a/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot/README.md b/samples/openapi3/server/petstore/springboot/README.md new file mode 100644 index 000000000000..5bbe4a495d99 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/README.md @@ -0,0 +1,16 @@ +# OpenAPI generated server + +Spring Boot Server + + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:8080/ + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot/pom.xml b/samples/openapi3/server/petstore/springboot/pom.xml new file mode 100644 index 000000000000..d0efb3028cea --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/pom.xml @@ -0,0 +1,71 @@ + + 4.0.0 + org.openapitools.openapi3 + springboot + jar + springboot + 1.0.0-SNAPSHOT + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/OpenAPI2SpringBoot.java new file mode 100644 index 000000000000..cb088f451935 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -0,0 +1,63 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebMvcConfigurer webConfigurer() { + return new WebMvcConfigurer() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); + } + }; + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +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.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(); + } + + @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 this; + } +} \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} 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 new file mode 100644 index 000000000000..0bec586d6930 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,382 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + produces = { "application/xml", "application/json" }, + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity addPet( + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet pet + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + @Operation( + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + default ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /pet : Update an existing pet + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + produces = { "application/xml", "application/json" }, + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity updatePet( + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet pet + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java new file mode 100644 index 000000000000..e72c57e3cbec --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class PetApiController implements PetApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public PetApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..98cbb475200d --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,184 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + default ResponseEntity deleteOrder( + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("orderId") String orderId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = { "application/json" } + ) + default ResponseEntity> getInventory( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("orderId") Long orderId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /store/order : Place an order for a pet + * + * @param order order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = { "application/xml", "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity placeOrder( + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order order + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java new file mode 100644 index 000000000000..1293b5c8f6e4 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class StoreApiController implements StoreApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public StoreApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..899416135fc5 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,294 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param user Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user", + consumes = { "application/json" } + ) + default ResponseEntity createUser( + @Parameter(name = "User", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User user + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray", + consumes = { "application/json" } + ) + default ResponseEntity createUsersWithArrayInput( + @Parameter(name = "User", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List user + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList", + consumes = { "application/json" } + ) + default ResponseEntity createUsersWithListInput( + @Parameter(name = "User", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List user + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + default ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity loginUser( + @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + default ResponseEntity logoutUser( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}", + consumes = { "application/json" } + ) + default ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "User", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User user + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java new file mode 100644 index 000000000000..3f6c4d9a2d6f --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java @@ -0,0 +1,24 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class UserApiController implements UserApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public UserApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..34bae16b8986 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,53 @@ +package org.openapitools.configuration; + +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Controller; +import org.springframework.util.StreamUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + private static YAMLMapper yamlMapper = new YAMLMapper(); + + @Value("classpath:/openapi.yaml") + private Resource openapi; + + @Bean + public String openapiContent() throws IOException { + try(InputStream is = openapi.getInputStream()) { + return StreamUtils.copyToString(is, Charset.defaultCharset()); + } + } + + @GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi") + @ResponseBody + public String openapiYaml() throws IOException { + return openapiContent(); + } + + @GetMapping(value = "/openapi.json", produces = "application/json") + @ResponseBody + public Object openapiJson() throws IOException { + return yamlMapper.readValue(openapiContent(), Object.class); + } + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui/index.html?url=../openapi.json"; + } + + +} diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..463de0ed39a3 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A category for a pet + */ +@Schema(name = "Category",description = "A category for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + +@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + 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/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..0ef610e38f01 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,134 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * Describes the result of uploading an image resource + */ +@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..528598b79ea7 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,250 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * An order for a pets from the pet store + */ +@Schema(name = "Order",description = "An order for a pets from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..7c2986fea846 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,270 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A pet for sale in the pet store + */ +@Schema(name = "Pet",description = "A pet for sale in the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + 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 + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + 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 + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..27166f687a27 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A tag for a pet + */ +@Schema(name = "Tag",description = "A tag for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..ba24f681c1df --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,259 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; + +/** + * A User who is purchasing from the pet store + */ +@Schema(name = "User",description = "A User who is purchasing from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot/src/main/resources/application.properties b/samples/openapi3/server/petstore/springboot/src/main/resources/application.properties new file mode 100644 index 000000000000..7e90813e59b2 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=8080 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml new file mode 100644 index 000000000000..56703dfefb56 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml @@ -0,0 +1,893 @@ +openapi: 3.0.0 +info: + description: This is a sample server Petstore server. For this sample, you can use + the api key `special-key` to test the authorization filters. + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io +servers: +- url: http://petstore.swagger.io/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + post: + operationId: addPet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "405": + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + put: + operationId: updatePet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Pet not found + "405": + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - deprecated: true + description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + description: Invalid status value + security: + - petstore_auth: + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + description: Invalid tag value + security: + - petstore_auth: + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - explode: false + in: header + name: api_key + required: false + schema: + type: string + style: simple + - description: Pet id to delete + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "400": + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object' + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + responses: + "405": + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object_1' + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /store/order: + post: + operationId: placeOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: store + /store/order/{orderId}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + explode: false + in: path + name: orderId + required: true + schema: + type: string + style: simple + responses: + "400": + description: Invalid ID supplied + "404": + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + explode: false + in: path + name: orderId + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Order not found + summary: Find purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Create user + tags: + - user + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Creates list of users with given input array + tags: + - user + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Creates list of users with given input array + tags: + - user + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + explode: true + in: query + name: username + required: true + schema: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ + type: string + style: form + - description: The password for login in clear text + explode: true + in: query + name: password + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + Set-Cookie: + description: Cookie authentication key for use with the `api_key` apiKey + authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple + X-Rate-Limit: + description: calls per hour allowed by the user + explode: false + schema: + format: int32 + type: integer + style: simple + X-Expires-After: + description: date in UTC when token expires + explode: false + schema: + format: date-time + type: string + style: simple + "400": + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/logout: + get: + operationId: logoutUser + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "400": + description: Invalid username supplied + "404": + description: User not found + security: + - api_key: [] + summary: Delete user + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + description: Invalid username supplied + "404": + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + description: Invalid user supplied + "404": + description: User not found + security: + - api_key: [] + summary: Updated user + tags: + - user + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: user +components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' + schemas: + Order: + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + title: Pet Order + type: object + xml: + name: Order + Category: + description: A category for a pet + example: + name: name + id: 6 + properties: + id: + format: int64 + type: integer + name: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ + type: string + title: Pet category + type: object + xml: + name: Category + User: + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + title: a User + type: object + xml: + name: User + Tag: + description: A tag for a pet + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + title: Pet Tag + type: object + xml: + name: Tag + Pet: + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + deprecated: true + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + title: a Pet + type: object + xml: + name: Pet + ApiResponse: + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + title: An uploaded response + type: object + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/spring-mvc-default-value/pom.xml b/samples/server/petstore/spring-mvc-default-value/pom.xml index fa8da51ae2da..dc8d196bfaf2 100644 --- a/samples/server/petstore/spring-mvc-default-value/pom.xml +++ b/samples/server/petstore/spring-mvc-default-value/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java index dfdd5db9095d..f4cc86e3817c 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java @@ -42,29 +42,29 @@ default Optional getRequest() { * @param headerBoolean (optional, default to true) * @return default response (status code 200) */ - - @ApiOperation(value = "test headers", nickname = "headersTest", notes = "desc", response = TestResponse.class, tags={ "verify-default-value", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) + @ApiOperation( + tags = { "verify-default-value" }, + value = "test headers", + nickname = "headersTest", + notes = "desc", + response = TestResponse.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "default response", response = TestResponse.class) + }) @RequestMapping( method = RequestMethod.GET, value = "/test-headers", produces = { "application/json" } ) default ResponseEntity headersTest( -@ApiParam(value = "", defaultValue = "11.2") @RequestHeader(value = "headerNumber", required = false) BigDecimal headerNumber -, -@ApiParam(value = "", defaultValue = "qwerty") @RequestHeader(value = "headerString", required = false) String headerString -, -@ApiParam(value = "", defaultValue = "qwerty") @RequestHeader(value = "headerStringWrapped", required = false) String headerStringWrapped -, -@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @RequestHeader(value = "headerStringQuotes", required = false) String headerStringQuotes -, -@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @RequestHeader(value = "headerStringQuotesWrapped", required = false) String headerStringQuotesWrapped -, -@ApiParam(value = "", defaultValue = "true") @RequestHeader(value = "headerBoolean", required = false) Boolean headerBoolean -) { + @ApiParam(value = "", defaultValue = "11.2") @RequestHeader(value = "headerNumber", required = false) BigDecimal headerNumber, + @ApiParam(value = "", defaultValue = "qwerty") @RequestHeader(value = "headerString", required = false) String headerString, + @ApiParam(value = "", defaultValue = "qwerty") @RequestHeader(value = "headerStringWrapped", required = false) String headerStringWrapped, + @ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @RequestHeader(value = "headerStringQuotes", required = false) String headerStringQuotes, + @ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @RequestHeader(value = "headerStringQuotesWrapped", required = false) String headerStringQuotesWrapped, + @ApiParam(value = "", defaultValue = "true") @RequestHeader(value = "headerBoolean", required = false) Boolean headerBoolean + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java index 264c8c28f6a6..208840a0b056 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java @@ -42,29 +42,29 @@ default Optional getRequest() { * @param queryBoolean (optional, default to true) * @return default response (status code 200) */ - - @ApiOperation(value = "test query params", nickname = "queryParamsTest", notes = "desc", response = TestResponse.class, tags={ "verify-default-value", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) + @ApiOperation( + tags = { "verify-default-value" }, + value = "test query params", + nickname = "queryParamsTest", + notes = "desc", + response = TestResponse.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "default response", response = TestResponse.class) + }) @RequestMapping( method = RequestMethod.GET, value = "/test-query-params", produces = { "application/json" } ) - default ResponseEntity queryParamsTest(@ApiParam(value = "", defaultValue = "11.2") @Valid @RequestParam(value = "queryNumber", required = false, defaultValue = "11.2") BigDecimal queryNumber - -,@ApiParam(value = "", defaultValue = "qwerty") @Valid @RequestParam(value = "queryString", required = false, defaultValue = "qwerty") String queryString - -,@ApiParam(value = "", defaultValue = "qwerty") @Valid @RequestParam(value = "queryStringWrapped", required = false, defaultValue = "qwerty") String queryStringWrapped - -,@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @Valid @RequestParam(value = "queryStringQuotes", required = false, defaultValue = "qwerty\"with quotes\" test") String queryStringQuotes - -,@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @Valid @RequestParam(value = "queryStringQuotesWrapped", required = false, defaultValue = "qwerty\"with quotes\" test") String queryStringQuotesWrapped - -,@ApiParam(value = "", defaultValue = "true") @Valid @RequestParam(value = "queryBoolean", required = false, defaultValue = "true") Boolean queryBoolean - -) { + default ResponseEntity queryParamsTest( + @ApiParam(value = "", defaultValue = "11.2") @Valid @RequestParam(value = "queryNumber", required = false, defaultValue = "11.2") BigDecimal queryNumber, + @ApiParam(value = "", defaultValue = "qwerty") @Valid @RequestParam(value = "queryString", required = false, defaultValue = "qwerty") String queryString, + @ApiParam(value = "", defaultValue = "qwerty") @Valid @RequestParam(value = "queryStringWrapped", required = false, defaultValue = "qwerty") String queryStringWrapped, + @ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @Valid @RequestParam(value = "queryStringQuotes", required = false, defaultValue = "qwerty\"with quotes\" test") String queryStringQuotes, + @ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @Valid @RequestParam(value = "queryStringQuotesWrapped", required = false, defaultValue = "qwerty\"with quotes\" test") String queryStringQuotesWrapped, + @ApiParam(value = "", defaultValue = "true") @Valid @RequestParam(value = "queryBoolean", required = false, defaultValue = "true") Boolean queryBoolean + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/pom.xml b/samples/server/petstore/spring-mvc-j8-async/pom.xml index 75642d4fca41..9308a10db9d3 100644 --- a/samples/server/petstore/spring-mvc-j8-async/pom.xml +++ b/samples/server/petstore/spring-mvc-j8-async/pom.xml @@ -166,17 +166,18 @@ ${java.version} ${java.version} 1.3.5 - 2.3.3 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 4.0.4 - 2.8.0 + 2.9.2 2.9.9 2.8.4 2.0.2 4.3.20.RELEASE 0.2.2 2.9.8 + 1.6.3 diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3e2889541ecd..57027ab454f9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -37,11 +37,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -49,8 +54,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default CompletableFuture> call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 032d332fcc18..5481edab7a72 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -46,19 +46,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default CompletableFuture> createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -71,19 +75,24 @@ default CompletableFuture> createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default CompletableFuture> fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -96,19 +105,24 @@ default CompletableFuture> fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default CompletableFuture> fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -132,19 +146,24 @@ default CompletableFuture> fakeOuterCompositeSeri * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default CompletableFuture> fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -157,19 +176,24 @@ default CompletableFuture> fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default CompletableFuture> fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -182,19 +206,23 @@ default CompletableFuture> fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default CompletableFuture> testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -207,21 +235,24 @@ default CompletableFuture> testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default CompletableFuture> testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default CompletableFuture> testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -234,11 +265,16 @@ default CompletableFuture> testBodyWithQueryParams(@NotNull * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -246,8 +282,8 @@ default CompletableFuture> testBodyWithQueryParams(@NotNull consumes = { "application/json" } ) default CompletableFuture> testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -285,50 +321,40 @@ default CompletableFuture> testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default CompletableFuture> testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -349,35 +375,31 @@ default CompletableFuture> testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default CompletableFuture> testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -395,28 +417,27 @@ default CompletableFuture> testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default CompletableFuture> testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default CompletableFuture> testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -428,19 +449,23 @@ default CompletableFuture> testGroupParameters(@NotNull @Ap * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default CompletableFuture> testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -453,21 +478,24 @@ default CompletableFuture> testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default CompletableFuture> testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -484,26 +512,26 @@ default CompletableFuture> testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default CompletableFuture> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default CompletableFuture> testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -517,28 +545,33 @@ default CompletableFuture> testQueryParameterCollectionForm * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default CompletableFuture> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default CompletableFuture> uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 47e953b4e539..4d7d81f1a1b5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -37,14 +37,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -52,8 +57,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default CompletableFuture> testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index e977c20c3bf2..22c715f84ef6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -39,25 +39,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default CompletableFuture> addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -71,26 +76,30 @@ default CompletableFuture> addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default CompletableFuture> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default CompletableFuture> deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -104,25 +113,32 @@ default CompletableFuture> deletePet(@ApiParam(value = "Pet * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default CompletableFuture>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default CompletableFuture>> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -153,25 +169,32 @@ default CompletableFuture>> findPetsByStatus(@NotNull @ * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default CompletableFuture>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default CompletableFuture>> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -202,26 +225,29 @@ default CompletableFuture>> findPetsByTags(@NotNull @Api * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default CompletableFuture> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default CompletableFuture> getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -252,29 +278,32 @@ default CompletableFuture> getPetById(@ApiParam(value = "ID * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default CompletableFuture> updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -288,27 +317,31 @@ default CompletableFuture> updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default CompletableFuture> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default CompletableFuture> updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -322,28 +355,33 @@ default CompletableFuture> updatePetWithForm(@ApiParam(valu * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default CompletableFuture> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default CompletableFuture> uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index da11e798ae1c..f3637cae181f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -39,20 +39,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default CompletableFuture> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default CompletableFuture> deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -64,20 +67,28 @@ default CompletableFuture> deleteOrder(@ApiParam(value = "I * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default CompletableFuture>> getInventory() { + default CompletableFuture>> getInventory( + + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -92,23 +103,26 @@ default CompletableFuture>> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default CompletableFuture> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default CompletableFuture> getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -137,21 +151,25 @@ default CompletableFuture> getOrderById(@Min(1L) @Max(5L) * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default CompletableFuture> placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 8a2de1ce1d29..1293676616e2 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -39,18 +39,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default CompletableFuture> createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -62,18 +66,22 @@ default CompletableFuture> createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default CompletableFuture> createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -85,18 +93,22 @@ default CompletableFuture> createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default CompletableFuture> createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -110,20 +122,23 @@ default CompletableFuture> createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default CompletableFuture> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default CompletableFuture> deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -137,23 +152,26 @@ default CompletableFuture> deleteUser(@ApiParam(value = "Th * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default CompletableFuture> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default CompletableFuture> getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -183,23 +201,26 @@ default CompletableFuture> getUserByName(@ApiParam(value = * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default CompletableFuture> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default CompletableFuture> loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -210,16 +231,22 @@ default CompletableFuture> loginUser(@NotNull @ApiParam(v * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default CompletableFuture> logoutUser() { + default CompletableFuture> logoutUser( + + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -234,22 +261,24 @@ default CompletableFuture> logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default CompletableFuture> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default CompletableFuture> updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml index 869d354af92a..f14a30570c91 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml @@ -166,17 +166,18 @@ ${java.version} ${java.version} 1.3.5 - 2.3.3 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 4.0.4 - 2.8.0 + 2.9.2 2.9.9 2.8.4 2.0.2 4.3.20.RELEASE 0.2.2 2.9.8 + 1.6.3 diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index e11603b847c3..1667ef188aeb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index c682b121c804..bc0af05b90fe 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -45,19 +45,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +74,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,19 +104,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -129,19 +143,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -154,19 +173,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,19 +203,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -204,21 +232,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,11 +262,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -243,8 +279,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -280,50 +316,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) LocalDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) LocalDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -344,35 +370,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -390,28 +412,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -423,19 +444,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -448,21 +473,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -479,26 +507,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -512,28 +540,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3147f4bba9a8..e2459cc308c6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index fe9e7f727be3..e969bf667650 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -38,25 +38,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,26 +75,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -103,25 +112,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -150,25 +166,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -197,26 +220,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -245,29 +271,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,27 +310,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -315,28 +348,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 4ab75d5cfadb..19ab0bb614b6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index 6c4b9866f911..9ab7a9c21f56 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/spring-mvc-no-nullable/pom.xml b/samples/server/petstore/spring-mvc-no-nullable/pom.xml index 126e6408ffcb..4c44170eca32 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/pom.xml +++ b/samples/server/petstore/spring-mvc-no-nullable/pom.xml @@ -161,16 +161,17 @@ ${java.version} ${java.version} 1.3.5 - 2.3.3 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 4.0.4 - 2.8.0 + 2.9.2 2.9.9 2.8.4 2.0.2 4.3.20.RELEASE 2.9.8 + 1.6.3 diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index e11603b847c3..1667ef188aeb 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index c8793f61e444..71ffda67b0c2 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -45,19 +45,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +74,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,19 +104,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -129,19 +143,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -154,19 +173,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,19 +203,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -204,21 +232,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,11 +262,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -243,8 +279,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -280,50 +316,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -344,35 +370,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -390,28 +412,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -423,19 +444,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -448,21 +473,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -479,26 +507,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -512,28 +540,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3147f4bba9a8..e2459cc308c6 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index fe9e7f727be3..e969bf667650 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -38,25 +38,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,26 +75,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -103,25 +112,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -150,25 +166,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -197,26 +220,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -245,29 +271,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,27 +310,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -315,28 +348,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 4ab75d5cfadb..19ab0bb614b6 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index ca77015acbd8..97583359e3b1 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/pom.xml b/samples/server/petstore/spring-mvc-spring-pageable/pom.xml index 1407e73ebaf0..8e4e24b77ae2 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/pom.xml +++ b/samples/server/petstore/spring-mvc-spring-pageable/pom.xml @@ -166,17 +166,18 @@ ${java.version} ${java.version} 1.3.5 - 2.3.3 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 4.0.4 - 2.8.0 + 2.9.2 2.9.9 2.8.4 2.0.2 4.3.20.RELEASE 0.2.2 2.9.8 + 1.6.3 diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index e11603b847c3..1667ef188aeb 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 8d805638e512..14af6c292108 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -45,19 +45,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +74,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,19 +104,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -129,19 +143,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -154,19 +173,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,19 +203,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -204,21 +232,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,11 +262,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -243,8 +279,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -280,50 +316,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -344,35 +370,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -390,28 +412,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -423,19 +444,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -448,21 +473,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -479,26 +507,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -512,28 +540,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3147f4bba9a8..e2459cc308c6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index a428ea5ba5e9..dc4a8ace4c6f 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -37,25 +37,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -69,26 +74,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -102,25 +111,33 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -149,25 +166,33 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -196,26 +221,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -244,29 +272,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -280,27 +311,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -314,28 +349,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 4ab75d5cfadb..19ab0bb614b6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index ca77015acbd8..97583359e3b1 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/spring-mvc/pom.xml b/samples/server/petstore/spring-mvc/pom.xml index 42dc38e182e7..64dbdca4b957 100644 --- a/samples/server/petstore/spring-mvc/pom.xml +++ b/samples/server/petstore/spring-mvc/pom.xml @@ -166,17 +166,18 @@ ${java.version} ${java.version} 1.3.5 - 2.3.3 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 4.0.4 - 2.8.0 + 2.9.2 2.9.9 2.8.4 2.0.2 4.3.20.RELEASE 0.2.2 2.9.8 + 1.6.3 diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index e11603b847c3..1667ef188aeb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index c8793f61e444..71ffda67b0c2 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -45,19 +45,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +74,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,19 +104,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -129,19 +143,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -154,19 +173,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,19 +203,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -204,21 +232,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,11 +262,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -243,8 +279,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -280,50 +316,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -344,35 +370,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -390,28 +412,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -423,19 +444,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -448,21 +473,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -479,26 +507,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -512,28 +540,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3147f4bba9a8..e2459cc308c6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index fe9e7f727be3..e969bf667650 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -38,25 +38,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,26 +75,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -103,25 +112,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -150,25 +166,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -197,26 +220,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -245,29 +271,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,27 +310,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -315,28 +348,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 4ab75d5cfadb..19ab0bb614b6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index ca77015acbd8..97583359e3b1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml b/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml index 2c3a945d1916..f865833516e0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml @@ -9,12 +9,12 @@ 1.7 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 1.5.12.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,26 +38,27 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.github.joschi.jackson jackson-datatype-threetenbp - 2.8.4 + 2.9.10 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9c4ef1f25e51..eb4da37da2c4 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,11 +28,16 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -40,7 +45,7 @@ public interface AnotherFakeApi { consumes = { "application/json" } ) ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index ec32cf448bff..e8f022846bfc 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -41,8 +41,8 @@ public AnotherFakeApiController(NativeWebRequest request) { * @see AnotherFakeApi#call123testSpecialTags */ public ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; 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 e60e016dde5e..ce2e0775f783 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 @@ -37,19 +37,23 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem); + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ); /** @@ -59,19 +63,24 @@ ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body); + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ); /** @@ -81,19 +90,24 @@ ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body); + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ); /** @@ -103,19 +117,24 @@ ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body); + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ); /** @@ -125,19 +144,24 @@ ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body); + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ); /** @@ -147,19 +171,23 @@ ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body); + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ); /** @@ -169,21 +197,24 @@ ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body); + ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ); /** @@ -193,11 +224,16 @@ ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", requ * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -205,8 +241,8 @@ ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", requ consumes = { "application/json" } ) ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); /** @@ -230,50 +266,40 @@ ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ); /** @@ -291,35 +317,31 @@ ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ); /** @@ -334,28 +356,27 @@ ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -); + ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ); /** @@ -364,19 +385,23 @@ ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required St * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param); + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ); /** @@ -386,21 +411,24 @@ ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ); /** @@ -414,26 +442,26 @@ ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -); + ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ); /** @@ -444,27 +472,32 @@ ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); + ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 227840431fb3..76034668bf3c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -50,8 +50,8 @@ public FakeApiController(NativeWebRequest request) { * @see FakeApi#createXmlItem */ public ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,8 +65,8 @@ public ResponseEntity createXmlItem( * @see FakeApi#fakeOuterBooleanSerialize */ public ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -80,8 +80,8 @@ public ResponseEntity fakeOuterBooleanSerialize( * @see FakeApi#fakeOuterCompositeSerialize */ public ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; @@ -102,8 +102,8 @@ public ResponseEntity fakeOuterCompositeSerialize( * @see FakeApi#fakeOuterNumberSerialize */ public ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -117,8 +117,8 @@ public ResponseEntity fakeOuterNumberSerialize( * @see FakeApi#fakeOuterStringSerialize */ public ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -132,8 +132,8 @@ public ResponseEntity fakeOuterStringSerialize( * @see FakeApi#testBodyWithFileSchema */ public ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -146,11 +146,10 @@ public ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) * @see FakeApi#testBodyWithQueryParams */ - public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + public ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -164,8 +163,8 @@ public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = " * @see FakeApi#testClientModel */ public ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; @@ -200,34 +199,21 @@ public ResponseEntity testClientModel( * @see FakeApi#testEndpointParameters */ public ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -249,22 +235,15 @@ public ResponseEntity testEndpointParameters( * @see FakeApi#testEnumParameters */ public ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -282,19 +261,14 @@ public ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) * @see FakeApi#testGroupParameters */ - public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + public ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -307,8 +281,8 @@ public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Requ * @see FakeApi#testInlineAdditionalProperties */ public ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -322,10 +296,9 @@ public ResponseEntity testInlineAdditionalProperties( * @see FakeApi#testJsonFormData */ public ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -342,17 +315,13 @@ public ResponseEntity testJsonFormData( * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + public ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -366,13 +335,11 @@ public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPara * @return successful operation (status code 200) * @see FakeApi#uploadFileWithRequiredFile */ - public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + public ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f552024c17cd..f482b6bf5ac9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,14 +28,19 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -43,7 +48,7 @@ public interface FakeClassnameTestApi { consumes = { "application/json" } ) ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 80e92bdeaf15..b705c60d83bb 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -41,8 +41,8 @@ public FakeClassnameTestApiController(NativeWebRequest request) { * @see FakeClassnameTestApi#testClassname */ public ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index c733126515f9..f0ab551e4d9f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -30,25 +30,30 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -59,26 +64,30 @@ ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -); + ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ); /** @@ -89,25 +98,32 @@ ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -); + ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ); /** @@ -119,25 +135,32 @@ ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status va * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -); + ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ); /** @@ -149,26 +172,29 @@ ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filt * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -); + ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ); /** @@ -180,29 +206,32 @@ ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -213,27 +242,31 @@ ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); + ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ); /** @@ -244,27 +277,32 @@ ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs t * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); + ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 4905ee8920bd..f5625cea3f90 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -43,8 +43,8 @@ public PetApiController(NativeWebRequest request) { * @see PetApi#addPet */ public ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +58,10 @@ public ResponseEntity addPet( * or Invalid pet value (status code 400) * @see PetApi#deletePet */ - public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + public ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -76,9 +75,9 @@ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", requ * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + public ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -105,9 +104,9 @@ public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "St * @deprecated * @see PetApi#findPetsByTags */ - public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + public ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -134,9 +133,9 @@ public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Pet not found (status code 404) * @see PetApi#getPetById */ - public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + public ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -164,8 +163,8 @@ public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", r * @see PetApi#updatePet */ public ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,13 +178,11 @@ public ResponseEntity updatePet( * @return Invalid input (status code 405) * @see PetApi#updatePetWithForm */ - public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + public ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -199,13 +196,11 @@ public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @return successful operation (status code 200) * @see PetApi#uploadFile */ - public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + public ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; 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 ab7fee834062..cb72ccb357fd 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 @@ -30,20 +30,23 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -); + ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ); /** @@ -52,20 +55,28 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - ResponseEntity> getInventory(); + ResponseEntity> getInventory( + + ); /** @@ -77,23 +88,26 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -); + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ); /** @@ -103,20 +117,24 @@ ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pe * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 392213709825..203faf80f73c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -42,9 +42,9 @@ public StoreApiController(NativeWebRequest request) { * or Order not found (status code 404) * @see StoreApi#deleteOrder */ - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + public ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,7 +56,9 @@ public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * @return successful operation (status code 200) * @see StoreApi#getInventory */ - public ResponseEntity> getInventory() { + public ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -71,9 +73,9 @@ public ResponseEntity> getInventory() { * or Order not found (status code 404) * @see StoreApi#getOrderById */ - public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + public ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; @@ -99,8 +101,8 @@ public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "I * @see StoreApi#placeOrder */ public ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 6cfdcf7533e2..3f8d7b71b281 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -30,18 +30,22 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ); /** @@ -50,18 +54,22 @@ ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -70,18 +78,22 @@ ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -92,20 +104,23 @@ ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -); + ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ); /** @@ -116,23 +131,26 @@ ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be del * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -); + ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ); /** @@ -143,23 +161,26 @@ ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -); + ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ); /** @@ -167,16 +188,22 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - ResponseEntity logoutUser(); + ResponseEntity logoutUser( + + ); /** @@ -188,21 +215,23 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); + ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index a5441a06b657..224d437db48a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -43,8 +43,8 @@ public UserApiController(NativeWebRequest request) { * @see UserApi#createUser */ public ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -57,8 +57,8 @@ public ResponseEntity createUser( * @see UserApi#createUsersWithArrayInput */ public ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -71,8 +71,8 @@ public ResponseEntity createUsersWithArrayInput( * @see UserApi#createUsersWithListInput */ public ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -86,9 +86,9 @@ public ResponseEntity createUsersWithListInput( * or User not found (status code 404) * @see UserApi#deleteUser */ - public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + public ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -102,9 +102,9 @@ public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to * or User not found (status code 404) * @see UserApi#getUserByName */ - public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + public ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; @@ -130,11 +130,10 @@ public ResponseEntity getUserByName(@ApiParam(value = "The name that needs * or Invalid username/password supplied (status code 400) * @see UserApi#loginUser */ - public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + public ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -145,7 +144,9 @@ public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user nam * @return successful operation (status code 200) * @see UserApi#logoutUser */ - public ResponseEntity logoutUser() { + public ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -160,11 +161,10 @@ public ResponseEntity logoutUser() { * or User not found (status code 404) * @see UserApi#updateUser */ - public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + public ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-beanvalidation/pom.xml b/samples/server/petstore/springboot-beanvalidation/pom.xml index ae8ec70bc1c7..a9da2ec020fd 100644 --- a/samples/server/petstore/springboot-beanvalidation/pom.xml +++ b/samples/server/petstore/springboot-beanvalidation/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index e11603b847c3..1667ef188aeb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 c8793f61e444..71ffda67b0c2 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 @@ -45,19 +45,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +74,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,19 +104,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -129,19 +143,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -154,19 +173,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,19 +203,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -204,21 +232,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,11 +262,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -243,8 +279,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -280,50 +316,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -344,35 +370,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -390,28 +412,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -423,19 +444,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -448,21 +473,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -479,26 +507,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -512,28 +540,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3147f4bba9a8..e2459cc308c6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index fe9e7f727be3..e969bf667650 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -38,25 +38,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,26 +75,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -103,25 +112,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -150,25 +166,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -197,26 +220,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -245,29 +271,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,27 +310,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -315,28 +348,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 4ab75d5cfadb..19ab0bb614b6 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 @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index ca77015acbd8..97583359e3b1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate-j8/pom.xml b/samples/server/petstore/springboot-delegate-j8/pom.xml index 14ed219b34cc..4dc9b6f1c579 100644 --- a/samples/server/petstore/springboot-delegate-j8/pom.xml +++ b/samples/server/petstore/springboot-delegate-j8/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2f58a11f22ba..ff5677cd8c33 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -32,11 +32,16 @@ default AnotherFakeApiDelegate getDelegate() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -44,8 +49,8 @@ default AnotherFakeApiDelegate getDelegate() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 7e6ac74b30f4..a86542ddf223 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 82c6778214bb..52267c039104 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 @@ -41,19 +41,23 @@ default FakeApiDelegate getDelegate() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return getDelegate().createXmlItem(xmlItem); } @@ -65,19 +69,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -89,19 +98,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { return getDelegate().fakeOuterCompositeSerialize(body); } @@ -113,19 +127,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -137,19 +156,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return getDelegate().fakeOuterStringSerialize(body); } @@ -161,19 +185,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return getDelegate().testBodyWithFileSchema(body); } @@ -185,21 +213,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return getDelegate().testBodyWithQueryParams(query, body); } @@ -211,11 +242,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -223,8 +259,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().testClientModel(body); } @@ -250,50 +286,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -313,35 +339,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -358,28 +380,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -390,19 +411,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return getDelegate().testInlineAdditionalProperties(param); } @@ -414,21 +439,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return getDelegate().testJsonFormData(param, param2); } @@ -444,26 +472,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -476,28 +504,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } 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 32a862f8273f..d3a949e65d81 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 @@ -10,7 +10,6 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 88b4da345186..f76698310b49 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -32,14 +32,19 @@ default FakeClassnameTestApiDelegate getDelegate() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -47,8 +52,8 @@ default FakeClassnameTestApiDelegate getDelegate() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().testClassname(body); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index c71fe13d195a..ed5a6bfc09a0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index e57b00ff21e8..c62662ff8c93 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -34,25 +34,30 @@ default PetApiDelegate getDelegate() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return getDelegate().addPet(body); } @@ -65,26 +70,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return getDelegate().deletePet(petId, apiKey); } @@ -97,25 +106,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { return getDelegate().findPetsByStatus(status); } @@ -129,25 +145,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { return getDelegate().findPetsByTags(tags); } @@ -161,26 +184,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { return getDelegate().getPetById(petId); } @@ -194,29 +220,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return getDelegate().updatePet(body); } @@ -229,27 +258,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -262,28 +295,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { return getDelegate().uploadFile(petId, additionalMetadata, file); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index b34d322223b6..e3adc7d4bca7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -3,7 +3,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 6944e4129d3f..39f4c0b7c7e9 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 @@ -34,20 +34,23 @@ default StoreApiDelegate getDelegate() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return getDelegate().deleteOrder(orderId); } @@ -58,20 +61,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return getDelegate().getInventory(); } @@ -85,23 +96,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { return getDelegate().getOrderById(orderId); } @@ -113,21 +127,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { return getDelegate().placeOrder(body); } 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 5091e7e1f2cc..dfe4bb314961 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 @@ -2,7 +2,6 @@ import java.util.Map; import org.openapitools.model.Order; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 87353cde051e..b45b075f9240 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -34,18 +34,22 @@ default UserApiDelegate getDelegate() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return getDelegate().createUser(body); } @@ -56,18 +60,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return getDelegate().createUsersWithArrayInput(body); } @@ -78,18 +86,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return getDelegate().createUsersWithListInput(body); } @@ -102,20 +114,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return getDelegate().deleteUser(username); } @@ -128,23 +143,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { return getDelegate().getUserByName(username); } @@ -157,23 +175,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return getDelegate().loginUser(username, password); } @@ -183,16 +204,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return getDelegate().logoutUser(); } @@ -206,22 +233,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return getDelegate().updateUser(username, body); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index b63fa7a1c28a..2efbd71c9dc9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -3,7 +3,6 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate/pom.xml b/samples/server/petstore/springboot-delegate/pom.xml index f5fe58e2f14b..4e8cd4a140ea 100644 --- a/samples/server/petstore/springboot-delegate/pom.xml +++ b/samples/server/petstore/springboot-delegate/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2f58a11f22ba..ff5677cd8c33 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -32,11 +32,16 @@ default AnotherFakeApiDelegate getDelegate() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -44,8 +49,8 @@ default AnotherFakeApiDelegate getDelegate() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 7e6ac74b30f4..a86542ddf223 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 82c6778214bb..52267c039104 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 @@ -41,19 +41,23 @@ default FakeApiDelegate getDelegate() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return getDelegate().createXmlItem(xmlItem); } @@ -65,19 +69,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -89,19 +98,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { return getDelegate().fakeOuterCompositeSerialize(body); } @@ -113,19 +127,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -137,19 +156,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return getDelegate().fakeOuterStringSerialize(body); } @@ -161,19 +185,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return getDelegate().testBodyWithFileSchema(body); } @@ -185,21 +213,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return getDelegate().testBodyWithQueryParams(query, body); } @@ -211,11 +242,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -223,8 +259,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().testClientModel(body); } @@ -250,50 +286,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -313,35 +339,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -358,28 +380,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -390,19 +411,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return getDelegate().testInlineAdditionalProperties(param); } @@ -414,21 +439,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return getDelegate().testJsonFormData(param, param2); } @@ -444,26 +472,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -476,28 +504,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } 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 32a862f8273f..d3a949e65d81 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 @@ -10,7 +10,6 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 88b4da345186..f76698310b49 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -32,14 +32,19 @@ default FakeClassnameTestApiDelegate getDelegate() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -47,8 +52,8 @@ default FakeClassnameTestApiDelegate getDelegate() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().testClassname(body); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index c71fe13d195a..ed5a6bfc09a0 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index e57b00ff21e8..c62662ff8c93 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -34,25 +34,30 @@ default PetApiDelegate getDelegate() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return getDelegate().addPet(body); } @@ -65,26 +70,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return getDelegate().deletePet(petId, apiKey); } @@ -97,25 +106,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { return getDelegate().findPetsByStatus(status); } @@ -129,25 +145,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { return getDelegate().findPetsByTags(tags); } @@ -161,26 +184,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { return getDelegate().getPetById(petId); } @@ -194,29 +220,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return getDelegate().updatePet(body); } @@ -229,27 +258,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -262,28 +295,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { return getDelegate().uploadFile(petId, additionalMetadata, file); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index b34d322223b6..e3adc7d4bca7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -3,7 +3,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 6944e4129d3f..39f4c0b7c7e9 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 @@ -34,20 +34,23 @@ default StoreApiDelegate getDelegate() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return getDelegate().deleteOrder(orderId); } @@ -58,20 +61,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return getDelegate().getInventory(); } @@ -85,23 +96,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { return getDelegate().getOrderById(orderId); } @@ -113,21 +127,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { return getDelegate().placeOrder(body); } 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 5091e7e1f2cc..dfe4bb314961 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 @@ -2,7 +2,6 @@ import java.util.Map; import org.openapitools.model.Order; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 87353cde051e..b45b075f9240 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -34,18 +34,22 @@ default UserApiDelegate getDelegate() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return getDelegate().createUser(body); } @@ -56,18 +60,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return getDelegate().createUsersWithArrayInput(body); } @@ -78,18 +86,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return getDelegate().createUsersWithListInput(body); } @@ -102,20 +114,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return getDelegate().deleteUser(username); } @@ -128,23 +143,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { return getDelegate().getUserByName(username); } @@ -157,23 +175,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return getDelegate().loginUser(username, password); } @@ -183,16 +204,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return getDelegate().logoutUser(); } @@ -206,22 +233,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return getDelegate().updateUser(username, body); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index b63fa7a1c28a..2efbd71c9dc9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -3,7 +3,6 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-implicitHeaders/pom.xml b/samples/server/petstore/springboot-implicitHeaders/pom.xml index 149407e2aad3..28802bac5446 100644 --- a/samples/server/petstore/springboot-implicitHeaders/pom.xml +++ b/samples/server/petstore/springboot-implicitHeaders/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index d9f497162212..08fad3c33bf2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -50,8 +55,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 19023bdba49d..940a74845194 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 @@ -45,11 +45,15 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -58,8 +62,8 @@ default Optional getRequest() { consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -72,11 +76,16 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -85,8 +94,8 @@ default ResponseEntity createXmlItem( produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -99,11 +108,16 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -112,8 +126,8 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -135,11 +149,16 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -148,8 +167,8 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -162,11 +181,16 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -175,8 +199,8 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -189,11 +213,15 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -202,8 +230,8 @@ default ResponseEntity fakeOuterStringSerialize( consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -216,11 +244,15 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -228,11 +260,10 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -245,11 +276,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -259,8 +295,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -296,16 +332,19 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -314,34 +353,21 @@ default ResponseEntity testClientModel( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -360,35 +386,33 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @ApiImplicitParams({ - @ApiImplicitParam(name = "enumHeaderStringArray", value = "Header parameter enum test (string array)", dataType = "List", paramType = "header"), - @ApiImplicitParam(name = "enumHeaderString", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") + @ApiImplicitParam(name = "enumHeaderStringArray", value = "Header parameter enum test (string array)", dataType = "List", paramType = "header"), + @ApiImplicitParam(name = "enumHeaderString", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -404,28 +428,29 @@ default ResponseEntity testEnumParameters(@ApiParam(value = "Query paramet * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @ApiImplicitParams({ - @ApiImplicitParam(name = "requiredBooleanGroup", value = "Required Boolean in group parameters", required = true, dataType = "Boolean", paramType = "header"), - @ApiImplicitParam(name = "booleanGroup", value = "Boolean in group parameters", dataType = "Boolean", paramType = "header") + @ApiImplicitParam(name = "requiredBooleanGroup", value = "Required Boolean in group parameters", required = true, dataType = "Boolean", paramType = "header"), + @ApiImplicitParam(name = "booleanGroup", value = "Boolean in group parameters", dataType = "Boolean", paramType = "header") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -437,11 +462,15 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -450,8 +479,8 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -464,11 +493,15 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -477,10 +510,9 @@ default ResponseEntity testInlineAdditionalProperties( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -497,28 +529,28 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @ApiImplicitParams({ }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -532,15 +564,22 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -549,13 +588,11 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 2b8723c03a04..902ff4d66003 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -53,8 +58,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 06f331738cff..9ea20fa79798 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -38,17 +38,22 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -57,8 +62,8 @@ default Optional getRequest() { consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -71,27 +76,32 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @ApiImplicitParams({ - @ApiImplicitParam(name = "apiKey", value = "", dataType = "String", paramType = "header") + @ApiImplicitParam(name = "apiKey", value = "", dataType = "String", paramType = "header") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -105,17 +115,24 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -123,9 +140,9 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -154,17 +171,24 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -172,9 +196,9 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -203,18 +227,21 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -222,9 +249,9 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -253,21 +280,24 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -276,8 +306,8 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -291,15 +321,21 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -307,13 +343,11 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -327,15 +361,22 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @ApiImplicitParams({ }) @RequestMapping( @@ -344,13 +385,11 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 05e8b7e0dd54..60aaea2af9a5 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 @@ -38,22 +38,25 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @ApiImplicitParams({ }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,14 +68,20 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -80,7 +89,9 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,15 +106,18 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -111,9 +125,9 @@ default ResponseEntity> getInventory() { value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -140,13 +154,17 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -155,8 +173,8 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 694cd412a58b..47da1e2faf2b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -38,11 +38,15 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -50,8 +54,8 @@ default Optional getRequest() { value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,11 +67,15 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -75,8 +83,8 @@ default ResponseEntity createUser( value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -88,11 +96,15 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -100,8 +112,8 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -115,22 +127,25 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @ApiImplicitParams({ }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -144,15 +159,18 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -160,9 +178,9 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -190,13 +208,17 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @ApiImplicitParams({ }) @RequestMapping( @@ -204,11 +226,10 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -219,18 +240,24 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @ApiImplicitParams({ }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -245,24 +272,26 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @ApiImplicitParams({ }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-reactive/pom.xml b/samples/server/petstore/springboot-reactive/pom.xml index bc82bfdfef5d..6f5e06c6e297 100644 --- a/samples/server/petstore/springboot-reactive/pom.xml +++ b/samples/server/petstore/springboot-reactive/pom.xml @@ -9,11 +9,12 @@ 1.8 ${java.version} ${java.version} + 1.6.3 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -21,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -40,20 +34,10 @@ org.springframework.data spring-data-commons - - io.springfox - springfox-swagger2 - 2.8.0 - - - org.webjars - swagger-ui - 3.14.2 - io.swagger swagger-annotations - 1.5.14 + ${swagger-core-version} @@ -72,12 +56,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 22b53a2cd15e..3fb97da7defe 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default AnotherFakeApiDelegate getDelegate() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,9 @@ default AnotherFakeApiDelegate getDelegate() { consumes = { "application/json" } ) default Mono> call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().call123testSpecialTags(body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index f925f8ac4789..2ef11c811c11 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 3165448cc121..c01306b7fd40 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 @@ -45,19 +45,24 @@ default FakeApiDelegate getDelegate() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default Mono> createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody Mono xmlItem, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody Mono xmlItem, + final ServerWebExchange exchange + ) { return getDelegate().createXmlItem(xmlItem, exchange); } @@ -69,19 +74,25 @@ default Mono> createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default Mono> fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Mono body, + final ServerWebExchange exchange + ) { return getDelegate().fakeOuterBooleanSerialize(body, exchange); } @@ -93,19 +104,25 @@ default Mono> fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default Mono> fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono body, + final ServerWebExchange exchange + ) { return getDelegate().fakeOuterCompositeSerialize(body, exchange); } @@ -117,19 +134,25 @@ default Mono> fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default Mono> fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Mono body, + final ServerWebExchange exchange + ) { return getDelegate().fakeOuterNumberSerialize(body, exchange); } @@ -141,19 +164,25 @@ default Mono> fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default Mono> fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Mono body, + final ServerWebExchange exchange + ) { return getDelegate().fakeOuterStringSerialize(body, exchange); } @@ -165,19 +194,24 @@ default Mono> fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default Mono> testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().testBodyWithFileSchema(body, exchange); } @@ -189,21 +223,25 @@ default Mono> testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default Mono> testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().testBodyWithQueryParams(query, body, exchange); } @@ -215,11 +253,16 @@ default Mono> testBodyWithQueryParams(@NotNull @ApiParam(va * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -227,8 +270,9 @@ default Mono> testBodyWithQueryParams(@NotNull @ApiParam(va consumes = { "application/json" } ) default Mono> testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().testClientModel(body, exchange); } @@ -254,50 +298,41 @@ default Mono> testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default Mono> testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) Flux binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) Flux binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, + final ServerWebExchange exchange + ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, exchange); } @@ -317,35 +352,32 @@ default Mono> testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default Mono> testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, + final ServerWebExchange exchange + ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); } @@ -362,28 +394,28 @@ default Mono> testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default Mono> testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group, + final ServerWebExchange exchange + ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, exchange); } @@ -394,19 +426,24 @@ default Mono> testGroupParameters(@NotNull @ApiParam(value * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default Mono> testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Mono> param, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono> param, + final ServerWebExchange exchange + ) { return getDelegate().testInlineAdditionalProperties(param, exchange); } @@ -418,21 +455,25 @@ default Mono> testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default Mono> testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2, + final ServerWebExchange exchange + ) { return getDelegate().testJsonFormData(param, param2, exchange); } @@ -448,26 +489,27 @@ default Mono> testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default Mono> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, + final ServerWebExchange exchange + ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange); } @@ -480,28 +522,34 @@ default Mono> testQueryParameterCollectionFormat(@NotNull @ * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default Mono> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) Flux requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Flux requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + final ServerWebExchange exchange + ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, exchange); } 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 348bc54bb047..dbe78fa1c7f9 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 @@ -10,7 +10,6 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3db3fcc1911c..4d2d37f1a59a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default FakeClassnameTestApiDelegate getDelegate() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,9 @@ default FakeClassnameTestApiDelegate getDelegate() { consumes = { "application/json" } ) default Mono> testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().testClassname(body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 621c23358185..4127d96d9e3e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index d06e0ed2db34..877603ff0094 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -38,25 +38,31 @@ default PetApiDelegate getDelegate() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default Mono> addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().addPet(body, exchange); } @@ -69,26 +75,31 @@ default Mono> addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default Mono> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey, + final ServerWebExchange exchange + ) { return getDelegate().deletePet(petId, apiKey, exchange); } @@ -101,25 +112,33 @@ default Mono> deletePet(@ApiParam(value = "Pet id to delete * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default Mono>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono>> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + final ServerWebExchange exchange + ) { return getDelegate().findPetsByStatus(status, exchange); } @@ -133,25 +152,33 @@ default Mono>> findPetsByStatus(@NotNull @ApiParam(valu * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default Mono>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono>> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, + final ServerWebExchange exchange + ) { return getDelegate().findPetsByTags(tags, exchange); } @@ -165,26 +192,30 @@ default Mono>> findPetsByTags(@NotNull @ApiParam(value * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default Mono> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, + final ServerWebExchange exchange + ) { return getDelegate().getPetById(petId, exchange); } @@ -198,29 +229,33 @@ default Mono> getPetById(@ApiParam(value = "ID of pet to ret * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default Mono> updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().updatePet(body, exchange); } @@ -233,27 +268,32 @@ default Mono> updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default Mono> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, + final ServerWebExchange exchange + ) { return getDelegate().updatePetWithForm(petId, name, status, exchange); } @@ -266,28 +306,34 @@ default Mono> updatePetWithForm(@ApiParam(value = "ID of pe * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default Mono> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) Flux file, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) Flux file, + final ServerWebExchange exchange + ) { return getDelegate().uploadFile(petId, additionalMetadata, file, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index 12eca4209031..8dc1be776ea0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -3,7 +3,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 94ff763fd3b4..1b8cd8622037 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 @@ -38,20 +38,24 @@ default StoreApiDelegate getDelegate() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default Mono> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, + final ServerWebExchange exchange + ) { return getDelegate().deleteOrder(orderId, exchange); } @@ -62,20 +66,28 @@ default Mono> deleteOrder(@ApiParam(value = "ID of the orde * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default Mono>> getInventory(@springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono>> getInventory( + final ServerWebExchange exchange + ) { return getDelegate().getInventory(exchange); } @@ -89,23 +101,27 @@ default Mono>> getInventory(@springfox.docum * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default Mono> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, + final ServerWebExchange exchange + ) { return getDelegate().getOrderById(orderId, exchange); } @@ -117,21 +133,26 @@ default Mono> getOrderById(@Min(1L) @Max(5L) @ApiParam(val * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default Mono> placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().placeOrder(body, exchange); } 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 680de023d029..02daadf024a1 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 @@ -2,7 +2,6 @@ import java.util.Map; import org.openapitools.model.Order; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 62e19d84e4ff..60a2f999e4bd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,23 @@ default UserApiDelegate getDelegate() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default Mono> createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().createUser(body, exchange); } @@ -60,18 +65,23 @@ default Mono> createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default Mono> createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody Flux body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux body, + final ServerWebExchange exchange + ) { return getDelegate().createUsersWithArrayInput(body, exchange); } @@ -82,18 +92,23 @@ default Mono> createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default Mono> createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody Flux body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux body, + final ServerWebExchange exchange + ) { return getDelegate().createUsersWithListInput(body, exchange); } @@ -106,20 +121,24 @@ default Mono> createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default Mono> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, + final ServerWebExchange exchange + ) { return getDelegate().deleteUser(username, exchange); } @@ -132,23 +151,27 @@ default Mono> deleteUser(@ApiParam(value = "The name that n * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default Mono> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, + final ServerWebExchange exchange + ) { return getDelegate().getUserByName(username, exchange); } @@ -161,23 +184,27 @@ default Mono> getUserByName(@ApiParam(value = "The name tha * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default Mono> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password, + final ServerWebExchange exchange + ) { return getDelegate().loginUser(username, password, exchange); } @@ -187,16 +214,22 @@ default Mono> loginUser(@NotNull @ApiParam(value = "The u * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default Mono> logoutUser(@springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> logoutUser( + final ServerWebExchange exchange + ) { return getDelegate().logoutUser(exchange); } @@ -210,22 +243,25 @@ default Mono> logoutUser(@springfox.documentation.annotatio * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default Mono> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono body, + final ServerWebExchange exchange + ) { return getDelegate().updateUser(username, body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index 563d11fa041e..3985dd30ecdf 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -3,7 +3,6 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml index d129b82917eb..93c4f5ec6dd5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml @@ -9,12 +9,12 @@ 1.7 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 1.5.12.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,31 +38,32 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.github.joschi.jackson jackson-datatype-threetenbp - 2.8.4 + 2.9.10 org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9c4ef1f25e51..eb4da37da2c4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,11 +28,16 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -40,7 +45,7 @@ public interface AnotherFakeApi { consumes = { "application/json" } ) ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 30d4f1c90e32..f1ca88a6a5ed 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -39,8 +39,8 @@ public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Au * @see AnotherFakeApi#call123testSpecialTags */ public ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return delegate.call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index d17e376d976f..17244270c859 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; 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 72b0473bb9c6..1030dcc870c8 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 @@ -37,19 +37,23 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem); + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ); /** @@ -59,19 +63,24 @@ ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body); + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ); /** @@ -81,19 +90,24 @@ ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body); + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ); /** @@ -103,19 +117,24 @@ ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body); + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ); /** @@ -125,19 +144,24 @@ ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body); + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ); /** @@ -147,19 +171,23 @@ ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body); + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ); /** @@ -169,21 +197,24 @@ ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body); + ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ); /** @@ -193,11 +224,16 @@ ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", requ * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -205,8 +241,8 @@ ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", requ consumes = { "application/json" } ) ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); /** @@ -230,50 +266,40 @@ ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ); /** @@ -291,35 +317,31 @@ ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ); /** @@ -334,28 +356,27 @@ ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -); + ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ); /** @@ -364,19 +385,23 @@ ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required St * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param); + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ); /** @@ -386,21 +411,24 @@ ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ); /** @@ -414,26 +442,26 @@ ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -); + ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ); /** @@ -444,27 +472,32 @@ ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); + ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index e714970497e1..76cc2bb95757 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -48,8 +48,8 @@ public FakeApiController(@org.springframework.beans.factory.annotation.Autowired * @see FakeApi#createXmlItem */ public ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return delegate.createXmlItem(xmlItem); } @@ -62,8 +62,8 @@ public ResponseEntity createXmlItem( * @see FakeApi#fakeOuterBooleanSerialize */ public ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return delegate.fakeOuterBooleanSerialize(body); } @@ -76,8 +76,8 @@ public ResponseEntity fakeOuterBooleanSerialize( * @see FakeApi#fakeOuterCompositeSerialize */ public ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { return delegate.fakeOuterCompositeSerialize(body); } @@ -90,8 +90,8 @@ public ResponseEntity fakeOuterCompositeSerialize( * @see FakeApi#fakeOuterNumberSerialize */ public ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return delegate.fakeOuterNumberSerialize(body); } @@ -104,8 +104,8 @@ public ResponseEntity fakeOuterNumberSerialize( * @see FakeApi#fakeOuterStringSerialize */ public ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return delegate.fakeOuterStringSerialize(body); } @@ -118,8 +118,8 @@ public ResponseEntity fakeOuterStringSerialize( * @see FakeApi#testBodyWithFileSchema */ public ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return delegate.testBodyWithFileSchema(body); } @@ -131,11 +131,10 @@ public ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) * @see FakeApi#testBodyWithQueryParams */ - public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + public ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return delegate.testBodyWithQueryParams(query, body); } @@ -148,8 +147,8 @@ public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = " * @see FakeApi#testClientModel */ public ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return delegate.testClientModel(body); } @@ -176,34 +175,21 @@ public ResponseEntity testClientModel( * @see FakeApi#testEndpointParameters */ public ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -224,22 +210,15 @@ public ResponseEntity testEndpointParameters( * @see FakeApi#testEnumParameters */ public ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -256,19 +235,14 @@ public ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) * @see FakeApi#testGroupParameters */ - public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + public ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -280,8 +254,8 @@ public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Requ * @see FakeApi#testInlineAdditionalProperties */ public ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return delegate.testInlineAdditionalProperties(param); } @@ -294,10 +268,9 @@ public ResponseEntity testInlineAdditionalProperties( * @see FakeApi#testJsonFormData */ public ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return delegate.testJsonFormData(param, param2); } @@ -313,17 +286,13 @@ public ResponseEntity testJsonFormData( * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + public ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -336,13 +305,11 @@ public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPara * @return successful operation (status code 200) * @see FakeApi#uploadFileWithRequiredFile */ - public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + public ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { return delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } 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 3a442bdc25cf..e88b7aa6ca50 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 @@ -10,7 +10,6 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; -import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f552024c17cd..f482b6bf5ac9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,14 +28,19 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -43,7 +48,7 @@ public interface FakeClassnameTestApi { consumes = { "application/json" } ) ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 027fe24ac123..65de19a78d30 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -39,8 +39,8 @@ public FakeClassnameTestApiController(@org.springframework.beans.factory.annotat * @see FakeClassnameTestApi#testClassname */ public ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return delegate.testClassname(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 20d9b798c627..31b94ac10958 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 3407bc13ba18..c8b2da14ebfc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -29,25 +29,30 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -58,26 +63,30 @@ ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -); + ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ); /** @@ -88,25 +97,33 @@ ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ); /** @@ -118,25 +135,33 @@ ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status va * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ); /** @@ -148,26 +173,29 @@ ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to fil * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -); + ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ); /** @@ -179,29 +207,32 @@ ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -212,27 +243,31 @@ ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); + ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ); /** @@ -243,27 +278,32 @@ ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs t * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); + ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 79e735b977f3..5583546f3e50 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -40,8 +40,8 @@ public PetApiController(@org.springframework.beans.factory.annotation.Autowired( * @see PetApi#addPet */ public ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return delegate.addPet(body); } @@ -54,11 +54,10 @@ public ResponseEntity addPet( * or Invalid pet value (status code 400) * @see PetApi#deletePet */ - public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + public ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return delegate.deletePet(petId, apiKey); } @@ -71,9 +70,10 @@ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", requ * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { + public ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @springfox.documentation.annotations.ApiIgnore final Pageable pageable + ) { return delegate.findPetsByStatus(status, pageable); } @@ -87,9 +87,10 @@ public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "St * @deprecated * @see PetApi#findPetsByTags */ - public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { + public ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @springfox.documentation.annotations.ApiIgnore final Pageable pageable + ) { return delegate.findPetsByTags(tags, pageable); } @@ -103,9 +104,9 @@ public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Pet not found (status code 404) * @see PetApi#getPetById */ - public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + public ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { return delegate.getPetById(petId); } @@ -120,8 +121,8 @@ public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", r * @see PetApi#updatePet */ public ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return delegate.updatePet(body); } @@ -134,13 +135,11 @@ public ResponseEntity updatePet( * @return Invalid input (status code 405) * @see PetApi#updatePetWithForm */ - public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + public ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return delegate.updatePetWithForm(petId, name, status); } @@ -153,13 +152,11 @@ public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @return successful operation (status code 200) * @see PetApi#uploadFile */ - public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + public ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { return delegate.uploadFile(petId, additionalMetadata, file); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 6ccfd0c28742..94d3c58d3327 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,7 +2,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; @@ -47,7 +46,7 @@ ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - ResponseEntity> findPetsByStatus(List status, final Pageable pageable); + ResponseEntity> findPetsByStatus(List status, final org.springframework.data.domain.Pageable pageable); /** * GET /pet/findByTags : Finds Pets by tags @@ -59,7 +58,7 @@ ResponseEntity deletePet(Long petId, * @deprecated * @see PetApi#findPetsByTags */ - ResponseEntity> findPetsByTags(List tags, final Pageable pageable); + ResponseEntity> findPetsByTags(List tags, final org.springframework.data.domain.Pageable pageable); /** * GET /pet/{petId} : Find pet by ID 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 ab7fee834062..cb72ccb357fd 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 @@ -30,20 +30,23 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -); + ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ); /** @@ -52,20 +55,28 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - ResponseEntity> getInventory(); + ResponseEntity> getInventory( + + ); /** @@ -77,23 +88,26 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -); + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ); /** @@ -103,20 +117,24 @@ ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pe * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index 76d07f1fc783..3becdad6f4a6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -40,9 +40,9 @@ public StoreApiController(@org.springframework.beans.factory.annotation.Autowire * or Order not found (status code 404) * @see StoreApi#deleteOrder */ - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + public ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return delegate.deleteOrder(orderId); } @@ -53,7 +53,9 @@ public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * @return successful operation (status code 200) * @see StoreApi#getInventory */ - public ResponseEntity> getInventory() { + public ResponseEntity> getInventory( + + ) { return delegate.getInventory(); } @@ -67,9 +69,9 @@ public ResponseEntity> getInventory() { * or Order not found (status code 404) * @see StoreApi#getOrderById */ - public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + public ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { return delegate.getOrderById(orderId); } @@ -82,8 +84,8 @@ public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "I * @see StoreApi#placeOrder */ public ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { return delegate.placeOrder(body); } 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 a7bfc60e1289..a6ad2c609955 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 @@ -2,7 +2,6 @@ import java.util.Map; import org.openapitools.model.Order; -import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 6cfdcf7533e2..3f8d7b71b281 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -30,18 +30,22 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ); /** @@ -50,18 +54,22 @@ ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -70,18 +78,22 @@ ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -92,20 +104,23 @@ ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -); + ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ); /** @@ -116,23 +131,26 @@ ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be del * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -); + ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ); /** @@ -143,23 +161,26 @@ ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -); + ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ); /** @@ -167,16 +188,22 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - ResponseEntity logoutUser(); + ResponseEntity logoutUser( + + ); /** @@ -188,21 +215,23 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); + ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java index 927da273215f..a9721c9a469e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -41,8 +41,8 @@ public UserApiController(@org.springframework.beans.factory.annotation.Autowired * @see UserApi#createUser */ public ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return delegate.createUser(body); } @@ -54,8 +54,8 @@ public ResponseEntity createUser( * @see UserApi#createUsersWithArrayInput */ public ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return delegate.createUsersWithArrayInput(body); } @@ -67,8 +67,8 @@ public ResponseEntity createUsersWithArrayInput( * @see UserApi#createUsersWithListInput */ public ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return delegate.createUsersWithListInput(body); } @@ -81,9 +81,9 @@ public ResponseEntity createUsersWithListInput( * or User not found (status code 404) * @see UserApi#deleteUser */ - public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + public ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return delegate.deleteUser(username); } @@ -96,9 +96,9 @@ public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to * or User not found (status code 404) * @see UserApi#getUserByName */ - public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + public ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { return delegate.getUserByName(username); } @@ -111,11 +111,10 @@ public ResponseEntity getUserByName(@ApiParam(value = "The name that needs * or Invalid username/password supplied (status code 400) * @see UserApi#loginUser */ - public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + public ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return delegate.loginUser(username, password); } @@ -125,7 +124,9 @@ public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user nam * @return successful operation (status code 200) * @see UserApi#logoutUser */ - public ResponseEntity logoutUser() { + public ResponseEntity logoutUser( + + ) { return delegate.logoutUser(); } @@ -139,11 +140,10 @@ public ResponseEntity logoutUser() { * or User not found (status code 404) * @see UserApi#updateUser */ - public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + public ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return delegate.updateUser(username, body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index 00d156773a2e..f41ca92fd595 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -3,7 +3,6 @@ import java.util.List; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; -import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml index 5a29021686c6..a5ac06132f25 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2f58a11f22ba..ff5677cd8c33 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -32,11 +32,16 @@ default AnotherFakeApiDelegate getDelegate() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -44,8 +49,8 @@ default AnotherFakeApiDelegate getDelegate() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 7e6ac74b30f4..a86542ddf223 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 c090ac7835e3..0abbadcd381d 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 @@ -41,19 +41,23 @@ default FakeApiDelegate getDelegate() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return getDelegate().createXmlItem(xmlItem); } @@ -65,19 +69,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -89,19 +98,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { return getDelegate().fakeOuterCompositeSerialize(body); } @@ -113,19 +127,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -137,19 +156,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return getDelegate().fakeOuterStringSerialize(body); } @@ -161,19 +185,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return getDelegate().testBodyWithFileSchema(body); } @@ -185,21 +213,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return getDelegate().testBodyWithQueryParams(query, body); } @@ -211,11 +242,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -223,8 +259,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().testClientModel(body); } @@ -250,50 +286,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -313,35 +339,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -358,28 +380,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -390,19 +411,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return getDelegate().testInlineAdditionalProperties(param); } @@ -414,21 +439,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return getDelegate().testJsonFormData(param, param2); } @@ -444,26 +472,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -476,28 +504,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } 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 61a6142cc5e4..de03df402674 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 @@ -10,7 +10,6 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 88b4da345186..f76698310b49 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -32,14 +32,19 @@ default FakeClassnameTestApiDelegate getDelegate() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -47,8 +52,8 @@ default FakeClassnameTestApiDelegate getDelegate() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { return getDelegate().testClassname(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index c71fe13d195a..ed5a6bfc09a0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 0a6cbef02326..ad5e552b083c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -33,25 +33,30 @@ default PetApiDelegate getDelegate() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return getDelegate().addPet(body); } @@ -64,26 +69,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return getDelegate().deletePet(petId, apiKey); } @@ -96,25 +105,33 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ) { return getDelegate().findPetsByStatus(status, pageable); } @@ -128,25 +145,33 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ) { return getDelegate().findPetsByTags(tags, pageable); } @@ -160,26 +185,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { return getDelegate().getPetById(petId); } @@ -193,29 +221,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return getDelegate().updatePet(body); } @@ -228,27 +259,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -261,28 +296,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { return getDelegate().uploadFile(petId, additionalMetadata, file); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java index 992e770d81d7..02d3eee8e53f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,7 +2,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -61,7 +60,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { + default ResponseEntity> findPetsByStatus(List status, final org.springframework.data.domain.Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -90,7 +89,7 @@ default ResponseEntity> findPetsByStatus(List status, final Pa * @deprecated * @see PetApi#findPetsByTags */ - default ResponseEntity> findPetsByTags(List tags, final Pageable pageable) { + default ResponseEntity> findPetsByTags(List tags, final org.springframework.data.domain.Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 6944e4129d3f..39f4c0b7c7e9 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 @@ -34,20 +34,23 @@ default StoreApiDelegate getDelegate() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return getDelegate().deleteOrder(orderId); } @@ -58,20 +61,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return getDelegate().getInventory(); } @@ -85,23 +96,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { return getDelegate().getOrderById(orderId); } @@ -113,21 +127,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { return getDelegate().placeOrder(body); } 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 5091e7e1f2cc..dfe4bb314961 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 @@ -2,7 +2,6 @@ import java.util.Map; import org.openapitools.model.Order; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 87353cde051e..b45b075f9240 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -34,18 +34,22 @@ default UserApiDelegate getDelegate() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return getDelegate().createUser(body); } @@ -56,18 +60,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return getDelegate().createUsersWithArrayInput(body); } @@ -78,18 +86,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return getDelegate().createUsersWithListInput(body); } @@ -102,20 +114,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return getDelegate().deleteUser(username); } @@ -128,23 +143,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { return getDelegate().getUserByName(username); } @@ -157,23 +175,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return getDelegate().loginUser(username, password); } @@ -183,16 +204,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return getDelegate().logoutUser(); } @@ -206,22 +233,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return getDelegate().updateUser(username, body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java index b63fa7a1c28a..2efbd71c9dc9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -3,7 +3,6 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml b/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml index 62d59d9d1d7d..b8f2eb116283 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml @@ -9,12 +9,12 @@ 1.7 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 1.5.12.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,31 +38,32 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.github.joschi.jackson jackson-datatype-threetenbp - 2.8.4 + 2.9.10 org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9c4ef1f25e51..eb4da37da2c4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,11 +28,16 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -40,7 +45,7 @@ public interface AnotherFakeApi { consumes = { "application/json" } ) ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index ec32cf448bff..e8f022846bfc 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -41,8 +41,8 @@ public AnotherFakeApiController(NativeWebRequest request) { * @see AnotherFakeApi#call123testSpecialTags */ public ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; 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 72b0473bb9c6..1030dcc870c8 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 @@ -37,19 +37,23 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem); + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ); /** @@ -59,19 +63,24 @@ ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body); + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ); /** @@ -81,19 +90,24 @@ ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body); + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ); /** @@ -103,19 +117,24 @@ ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body); + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ); /** @@ -125,19 +144,24 @@ ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body); + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ); /** @@ -147,19 +171,23 @@ ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body); + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ); /** @@ -169,21 +197,24 @@ ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body); + ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ); /** @@ -193,11 +224,16 @@ ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", requ * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -205,8 +241,8 @@ ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", requ consumes = { "application/json" } ) ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); /** @@ -230,50 +266,40 @@ ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ); /** @@ -291,35 +317,31 @@ ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ); /** @@ -334,28 +356,27 @@ ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -); + ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ); /** @@ -364,19 +385,23 @@ ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required St * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param); + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ); /** @@ -386,21 +411,24 @@ ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ); /** @@ -414,26 +442,26 @@ ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -); + ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ); /** @@ -444,27 +472,32 @@ ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); + ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 34b4872f1857..9a5306056e85 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -50,8 +50,8 @@ public FakeApiController(NativeWebRequest request) { * @see FakeApi#createXmlItem */ public ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,8 +65,8 @@ public ResponseEntity createXmlItem( * @see FakeApi#fakeOuterBooleanSerialize */ public ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -80,8 +80,8 @@ public ResponseEntity fakeOuterBooleanSerialize( * @see FakeApi#fakeOuterCompositeSerialize */ public ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; @@ -102,8 +102,8 @@ public ResponseEntity fakeOuterCompositeSerialize( * @see FakeApi#fakeOuterNumberSerialize */ public ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -117,8 +117,8 @@ public ResponseEntity fakeOuterNumberSerialize( * @see FakeApi#fakeOuterStringSerialize */ public ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -132,8 +132,8 @@ public ResponseEntity fakeOuterStringSerialize( * @see FakeApi#testBodyWithFileSchema */ public ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -146,11 +146,10 @@ public ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) * @see FakeApi#testBodyWithQueryParams */ - public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + public ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -164,8 +163,8 @@ public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = " * @see FakeApi#testClientModel */ public ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; @@ -200,34 +199,21 @@ public ResponseEntity testClientModel( * @see FakeApi#testEndpointParameters */ public ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -249,22 +235,15 @@ public ResponseEntity testEndpointParameters( * @see FakeApi#testEnumParameters */ public ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -282,19 +261,14 @@ public ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) * @see FakeApi#testGroupParameters */ - public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + public ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -307,8 +281,8 @@ public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Requ * @see FakeApi#testInlineAdditionalProperties */ public ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -322,10 +296,9 @@ public ResponseEntity testInlineAdditionalProperties( * @see FakeApi#testJsonFormData */ public ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -342,17 +315,13 @@ public ResponseEntity testJsonFormData( * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + public ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -366,13 +335,11 @@ public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPara * @return successful operation (status code 200) * @see FakeApi#uploadFileWithRequiredFile */ - public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + public ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f552024c17cd..f482b6bf5ac9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,14 +28,19 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -43,7 +48,7 @@ public interface FakeClassnameTestApi { consumes = { "application/json" } ) ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 80e92bdeaf15..b705c60d83bb 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -41,8 +41,8 @@ public FakeClassnameTestApiController(NativeWebRequest request) { * @see FakeClassnameTestApi#testClassname */ public ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 3407bc13ba18..c8b2da14ebfc 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -29,25 +29,30 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -58,26 +63,30 @@ ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -); + ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ); /** @@ -88,25 +97,33 @@ ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ); /** @@ -118,25 +135,33 @@ ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status va * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ); /** @@ -148,26 +173,29 @@ ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to fil * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -); + ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ); /** @@ -179,29 +207,32 @@ ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ); /** @@ -212,27 +243,31 @@ ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); + ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ); /** @@ -243,27 +278,32 @@ ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs t * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); + ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 27bc49a0f61e..32b8031cf835 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -42,8 +42,8 @@ public PetApiController(NativeWebRequest request) { * @see PetApi#addPet */ public ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -57,11 +57,10 @@ public ResponseEntity addPet( * or Invalid pet value (status code 400) * @see PetApi#deletePet */ - public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + public ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,9 +74,10 @@ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", requ * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { + public ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @springfox.documentation.annotations.ApiIgnore final Pageable pageable + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -104,9 +104,10 @@ public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "St * @deprecated * @see PetApi#findPetsByTags */ - public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { + public ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @springfox.documentation.annotations.ApiIgnore final Pageable pageable + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -133,9 +134,9 @@ public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Pet not found (status code 404) * @see PetApi#getPetById */ - public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + public ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -163,8 +164,8 @@ public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", r * @see PetApi#updatePet */ public ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -178,13 +179,11 @@ public ResponseEntity updatePet( * @return Invalid input (status code 405) * @see PetApi#updatePetWithForm */ - public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + public ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -198,13 +197,11 @@ public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @return successful operation (status code 200) * @see PetApi#uploadFile */ - public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + public ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; 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 ab7fee834062..cb72ccb357fd 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 @@ -30,20 +30,23 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -); + ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ); /** @@ -52,20 +55,28 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - ResponseEntity> getInventory(); + ResponseEntity> getInventory( + + ); /** @@ -77,23 +88,26 @@ ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs t * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -); + ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ); /** @@ -103,20 +117,24 @@ ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pe * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index 392213709825..203faf80f73c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -42,9 +42,9 @@ public StoreApiController(NativeWebRequest request) { * or Order not found (status code 404) * @see StoreApi#deleteOrder */ - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + public ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,7 +56,9 @@ public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * @return successful operation (status code 200) * @see StoreApi#getInventory */ - public ResponseEntity> getInventory() { + public ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -71,9 +73,9 @@ public ResponseEntity> getInventory() { * or Order not found (status code 404) * @see StoreApi#getOrderById */ - public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + public ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; @@ -99,8 +101,8 @@ public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "I * @see StoreApi#placeOrder */ public ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 6cfdcf7533e2..3f8d7b71b281 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -30,18 +30,22 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ); /** @@ -50,18 +54,22 @@ ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -70,18 +78,22 @@ ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ); /** @@ -92,20 +104,23 @@ ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -); + ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ); /** @@ -116,23 +131,26 @@ ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be del * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -); + ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ); /** @@ -143,23 +161,26 @@ ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -); + ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ); /** @@ -167,16 +188,22 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - ResponseEntity logoutUser(); + ResponseEntity logoutUser( + + ); /** @@ -188,21 +215,23 @@ ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for l * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); + ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java index a5441a06b657..224d437db48a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -43,8 +43,8 @@ public UserApiController(NativeWebRequest request) { * @see UserApi#createUser */ public ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -57,8 +57,8 @@ public ResponseEntity createUser( * @see UserApi#createUsersWithArrayInput */ public ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -71,8 +71,8 @@ public ResponseEntity createUsersWithArrayInput( * @see UserApi#createUsersWithListInput */ public ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -86,9 +86,9 @@ public ResponseEntity createUsersWithListInput( * or User not found (status code 404) * @see UserApi#deleteUser */ - public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + public ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -102,9 +102,9 @@ public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to * or User not found (status code 404) * @see UserApi#getUserByName */ - public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + public ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; @@ -130,11 +130,10 @@ public ResponseEntity getUserByName(@ApiParam(value = "The name that needs * or Invalid username/password supplied (status code 400) * @see UserApi#loginUser */ - public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + public ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -145,7 +144,9 @@ public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user nam * @return successful operation (status code 200) * @see UserApi#logoutUser */ - public ResponseEntity logoutUser() { + public ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -160,11 +161,10 @@ public ResponseEntity logoutUser() { * or User not found (status code 404) * @see UserApi#updateUser */ - public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + public ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable/pom.xml b/samples/server/petstore/springboot-spring-pageable/pom.xml index 38fbd7d57fa6..d0b710969509 100644 --- a/samples/server/petstore/springboot-spring-pageable/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index e11603b847c3..1667ef188aeb 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 8d805638e512..14af6c292108 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 @@ -45,19 +45,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +74,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,19 +104,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -129,19 +143,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -154,19 +173,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,19 +203,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -204,21 +232,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,11 +262,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -243,8 +279,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -280,50 +316,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -344,35 +370,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -390,28 +412,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -423,19 +444,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -448,21 +473,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -479,26 +507,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -512,28 +540,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3147f4bba9a8..e2459cc308c6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index a428ea5ba5e9..dc4a8ace4c6f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -37,25 +37,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -69,26 +74,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -102,25 +111,33 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -149,25 +166,33 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags - -, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -196,26 +221,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -244,29 +272,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -280,27 +311,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -314,28 +349,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 4ab75d5cfadb..19ab0bb614b6 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 @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index ca77015acbd8..97583359e3b1 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-useoptional/pom.xml b/samples/server/petstore/springboot-useoptional/pom.xml index bbfc822dfbac..947ef54fb7eb 100644 --- a/samples/server/petstore/springboot-useoptional/pom.xml +++ b/samples/server/petstore/springboot-useoptional/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index e11603b847c3..1667ef188aeb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 0b1b0c6e1f51..8a9cd128c463 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 @@ -45,19 +45,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +74,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,19 +104,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -129,19 +143,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -154,19 +173,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,19 +203,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -204,21 +232,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,11 +262,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -243,8 +279,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -280,50 +316,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -344,35 +370,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) Optional enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) Optional enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -390,28 +412,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Optional booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Optional booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -423,19 +444,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -448,21 +473,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -479,26 +507,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -512,28 +540,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3147f4bba9a8..e2459cc308c6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index e2103efefa7f..a5de2295a582 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -38,25 +38,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,26 +75,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -103,25 +112,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -150,25 +166,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -197,26 +220,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -245,29 +271,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,27 +310,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -315,28 +348,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 4ab75d5cfadb..19ab0bb614b6 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 @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index ca77015acbd8..97583359e3b1 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-virtualan/pom.xml b/samples/server/petstore/springboot-virtualan/pom.xml index 920b8d600891..dd52e11911b6 100644 --- a/samples/server/petstore/springboot-virtualan/pom.xml +++ b/samples/server/petstore/springboot-virtualan/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation 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 f5194da52690..6504bc555c21 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 @@ -40,11 +40,16 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -52,8 +57,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 fa2be27a1ebf..8cfa7936f844 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 @@ -49,19 +49,23 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,19 +79,24 @@ default ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @ApiVirtual - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -101,19 +110,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @ApiVirtual - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -136,19 +150,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @ApiVirtual - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -162,19 +181,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @ApiVirtual - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -188,19 +212,23 @@ default ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @ApiVirtual - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -214,21 +242,24 @@ default ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @ApiVirtual - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -242,11 +273,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -254,8 +290,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -292,50 +328,40 @@ default ResponseEntity testClientModel( * or User not found (status code 404) */ @ApiVirtual - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -357,35 +383,31 @@ default ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @ApiVirtual - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -404,28 +426,27 @@ default ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @ApiVirtual - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -438,19 +459,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -464,21 +489,24 @@ default ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -496,26 +524,26 @@ default ResponseEntity testJsonFormData( * @return Success (status code 200) */ @ApiVirtual - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -530,28 +558,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 65093bda6d5d..4eb9dd69cdda 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 @@ -40,14 +40,19 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -55,8 +60,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 9fe808d5ec60..cc2491e204ff 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 @@ -42,25 +42,30 @@ default Optional getRequest() { * or Invalid input (status code 405) */ @ApiVirtual - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,26 +80,30 @@ default ResponseEntity addPet( * or Invalid pet value (status code 400) */ @ApiVirtual - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,25 +118,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * or Invalid status value (status code 400) */ @ApiVirtual - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -157,25 +173,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * @deprecated */ @ApiVirtual - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -205,26 +228,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Pet not found (status code 404) */ @ApiVirtual - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -254,29 +280,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Validation exception (status code 405) */ @ApiVirtual - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -291,27 +320,31 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @ApiVirtual - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -326,28 +359,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 4e0dbf7898ca..3a23f5a91257 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 @@ -42,20 +42,23 @@ default Optional getRequest() { * or Order not found (status code 404) */ @ApiVirtual - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -68,20 +71,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -97,23 +108,26 @@ default ResponseEntity> getInventory() { * or Order not found (status code 404) */ @ApiVirtual - - @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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -141,21 +155,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * or Invalid Order (status code 400) */ @ApiVirtual - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 d7d04f53f30e..9d2430db5628 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 @@ -42,18 +42,22 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,18 +70,22 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -90,18 +98,22 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -116,20 +128,23 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @ApiVirtual - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -144,23 +159,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or User not found (status code 404) */ @ApiVirtual - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -189,23 +207,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * or Invalid username/password supplied (status code 400) */ @ApiVirtual - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -217,16 +238,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * @return successful operation (status code 200) */ @ApiVirtual - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -242,22 +269,24 @@ default ResponseEntity logoutUser() { * or User not found (status code 404) */ @ApiVirtual - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot/pom.xml b/samples/server/petstore/springboot/pom.xml index 62aa1140a3ef..2388f8831b10 100644 --- a/samples/server/petstore/springboot/pom.xml +++ b/samples/server/petstore/springboot/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.9.2 + 2.9.2 org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.5.8 src/main/java @@ -22,13 +22,6 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - @@ -45,16 +38,17 @@ io.springfox springfox-swagger2 - ${springfox-version} + ${springfox.version} + - io.springfox - springfox-swagger-ui - ${springfox-version} + com.google.code.findbugs + jsr305 + 3.0.2 - jakarta.xml.bind - jakarta.xml.bind-api + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml com.fasterxml.jackson.datatype @@ -63,12 +57,12 @@ org.openapitools jackson-databind-nullable - 0.2.1 + 0.2.2 - + - jakarta.validation - jakarta.validation-api + org.springframework.boot + spring-boot-starter-validation com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index e11603b847c3..1667ef188aeb 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,11 +36,16 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "$another-fake?" }, + value = "To test special tags", + nickname = "call123testSpecialTags", + notes = "To test special tags and operation ID starting with number", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/another-fake/dummy", @@ -48,8 +53,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity call123testSpecialTags( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 c8793f61e444..71ffda67b0c2 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 @@ -45,19 +45,23 @@ default Optional getRequest() { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "creates an XmlItem", + nickname = "createXmlItem", + notes = "this route creates an XmlItem" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) default ResponseEntity createXmlItem( - -@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { + @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +74,24 @@ default ResponseEntity createXmlItem( * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterBooleanSerialize", + notes = "Test serialization of outer boolean types", + response = Boolean.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) default ResponseEntity fakeOuterBooleanSerialize( - -@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { + @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,19 +104,24 @@ default ResponseEntity fakeOuterBooleanSerialize( * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterCompositeSerialize", + notes = "Test serialization of object with outer number type", + response = OuterComposite.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) default ResponseEntity fakeOuterCompositeSerialize( - -@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { + @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -129,19 +143,24 @@ default ResponseEntity fakeOuterCompositeSerialize( * @param body Input number as post body (optional) * @return Output number (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterNumberSerialize", + notes = "Test serialization of outer number types", + response = BigDecimal.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) default ResponseEntity fakeOuterNumberSerialize( - -@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { + @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -154,19 +173,24 @@ default ResponseEntity fakeOuterNumberSerialize( * @param body Input string as post body (optional) * @return Output string (status code 200) */ - - @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Output string", response = String.class) }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "fakeOuterStringSerialize", + notes = "Test serialization of outer string types", + response = String.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Output string", response = String.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) default ResponseEntity fakeOuterStringSerialize( - -@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { + @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,19 +203,23 @@ default ResponseEntity fakeOuterStringSerialize( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithFileSchema", + notes = "For this test, the body for this request much reference a schema named `File`." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) default ResponseEntity testBodyWithFileSchema( - -@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { + @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -204,21 +232,24 @@ default ResponseEntity testBodyWithFileSchema( * @param body (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testBodyWithQueryParams", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query - -, - -@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @ApiParam(value = "", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,11 +262,16 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake" }, + value = "To test \"client\" model", + nickname = "testClientModel", + notes = "To test \"client\" model", + response = Client.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake", @@ -243,8 +279,8 @@ default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = consumes = { "application/json" } ) default ResponseEntity testClientModel( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -280,50 +316,40 @@ default ResponseEntity testClientModel( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + nickname = "testEndpointParameters", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + authorizations = { + @Authorization(value = "http_basic_test") + } + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEndpointParameters( - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - -@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - -@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - -@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - -@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - -@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, - -@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, - -@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, - -@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, - -@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - -@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -344,35 +370,31 @@ default ResponseEntity testEndpointParameters( * @return Invalid request (status code 400) * or Not found (status code 404) */ - - @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "fake" }, + value = "To test enum parameters", + nickname = "testEnumParameters", + notes = "To test enum parameters" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid request"), - - @ApiResponse(code = 404, message = "Not found") }) + @ApiResponse(code = 404, message = "Not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( -@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray -, -@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString -,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray - -,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger - -,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble - -, - -@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - -@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -390,28 +412,27 @@ default ResponseEntity testEnumParameters( * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiOperation( + tags = { "fake" }, + value = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + notes = "Fake endpoint to test group parameters (optional)" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Someting wrong") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup - -, -@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup -,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group - -,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup - -, -@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup -,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group - -) { + default ResponseEntity testGroupParameters( + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -423,19 +444,23 @@ default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Req * @param param request body (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test inline additionalProperties", + nickname = "testInlineAdditionalProperties", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) default ResponseEntity testInlineAdditionalProperties( - -@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { + @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -448,21 +473,24 @@ default ResponseEntity testInlineAdditionalProperties( * @param param2 field2 (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "fake" }, + value = "test json serialization of form data", + nickname = "testJsonFormData", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testJsonFormData( - -@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - -@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2 + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -479,26 +507,26 @@ default ResponseEntity testJsonFormData( * @param context (required) * @return Success (status code 200) */ - - @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "Success") }) + @ApiOperation( + tags = { "fake" }, + value = "", + nickname = "testQueryParameterCollectionFormat", + notes = "To test the collection format in query parameters" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "Success") + }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url - -,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context - -) { + default ResponseEntity testQueryParameterCollectionFormat( + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -512,28 +540,33 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image (required)", + nickname = "uploadFileWithRequiredFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/fake/{petId}/uploadImageWithRequiredFile", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3147f4bba9a8..e2459cc308c6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,14 +36,19 @@ default Optional getRequest() { * @param body client model (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiOperation( + tags = { "fake_classname_tags 123#$%^" }, + value = "To test class name in snake case", + nickname = "testClassname", + notes = "To test class name in snake case", + response = Client.class, + authorizations = { + @Authorization(value = "api_key_query") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Client.class) + }) @RequestMapping( method = RequestMethod.PATCH, value = "/fake_classname_test", @@ -51,8 +56,8 @@ default Optional getRequest() { consumes = { "application/json" } ) default ResponseEntity testClassname( - -@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { + @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index fe9e7f727be3..e969bf667650 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -38,25 +38,30 @@ default Optional getRequest() { * @return successful operation (status code 200) * or Invalid input (status code 405) */ - - @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Add a new pet to the store", + nickname = "addPet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity addPet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,26 +75,30 @@ default ResponseEntity addPet( * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ - - @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Deletes a pet", + nickname = "deletePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId - -, -@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey -) { + default ResponseEntity deletePet( + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -103,25 +112,32 @@ default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", req * @return successful operation (status code 200) * or Invalid status value (status code 400) */ - - @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "List", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @ApiResponse(code = 400, message = "Invalid status value") }) + @ApiResponse(code = 400, message = "Invalid status value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status - -) { + default ResponseEntity> findPetsByStatus( + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -150,25 +166,32 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S * or Invalid tag value (status code 400) * @deprecated */ - - @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "Set", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - - @ApiResponse(code = 400, message = "Invalid tag value") }) + @ApiResponse(code = 400, message = "Invalid tag value") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags - -) { + default ResponseEntity> findPetsByTags( + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -197,26 +220,29 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ - - @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { - - @Authorization(value = "api_key") - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Pet not found") }) + @ApiResponse(code = 404, message = "Pet not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId - -) { + default ResponseEntity getPetById( + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -245,29 +271,32 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", * or Pet not found (status code 404) * or Validation exception (status code 405) */ - - @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "pet" }, + value = "Update an existing pet", + nickname = "updatePet", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - - @ApiResponse(code = 405, message = "Validation exception") }) + @ApiResponse(code = 405, message = "Validation exception") + }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) default ResponseEntity updatePet( - -@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,27 +310,31 @@ default ResponseEntity updatePet( * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ - - @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiOperation( + tags = { "pet" }, + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + notes = "", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 405, message = "Invalid input") + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - -@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm( + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -315,28 +348,33 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that * @param file file to upload (optional) * @return successful operation (status code 200) */ - - @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiOperation( + tags = { "pet" }, + value = "uploads an image", + nickname = "uploadFile", + notes = "", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId - -, - -@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - -@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile( + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 4ab75d5cfadb..19ab0bb614b6 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 @@ -38,20 +38,23 @@ default Optional getRequest() { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ - - @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - -) { + default ResponseEntity deleteOrder( + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,20 +66,28 @@ default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - - @Authorization(value = "api_key") - }, tags={ "store", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/inventory", produces = { "application/json" } ) - default ResponseEntity> getInventory() { + default ResponseEntity> getInventory( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,23 +102,26 @@ default ResponseEntity> getInventory() { * or Invalid ID supplied (status code 400) * 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", }) - @ApiResponses(value = { - + @ApiOperation( + 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", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 404, message = "Order not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - -) { + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -134,21 +148,25 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " * @return successful operation (status code 200) * or Invalid Order (status code 400) */ - - @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @ApiResponse(code = 400, message = "Invalid Order") }) + @ApiResponse(code = 400, message = "Invalid Order") + }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) default ResponseEntity placeOrder( - -@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index ca77015acbd8..97583359e3b1 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -38,18 +38,22 @@ default Optional getRequest() { * @param body Created user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) default ResponseEntity createUser( - -@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { + @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,22 @@ default ResponseEntity createUser( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) default ResponseEntity createUsersWithArrayInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -84,18 +92,22 @@ default ResponseEntity createUsersWithArrayInput( * @param body List of user object (required) * @return successful operation (status code 200) */ - - @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) default ResponseEntity createUsersWithListInput( - -@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -109,20 +121,23 @@ default ResponseEntity createUsersWithListInput( * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username - -) { + default ResponseEntity deleteUser( + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -136,23 +151,26 @@ default ResponseEntity deleteUser(@ApiParam(value = "The name that needs t * or Invalid username supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Get user by user name", + nickname = "getUserByName", + notes = "", + response = User.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username - -) { + default ResponseEntity getUserByName( + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -180,23 +198,26 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ - - @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Logs user into the system", + nickname = "loginUser", + notes = "", + response = String.class + ) + @ApiResponses({ @ApiResponse(code = 200, message = "successful operation", response = String.class), - - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @ApiResponse(code = 400, message = "Invalid username/password supplied") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username - -,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password - -) { + default ResponseEntity loginUser( + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -207,16 +228,22 @@ default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user na * * @return successful operation (status code 200) */ - - @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) - @ApiResponses(value = { - - @ApiResponse(code = 200, message = "successful operation") }) + @ApiOperation( + tags = { "user" }, + value = "Logs out current logged in user session", + nickname = "logoutUser", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) @RequestMapping( method = RequestMethod.GET, value = "/user/logout" ) - default ResponseEntity logoutUser() { + default ResponseEntity logoutUser( + + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -231,22 +258,24 @@ default ResponseEntity logoutUser() { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ - - @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) - @ApiResponses(value = { - + @ApiOperation( + tags = { "user" }, + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user." + ) + @ApiResponses({ @ApiResponse(code = 400, message = "Invalid user supplied"), - - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 404, message = "User not found") + }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username - -, - -@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { + default ResponseEntity updateUser( + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } From 6c3cdee6fbed3a22a71405b1e45fb83c9ffa93fb Mon Sep 17 00:00:00 2001 From: agilob Date: Sun, 2 Jan 2022 13:13:02 +0000 Subject: [PATCH 048/175] Dart - update generator to support null safety (#10637) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Make dart2 generated code compilable * Update dart2 client samples * Re-add deleted test files * Lower dart version to 2.12 * Make username and pass not null in http basic auth * Delete json_serializable * Make growable false by default * Make value not nullable * Remove redundant null check * Revert linter fix * Provide required username and pass * Revert initial abstractDartCodeGen changes * Revert removing dart pom module * Revert removing dart pom module * Lower minimum dart version to 2.12 * Disable dart2 tests generation * Disable petstore_client_lib * Disable samples/openapi3/client/petstore/dart2/petstore * Re-add dart2 tests * Add new tests * Delete empty directory * api_client.mustacheUpdate added optional HttpBearerAuth so you can add the token directly on the ApiClient * Update api_client.dart auto generated files for build * Update api_client.dart Autogenerated files for buiild * Make mapDateTime nullable and add ! after json mapping * Fix warning on Future * Fix warning on Future * Dont insert unused param to constructor * Modified Dart2 Mustache template. * Regenerated Petstore source code. * Remove extra code to sync with agilob's pr. * Regenerated Petstore source code. * Fix a couple of reported bugs. * Regenerated Petstore source code. * Make properties non-nullable. * Regenerated Petstore source code. * Do not trim user input before submitting. * Regenerate Petstore source code. * Regenerate Petstore source code. Co-authored-by: Kate Döen Co-authored-by: Artur Powroznik Co-authored-by: devjakobsen <94956607+devjakobsen@users.noreply.github.com> Co-authored-by: Noor Dawod --- .../openapitools/codegen/CodegenModel.java | 10 +- .../codegen/CodegenParameter.java | 8 + .../openapitools/codegen/CodegenProperty.java | 8 + .../openapitools/codegen/CodegenResponse.java | 8 + .../IJsonSchemaValidationProperties.java | 6 +- .../languages/AbstractDartCodegen.java | 38 +- .../codegen/languages/DartClientCodegen.java | 1 + .../src/main/resources/dart2/README.mustache | 2 +- .../src/main/resources/dart2/api.mustache | 29 +- .../main/resources/dart2/api_client.mustache | 123 +++--- .../resources/dart2/api_exception.mustache | 6 +- .../main/resources/dart2/api_helper.mustache | 47 +- .../main/resources/dart2/api_test.mustache | 2 +- .../dart2/auth/api_key_auth.mustache | 28 +- .../main/resources/dart2/auth/header.mustache | 2 +- .../dart2/auth/http_basic_auth.mustache | 8 +- .../dart2/auth/http_bearer_auth.mustache | 18 +- .../main/resources/dart2/auth/oauth.mustache | 4 +- .../resources/dart2/dart_constructor.mustache | 8 +- .../main/resources/dart2/gitignore.mustache | 32 +- .../src/main/resources/dart2/header.mustache | 2 +- .../main/resources/dart2/model_test.mustache | 2 +- .../native/native_class.mustache | 182 +++++--- .../serialization/native/native_enum.mustache | 27 +- .../native/native_enum_inline.mustache | 27 +- .../src/main/resources/dart2/travis.mustache | 2 +- pom.xml | 1 - .../client/petstore/dart2/petstore/README.md | 37 -- .../client/petstore/dart2/petstore/pom.xml | 73 --- .../petstore/dart2/petstore/pubspec.lock | 418 ------------------ .../petstore/dart2/petstore/pubspec.yaml | 19 - .../dart2/petstore/test/fake_client.dart | 134 ------ .../petstore/test/file_upload_response.json | 1 - .../petstore/test/inventory_response.json | 1 - .../dart2/petstore/test/order_model_test.dart | 9 - .../petstore/test/pet_faked_client_test.dart | 223 ---------- .../dart2/petstore/test/pet_test.dart | 101 ----- .../dart2/petstore/test/random_id.dart | 7 - .../test/store_faked_client_test.dart | 83 ---- .../dart2/petstore/test/store_test.dart | 42 -- .../petstore/test/user_faked_client_test.dart | 180 -------- .../dart2/petstore/test/user_test.dart | 79 ---- .../dart2/petstore_client_lib/.gitignore | 32 +- .../dart2/petstore_client_lib/.travis.yml | 2 +- .../dart2/petstore_client_lib/README.md | 2 +- .../dart2/petstore_client_lib/lib/api.dart | 2 +- .../petstore_client_lib/lib/api/pet_api.dart | 130 ++---- .../lib/api/store_api.dart | 53 +-- .../petstore_client_lib/lib/api/user_api.dart | 93 ++-- .../petstore_client_lib/lib/api_client.dart | 125 +++--- .../lib/api_exception.dart | 8 +- .../petstore_client_lib/lib/api_helper.dart | 49 +- .../lib/auth/api_key_auth.dart | 30 +- .../lib/auth/authentication.dart | 2 +- .../lib/auth/http_basic_auth.dart | 10 +- .../lib/auth/http_bearer_auth.dart | 20 +- .../petstore_client_lib/lib/auth/oauth.dart | 6 +- .../lib/model/api_response.dart | 96 ++-- .../lib/model/category.dart | 86 +++- .../petstore_client_lib/lib/model/order.dart | 145 ++++-- .../petstore_client_lib/lib/model/pet.dart | 137 ++++-- .../petstore_client_lib/lib/model/tag.dart | 86 +++- .../petstore_client_lib/lib/model/user.dart | 158 +++++-- .../test/api_response_test.dart | 6 +- .../test/category_test.dart | 6 +- .../petstore_client_lib/test/order_test.dart | 6 +- .../test/pet_api_test.dart | 6 +- .../petstore_client_lib/test/pet_test.dart | 6 +- .../test/store_api_test.dart | 6 +- .../petstore_client_lib/test/tag_test.dart | 6 +- .../test/user_api_test.dart | 6 +- .../petstore_client_lib/test/user_test.dart | 6 +- .../dart2/petstore_client_lib_fake/.gitignore | 32 +- .../petstore_client_lib_fake/.travis.yml | 2 +- .../dart2/petstore_client_lib_fake/README.md | 2 +- .../petstore_client_lib_fake/lib/api.dart | 2 +- .../lib/api/another_fake_api.dart | 19 +- .../lib/api/default_api.dart | 14 +- .../lib/api/fake_api.dart | 277 ++++-------- .../lib/api/fake_classname_tags123_api.dart | 19 +- .../lib/api/pet_api.dart | 136 ++---- .../lib/api/store_api.dart | 53 +-- .../lib/api/user_api.dart | 93 ++-- .../lib/api_client.dart | 125 +++--- .../lib/api_exception.dart | 8 +- .../lib/api_helper.dart | 49 +- .../lib/auth/api_key_auth.dart | 30 +- .../lib/auth/authentication.dart | 2 +- .../lib/auth/http_basic_auth.dart | 10 +- .../lib/auth/http_bearer_auth.dart | 20 +- .../lib/auth/oauth.dart | 6 +- .../model/additional_properties_class.dart | 78 ++-- .../lib/model/animal.dart | 79 ++-- .../lib/model/api_response.dart | 96 ++-- .../model/array_of_array_of_number_only.dart | 72 ++- .../lib/model/array_of_number_only.dart | 74 ++-- .../lib/model/array_test.dart | 86 ++-- .../lib/model/capitalization.dart | 134 ++++-- .../lib/model/cat.dart | 89 ++-- .../lib/model/cat_all_of.dart | 76 +++- .../lib/model/category.dart | 81 +++- .../lib/model/class_model.dart | 76 +++- .../lib/model/deprecated_object.dart | 76 +++- .../lib/model/dog.dart | 89 ++-- .../lib/model/dog_all_of.dart | 76 +++- .../lib/model/enum_arrays.dart | 130 ++++-- .../lib/model/enum_class.dart | 29 +- .../lib/model/enum_test.dart | 227 ++++++---- .../lib/model/file_schema_test_class.dart | 82 ++-- .../lib/model/foo.dart | 72 ++- .../lib/model/format_test.dart | 238 +++++++--- .../lib/model/has_only_read_only.dart | 86 +++- .../lib/model/health_check_result.dart | 70 ++- .../lib/model/inline_response_default.dart | 76 +++- .../lib/model/map_test.dart | 117 +++-- ...rties_and_additional_properties_class.dart | 94 ++-- .../lib/model/model200_response.dart | 86 +++- .../lib/model/model_client.dart | 76 +++- .../lib/model/model_file.dart | 76 +++- .../lib/model/model_list.dart | 76 +++- .../lib/model/model_return.dart | 76 +++- .../lib/model/name.dart | 107 +++-- .../lib/model/nullable_class.dart | 142 +++--- .../lib/model/number_only.dart | 80 +++- .../model/object_with_deprecated_fields.dart | 112 +++-- .../lib/model/order.dart | 145 ++++-- .../lib/model/outer_composite.dart | 100 +++-- .../lib/model/outer_enum.dart | 29 +- .../lib/model/outer_enum_default_value.dart | 29 +- .../lib/model/outer_enum_integer.dart | 29 +- .../outer_enum_integer_default_value.dart | 29 +- .../outer_object_with_enum_property.dart | 73 ++- .../lib/model/pet.dart | 137 ++++-- .../lib/model/read_only_first.dart | 86 +++- .../lib/model/special_model_name.dart | 76 +++- .../lib/model/tag.dart | 86 +++- .../lib/model/user.dart | 158 +++++-- .../dart2/petstore_client_lib_fake/pom.xml | 73 --- .../additional_properties_class_test.dart | 6 +- .../test/animal_test.dart | 6 +- .../test/another_fake_api_test.dart | 6 +- .../test/api_response_test.dart | 6 +- .../array_of_array_of_number_only_test.dart | 6 +- .../test/array_of_number_only_test.dart | 6 +- .../test/array_test_test.dart | 6 +- .../test/capitalization_test.dart | 6 +- .../test/cat_all_of_test.dart | 6 +- .../test/cat_test.dart | 6 +- .../test/category_test.dart | 6 +- .../test/class_model_test.dart | 6 +- .../test/default_api_test.dart | 6 +- .../test/deprecated_object_test.dart | 6 +- .../test/dog_all_of_test.dart | 6 +- .../test/dog_test.dart | 6 +- .../test/enum_arrays_test.dart | 6 +- .../test/enum_class_test.dart | 4 +- .../test/enum_test_test.dart | 6 +- .../test/fake_api_test.dart | 17 +- .../test/fake_classname_tags123_api_test.dart | 6 +- .../test/file_schema_test_class_test.dart | 6 +- .../test/foo_test.dart | 6 +- .../test/format_test_test.dart | 6 +- .../test/has_only_read_only_test.dart | 6 +- .../test/health_check_result_test.dart | 6 +- .../test/inline_response_default_test.dart | 6 +- .../test/map_test_test.dart | 6 +- ..._and_additional_properties_class_test.dart | 6 +- .../test/model200_response_test.dart | 6 +- .../test/model_client_test.dart | 6 +- .../test/model_file_test.dart | 6 +- .../test/model_list_test.dart | 6 +- .../test/model_return_test.dart | 6 +- .../test/name_test.dart | 6 +- .../test/nullable_class_test.dart | 6 +- .../test/number_only_test.dart | 6 +- .../object_with_deprecated_fields_test.dart | 6 +- .../test/order_test.dart | 6 +- .../test/outer_composite_test.dart | 6 +- .../test/outer_enum_default_value_test.dart | 4 +- ...outer_enum_integer_default_value_test.dart | 4 +- .../test/outer_enum_integer_test.dart | 4 +- .../test/outer_enum_test.dart | 4 +- .../outer_object_with_enum_property_test.dart | 6 +- .../test/pet_api_test.dart | 6 +- .../test/pet_test.dart | 6 +- .../test/read_only_first_test.dart | 6 +- .../test/special_model_name_test.dart | 6 +- .../test/store_api_test.dart | 6 +- .../test/tag_test.dart | 6 +- .../test/user_api_test.dart | 6 +- .../test/user_test.dart | 6 +- 191 files changed, 4606 insertions(+), 4260 deletions(-) delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/README.md delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/pom.xml delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/pubspec.lock delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/pubspec.yaml delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/fake_client.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/file_upload_response.json delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/inventory_response.json delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/order_model_test.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/pet_faked_client_test.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/pet_test.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/random_id.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/store_faked_client_test.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/store_test.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/user_faked_client_test.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore/test/user_test.dart delete mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/pom.xml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 39e7f784cc94..bba6ad2789df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -64,7 +64,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { public String defaultValue; public String arrayModelType; public boolean isAlias; // Is this effectively an alias of another simple type - public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, isShort, isUnboundedInteger, isBoolean; + public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, isShort, isUnboundedInteger, isPrimitiveType, isBoolean; private boolean additionalPropertiesIsAnyType; public List vars = new ArrayList<>(); // all properties (without parent's properties) public List allVars = new ArrayList<>(); // all properties (with parent's properties) @@ -637,6 +637,14 @@ public void setIsUnboundedInteger(boolean isUnboundedInteger) { this.isUnboundedInteger = isUnboundedInteger; } + @Override + public boolean getIsPrimitiveType() { return isPrimitiveType; } + + @Override + public void setIsPrimitiveType(boolean isPrimitiveType) { + this.isPrimitiveType = isPrimitiveType; + } + @Override public CodegenProperty getAdditionalProperties() { return additionalProperties; } 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 dba1721fbca2..d48b75843af9 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 @@ -623,6 +623,14 @@ public void setIsUnboundedInteger(boolean isUnboundedInteger) { this.isUnboundedInteger = isUnboundedInteger; } + @Override + public boolean getIsPrimitiveType() { return isPrimitiveType; } + + @Override + public void setIsPrimitiveType(boolean isPrimitiveType) { + this.isPrimitiveType = isPrimitiveType; + } + @Override public CodegenProperty getAdditionalProperties() { return additionalProperties; } 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 c7a22915dbff..ac78261510f6 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 @@ -536,6 +536,14 @@ public void setIsUnboundedInteger(boolean isUnboundedInteger) { this.isUnboundedInteger = isUnboundedInteger; } + @Override + public boolean getIsPrimitiveType() { return isPrimitiveType; } + + @Override + public void setIsPrimitiveType(boolean isPrimitiveType) { + this.isPrimitiveType = isPrimitiveType; + } + public Map getVendorExtensions() { return vendorExtensions; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index 7a23b3ab7267..6cc2cd63f90c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -371,6 +371,14 @@ public void setIsUnboundedInteger(boolean isUnboundedInteger) { this.isUnboundedInteger = isUnboundedInteger; } + @Override + public boolean getIsPrimitiveType() { return primitiveType; } + + @Override + public void setIsPrimitiveType(boolean isPrimitiveType) { + this.primitiveType = isPrimitiveType; + } + @Override public void setIsModel(boolean isModel) { this.isModel = isModel; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java index eb95821d6f3c..0a4a2d7eec58 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java @@ -95,6 +95,10 @@ public interface IJsonSchemaValidationProperties { void setIsUnboundedInteger(boolean isUnboundedInteger); + boolean getIsPrimitiveType(); + + void setIsPrimitiveType(boolean isPrimitiveType); + CodegenProperty getAdditionalProperties(); void setAdditionalProperties(CodegenProperty additionalProperties); @@ -213,4 +217,4 @@ default void setTypeProperties(Schema p) { setIsAnyType(true); } } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java index 75e466165a55..d8fda925017a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java @@ -1,5 +1,7 @@ package org.openapitools.codegen.languages; +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; @@ -112,12 +114,13 @@ public AbstractDartCodegen() { setReservedWordsLowerCase(reservedWordsList); // These types return isPrimitive=true in templates - languageSpecificPrimitives = new HashSet<>(5); - languageSpecificPrimitives.add("String"); - languageSpecificPrimitives.add("bool"); - languageSpecificPrimitives.add("int"); - languageSpecificPrimitives.add("num"); - languageSpecificPrimitives.add("double"); + languageSpecificPrimitives = Sets.newHashSet( + "String", + "bool", + "int", + "num", + "double" + ); typeMapping = new HashMap<>(); typeMapping.put("Array", "List"); @@ -148,17 +151,18 @@ public AbstractDartCodegen() { typeMapping.put("AnyType", "Object"); // Data types of the above values which are automatically imported - defaultIncludes = new HashSet<>(); - defaultIncludes.add("String"); - defaultIncludes.add("bool"); - defaultIncludes.add("int"); - defaultIncludes.add("num"); - defaultIncludes.add("double"); - defaultIncludes.add("List"); - defaultIncludes.add("Set"); - defaultIncludes.add("Map"); - defaultIncludes.add("DateTime"); - defaultIncludes.add("Object"); + defaultIncludes = Sets.newHashSet( + "String", + "bool", + "int", + "num", + "double", + "List", + "Set", + "Map", + "DateTime", + "Object" + ); imports.put("String", "dart:core"); imports.put("bool", "dart:core"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 25853e0b2541..5693d19265c9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -36,6 +36,7 @@ public class DartClientCodegen extends AbstractDartCodegen { public DartClientCodegen() { super(); + final CliOption serializationLibrary = CliOption.newString(CodegenConstants.SERIALIZATION_LIBRARY, "Specify serialization library"); serializationLibrary.setDefault(SERIALIZATION_LIBRARY_NATIVE); diff --git a/modules/openapi-generator/src/main/resources/dart2/README.mustache b/modules/openapi-generator/src/main/resources/dart2/README.mustache index 1b1129159560..ba99ace33f36 100644 --- a/modules/openapi-generator/src/main/resources/dart2/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/README.mustache @@ -19,7 +19,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requirements -Dart 2.0 or later +Dart 2.12 or later ## Installation & Usage diff --git a/modules/openapi-generator/src/main/resources/dart2/api.mustache b/modules/openapi-generator/src/main/resources/dart2/api.mustache index 32f3ee2d8c42..2ce04e81f0eb 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api.mustache @@ -3,7 +3,7 @@ {{#operations}} class {{{classname}}} { - {{{classname}}}([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + {{{classname}}}([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; {{#operation}} @@ -49,24 +49,13 @@ class {{{classname}}} { /// {{/-last}} {{/allParams}} - Future {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { - {{#hasParams}} - // Verify required params are set. - {{#allParams}} - {{#required}} - if ({{{paramName}}} == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: {{{paramName}}}'); - } - {{/required}} - {{/allParams}} - - {{/hasParams}} + Future {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { // ignore: prefer_const_declarations final path = r'{{{path}}}'{{#pathParams}} .replaceAll({{=<% %>=}}'{<% baseName %>}'<%={{ }}=%>, {{{paramName}}}{{^isString}}.toString(){{/isString}}){{/pathParams}}; // ignore: prefer_final_locals - Object postBody{{#bodyParam}} = {{{paramName}}}{{/bodyParam}}; + Object? postBody{{#bodyParam}} = {{{paramName}}}{{/bodyParam}}; final queryParams = []; final headerParams = {}; @@ -77,7 +66,7 @@ class {{{classname}}} { {{^required}} if ({{{paramName}}} != null) { {{/required}} - queryParams.addAll(_convertParametersForCollectionFormat('{{{collectionFormat}}}', '{{{baseName}}}', {{{paramName}}})); + queryParams.addAll(_queryParams('{{{collectionFormat}}}', '{{{baseName}}}', {{{paramName}}})); {{^required}} } {{/required}} @@ -139,7 +128,7 @@ class {{{classname}}} { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -174,7 +163,7 @@ class {{{classname}}} { /// {{/-last}} {{/allParams}} - Future<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { + Future<{{#returnType}}{{{.}}}?{{/returnType}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { final response = await {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}} {{#allParams}}{{^required}}{{{paramName}}}: {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} {{/hasOptionalParams}}); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -183,13 +172,13 @@ class {{{classname}}} { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { {{#native_serialization}} {{#isArray}} final responseBody = await _decodeBodyBytes(response); return (await apiClient.deserializeAsync(responseBody, '{{{returnType}}}') as List) .cast<{{{returnBaseType}}}>() - .{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}}; + .{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(){{/uniqueItems}}; {{/isArray}} {{^isArray}} {{#isMap}} @@ -199,7 +188,7 @@ class {{{classname}}} { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), '{{{returnType}}}',) as {{{returnType}}}; {{/isMap}}{{/isArray}}{{/native_serialization}} } - return Future<{{{returnType}}}>.value(); + return null; {{/returnType}} } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/dart2/api_client.mustache b/modules/openapi-generator/src/main/resources/dart2/api_client.mustache index 7eb14870b7ca..92846fc4b910 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api_client.mustache @@ -33,12 +33,7 @@ class ApiClient { Client get client => _client; /// Requests to use a new HTTP [Client] in this class. - /// - /// If the [newClient] is null, an [ArgumentError] is thrown. set client(Client newClient) { - if (newClient == null) { - throw ArgumentError('New client instance cannot be null.'); - } _client = newClient; } @@ -55,7 +50,7 @@ class ApiClient { /// or deleted. Map get authentications => Map.unmodifiable(_authentications); - T getAuthentication(String name) { + T? getAuthentication(String name) { final authentication = _authentications[name]; return authentication is T ? authentication : null; } @@ -66,35 +61,28 @@ class ApiClient { String path, String method, List queryParams, - Object body, + Object? body, Map headerParams, Map formParams, - String nullableContentType, + String? contentType, List authNames, ) async { _updateParamsForAuth(authNames, queryParams, headerParams); headerParams.addAll(_defaultHeaderMap); + if (contentType != null) { + headerParams['Content-Type'] = contentType; + } - final urlEncodedQueryParams = queryParams - .where((param) => param.value != null) - .map((param) => '$param'); - - final queryString = urlEncodedQueryParams.isNotEmpty - ? '?${urlEncodedQueryParams.join('&')}' - : ''; - + final urlEncodedQueryParams = queryParams.map((param) => '$param'); + final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; final uri = Uri.parse('$basePath$path$queryString'); - if (nullableContentType != null) { - headerParams['Content-Type'] = nullableContentType; - } - try { // Special case for uploading a single file which isn't a 'multipart/form-data'. if ( - body is MultipartFile && (nullableContentType == null || - !nullableContentType.toLowerCase().startsWith('multipart/form-data')) + body is MultipartFile && (contentType == null || + !contentType.toLowerCase().startsWith('multipart/form-data')) ) { final request = StreamedRequest(method, uri); request.headers.addAll(headerParams); @@ -120,7 +108,7 @@ class ApiClient { return Response.fromStream(response); } - final msgBody = nullableContentType == 'application/x-www-form-urlencoded' + final msgBody = contentType == 'application/x-www-form-urlencoded' ? formParams : await serializeAsync(body); final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; @@ -133,43 +121,71 @@ class ApiClient { case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,); case 'GET': return await _client.get(uri, headers: nullableHeaderParams,); } - } on SocketException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'Socket operation failed: $method $path', e, trace,); - } on TlsException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'TLS/SSL communication failed: $method $path', e, trace,); - } on IOException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'I/O operation failed: $method $path', e, trace,); - } on ClientException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'HTTP connection failed: $method $path', e, trace,); - } on Exception catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'Exception occurred: $method $path', e, trace,); + } on SocketException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Socket operation failed: $method $path', + error, + trace, + ); + } on TlsException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'TLS/SSL communication failed: $method $path', + error, + trace, + ); + } on IOException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'I/O operation failed: $method $path', + error, + trace, + ); + } on ClientException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'HTTP connection failed: $method $path', + error, + trace, + ); + } on Exception catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Exception occurred: $method $path', + error, + trace, + ); } - throw ApiException(HttpStatus.badRequest, 'Invalid HTTP operation: $method $path',); + throw ApiException( + HttpStatus.badRequest, + 'Invalid HTTP operation: $method $path', + ); } {{#native_serialization}} - Future deserializeAsync(String json, String targetType, {bool growable}) async => + Future deserializeAsync(String json, String targetType, {bool growable = false,}) async => // ignore: deprecated_member_use_from_same_package deserialize(json, targetType, growable: growable); @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') - dynamic deserialize(String json, String targetType, {bool growable}) { + dynamic deserialize(String json, String targetType, {bool growable = false,}) { // Remove all spaces. Necessary for regular expressions as well. targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments // If the expected target type is String, nothing to do... return targetType == 'String' ? json - : _deserialize(jsonDecode(json), targetType, growable: growable == true); + : _deserialize(jsonDecode(json), targetType, growable: growable); } {{/native_serialization}} // ignore: deprecated_member_use_from_same_package - Future serializeAsync(Object value) async => serialize(value); + Future serializeAsync(Object? value) async => serialize(value); @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') - String serialize(Object value) => value == null ? '' : json.encode(value); + String serialize(Object? value) => value == null ? '' : json.encode(value); /// Update query and header parameters based on authentication settings. /// @param authNames The authentications to apply @@ -188,7 +204,7 @@ class ApiClient { } {{#native_serialization}} - static dynamic _deserialize(dynamic value, String targetType, {bool growable}) { + static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) { try { switch (targetType) { case 'String': @@ -215,24 +231,21 @@ class ApiClient { {{/model}} {{/models}} default: - Match match; - if (value is List && (match = _regList.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + dynamic match; + if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, targetType, growable: growable)) + .map((dynamic v) => _deserialize(v, match, growable: growable,)) .toList(growable: growable); } - if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, targetType, growable: growable)) + .map((dynamic v) => _deserialize(v, match, growable: growable,)) .toSet(); } - if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { return Map.fromIterables( value.keys.cast(), - value.values.map((dynamic v) => _deserialize(v, targetType, growable: growable)), + value.values.map((dynamic v) => _deserialize(v, match, growable: growable,)), ); } } @@ -248,9 +261,9 @@ class ApiClient { /// Primarily intended for use in an isolate. class DeserializationMessage { const DeserializationMessage({ - @required this.json, - @required this.targetType, - this.growable, + required this.json, + required this.targetType, + this.growable = false, }); /// The JSON value to deserialize. @@ -274,10 +287,10 @@ Future deserializeAsync(DeserializationMessage message) async { : ApiClient._deserialize( jsonDecode(message.json), targetType, - growable: message.growable == true, + growable: message.growable, ); } {{/native_serialization}} /// Primarily intended for use in an isolate. -Future serializeAsync(Object value) async => value == null ? '' : json.encode(value); +Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); diff --git a/modules/openapi-generator/src/main/resources/dart2/api_exception.mustache b/modules/openapi-generator/src/main/resources/dart2/api_exception.mustache index 28f734e55879..aeb7aa9ce226 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api_exception.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api_exception.mustache @@ -6,9 +6,9 @@ class ApiException implements Exception { ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); int code = 0; - String message; - Exception innerException; - StackTrace stackTrace; + String? message; + Exception? innerException; + StackTrace? stackTrace; @override String toString() { diff --git a/modules/openapi-generator/src/main/resources/dart2/api_helper.mustache b/modules/openapi-generator/src/main/resources/dart2/api_helper.mustache index 6b2f4f2fdef8..ec98b7d1d741 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api_helper.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api_helper.mustache @@ -11,32 +11,27 @@ class QueryParam { } // Ported from the Java version. -Iterable _convertParametersForCollectionFormat( - String collectionFormat, - String name, - dynamic value, -) { +Iterable _queryParams(String collectionFormat, String name, dynamic value,) { + // Assertions to run in debug mode only. + assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); + final params = []; - // preconditions - if (name != null && name.isNotEmpty && value != null) { - if (value is List) { - if (collectionFormat == 'multi') { - return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); - } + if (value is List) { + if (collectionFormat == 'multi') { + return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); + } - // Default collection format is 'csv'. - if (collectionFormat == null || collectionFormat.isEmpty) { - // ignore: parameter_assignments - collectionFormat = 'csv'; - } + // Default collection format is 'csv'. + if (collectionFormat.isEmpty) { + collectionFormat = 'csv'; // ignore: parameter_assignments + } - final delimiter = _delimiters[collectionFormat] ?? ','; + final delimiter = _delimiters[collectionFormat] ?? ','; - params.add(QueryParam(name, value.map(parameterToString).join(delimiter)),); - } else { - params.add(QueryParam(name, parameterToString(value),)); - } + params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); + } else if (value != null) { + params.add(QueryParam(name, parameterToString(value))); } return params; @@ -67,27 +62,27 @@ String parameterToString(dynamic value) { Future _decodeBodyBytes(Response response) async { final contentType = response.headers['content-type']; return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes == null ? null : utf8.decode(response.bodyBytes) + ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) : response.body; } /// Returns a valid [T] value found at the specified Map [key], null otherwise. -T mapValueOfType(dynamic map, String key) { +T? mapValueOfType(dynamic map, String key) { final dynamic value = map is Map ? map[key] : null; return value is T ? value : null; } /// Returns a valid Map found at the specified Map [key], null otherwise. -Map mapCastOfType(dynamic map, String key) { +Map? mapCastOfType(dynamic map, String key) { final dynamic value = map is Map ? map[key] : null; return value is Map ? value.cast() : null; } /// Returns a valid [DateTime] found at the specified Map [key], null otherwise. -DateTime mapDateTime(dynamic map, String key, [String pattern]) { +DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { final dynamic value = map is Map ? map[key] : null; if (value != null) { - int millis; + int? millis; if (value is int) { millis = value; } else if (value is String) { diff --git a/modules/openapi-generator/src/main/resources/dart2/api_test.mustache b/modules/openapi-generator/src/main/resources/dart2/api_test.mustache index 319945b2c3b5..6873ba0f9d4d 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api_test.mustache @@ -6,7 +6,7 @@ import 'package:test/test.dart'; /// tests for {{{classname}}} void main() { - final instance = {{{classname}}}(); + // final instance = {{{classname}}}(); group('tests for {{{classname}}}', () { {{#operation}} diff --git a/modules/openapi-generator/src/main/resources/dart2/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart2/auth/api_key_auth.mustache index f5d602880de0..b4f5a4587246 100644 --- a/modules/openapi-generator/src/main/resources/dart2/auth/api_key_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/auth/api_key_auth.mustache @@ -6,23 +6,25 @@ class ApiKeyAuth implements Authentication { final String location; final String paramName; - String apiKeyPrefix; - String apiKey; + String apiKeyPrefix = ''; + String apiKey = ''; @override void applyToParams(List queryParams, Map headerParams) { - final value = apiKeyPrefix == null ? apiKey : '$apiKeyPrefix $apiKey'; + final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; - if (location == 'query' && value != null) { - queryParams.add(QueryParam(paramName, value)); - } else if (location == 'header' && value != null) { - headerParams[paramName] = value; - } else if (location == 'cookie' && value != null) { - headerParams.update( - 'Cookie', - (existingCookie) => '$existingCookie; $paramName=$value', - ifAbsent: () => '$paramName=$value', - ); + if (paramValue.isNotEmpty) { + if (location == 'query') { + queryParams.add(QueryParam(paramName, paramValue)); + } else if (location == 'header') { + headerParams[paramName] = paramValue; + } else if (location == 'cookie') { + headerParams.update( + 'Cookie', + (existingCookie) => '$existingCookie; $paramName=$paramValue', + ifAbsent: () => '$paramName=$paramValue', + ); + } } } } diff --git a/modules/openapi-generator/src/main/resources/dart2/auth/header.mustache b/modules/openapi-generator/src/main/resources/dart2/auth/header.mustache index 341e14bf9e63..3799d9d04658 100644 --- a/modules/openapi-generator/src/main/resources/dart2/auth/header.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/auth/header.mustache @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/modules/openapi-generator/src/main/resources/dart2/auth/http_basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart2/auth/http_basic_auth.mustache index 6098ba5661ea..544219733921 100644 --- a/modules/openapi-generator/src/main/resources/dart2/auth/http_basic_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/auth/http_basic_auth.mustache @@ -1,12 +1,16 @@ {{>header}} {{>part_of}} class HttpBasicAuth implements Authentication { + HttpBasicAuth({this.username = '', this.password = ''}); + String username; String password; @override void applyToParams(List queryParams, Map headerParams) { - final credentials = '${username ?? ''}:${password ?? ''}'; - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + if (username.isNotEmpty && password.isNotEmpty) { + final credentials = '$username:$password'; + headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + } } } diff --git a/modules/openapi-generator/src/main/resources/dart2/auth/http_bearer_auth.mustache b/modules/openapi-generator/src/main/resources/dart2/auth/http_bearer_auth.mustache index 1260ff9c99d0..7c480c5e81d3 100644 --- a/modules/openapi-generator/src/main/resources/dart2/auth/http_bearer_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/auth/http_bearer_auth.mustache @@ -11,19 +11,29 @@ class HttpBearerAuth implements Authentication { set accessToken(dynamic accessToken) { if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().'); + throw ArgumentError('accessToken value must be either a String or a String Function().'); } _accessToken = accessToken; } @override void applyToParams(List queryParams, Map headerParams) { + if (_accessToken == null) { + return; + } + + String accessToken; + if (_accessToken is String) { - headerParams['Authorization'] = 'Bearer $_accessToken'; + accessToken = _accessToken; } else if (_accessToken is HttpBearerAuthProvider) { - headerParams['Authorization'] = 'Bearer ${_accessToken()}'; + accessToken = _accessToken!(); } else { - throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().'); + return; + } + + if (accessToken.isNotEmpty) { + headerParams['Authorization'] = 'Bearer $accessToken'; } } } diff --git a/modules/openapi-generator/src/main/resources/dart2/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart2/auth/oauth.mustache index 6cdd30dceb27..c5c64d522184 100644 --- a/modules/openapi-generator/src/main/resources/dart2/auth/oauth.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/auth/oauth.mustache @@ -1,13 +1,13 @@ {{>header}} {{>part_of}} class OAuth implements Authentication { - OAuth({this.accessToken}); + OAuth({this.accessToken = ''}); String accessToken; @override void applyToParams(List queryParams, Map headerParams) { - if (accessToken != null) { + if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } } diff --git a/modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache b/modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache index af2f2a0e2859..dc5dfec5f2a7 100644 --- a/modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/dart_constructor.mustache @@ -2,9 +2,9 @@ {{{classname}}}({ {{#vars}} {{! - A field is @required in Dart when it is - required && !nullable && !defaultValue in OAS + A field is required in Dart when it is + required && !defaultValue in OAS }} - {{#required}}{{^isNullable}}{{^defaultValue}}@required {{/defaultValue}}{{/isNullable}}{{/required}}this.{{{name}}}{{^isNullable}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}}{{/isNullable}}, + {{#required}}{{^defaultValue}}required {{/defaultValue}}{{/required}}this.{{{name}}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{.}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}}, {{/vars}} - }); \ No newline at end of file + }); diff --git a/modules/openapi-generator/src/main/resources/dart2/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart2/gitignore.mustache index 8b7331fd822c..1be28ced0940 100644 --- a/modules/openapi-generator/src/main/resources/dart2/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/gitignore.mustache @@ -1,27 +1,17 @@ -# See https://www.dartlang.org/tools/private-files.html +# See https://dart.dev/guides/libraries/private-files -# Files and directories created by pub -.buildlog +.dart_tool/ .packages -.project -.pub/ build/ -**/packages/ +pubspec.lock # Except for application packages -# Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these -# rules if you intend to use dart2js directly -# Convention is to use extension '.dart.js' for Dart compiled to Javascript to -# differentiate from explicit Javascript files) -*.dart.js -*.part.js -*.js.deps -*.js.map -*.info.json - -# Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file -# (Library packages only! Remove pattern if developing an application package) -pubspec.lock +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ + +# Mac +.DS_Store diff --git a/modules/openapi-generator/src/main/resources/dart2/header.mustache b/modules/openapi-generator/src/main/resources/dart2/header.mustache index 341e14bf9e63..3799d9d04658 100644 --- a/modules/openapi-generator/src/main/resources/dart2/header.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/header.mustache @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/modules/openapi-generator/src/main/resources/dart2/model_test.mustache b/modules/openapi-generator/src/main/resources/dart2/model_test.mustache index 5d4f1c161c52..1a074d47b71d 100644 --- a/modules/openapi-generator/src/main/resources/dart2/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/model_test.mustache @@ -7,7 +7,7 @@ import 'package:test/test.dart'; // tests for {{{classname}}} void main() { {{^isEnum}} - final instance = {{{classname}}}(); + // final instance = {{{classname}}}(); {{/isEnum}} group('test {{{classname}}}', () { diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache index 0efe1455c4b5..e6a680201fe7 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache @@ -1,21 +1,40 @@ class {{{classname}}} { {{>dart_constructor}} - - {{#vars}} +{{#vars}} {{#description}} /// {{{.}}} {{/description}} {{^isEnum}} {{#minimum}} - // minimum: {{{.}}} + {{#description}} + /// + {{/description}} + /// Minimum value: {{{.}}} {{/minimum}} {{#maximum}} - // maximum: {{{.}}} + {{#description}} + {{^minimum}} + /// + {{/minimum}} + {{/description}} + /// Maximum value: {{{.}}} {{/maximum}} + {{^isNullable}} + {{^required}} + {{^defaultValue}} + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + {{/defaultValue}} + {{/required}} + {{/isNullable}} {{/isEnum}} - {{{datatypeWithEnum}}} {{{name}}}; + {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}?{{/defaultValue}}{{/required}}{{/isNullable}} {{{name}}}; - {{/vars}} +{{/vars}} @override bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} && {{#vars}} @@ -24,9 +43,9 @@ class {{{classname}}} { @override int get hashCode => - // ignore: unnecessary_parenthesis + // ignore: unnecessary_parenthesis {{#vars}} - ({{{name}}} == null ? 0 : {{{name}}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}} + ({{#isNullable}}{{{name}}} == null ? 0 : {{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}{{{name}}} == null ? 0 : {{/defaultValue}}{{/required}}{{/isNullable}}{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}} {{/vars}} @override @@ -35,37 +54,51 @@ class {{{classname}}} { Map toJson() { final json = {}; {{#vars}} - {{^required}} + {{#isNullable}} if ({{{name}}} != null) { - {{/required}} + {{/isNullable}} + {{^isNullable}} + {{^required}} + {{^defaultValue}} + if ({{{name}}} != null) { + {{/defaultValue}} + {{/required}} + {{/isNullable}} {{#isDateTime}} {{#pattern}} - json[r'{{{baseName}}}'] = {{#required}}{{#isNullable}}{{{name}}} == null ? null : {{/isNullable}}{{/required}}_dateEpochMarker == '{{{pattern}}}' - ? {{{name}}}.millisecondsSinceEpoch - : {{{name}}}.toUtc().toIso8601String(); + json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}' + ? {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch + : {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); {{/pattern}} {{^pattern}} - json[r'{{{baseName}}}'] = {{#required}}{{#isNullable}}{{{name}}} == null ? null : {{/isNullable}}{{/required}}{{{name}}}.toUtc().toIso8601String(); + json[r'{{{baseName}}}'] = {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); {{/pattern}} {{/isDateTime}} {{#isDate}} {{#pattern}} - json[r'{{{baseName}}}'] = {{#required}}{{#isNullable}}{{{name}}} == null ? null : {{/isNullable}}{{/required}}_dateEpochMarker == '{{{pattern}}}' - ? {{{name}}}.millisecondsSinceEpoch - : _dateFormatter.format({{{name}}}.toUtc()); + json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}' + ? {{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch + : _dateFormatter.format({{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); {{/pattern}} {{^pattern}} - json[r'{{{baseName}}}'] = {{#required}}{{#isNullable}}{{{name}}} == null ? null : {{/isNullable}}{{/required}}_dateFormatter.format({{{name}}}.toUtc()); + json[r'{{{baseName}}}'] = _dateFormatter.format({{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); {{/pattern}} {{/isDate}} {{^isDateTime}} {{^isDate}} - json[r'{{{baseName}}}'] = {{#required}}{{#isNullable}}{{{name}}} == null ? null : {{/isNullable}}{{/required}}{{{name}}}; + json[r'{{{baseName}}}'] = {{{name}}}; {{/isDate}} {{/isDateTime}} - {{^required}} + {{#isNullable}} + } + {{/isNullable}} + {{^isNullable}} + {{^required}} + {{^defaultValue}} } - {{/required}} + {{/defaultValue}} + {{/required}} + {{/isNullable}} {{/vars}} return json; } @@ -73,16 +106,28 @@ class {{{classname}}} { /// Returns a new [{{{classname}}}] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static {{{classname}}} fromJson(dynamic value) { + static {{{classname}}}? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "{{{classname}}}[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "{{{classname}}}[$key]" has a null value in JSON.'); + }); + return true; + }()); + return {{{classname}}}( {{#vars}} {{#isDateTime}} - {{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'), + {{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/isDateTime}} {{#isDate}} - {{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'), + {{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/isDate}} {{^isDateTime}} {{^isDate}} @@ -97,36 +142,36 @@ class {{{classname}}} { {{^items.complexType}} (e) => e == null ? null : (e as List).cast<{{items.items.dataType}}>() {{/items.complexType}} - ).toList(growable: false) + ).toList() : null, {{/items.isArray}} {{^items.isArray}} - {{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']), + {{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/items.isArray}} {{/isArray}} {{^isArray}} {{#isMap}} {{#items.isArray}} {{{name}}}: json[r'{{{baseName}}}'] == null - ? null + ? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} {{#items.complexType}} - : {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}']), + : {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}']), {{/items.complexType}} {{^items.complexType}} - : mapCastOfType(json, r'{{{baseName}}}'), + : mapCastOfType(json, r'{{{baseName}}}'), {{/items.complexType}} {{/items.isArray}} {{^items.isArray}} {{#items.isMap}} {{#items.complexType}} - {{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']), + {{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/items.complexType}} {{^items.complexType}} - {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'), + {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/items.complexType}} {{/items.isMap}} {{^items.isMap}} - {{{name}}}: mapValueOfType<{{{datatypeWithEnum}}}>(json, r'{{{baseName}}}'), + {{{name}}}: mapValueOfType<{{{datatypeWithEnum}}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/items.isMap}} {{/items.isArray}} {{/isMap}} @@ -135,7 +180,7 @@ class {{{classname}}} { {{{name}}}: null, // No support for decoding binary content from JSON {{/isBinary}} {{^isBinary}} - {{{name}}}: {{{complexType}}}.fromJson(json[r'{{{baseName}}}']), + {{{name}}}: {{{complexType}}}.fromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/isBinary}} {{/isMap}} {{/isArray}} @@ -143,30 +188,30 @@ class {{{classname}}} { {{^complexType}} {{#isArray}} {{#isEnum}} - {{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']), + {{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/isEnum}} {{^isEnum}} {{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}} - ? (json[r'{{{baseName}}}'] as {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}).cast<{{{items.datatype}}}>() - : null, + ? (json[r'{{{baseName}}}'] as {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}).cast<{{{items.datatype}}}>() + : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}, {{/isEnum}} {{/isArray}} {{^isArray}} {{#isMap}} - {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'), + {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/isMap}} {{^isMap}} {{#isNumber}} {{{name}}}: json[r'{{{baseName}}}'] == null - ? null - : {{{datatypeWithEnum}}}.parse(json[r'{{{baseName}}}'].toString()), + ? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} + : {{{datatypeWithEnum}}}.parse(json[r'{{{baseName}}}'].toString()), {{/isNumber}} {{^isNumber}} {{^isEnum}} - {{{name}}}: mapValueOfType<{{{datatypeWithEnum}}}>(json, r'{{{baseName}}}'), + {{{name}}}: mapValueOfType<{{{datatypeWithEnum}}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/isEnum}} {{#isEnum}} - {{{name}}}: {{{enumName}}}.fromJson(json[r'{{{baseName}}}']), + {{{name}}}: {{{enumName}}}.fromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{/isEnum}} {{/isNumber}} {{/isMap}} @@ -180,37 +225,56 @@ class {{{classname}}} { return null; } - static List<{{{classname}}}> listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map({{{classname}}}.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : <{{{classname}}}>[]; + static List<{{{classname}}}>? listFromJson(dynamic json, {bool growable = false,}) { + final result = <{{{classname}}}>[]; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = {{{classname}}}.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = {{{classname}}}.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = {{{classname}}}.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of {{{classname}}}-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = {{{classname}}}.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = {{{classname}}}.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { +{{#vars}} + {{#required}} + '{{{baseName}}}', + {{/required}} +{{/vars}} + }; } {{#vars}} {{#isEnum}} @@ -225,4 +289,4 @@ class {{{classname}}} { {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} -{{/vars}} \ No newline at end of file +{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache index f686a20a2f69..6f4b8a62eda9 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache @@ -7,7 +7,7 @@ class {{{classname}}} { final {{{dataType}}} value; @override - String toString() => {{#isString}}value ?? ''{{/isString}}{{^isString}}value == null ? '' : value.toString(){{/isString}}; + String toString() => {{#isString}}value{{/isString}}{{^isString}}value.toString(){{/isString}}; {{{dataType}}} toJson() => value; @@ -26,13 +26,20 @@ class {{{classname}}} { {{/allowableValues}} ]; - static {{{classname}}} fromJson(dynamic value) => - {{{classname}}}TypeTransformer().decode(value); + static {{{classname}}}? fromJson(dynamic value) => {{{classname}}}TypeTransformer().decode(value); - static List<{{{classname}}}> listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map({{{classname}}}.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : <{{{classname}}}>[]; + static List<{{{classname}}}>? listFromJson(dynamic json, {bool growable = false,}) { + final result = <{{{classname}}}>[]; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = {{{classname}}}.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [{{{classname}}}] to {{{dataType}}}, @@ -52,7 +59,7 @@ class {{{classname}}}TypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - {{{classname}}} decode(dynamic data, {bool allowNull}) { + {{{classname}}}? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { {{#allowableValues}} @@ -61,7 +68,7 @@ class {{{classname}}}TypeTransformer { {{/enumVars}} {{/allowableValues}} default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -70,5 +77,5 @@ class {{{classname}}}TypeTransformer { } /// Singleton [{{{classname}}}TypeTransformer] instance. - static {{{classname}}}TypeTransformer _instance; + static {{{classname}}}TypeTransformer? _instance; } diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache index d01b1676aadd..b434d2d018ff 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache @@ -7,7 +7,7 @@ class {{{enumName}}} { final {{{dataType}}} value; @override - String toString() => {{#isString}}value ?? ''{{/isString}}{{^isString}}value == null ? '' : value.toString(){{/isString}}; + String toString() => {{#isString}}value{{/isString}}{{^isString}}value.toString(){{/isString}}; {{{dataType}}} toJson() => value; @@ -26,13 +26,20 @@ class {{{enumName}}} { {{/allowableValues}} ]; - static {{{enumName}}} fromJson(dynamic value) => - {{{enumName}}}TypeTransformer().decode(value); + static {{{enumName}}}? fromJson(dynamic value) => {{{enumName}}}TypeTransformer().decode(value); - static List<{{{enumName}}}> listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map({{{enumName}}}.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : <{{{enumName}}}>[]; + static List<{{{enumName}}}>? listFromJson(dynamic json, {bool growable = false,}) { + final result = <{{{enumName}}}>[]; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = {{{enumName}}}.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [{{{enumName}}}] to {{{dataType}}}, @@ -52,7 +59,7 @@ class {{{enumName}}}TypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - {{{enumName}}} decode(dynamic data, {bool allowNull}) { + {{{enumName}}}? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { {{#allowableValues}} @@ -61,7 +68,7 @@ class {{{enumName}}}TypeTransformer { {{/enumVars}} {{/allowableValues}} default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -70,5 +77,5 @@ class {{{enumName}}}TypeTransformer { } /// Singleton [{{{enumName}}}TypeTransformer] instance. - static {{{enumName}}}TypeTransformer _instance; + static {{{enumName}}}TypeTransformer? _instance; } diff --git a/modules/openapi-generator/src/main/resources/dart2/travis.mustache b/modules/openapi-generator/src/main/resources/dart2/travis.mustache index 1a3af66d54c7..2774ccbba0e9 100644 --- a/modules/openapi-generator/src/main/resources/dart2/travis.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/travis.mustache @@ -6,7 +6,7 @@ language: dart dart: # Install a specific stable release -- "2.2.0" +- "2.12" install: - pub get diff --git a/pom.xml b/pom.xml index 8a40d41061f1..e6463ca0bc08 100644 --- a/pom.xml +++ b/pom.xml @@ -1400,7 +1400,6 @@ samples/openapi3/client/petstore/dart2/petstore_client_lib - samples/openapi3/client/petstore/dart2/petstore samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake diff --git a/samples/openapi3/client/petstore/dart2/petstore/README.md b/samples/openapi3/client/petstore/dart2/petstore/README.md deleted file mode 100644 index 2139c301745c..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Background - -## Current state of tests - -TL;DR currently the only tests are e2e tests that were adapted to use a faked http client. While pushing data around as a smoke test has some value, more testing is required. In particular we need comprehensive unit/integration tests. - -- an old set of e2e tests are skipped for CI, as they hit a live endpoint and so are inherently flaky - - `pet_test.dart` - - `store_test.dart` - - `user_test.dart` -- the above set of tests were adapted to use a faked http client - - the tests are not really well suited to being used with a stubbed client, many are basically just testing the endpoint logic - - while not a great set of tests, they do have some value as a smoke test for template changes -- the adapted tests and files that contain test data: - - `pet_test_fake_client.dart` - - `store_test_fake_client.dart` - - `user_test_fake_client.dart` - - `fake_client.dart` - - `file_upload_response.json` - -## Assumptions - -- the tests will be run as part of CI and so have access to dart:io - -# Running - -## If not already done, resolve dependencies - -`pub get` - -## To run tests in a single file: - -`pub run test test/pet_test.dart` - -## To run all tests in the test folder: - -`pub run test` diff --git a/samples/openapi3/client/petstore/dart2/petstore/pom.xml b/samples/openapi3/client/petstore/dart2/petstore/pom.xml deleted file mode 100644 index c4ce7b4d68e7..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - 4.0.0 - org.openapitools - Dart2PetstoreClientTests - pom - 1.0.0-SNAPSHOT - Dart2 Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - export-dartfmt - pre-install-test - - exec - - - export - - DART_FMT_PATH=/usr/local/bin/dartfmt - - - - - pub-get - pre-integration-test - - exec - - - pub - - get - - - - - pub-test - integration-test - - exec - - - pub - - run - test - - - - - - - - diff --git a/samples/openapi3/client/petstore/dart2/petstore/pubspec.lock b/samples/openapi3/client/petstore/dart2/petstore/pubspec.lock deleted file mode 100644 index dd5bbc89254b..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/pubspec.lock +++ /dev/null @@ -1,418 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "14.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "0.41.2" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.7.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.2" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.0" - built_value: - dependency: transitive - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "8.1.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.3" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "3.7.0" - collection: - dependency: "direct dev" - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - coverage: - dependency: transitive - description: - name: coverage - url: "https://pub.dartlang.org" - source: hosted - version: "0.15.2" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.12" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - http: - dependency: "direct dev" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.3" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.10" - meta: - dependency: "direct dev" - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - mockito: - dependency: "direct dev" - description: - name: mockito - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.4" - node_preamble: - dependency: transitive - description: - name: node_preamble - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.13" - openapi: - dependency: "direct main" - description: - path: "../petstore_client_lib" - relative: true - source: path - version: "1.0.0" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.3" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.0" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - shelf_static: - dependency: transitive - description: - name: shelf_static - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - source_gen: - dependency: transitive - description: - name: source_gen - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.10+3" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - source_maps: - dependency: transitive - description: - name: source_maps - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.10" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test: - dependency: "direct dev" - description: - name: test - url: "https://pub.dartlang.org" - source: hosted - version: "1.16.5" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.19" - test_core: - dependency: transitive - description: - name: test_core - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.15" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - vm_service: - dependency: transitive - description: - name: vm_service - url: "https://pub.dartlang.org" - source: hosted - version: "6.2.0" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" -sdks: - dart: ">=2.12.0 <3.0.0" diff --git a/samples/openapi3/client/petstore/dart2/petstore/pubspec.yaml b/samples/openapi3/client/petstore/dart2/petstore/pubspec.yaml deleted file mode 100644 index 6b1e0dcfa3a2..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: petstore_client -version: 1.0.0 -description: Petstore client using OpenAPI library - -publish_to: none - -environment: - sdk: '>=2.11.0 <3.0.0' - -dependencies: - openapi: - path: ../petstore_client_lib - -dev_dependencies: - meta: <1.7.0 - test: ^1.8.0 - mockito: ^4.1.1 - http: ^0.13.0 - collection: ^1.14.12 diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/fake_client.dart b/samples/openapi3/client/petstore/dart2/petstore/test/fake_client.dart deleted file mode 100644 index ed60f386aa41..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/fake_client.dart +++ /dev/null @@ -1,134 +0,0 @@ -import 'dart:convert'; - -import 'package:collection/collection.dart'; -import 'package:http/http.dart'; -import 'package:mockito/mockito.dart'; - -/// A fake client that checks for expected values and returns given responses -/// -/// Checks for the expected values (url, headers, body) and throws if not found -/// -/// If exception is non-null the request will throw the exception, after other -/// checks are performed -class FakeClient extends Fake implements Client { - FakeClient({ - this.throwException, - this.expectedPostRequestBody, - this.postResponseBody, - this.expectedGetRequestBody, - this.getResponseBody, - this.deleteResponseBody, - this.expectedPutRequestBody, - this.putResponseBody, - this.sendResponseBody, - String expectedUrl, - this.expectedHeaders = null, - }) : this.expectedUrl = Uri.parse(expectedUrl); - - Exception throwException; - Object expectedPostRequestBody; - String postResponseBody; - String expectedGetRequestBody; - String getResponseBody; - String deleteResponseBody; - String expectedPutRequestBody; - String putResponseBody; - String sendResponseBody; - Uri expectedUrl; - Map expectedHeaders; - - @override - Future post(Uri url, - {Map headers, Object body, Encoding encoding}) async { - // check that the request was made with expected values - if (url != expectedUrl) { - throw StateError( - 'POST was called with unexpected url: ${url} should be ${expectedUrl}'); - } - if (!MapEquality().equals(headers, expectedHeaders)) { - throw StateError( - 'POST was called with unexpected headers: ${headers} should be ${expectedHeaders}'); - } - // currently we only expect Map (and subtypes) or Strings - if (body is Map) { - if (!MapEquality().equals(body, expectedPostRequestBody)) { - throw StateError( - 'POST was called with unexpected body: ${body} should be ${expectedPostRequestBody}'); - } - } else if (body != expectedPostRequestBody) { - throw StateError( - 'POST was called with unexpected body: ${body} should be ${expectedPostRequestBody}'); - } - - // throw if set to throw - if (throwException != null) throw throwException; - - return Response(postResponseBody, 200); - } - - @override - Future get(Uri url, {Map headers}) async { - // check that the request was made with expected values - if (url != expectedUrl) { - throw StateError( - 'GET was called with unexpected url: ${url} should be ${expectedUrl}'); - } - if (!MapEquality().equals(headers, expectedHeaders)) { - throw StateError( - 'GET was called with unexpected headers: ${headers} should be ${expectedHeaders}'); - } - - // throw if set to throw - if (throwException != null) throw throwException; - - return Response(getResponseBody, 200); - } - - @override - Future delete(Uri url, - {Map headers, Object body, Encoding encoding}) async { - // check that the request was made with expected values - if (url != expectedUrl) { - throw StateError( - 'DELETE was called with unexpected url: ${url} should be ${expectedUrl}'); - } - if (!MapEquality().equals(headers, expectedHeaders)) { - throw StateError( - 'DELETE was called with unexpected headers: ${headers} should be ${expectedHeaders}'); - } - - // throw if set to throw - if (throwException != null) throw throwException; - - return Response(deleteResponseBody, 200); - } - - @override - Future put(Uri url, - {Map headers, Object body, Encoding encoding}) async { - // check that the request was made with expected values - if (url != expectedUrl) { - throw StateError( - 'PUT was called with unexpected url: ${url} should be ${expectedUrl}'); - } - if (!MapEquality().equals(headers, expectedHeaders)) { - throw StateError( - 'PUT was called with unexpected headers: ${headers} should be ${expectedHeaders}'); - } - if (body != expectedPutRequestBody) { - throw StateError( - 'PUT was called with unexpected body: ${body} should be ${expectedPutRequestBody}'); - } - - // throw if set to throw - if (throwException != null) throw throwException; - - return Response(putResponseBody, 200); - } - - @override - Future send(BaseRequest request) async { - List bytes = utf8.encode(sendResponseBody); - return StreamedResponse(Stream.fromIterable([bytes]), 200); - } -} diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/file_upload_response.json b/samples/openapi3/client/petstore/dart2/petstore/test/file_upload_response.json deleted file mode 100644 index 8855b00d9e38..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/file_upload_response.json +++ /dev/null @@ -1 +0,0 @@ -{"code":200,"type":"unknown","message":"additionalMetadata: \nFile uploaded to ./null, 4 bytes"} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/inventory_response.json b/samples/openapi3/client/petstore/dart2/petstore/test/inventory_response.json deleted file mode 100644 index b4388d1e7b35..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/inventory_response.json +++ /dev/null @@ -1 +0,0 @@ -{"mine":1,"sold":18,"string":568,"Dead":2,"test":2,"Nonavailable":1,"custom":3,"pending":20,"available":2212,"notAvailable":26,"avaiflable":1,"AVAILABLE":1,"swimming":1,"availablee":2,"success":1,"105":1,"missing":11,"disabled":1,"Available":1,"]]>":1} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/order_model_test.dart b/samples/openapi3/client/petstore/dart2/petstore/test/order_model_test.dart deleted file mode 100644 index 7048659e8942..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/order_model_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -void main() { - test('Check if default value is generated', () async { - var order = Order(); - expect(order.complete, equals(false)); - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/pet_faked_client_test.dart b/samples/openapi3/client/petstore/dart2/petstore/test/pet_faked_client_test.dart deleted file mode 100644 index 9737df5d4881..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/pet_faked_client_test.dart +++ /dev/null @@ -1,223 +0,0 @@ -import 'dart:io'; - -import 'package:http/http.dart'; -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -import 'fake_client.dart'; -import 'random_id.dart'; - -void main() { - final petApi = PetApi(); - - Pet makePet({ - int id = 1234, - String name = 'Fluffy', - String status = '', - }) { - final category = Category() - ..id = 1234 - ..name = 'eyeColor'; - final tags = [ - Tag() - ..id = 1234 - ..name = 'New York', - Tag() - ..id = 124321 - ..name = 'Jose' - ]; - return Pet(name: name) - ..id = id - ..category = category - ..tags = tags - ..status = PetStatusEnum.fromJson(status) - ..photoUrls = ['https://petstore.com/sample/photo1.jpg']; - } - - /// Setup the fake client then call [petApi.addPet] - Future addPet(Pet pet) async { - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet', - expectedPostRequestBody: await petApi.apiClient.serializeAsync(pet), - postResponseBody: await petApi.apiClient.serializeAsync(pet), - expectedHeaders: {'Content-Type': 'application/json'}); - return petApi.addPet(pet); - } - - group('Pet API with faked client', () { - test('adds a new pet and gets it by id', () async { - final id = newId(); - final newPet = makePet(id: id); - - // use the pet api to add a pet - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet', - expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet), - postResponseBody: await petApi.apiClient.serializeAsync(newPet), - expectedHeaders: {'Content-Type': 'application/json'}); - await petApi.addPet(newPet); - - // retrieve the same pet by id - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet/$id', - getResponseBody: await petApi.apiClient.serializeAsync(newPet), - ); - final retrievedPet = await petApi.getPetById(id); - - // check that the retrieved id is as expected - expect(retrievedPet.id, equals(id)); - }); - - test('doesn\'t get non-existing pet by id', () { - final id = newId(); - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet/$id', - throwException: ApiException(400, 'not found'), - ); - expect(petApi.getPetById(id), throwsA(equals(TypeMatcher()))); - }); - - test('deletes existing pet by id', () async { - final id = newId(); - Pet newPet = makePet(id: id); - - // add a new pet - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet', - expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet), - postResponseBody: await petApi.apiClient.serializeAsync(newPet), - expectedHeaders: {'Content-Type': 'application/json'}); - await petApi.addPet(newPet); - - // delete the pet - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet/$id', - expectedHeaders: {'api_key': 'special-key'}, - deleteResponseBody: '', - ); - await petApi.deletePet(id, apiKey: 'special-key'); - - // check for the deleted pet - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet/$id', - throwException: ApiException(400, 'Not found'), - ); - expect(petApi.getPetById(id), throwsA(equals(TypeMatcher()))); - }); - - test('updates pet with form', () async { - final id = newId(); - final newPet = makePet(id: id, name: 'Snowy'); - - // add a new pet - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet', - expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet), - postResponseBody: await petApi.apiClient.serializeAsync(newPet), - expectedHeaders: {'Content-Type': 'application/json'}); - await petApi.addPet(newPet); - - // update with form - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet/$id', - expectedHeaders: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - expectedPostRequestBody: {'name': 'Doge', 'status': ''}, - postResponseBody: '', - ); - await petApi.updatePetWithForm(id, name: 'Doge', status: ''); - - // check update worked - newPet.name = 'Doge'; - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet/$id', - getResponseBody: await petApi.apiClient.serializeAsync(newPet), - ); - final pet = await petApi.getPetById(id); - expect(pet.name, equals('Doge')); - }); - - test('updates existing pet', () async { - final id = newId(); - final name = 'Snowy'; - final newPet = makePet(id: id); - final updatePet = makePet(id: id, name: name); - - // add a new pet - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet', - expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet), - postResponseBody: await petApi.apiClient.serializeAsync(newPet), - expectedHeaders: {'Content-Type': 'application/json'}); - await petApi.addPet(newPet); - - // update the same pet - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet', - expectedPutRequestBody: await petApi.apiClient.serializeAsync(updatePet), - putResponseBody: await petApi.apiClient.serializeAsync(updatePet), - expectedHeaders: {'Content-Type': 'application/json'}); - await petApi.updatePet(updatePet); - - // check update worked - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet/$id', - getResponseBody: await petApi.apiClient.serializeAsync(updatePet), - ); - final pet = await petApi.getPetById(id); - expect(pet.name, equals(name)); - }); - - test('finds pets by status', () async { - final id1 = newId(); - final id2 = newId(); - final id3 = newId(); - final status = '${PetStatusEnum.available}'; - final pet1 = makePet(id: id1, status: status); - final pet2 = makePet(id: id2, status: status); - final pet3 = makePet(id: id3, status: '${PetStatusEnum.sold}'); - - await addPet(pet1); - await addPet(pet2); - await addPet(pet3); - - // retrieve pets by status - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet/findByStatus?status=$status', - getResponseBody: await petApi.apiClient.serializeAsync([pet1, pet2]), - ); - final pets = await petApi.findPetsByStatus([status]); - - // tests serialisation and deserialisation of enum - final petsByStatus = pets.where((p) => p.status == PetStatusEnum.available); - expect(petsByStatus.length, equals(2)); - final petIds = pets.map((pet) => pet.id).toList(); - expect(petIds, contains(id1)); - expect(petIds, contains(id2)); - expect(petIds, isNot(contains(id3))); - }); - - test('uploads a pet image', () async { - final id = newId(); - final newPet = makePet(id: id); - // get some test data (recorded from live response) - final uploadResponse = await File('test/file_upload_response.json').readAsString(); - - // add a new pet - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet', - expectedPostRequestBody: await petApi.apiClient.serializeAsync(newPet), - postResponseBody: await petApi.apiClient.serializeAsync(newPet), - expectedHeaders: {'Content-Type': 'application/json'}); - await petApi.addPet(newPet); - - petApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/pet', - sendResponseBody: uploadResponse, - ); - final file = new MultipartFile.fromBytes('file', [104, 101, 108, 108, 111]); - await petApi.uploadFile(id, file: file); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/pet_test.dart b/samples/openapi3/client/petstore/dart2/petstore/test/pet_test.dart deleted file mode 100644 index cbd26c68c7ee..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/pet_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -@Skip('Needs real petstore') -import 'package:http/http.dart'; -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -import 'random_id.dart'; - -void main() { - var petApi = PetApi(); - - Pet makePet({ - int id = 1234, - String name = 'Fluffy', - String status = '', - }) { - final category = Category() - ..id = 1234 - ..name = 'eyeColor'; - final tags = [ - Tag() - ..id = 1234 - ..name = 'New York', - Tag() - ..id = 124321 - ..name = 'Jose' - ]; - - return Pet( - id: id, - category: category, - name: name, //required field - tags: tags, - photoUrls: ['https://petstore.com/sample/photo1.jpg'] //required field - ) - ..status = PetStatusEnum.fromJson(status) - ..photoUrls = ['https://petstore.com/sample/photo1.jpg']; - } - - group('Pet API with live client', () { - test('adds a new pet and gets it by id', () async { - var id = newId(); - await petApi.addPet(makePet(id: id)); - var pet = await petApi.getPetById(id); - expect(pet.id, equals(id)); - }); - - test('doesn\'t get non-existing pet by id', () { - expect(petApi.getPetById(newId()), throwsA(equals(TypeMatcher()))); - }); - - test('deletes existing pet by id', () async { - var id = newId(); - await petApi.addPet(makePet(id: id)); - await petApi.deletePet(id, apiKey: 'special-key'); - expect(petApi.getPetById(id), throwsA(equals(TypeMatcher()))); - }); - - test('updates pet with form', () async { - var id = newId(); - - await petApi.addPet(makePet(id: id, name: 'Snowy')); - await petApi.updatePetWithForm(id, name: 'Doge', status: ''); - var pet = await petApi.getPetById(id); - expect(pet.name, equals('Doge')); - }); - - test('updates existing pet', () async { - var id = newId(); - var name = 'Snowy'; - - await petApi.addPet(makePet(id: id)); - await petApi.updatePet(makePet(id: id, name: name)); - var pet = await petApi.getPetById(id); - expect(pet.name, equals(name)); - }); - - test('finds pets by status', () async { - var id1 = newId(); - var id2 = newId(); - var id3 = newId(); - var status = '${PetStatusEnum.available}'; - - await petApi.addPet(makePet(id: id1, status: status)); - await petApi.addPet(makePet(id: id2, status: status)); - await petApi.addPet(makePet(id: id3, status: '${PetStatusEnum.sold}')); - - var pets = await petApi.findPetsByStatus([status]); - var petIds = pets.map((pet) => pet.id).toList(); - expect(petIds, contains(id1)); - expect(petIds, contains(id2)); - expect(petIds, isNot(contains(id3))); - }); - - test('uploads a pet image', () async { - var id = newId(); - await petApi.addPet(makePet(id: id)); - var file = new MultipartFile.fromBytes('file', [104, 101, 108, 108, 111]); - await petApi.uploadFile(id, additionalMetadata: '', file: file); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/random_id.dart b/samples/openapi3/client/petstore/dart2/petstore/test/random_id.dart deleted file mode 100644 index ca67ac209934..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/random_id.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'dart:math'; - -final _random = new Random(); - -int newId() { - return _random.nextInt(999999); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/store_faked_client_test.dart b/samples/openapi3/client/petstore/dart2/petstore/test/store_faked_client_test.dart deleted file mode 100644 index 541d08b8c6a7..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/store_faked_client_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -import 'dart:io'; - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -import 'fake_client.dart'; -import 'random_id.dart'; - -void main() { - var storeApi = new StoreApi(); - - Order makeOrder({int id}) { - return Order() - ..id = id - ..petId = 1234 - ..quantity = 1 - ..shipDate = DateTime.now() - ..status - ..complete = false; - } - - group('Store API with faked client', () { - test('places an order and gets it by id', () async { - final id = newId(); - final newOrder = makeOrder(id: id); - - // use the store api to add an order - storeApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/store/order', - expectedPostRequestBody: await storeApi.apiClient.serializeAsync(newOrder), - postResponseBody: await storeApi.apiClient.serializeAsync(newOrder), - expectedHeaders: {"Content-Type": "application/json"}); - await storeApi.placeOrder(newOrder); - - // retrieve the same order by id - storeApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id', - getResponseBody: await storeApi.apiClient.serializeAsync(newOrder), - ); - final placedOrder = await storeApi.getOrderById(id); - expect(placedOrder.id, equals(id)); - }); - - test('deletes an order', () async { - final id = newId(); - final newOrder = makeOrder(id: id); - - // use the store api to add an order - storeApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/store/order', - expectedPostRequestBody: await storeApi.apiClient.serializeAsync(newOrder), - postResponseBody: await storeApi.apiClient.serializeAsync(newOrder), - expectedHeaders: {"Content-Type": "application/json"}); - await storeApi.placeOrder(newOrder); - - // delete the same order - storeApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id', - deleteResponseBody: '', - ); - await storeApi.deleteOrder(id.toString()); - - // try and retrieve the order - storeApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/store/order/$id', - throwException: ApiException(400, 'Not found'), - ); - expect(storeApi.getOrderById(id), throwsA(equals(TypeMatcher()))); - }); - - test('gets the store inventory', () async { - // get some test data (recorded from live response) - final inventoryResponse = await File('test/inventory_response.json').readAsString(); - // use the store api to get the inventory - storeApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/store/inventory', - getResponseBody: inventoryResponse, - ); - Map inventory = await storeApi.getInventory(); - expect(inventory.length, isNot(equals(0))); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/store_test.dart b/samples/openapi3/client/petstore/dart2/petstore/test/store_test.dart deleted file mode 100644 index a5b19cd1de59..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/store_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -@Skip('Needs real petstore') -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -import 'random_id.dart'; - -void main() { - var storeApi = new StoreApi(); - - Order makeOrder({int id}) { - return Order() - ..id = id - ..petId = 1234 - ..quantity = 1 - ..shipDate = DateTime.now() - ..status - ..complete = false; - } - - group('Store API with live client', () { - test('places an order and gets it by id', () async { - var id = newId(); - - await storeApi.placeOrder(makeOrder(id: id)); - var order = await storeApi.getOrderById(id); - expect(order.id, equals(id)); - }); - - test('deletes an order', () async { - var id = newId(); - - await storeApi.placeOrder(makeOrder(id: id)); - await storeApi.deleteOrder(id.toString()); - expect(storeApi.getOrderById(id), throwsA(equals(TypeMatcher()))); - }); - - test('gets the store inventory', () async { - Map inventory = await storeApi.getInventory(); - expect(inventory.length, isNot(equals(0))); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/user_faked_client_test.dart b/samples/openapi3/client/petstore/dart2/petstore/test/user_faked_client_test.dart deleted file mode 100644 index f81379351924..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/user_faked_client_test.dart +++ /dev/null @@ -1,180 +0,0 @@ -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -import 'fake_client.dart'; -import 'random_id.dart'; - -void main() { - var userApi = new UserApi(); - - User makeUser( - {int id, String userName = 'username', String password = 'password'}) { - return User() - ..id = id - ..username = userName - ..firstName = 'firstname' - ..lastName = 'lastname' - ..email = 'email' - ..password = password - ..phone = 'phone' - ..userStatus = 0; - } - - group('User API with faked client', () { - test('creates a user', () async { - final id = newId(); - final username = 'Mally45'; - final newUser = makeUser(id: id, userName: username); - - // use the user api to create a user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user', - expectedPostRequestBody: - await userApi.apiClient.serializeAsync(newUser), - expectedHeaders: {'Content-Type': 'application/json'}, - postResponseBody: await userApi.apiClient.serializeAsync(newUser), - ); - await userApi.createUser(newUser); - - // retrieve the same user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user/$username', - getResponseBody: await userApi.apiClient.serializeAsync(newUser), - ); - var user = await userApi.getUserByName(username); - expect(user.id, equals(id)); - }); - - test('creates users with list input', () async { - final firstId = newId(); - final joe = 'Joe'; - - final sally = 'Sally'; - final secondId = newId(); - - final users = [ - makeUser(id: firstId, userName: joe), - makeUser(id: secondId, userName: sally), - ]; - - // use the user api to create a list of users - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user/createWithList', - expectedPostRequestBody: await userApi.apiClient.serializeAsync(users), - expectedHeaders: {'Content-Type': 'application/json'}, - postResponseBody: await userApi.apiClient.serializeAsync(users), - ); - await userApi.createUsersWithListInput(users); - - // retrieve the users - userApi.apiClient.client = FakeClient( - expectedUrl: - 'http://petstore.swagger.io/v2/user/${users.elementAt(0).username}', - getResponseBody: await userApi.apiClient.serializeAsync( - users.elementAt(0), - ), - ); - final firstUser = await userApi.getUserByName(joe); - userApi.apiClient.client = FakeClient( - expectedUrl: - 'http://petstore.swagger.io/v2/user/${users.elementAt(1).username}', - getResponseBody: await userApi.apiClient.serializeAsync( - users.elementAt(1), - ), - ); - final secondUser = await userApi.getUserByName(sally); - expect(firstUser.id, equals(firstId)); - expect(secondUser.id, equals(secondId)); - }); - - test('updates a user', () async { - final username = 'Arkjam89'; - final email = 'test@example.com'; - final newUser = makeUser(id: newId(), userName: username); - - // use the user api to create a user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user', - expectedPostRequestBody: - await userApi.apiClient.serializeAsync(newUser), - expectedHeaders: {'Content-Type': 'application/json'}, - postResponseBody: await userApi.apiClient.serializeAsync(newUser), - ); - await userApi.createUser(newUser); - newUser.email = email; - - // use the user api to update the user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user/${newUser.username}', - expectedPutRequestBody: await userApi.apiClient.serializeAsync(newUser), - expectedHeaders: {'Content-Type': 'application/json'}, - putResponseBody: await userApi.apiClient.serializeAsync(newUser), - ); - await userApi.updateUser(username, newUser); - - // retrieve the same user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user/${newUser.username}', - getResponseBody: await userApi.apiClient.serializeAsync(newUser), - ); - var foundUser = await userApi.getUserByName(username); - expect(foundUser.email, equals(email)); - }); - - test('deletes a user', () async { - final username = 'Riddlem325'; - final newUser = makeUser(id: newId(), userName: username); - - // use the user api to create a user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user', - expectedPostRequestBody: - await userApi.apiClient.serializeAsync(newUser), - expectedHeaders: {'Content-Type': 'application/json'}, - postResponseBody: await userApi.apiClient.serializeAsync(newUser), - ); - await userApi.createUser(newUser); - - // delete the same user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user/${newUser.username}', - deleteResponseBody: '', - ); - await userApi.deleteUser(username); - - // try and retrieve the user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user/${newUser.username}', - throwException: ApiException(400, 'Not found'), - ); - expect(userApi.getUserByName(username), - throwsA(TypeMatcher())); - }); - - test('logs a user in', () async { - final username = 'sgarad625'; - final password = 'lokimoki1'; - final newUser = - makeUser(id: newId(), userName: username, password: password); - - // use the user api to create a user - userApi.apiClient.client = FakeClient( - expectedUrl: 'http://petstore.swagger.io/v2/user', - expectedPostRequestBody: - await userApi.apiClient.serializeAsync(newUser), - expectedHeaders: {'Content-Type': 'application/json'}, - postResponseBody: await userApi.apiClient.serializeAsync(newUser), - ); - await userApi.createUser(newUser); - - // use the user api to login - userApi.apiClient.client = FakeClient( - expectedUrl: - 'http://petstore.swagger.io/v2/user/login?username=${newUser.username}&password=${newUser.password}', - getResponseBody: 'logged in user session:', - ); - final result = await userApi.loginUser(username, password); - expect(result, contains('logged in user session:')); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore/test/user_test.dart b/samples/openapi3/client/petstore/dart2/petstore/test/user_test.dart deleted file mode 100644 index d604363622d6..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore/test/user_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -@Skip('Needs real petstore') -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -import 'random_id.dart'; - -void main() { - var userApi = new UserApi(); - - User makeUser({int id, String userName = 'username', String password = 'password'}) { - return User() - ..id = id - ..username = userName - ..firstName = 'firstname' - ..lastName = 'lastname' - ..email = 'email' - ..password = password - ..phone = 'phone' - ..userStatus = 0; - } - - group('User API with live client', () { - test('creates a user', () async { - var id = newId(); - var username = 'Mally45'; - await userApi.createUser(makeUser(id: id, userName: username)); - var user = await userApi.getUserByName(username); - expect(user.id, equals(id)); - }); - - test('creates users with list input', () async { - var firstId = newId(); - var joe = 'Joe'; - - var sally = 'Sally'; - var secondId = newId(); - - var users = [ - makeUser(id: firstId, userName: joe), - makeUser(id: secondId, userName: sally), - ]; - - await userApi.createUsersWithListInput(users); - var firstUser = await userApi.getUserByName(joe); - var secondUser = await userApi.getUserByName(sally); - expect(firstUser.id, equals(firstId)); - expect(secondUser.id, equals(secondId)); - }); - - test('updates a user', () async { - var username = 'Arkjam89'; - var email = 'test@example.com'; - var user = makeUser(id: newId(), userName: username); - - await userApi.createUser(user); - user.email = email; - await userApi.updateUser(username, user); - var foundUser = await userApi.getUserByName(username); - expect(foundUser.email, equals(email)); - }); - - test('deletes a user', () async { - var username = 'Riddlem325'; - await userApi.createUser(makeUser(id: newId(), userName: username)); - await userApi.deleteUser(username); - expect(userApi.getUserByName(username), throwsA(TypeMatcher())); - }); - - test('logs a user in', () async { - var username = 'sgarad625'; - var password = 'lokimoki1'; - var user = makeUser(id: newId(), userName: username, password: password); - - await userApi.createUser(user); - var result = await userApi.loginUser(username, password); - expect(result, contains('logged in user session:')); - }); - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.gitignore b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.gitignore index 8b7331fd822c..1be28ced0940 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.gitignore +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.gitignore @@ -1,27 +1,17 @@ -# See https://www.dartlang.org/tools/private-files.html +# See https://dart.dev/guides/libraries/private-files -# Files and directories created by pub -.buildlog +.dart_tool/ .packages -.project -.pub/ build/ -**/packages/ +pubspec.lock # Except for application packages -# Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these -# rules if you intend to use dart2js directly -# Convention is to use extension '.dart.js' for Dart compiled to Javascript to -# differentiate from explicit Javascript files) -*.dart.js -*.part.js -*.js.deps -*.js.map -*.info.json - -# Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file -# (Library packages only! Remove pattern if developing an application package) -pubspec.lock +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ + +# Mac +.DS_Store diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.travis.yml b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.travis.yml index 1a3af66d54c7..2774ccbba0e9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.travis.yml +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.travis.yml @@ -6,7 +6,7 @@ language: dart dart: # Install a specific stable release -- "2.2.0" +- "2.12" install: - pub get diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md index b41b8970d0c2..dd7e2f923537 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md @@ -8,7 +8,7 @@ This Dart package is automatically generated by the [OpenAPI Generator](https:// ## Requirements -Dart 2.0 or later +Dart 2.12 or later ## Installation & Usage diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart index e67b60f2670f..742bcfa11543 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index 5b299b6b2cdb..b4ee176a9262 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class PetApi { - PetApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + PetApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -25,16 +25,11 @@ class PetApi { /// * [Pet] pet (required): /// Pet object that needs to be added to the store Future addPetWithHttpInfo(Pet pet,) async { - // Verify required params are set. - if (pet == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); - } - // ignore: prefer_const_declarations final path = r'/pet'; // ignore: prefer_final_locals - Object postBody = pet; + Object? postBody = pet; final queryParams = []; final headerParams = {}; @@ -51,7 +46,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -62,7 +57,7 @@ class PetApi { /// /// * [Pet] pet (required): /// Pet object that needs to be added to the store - Future addPet(Pet pet,) async { + Future addPet(Pet pet,) async { final response = await addPetWithHttpInfo(pet,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -70,11 +65,11 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Pet',) as Pet; } - return Future.value(); + return null; } /// Deletes a pet @@ -87,18 +82,13 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petId, { String apiKey, }) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - + Future deletePetWithHttpInfo(int petId, { String? apiKey, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -119,7 +109,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -132,7 +122,7 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petId, { String apiKey, }) async { + Future deletePet(int petId, { String? apiKey, }) async { final response = await deletePetWithHttpInfo(petId, apiKey: apiKey, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -150,22 +140,17 @@ class PetApi { /// * [List] status (required): /// Status values that need to be considered for filter Future findPetsByStatusWithHttpInfo(List status,) async { - // Verify required params are set. - if (status == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: status'); - } - // ignore: prefer_const_declarations final path = r'/pet/findByStatus'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('csv', 'status', status)); + queryParams.addAll(_queryParams('csv', 'status', status)); const authNames = ['petstore_auth']; const contentTypes = []; @@ -178,7 +163,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -191,7 +176,7 @@ class PetApi { /// /// * [List] status (required): /// Status values that need to be considered for filter - Future> findPetsByStatus(List status,) async { + Future?> findPetsByStatus(List status,) async { final response = await findPetsByStatusWithHttpInfo(status,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -199,14 +184,14 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); return (await apiClient.deserializeAsync(responseBody, 'List') as List) .cast() - .toList(growable: false); + .toList(); } - return Future>.value(); + return null; } /// Finds Pets by tags @@ -220,22 +205,17 @@ class PetApi { /// * [List] tags (required): /// Tags to filter by Future findPetsByTagsWithHttpInfo(List tags,) async { - // Verify required params are set. - if (tags == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: tags'); - } - // ignore: prefer_const_declarations final path = r'/pet/findByTags'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('csv', 'tags', tags)); + queryParams.addAll(_queryParams('csv', 'tags', tags)); const authNames = ['petstore_auth']; const contentTypes = []; @@ -248,7 +228,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -261,7 +241,7 @@ class PetApi { /// /// * [List] tags (required): /// Tags to filter by - Future> findPetsByTags(List tags,) async { + Future?> findPetsByTags(List tags,) async { final response = await findPetsByTagsWithHttpInfo(tags,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -269,14 +249,14 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); return (await apiClient.deserializeAsync(responseBody, 'List') as List) .cast() - .toList(growable: false); + .toList(); } - return Future>.value(); + return null; } /// Find pet by ID @@ -290,17 +270,12 @@ class PetApi { /// * [int] petId (required): /// ID of pet to return Future getPetByIdWithHttpInfo(int petId,) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - // ignore: prefer_const_declarations final path = r'/pet/{petId}' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -317,7 +292,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -330,7 +305,7 @@ class PetApi { /// /// * [int] petId (required): /// ID of pet to return - Future getPetById(int petId,) async { + Future getPetById(int petId,) async { final response = await getPetByIdWithHttpInfo(petId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -338,11 +313,11 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Pet',) as Pet; } - return Future.value(); + return null; } /// Update an existing pet @@ -354,16 +329,11 @@ class PetApi { /// * [Pet] pet (required): /// Pet object that needs to be added to the store Future updatePetWithHttpInfo(Pet pet,) async { - // Verify required params are set. - if (pet == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); - } - // ignore: prefer_const_declarations final path = r'/pet'; // ignore: prefer_final_locals - Object postBody = pet; + Object? postBody = pet; final queryParams = []; final headerParams = {}; @@ -380,7 +350,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -391,7 +361,7 @@ class PetApi { /// /// * [Pet] pet (required): /// Pet object that needs to be added to the store - Future updatePet(Pet pet,) async { + Future updatePet(Pet pet,) async { final response = await updatePetWithHttpInfo(pet,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -399,11 +369,11 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Pet',) as Pet; } - return Future.value(); + return null; } /// Updates a pet in the store with form data @@ -420,18 +390,13 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petId, { String name, String status, }) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - + Future updatePetWithFormWithHttpInfo(int petId, { String? name, String? status, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -454,7 +419,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -471,7 +436,7 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petId, { String name, String status, }) async { + Future updatePetWithForm(int petId, { String? name, String? status, }) async { final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -492,18 +457,13 @@ class PetApi { /// /// * [MultipartFile] file: /// file to upload - Future uploadFileWithHttpInfo(int petId, { String additionalMetadata, MultipartFile file, }) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - + Future uploadFileWithHttpInfo(int petId, { String? additionalMetadata, MultipartFile? file, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}/uploadImage' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -534,7 +494,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -551,7 +511,7 @@ class PetApi { /// /// * [MultipartFile] file: /// file to upload - Future uploadFile(int petId, { String additionalMetadata, MultipartFile file, }) async { + Future uploadFile(int petId, { String? additionalMetadata, MultipartFile? file, }) async { final response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -559,10 +519,10 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiResponse',) as ApiResponse; } - return Future.value(); + return null; } } 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 0c5c49a95541..dff1442125db 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 @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class StoreApi { - StoreApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + StoreApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -27,17 +27,12 @@ class StoreApi { /// * [String] orderId (required): /// ID of the order that needs to be deleted Future deleteOrderWithHttpInfo(String orderId,) async { - // Verify required params are set. - if (orderId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); - } - // ignore: prefer_const_declarations final path = r'/store/order/{orderId}' .replaceAll('{orderId}', orderId); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -54,7 +49,7 @@ class StoreApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -84,7 +79,7 @@ class StoreApi { final path = r'/store/inventory'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -101,7 +96,7 @@ class StoreApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -109,7 +104,7 @@ class StoreApi { /// Returns pet inventories by status /// /// Returns a map of status codes to quantities - Future> getInventory() async { + Future?> getInventory() async { final response = await getInventoryWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -117,11 +112,11 @@ class StoreApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return Map.from(await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Map'),); } - return Future>.value(); + return null; } /// Find purchase order by ID @@ -135,17 +130,12 @@ class StoreApi { /// * [int] orderId (required): /// ID of pet that needs to be fetched Future getOrderByIdWithHttpInfo(int orderId,) async { - // Verify required params are set. - if (orderId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); - } - // ignore: prefer_const_declarations final path = r'/store/order/{orderId}' .replaceAll('{orderId}', orderId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -162,7 +152,7 @@ class StoreApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -175,7 +165,7 @@ class StoreApi { /// /// * [int] orderId (required): /// ID of pet that needs to be fetched - Future getOrderById(int orderId,) async { + Future getOrderById(int orderId,) async { final response = await getOrderByIdWithHttpInfo(orderId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -183,11 +173,11 @@ class StoreApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Order',) as Order; } - return Future.value(); + return null; } /// Place an order for a pet @@ -199,16 +189,11 @@ class StoreApi { /// * [Order] order (required): /// order placed for purchasing the pet Future placeOrderWithHttpInfo(Order order,) async { - // Verify required params are set. - if (order == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: order'); - } - // ignore: prefer_const_declarations final path = r'/store/order'; // ignore: prefer_final_locals - Object postBody = order; + Object? postBody = order; final queryParams = []; final headerParams = {}; @@ -225,7 +210,7 @@ class StoreApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -236,7 +221,7 @@ class StoreApi { /// /// * [Order] order (required): /// order placed for purchasing the pet - Future placeOrder(Order order,) async { + Future placeOrder(Order order,) async { final response = await placeOrderWithHttpInfo(order,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -244,10 +229,10 @@ class StoreApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Order',) as Order; } - return Future.value(); + return null; } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart index 3d30943890f1..a479e0b1dd32 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class UserApi { - UserApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + UserApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -27,16 +27,11 @@ class UserApi { /// * [User] user (required): /// Created user object Future createUserWithHttpInfo(User user,) async { - // Verify required params are set. - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/user'; // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; @@ -53,7 +48,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -82,16 +77,11 @@ class UserApi { /// * [List] user (required): /// List of user object Future createUsersWithArrayInputWithHttpInfo(List user,) async { - // Verify required params are set. - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/user/createWithArray'; // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; @@ -108,7 +98,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -135,16 +125,11 @@ class UserApi { /// * [List] user (required): /// List of user object Future createUsersWithListInputWithHttpInfo(List user,) async { - // Verify required params are set. - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/user/createWithList'; // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; @@ -161,7 +146,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -190,17 +175,12 @@ class UserApi { /// * [String] username (required): /// The name that needs to be deleted Future deleteUserWithHttpInfo(String username,) async { - // Verify required params are set. - if (username == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); - } - // ignore: prefer_const_declarations final path = r'/user/{username}' .replaceAll('{username}', username); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -217,7 +197,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -246,17 +226,12 @@ class UserApi { /// * [String] username (required): /// The name that needs to be fetched. Use user1 for testing. Future getUserByNameWithHttpInfo(String username,) async { - // Verify required params are set. - if (username == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); - } - // ignore: prefer_const_declarations final path = r'/user/{username}' .replaceAll('{username}', username); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -273,7 +248,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -284,7 +259,7 @@ class UserApi { /// /// * [String] username (required): /// The name that needs to be fetched. Use user1 for testing. - Future getUserByName(String username,) async { + Future getUserByName(String username,) async { final response = await getUserByNameWithHttpInfo(username,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -292,11 +267,11 @@ class UserApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'User',) as User; } - return Future.value(); + return null; } /// Logs user into the system @@ -311,26 +286,18 @@ class UserApi { /// * [String] password (required): /// The password for login in clear text Future loginUserWithHttpInfo(String username, String password,) async { - // Verify required params are set. - if (username == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); - } - if (password == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: password'); - } - // ignore: prefer_const_declarations final path = r'/user/login'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('', 'username', username)); - queryParams.addAll(_convertParametersForCollectionFormat('', 'password', password)); + queryParams.addAll(_queryParams('', 'username', username)); + queryParams.addAll(_queryParams('', 'password', password)); const authNames = []; const contentTypes = []; @@ -343,7 +310,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -357,7 +324,7 @@ class UserApi { /// /// * [String] password (required): /// The password for login in clear text - Future loginUser(String username, String password,) async { + Future loginUser(String username, String password,) async { final response = await loginUserWithHttpInfo(username, password,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -365,11 +332,11 @@ class UserApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; } - return Future.value(); + return null; } /// Logs out current logged in user session @@ -380,7 +347,7 @@ class UserApi { final path = r'/user/logout'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -397,7 +364,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -424,20 +391,12 @@ class UserApi { /// * [User] user (required): /// Updated user object Future updateUserWithHttpInfo(String username, User user,) async { - // Verify required params are set. - if (username == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); - } - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/user/{username}' .replaceAll('{username}', username); // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; @@ -454,7 +413,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart index 93057a79a7bf..3efae0775a54 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -27,12 +27,7 @@ class ApiClient { Client get client => _client; /// Requests to use a new HTTP [Client] in this class. - /// - /// If the [newClient] is null, an [ArgumentError] is thrown. set client(Client newClient) { - if (newClient == null) { - throw ArgumentError('New client instance cannot be null.'); - } _client = newClient; } @@ -49,7 +44,7 @@ class ApiClient { /// or deleted. Map get authentications => Map.unmodifiable(_authentications); - T getAuthentication(String name) { + T? getAuthentication(String name) { final authentication = _authentications[name]; return authentication is T ? authentication : null; } @@ -60,35 +55,28 @@ class ApiClient { String path, String method, List queryParams, - Object body, + Object? body, Map headerParams, Map formParams, - String nullableContentType, + String? contentType, List authNames, ) async { _updateParamsForAuth(authNames, queryParams, headerParams); headerParams.addAll(_defaultHeaderMap); + if (contentType != null) { + headerParams['Content-Type'] = contentType; + } - final urlEncodedQueryParams = queryParams - .where((param) => param.value != null) - .map((param) => '$param'); - - final queryString = urlEncodedQueryParams.isNotEmpty - ? '?${urlEncodedQueryParams.join('&')}' - : ''; - + final urlEncodedQueryParams = queryParams.map((param) => '$param'); + final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; final uri = Uri.parse('$basePath$path$queryString'); - if (nullableContentType != null) { - headerParams['Content-Type'] = nullableContentType; - } - try { // Special case for uploading a single file which isn't a 'multipart/form-data'. if ( - body is MultipartFile && (nullableContentType == null || - !nullableContentType.toLowerCase().startsWith('multipart/form-data')) + body is MultipartFile && (contentType == null || + !contentType.toLowerCase().startsWith('multipart/form-data')) ) { final request = StreamedRequest(method, uri); request.headers.addAll(headerParams); @@ -114,7 +102,7 @@ class ApiClient { return Response.fromStream(response); } - final msgBody = nullableContentType == 'application/x-www-form-urlencoded' + final msgBody = contentType == 'application/x-www-form-urlencoded' ? formParams : await serializeAsync(body); final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; @@ -127,41 +115,69 @@ class ApiClient { case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,); case 'GET': return await _client.get(uri, headers: nullableHeaderParams,); } - } on SocketException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'Socket operation failed: $method $path', e, trace,); - } on TlsException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'TLS/SSL communication failed: $method $path', e, trace,); - } on IOException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'I/O operation failed: $method $path', e, trace,); - } on ClientException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'HTTP connection failed: $method $path', e, trace,); - } on Exception catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'Exception occurred: $method $path', e, trace,); + } on SocketException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Socket operation failed: $method $path', + error, + trace, + ); + } on TlsException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'TLS/SSL communication failed: $method $path', + error, + trace, + ); + } on IOException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'I/O operation failed: $method $path', + error, + trace, + ); + } on ClientException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'HTTP connection failed: $method $path', + error, + trace, + ); + } on Exception catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Exception occurred: $method $path', + error, + trace, + ); } - throw ApiException(HttpStatus.badRequest, 'Invalid HTTP operation: $method $path',); + throw ApiException( + HttpStatus.badRequest, + 'Invalid HTTP operation: $method $path', + ); } - Future deserializeAsync(String json, String targetType, {bool growable}) async => + Future deserializeAsync(String json, String targetType, {bool growable = false,}) async => // ignore: deprecated_member_use_from_same_package deserialize(json, targetType, growable: growable); @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') - dynamic deserialize(String json, String targetType, {bool growable}) { + dynamic deserialize(String json, String targetType, {bool growable = false,}) { // Remove all spaces. Necessary for regular expressions as well. targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments // If the expected target type is String, nothing to do... return targetType == 'String' ? json - : _deserialize(jsonDecode(json), targetType, growable: growable == true); + : _deserialize(jsonDecode(json), targetType, growable: growable); } // ignore: deprecated_member_use_from_same_package - Future serializeAsync(Object value) async => serialize(value); + Future serializeAsync(Object? value) async => serialize(value); @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') - String serialize(Object value) => value == null ? '' : json.encode(value); + String serialize(Object? value) => value == null ? '' : json.encode(value); /// Update query and header parameters based on authentication settings. /// @param authNames The authentications to apply @@ -179,7 +195,7 @@ class ApiClient { } } - static dynamic _deserialize(dynamic value, String targetType, {bool growable}) { + static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) { try { switch (targetType) { case 'String': @@ -207,24 +223,21 @@ class ApiClient { case 'User': return User.fromJson(value); default: - Match match; - if (value is List && (match = _regList.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + dynamic match; + if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, targetType, growable: growable)) + .map((dynamic v) => _deserialize(v, match, growable: growable,)) .toList(growable: growable); } - if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, targetType, growable: growable)) + .map((dynamic v) => _deserialize(v, match, growable: growable,)) .toSet(); } - if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { return Map.fromIterables( value.keys.cast(), - value.values.map((dynamic v) => _deserialize(v, targetType, growable: growable)), + value.values.map((dynamic v) => _deserialize(v, match, growable: growable,)), ); } } @@ -238,9 +251,9 @@ class ApiClient { /// Primarily intended for use in an isolate. class DeserializationMessage { const DeserializationMessage({ - @required this.json, - @required this.targetType, - this.growable, + required this.json, + required this.targetType, + this.growable = false, }); /// The JSON value to deserialize. @@ -264,9 +277,9 @@ Future deserializeAsync(DeserializationMessage message) async { : ApiClient._deserialize( jsonDecode(message.json), targetType, - growable: message.growable == true, + growable: message.growable, ); } /// Primarily intended for use in an isolate. -Future serializeAsync(Object value) async => value == null ? '' : json.encode(value); +Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_exception.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_exception.dart index 8ffc340b4c9d..796f7f7ee74e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_exception.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_exception.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,9 +16,9 @@ class ApiException implements Exception { ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); int code = 0; - String message; - Exception innerException; - StackTrace stackTrace; + String? message; + Exception? innerException; + StackTrace? stackTrace; @override String toString() { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_helper.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_helper.dart index cf97058bec28..d6adb1798250 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_helper.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_helper.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,32 +21,27 @@ class QueryParam { } // Ported from the Java version. -Iterable _convertParametersForCollectionFormat( - String collectionFormat, - String name, - dynamic value, -) { +Iterable _queryParams(String collectionFormat, String name, dynamic value,) { + // Assertions to run in debug mode only. + assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); + final params = []; - // preconditions - if (name != null && name.isNotEmpty && value != null) { - if (value is List) { - if (collectionFormat == 'multi') { - return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); - } + if (value is List) { + if (collectionFormat == 'multi') { + return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); + } - // Default collection format is 'csv'. - if (collectionFormat == null || collectionFormat.isEmpty) { - // ignore: parameter_assignments - collectionFormat = 'csv'; - } + // Default collection format is 'csv'. + if (collectionFormat.isEmpty) { + collectionFormat = 'csv'; // ignore: parameter_assignments + } - final delimiter = _delimiters[collectionFormat] ?? ','; + final delimiter = _delimiters[collectionFormat] ?? ','; - params.add(QueryParam(name, value.map(parameterToString).join(delimiter)),); - } else { - params.add(QueryParam(name, parameterToString(value),)); - } + params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); + } else if (value != null) { + params.add(QueryParam(name, parameterToString(value))); } return params; @@ -68,27 +63,27 @@ String parameterToString(dynamic value) { Future _decodeBodyBytes(Response response) async { final contentType = response.headers['content-type']; return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes == null ? null : utf8.decode(response.bodyBytes) + ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) : response.body; } /// Returns a valid [T] value found at the specified Map [key], null otherwise. -T mapValueOfType(dynamic map, String key) { +T? mapValueOfType(dynamic map, String key) { final dynamic value = map is Map ? map[key] : null; return value is T ? value : null; } /// Returns a valid Map found at the specified Map [key], null otherwise. -Map mapCastOfType(dynamic map, String key) { +Map? mapCastOfType(dynamic map, String key) { final dynamic value = map is Map ? map[key] : null; return value is Map ? value.cast() : null; } /// Returns a valid [DateTime] found at the specified Map [key], null otherwise. -DateTime mapDateTime(dynamic map, String key, [String pattern]) { +DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { final dynamic value = map is Map ? map[key] : null; if (value != null) { - int millis; + int? millis; if (value is int) { millis = value; } else if (value is String) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/api_key_auth.dart index 0c2303af09e9..e304eda321ee 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/api_key_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/api_key_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,23 +16,25 @@ class ApiKeyAuth implements Authentication { final String location; final String paramName; - String apiKeyPrefix; - String apiKey; + String apiKeyPrefix = ''; + String apiKey = ''; @override void applyToParams(List queryParams, Map headerParams) { - final value = apiKeyPrefix == null ? apiKey : '$apiKeyPrefix $apiKey'; + final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; - if (location == 'query' && value != null) { - queryParams.add(QueryParam(paramName, value)); - } else if (location == 'header' && value != null) { - headerParams[paramName] = value; - } else if (location == 'cookie' && value != null) { - headerParams.update( - 'Cookie', - (existingCookie) => '$existingCookie; $paramName=$value', - ifAbsent: () => '$paramName=$value', - ); + if (paramValue.isNotEmpty) { + if (location == 'query') { + queryParams.add(QueryParam(paramName, paramValue)); + } else if (location == 'header') { + headerParams[paramName] = paramValue; + } else if (location == 'cookie') { + headerParams.update( + 'Cookie', + (existingCookie) => '$existingCookie; $paramName=$paramValue', + ifAbsent: () => '$paramName=$paramValue', + ); + } } } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/authentication.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/authentication.dart index 4257e1900069..49baf7c46a9c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/authentication.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/authentication.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_basic_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_basic_auth.dart index 0494f402d958..81abd7185f2d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_basic_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_basic_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -11,12 +11,16 @@ part of openapi.api; class HttpBasicAuth implements Authentication { + HttpBasicAuth({this.username = '', this.password = ''}); + String username; String password; @override void applyToParams(List queryParams, Map headerParams) { - final credentials = '${username ?? ''}:${password ?? ''}'; - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + if (username.isNotEmpty && password.isNotEmpty) { + final credentials = '$username:$password'; + headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + } } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart index 23e243523dd8..213f3483b8fb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,19 +21,29 @@ class HttpBearerAuth implements Authentication { set accessToken(dynamic accessToken) { if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().'); + throw ArgumentError('accessToken value must be either a String or a String Function().'); } _accessToken = accessToken; } @override void applyToParams(List queryParams, Map headerParams) { + if (_accessToken == null) { + return; + } + + String accessToken; + if (_accessToken is String) { - headerParams['Authorization'] = 'Bearer $_accessToken'; + accessToken = _accessToken; } else if (_accessToken is HttpBearerAuthProvider) { - headerParams['Authorization'] = 'Bearer ${_accessToken()}'; + accessToken = _accessToken!(); } else { - throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().'); + return; + } + + if (accessToken.isNotEmpty) { + headerParams['Authorization'] = 'Bearer $accessToken'; } } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/oauth.dart index 9299ac13f5bf..e9b87cffb052 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/oauth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/oauth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -11,13 +11,13 @@ part of openapi.api; class OAuth implements Authentication { - OAuth({this.accessToken}); + OAuth({this.accessToken = ''}); String accessToken; @override void applyToParams(List queryParams, Map headerParams) { - if (accessToken != null) { + if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart index bfd43366211f..6042baea5514 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/api_response.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -18,11 +18,29 @@ class ApiResponse { this.message, }); - int code; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? code; - String type; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? type; - String message; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? message; @override bool operator ==(Object other) => identical(this, other) || other is ApiResponse && @@ -32,10 +50,10 @@ class ApiResponse { @override int get hashCode => - // ignore: unnecessary_parenthesis - (code == null ? 0 : code.hashCode) + - (type == null ? 0 : type.hashCode) + - (message == null ? 0 : message.hashCode); + // ignore: unnecessary_parenthesis + (code == null ? 0 : code!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (message == null ? 0 : message!.hashCode); @override String toString() => 'ApiResponse[code=$code, type=$type, message=$message]'; @@ -57,9 +75,21 @@ class ApiResponse { /// Returns a new [ApiResponse] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ApiResponse fromJson(dynamic value) { + static ApiResponse? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ApiResponse[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ApiResponse[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ApiResponse( code: mapValueOfType(json, r'code'), type: mapValueOfType(json, r'type'), @@ -69,36 +99,50 @@ class ApiResponse { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ApiResponse.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ApiResponse.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ApiResponse.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ApiResponse.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ApiResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ApiResponse.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ApiResponse.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart index 50ad28ee0069..f4a572dffc73 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/category.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,9 +17,21 @@ class Category { this.name, }); - int id; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; - String name; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; @override bool operator ==(Object other) => identical(this, other) || other is Category && @@ -28,9 +40,9 @@ class Category { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (name == null ? 0 : name.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode); @override String toString() => 'Category[id=$id, name=$name]'; @@ -49,9 +61,21 @@ class Category { /// Returns a new [Category] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Category fromJson(dynamic value) { + static Category? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Category[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Category[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Category( id: mapValueOfType(json, r'id'), name: mapValueOfType(json, r'name'), @@ -60,36 +84,50 @@ class Category { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Category.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Category.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Category.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Category.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Category-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Category.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Category.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart index 61d01acfaaa8..ad84a894e8db 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,16 +21,40 @@ class Order { this.complete = false, }); - int id; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; - int petId; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? petId; - int quantity; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? quantity; - DateTime shipDate; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? shipDate; /// Order Status - OrderStatusEnum status; + OrderStatusEnum? status; bool complete; @@ -45,13 +69,13 @@ class Order { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (petId == null ? 0 : petId.hashCode) + - (quantity == null ? 0 : quantity.hashCode) + - (shipDate == null ? 0 : shipDate.hashCode) + - (status == null ? 0 : status.hashCode) + - (complete == null ? 0 : complete.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (petId == null ? 0 : petId!.hashCode) + + (quantity == null ? 0 : quantity!.hashCode) + + (shipDate == null ? 0 : shipDate!.hashCode) + + (status == null ? 0 : status!.hashCode) + + (complete.hashCode); @override String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; @@ -68,66 +92,90 @@ class Order { json[r'quantity'] = quantity; } if (shipDate != null) { - json[r'shipDate'] = shipDate.toUtc().toIso8601String(); + json[r'shipDate'] = shipDate!.toUtc().toIso8601String(); } if (status != null) { json[r'status'] = status; } - if (complete != null) { json[r'complete'] = complete; - } return json; } /// Returns a new [Order] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Order fromJson(dynamic value) { + static Order? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Order[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Order[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Order( id: mapValueOfType(json, r'id'), petId: mapValueOfType(json, r'petId'), quantity: mapValueOfType(json, r'quantity'), shipDate: mapDateTime(json, r'shipDate', ''), status: OrderStatusEnum.fromJson(json[r'status']), - complete: mapValueOfType(json, r'complete'), + complete: mapValueOfType(json, r'complete') ?? false, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Order.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Order.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Order.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Order.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Order-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Order.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Order.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } /// Order Status @@ -139,7 +187,7 @@ class OrderStatusEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -154,13 +202,20 @@ class OrderStatusEnum { delivered, ]; - static OrderStatusEnum fromJson(dynamic value) => - OrderStatusEnumTypeTransformer().decode(value); + static OrderStatusEnum? fromJson(dynamic value) => OrderStatusEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(OrderStatusEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OrderStatusEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [OrderStatusEnum] to String, @@ -180,14 +235,14 @@ class OrderStatusEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - OrderStatusEnum decode(dynamic data, {bool allowNull}) { + OrderStatusEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'placed': return OrderStatusEnum.placed; case r'approved': return OrderStatusEnum.approved; case r'delivered': return OrderStatusEnum.delivered; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -196,7 +251,7 @@ class OrderStatusEnumTypeTransformer { } /// Singleton [OrderStatusEnumTypeTransformer] instance. - static OrderStatusEnumTypeTransformer _instance; + static OrderStatusEnumTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart index 7b8d3c195e7b..62856ddace32 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -15,15 +15,27 @@ class Pet { Pet({ this.id, this.category, - @required this.name, + required this.name, this.photoUrls = const [], this.tags = const [], this.status, }); - int id; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; - Category category; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Category? category; String name; @@ -32,7 +44,7 @@ class Pet { List tags; /// pet status in the store - PetStatusEnum status; + PetStatusEnum? status; @override bool operator ==(Object other) => identical(this, other) || other is Pet && @@ -45,13 +57,13 @@ class Pet { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (category == null ? 0 : category.hashCode) + - (name == null ? 0 : name.hashCode) + - (photoUrls == null ? 0 : photoUrls.hashCode) + - (tags == null ? 0 : tags.hashCode) + - (status == null ? 0 : status.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (category == null ? 0 : category!.hashCode) + + (name.hashCode) + + (photoUrls.hashCode) + + (tags.hashCode) + + (status == null ? 0 : status!.hashCode); @override String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; @@ -66,9 +78,7 @@ class Pet { } json[r'name'] = name; json[r'photoUrls'] = photoUrls; - if (tags != null) { json[r'tags'] = tags; - } if (status != null) { json[r'status'] = status; } @@ -78,54 +88,82 @@ class Pet { /// Returns a new [Pet] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Pet fromJson(dynamic value) { + static Pet? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Pet[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Pet[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Pet( id: mapValueOfType(json, r'id'), category: Category.fromJson(json[r'category']), - name: mapValueOfType(json, r'name'), + name: mapValueOfType(json, r'name')!, photoUrls: json[r'photoUrls'] is List - ? (json[r'photoUrls'] as List).cast() - : null, - tags: Tag.listFromJson(json[r'tags']), + ? (json[r'photoUrls'] as List).cast() + : const [], + tags: Tag.listFromJson(json[r'tags']) ?? const [], status: PetStatusEnum.fromJson(json[r'status']), ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Pet.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Pet.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Pet.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Pet.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Pet-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Pet.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Pet.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + 'photoUrls', + }; } /// pet status in the store @@ -137,7 +175,7 @@ class PetStatusEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -152,13 +190,20 @@ class PetStatusEnum { sold, ]; - static PetStatusEnum fromJson(dynamic value) => - PetStatusEnumTypeTransformer().decode(value); + static PetStatusEnum? fromJson(dynamic value) => PetStatusEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(PetStatusEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PetStatusEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [PetStatusEnum] to String, @@ -178,14 +223,14 @@ class PetStatusEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - PetStatusEnum decode(dynamic data, {bool allowNull}) { + PetStatusEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'available': return PetStatusEnum.available; case r'pending': return PetStatusEnum.pending; case r'sold': return PetStatusEnum.sold; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -194,7 +239,7 @@ class PetStatusEnumTypeTransformer { } /// Singleton [PetStatusEnumTypeTransformer] instance. - static PetStatusEnumTypeTransformer _instance; + static PetStatusEnumTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart index 193c7004028f..71b8799d1cb1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/tag.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,9 +17,21 @@ class Tag { this.name, }); - int id; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; - String name; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; @override bool operator ==(Object other) => identical(this, other) || other is Tag && @@ -28,9 +40,9 @@ class Tag { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (name == null ? 0 : name.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode); @override String toString() => 'Tag[id=$id, name=$name]'; @@ -49,9 +61,21 @@ class Tag { /// Returns a new [Tag] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Tag fromJson(dynamic value) { + static Tag? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Tag[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Tag[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Tag( id: mapValueOfType(json, r'id'), name: mapValueOfType(json, r'name'), @@ -60,36 +84,50 @@ class Tag { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Tag.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Tag.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Tag.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Tag.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Tag-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Tag.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Tag.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart index d2b94ed6a7ab..0b10d4fe7c23 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -23,22 +23,70 @@ class User { this.userStatus, }); - int id; - - String username; - - String firstName; - - String lastName; - - String email; - - String password; - - String phone; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? username; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? firstName; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? lastName; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? email; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? password; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? phone; /// User Status - int userStatus; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? userStatus; @override bool operator ==(Object other) => identical(this, other) || other is User && @@ -53,15 +101,15 @@ class User { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (username == null ? 0 : username.hashCode) + - (firstName == null ? 0 : firstName.hashCode) + - (lastName == null ? 0 : lastName.hashCode) + - (email == null ? 0 : email.hashCode) + - (password == null ? 0 : password.hashCode) + - (phone == null ? 0 : phone.hashCode) + - (userStatus == null ? 0 : userStatus.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (username == null ? 0 : username!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (password == null ? 0 : password!.hashCode) + + (phone == null ? 0 : phone!.hashCode) + + (userStatus == null ? 0 : userStatus!.hashCode); @override String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; @@ -98,9 +146,21 @@ class User { /// Returns a new [User] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static User fromJson(dynamic value) { + static User? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "User[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "User[$key]" has a null value in JSON.'); + }); + return true; + }()); + return User( id: mapValueOfType(json, r'id'), username: mapValueOfType(json, r'username'), @@ -115,36 +175,50 @@ class User { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(User.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = User.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = User.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = User.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of User-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = User.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = User.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/api_response_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/api_response_test.dart index b0c30615b926..e9743c1ddded 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/api_response_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/api_response_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ApiResponse void main() { - final instance = ApiResponse(); + // final instance = ApiResponse(); group('test ApiResponse', () { // int code diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/category_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/category_test.dart index 1849d609ebb2..3e0e90fc90db 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/category_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/category_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Category void main() { - final instance = Category(); + // final instance = Category(); group('test Category', () { // int id diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/order_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/order_test.dart index 614a14e42bb9..b625abdaf9fc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/order_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/order_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Order void main() { - final instance = Order(); + // final instance = Order(); group('test Order', () { // int id diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/pet_api_test.dart index f143f4905306..bdb430ea1a80 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/pet_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/pet_api_test.dart @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for PetApi void main() { - final instance = PetApi(); + // final instance = PetApi(); group('tests for PetApi', () { // Add a new pet to the store diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/pet_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/pet_test.dart index a3b16fbd7abd..ddb8f6a569e3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/pet_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/pet_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Pet void main() { - final instance = Pet(); + // final instance = Pet(); group('test Pet', () { // int id 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 4a7ed54abbbc..351ef2682801 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 @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for StoreApi void main() { - final instance = StoreApi(); + // final instance = StoreApi(); group('tests for StoreApi', () { // Delete purchase order by ID diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/tag_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/tag_test.dart index 66ecdfe488dc..78d5880e6d4c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/tag_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/tag_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Tag void main() { - final instance = Tag(); + // final instance = Tag(); group('test Tag', () { // int id diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/user_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/user_api_test.dart index 73ee89a29451..4f82364bd172 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/user_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/user_api_test.dart @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for UserApi void main() { - final instance = UserApi(); + // final instance = UserApi(); group('tests for UserApi', () { // Create user diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/user_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/user_test.dart index b89cd360489d..d86551e10b64 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/user_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/user_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for User void main() { - final instance = User(); + // final instance = User(); group('test User', () { // int id diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.gitignore b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.gitignore index 8b7331fd822c..1be28ced0940 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.gitignore +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.gitignore @@ -1,27 +1,17 @@ -# See https://www.dartlang.org/tools/private-files.html +# See https://dart.dev/guides/libraries/private-files -# Files and directories created by pub -.buildlog +.dart_tool/ .packages -.project -.pub/ build/ -**/packages/ +pubspec.lock # Except for application packages -# Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these -# rules if you intend to use dart2js directly -# Convention is to use extension '.dart.js' for Dart compiled to Javascript to -# differentiate from explicit Javascript files) -*.dart.js -*.part.js -*.js.deps -*.js.map -*.info.json - -# Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file -# (Library packages only! Remove pattern if developing an application package) -pubspec.lock +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ + +# Mac +.DS_Store diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.travis.yml b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.travis.yml index 1a3af66d54c7..2774ccbba0e9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.travis.yml +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.travis.yml @@ -6,7 +6,7 @@ language: dart dart: # Install a specific stable release -- "2.2.0" +- "2.12" install: - pub get diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md index db2f2c26eac2..408714551412 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md @@ -8,7 +8,7 @@ This Dart package is automatically generated by the [OpenAPI Generator](https:// ## Requirements -Dart 2.0 or later +Dart 2.12 or later ## Installation & Usage diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart index 34d6adae2fa5..48f61a0d5f5d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart index 61a4d7786677..f03350c4dfff 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class AnotherFakeApi { - AnotherFakeApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + AnotherFakeApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -27,16 +27,11 @@ class AnotherFakeApi { /// * [ModelClient] modelClient (required): /// client model Future call123testSpecialTagsWithHttpInfo(ModelClient modelClient,) async { - // Verify required params are set. - if (modelClient == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); - } - // ignore: prefer_const_declarations final path = r'/another-fake/dummy'; // ignore: prefer_final_locals - Object postBody = modelClient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -53,7 +48,7 @@ class AnotherFakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -66,7 +61,7 @@ class AnotherFakeApi { /// /// * [ModelClient] modelClient (required): /// client model - Future call123testSpecialTags(ModelClient modelClient,) async { + Future call123testSpecialTags(ModelClient modelClient,) async { final response = await call123testSpecialTagsWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -74,10 +69,10 @@ class AnotherFakeApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ModelClient',) as ModelClient; } - return Future.value(); + return null; } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/default_api.dart index 15119087b633..02c22bfa2d9f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/default_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class DefaultApi { - DefaultApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + DefaultApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -22,7 +22,7 @@ class DefaultApi { final path = r'/foo'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -39,12 +39,12 @@ class DefaultApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } - Future fooGet() async { + Future fooGet() async { final response = await fooGetWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -52,10 +52,10 @@ class DefaultApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InlineResponseDefault',) as InlineResponseDefault; } - return Future.value(); + return null; } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart index 5ffad95f3b68..9d260e34f124 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class FakeApi { - FakeApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + FakeApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -24,7 +24,7 @@ class FakeApi { final path = r'/fake/health'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -41,13 +41,13 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } /// Health check endpoint - Future fakeHealthGet() async { + Future fakeHealthGet() async { final response = await fakeHealthGetWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -55,11 +55,11 @@ class FakeApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'HealthCheckResult',) as HealthCheckResult; } - return Future.value(); + return null; } /// test http signature authentication @@ -76,24 +76,19 @@ class FakeApi { /// /// * [String] header1: /// header parameter - Future fakeHttpSignatureTestWithHttpInfo(Pet pet, { String query1, String header1, }) async { - // Verify required params are set. - if (pet == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); - } - + Future fakeHttpSignatureTestWithHttpInfo(Pet pet, { String? query1, String? header1, }) async { // ignore: prefer_const_declarations final path = r'/fake/http-signature-test'; // ignore: prefer_final_locals - Object postBody = pet; + Object? postBody = pet; final queryParams = []; final headerParams = {}; final formParams = {}; if (query1 != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'query_1', query1)); + queryParams.addAll(_queryParams('', 'query_1', query1)); } if (header1 != null) { @@ -111,7 +106,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -128,7 +123,7 @@ class FakeApi { /// /// * [String] header1: /// header parameter - Future fakeHttpSignatureTest(Pet pet, { String query1, String header1, }) async { + Future fakeHttpSignatureTest(Pet pet, { String? query1, String? header1, }) async { final response = await fakeHttpSignatureTestWithHttpInfo(pet, query1: query1, header1: header1, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -143,14 +138,12 @@ class FakeApi { /// /// * [bool] body: /// Input boolean as post body - Future fakeOuterBooleanSerializeWithHttpInfo({ bool body, }) async { - // Verify required params are set. - + Future fakeOuterBooleanSerializeWithHttpInfo({ bool? body, }) async { // ignore: prefer_const_declarations final path = r'/fake/outer/boolean'; // ignore: prefer_final_locals - Object postBody = body; + Object? postBody = body; final queryParams = []; final headerParams = {}; @@ -167,7 +160,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -178,7 +171,7 @@ class FakeApi { /// /// * [bool] body: /// Input boolean as post body - Future fakeOuterBooleanSerialize({ bool body, }) async { + Future fakeOuterBooleanSerialize({ bool? body, }) async { final response = await fakeOuterBooleanSerializeWithHttpInfo( body: body, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -186,11 +179,11 @@ class FakeApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'bool',) as bool; } - return Future.value(); + return null; } /// Test serialization of object with outer number type @@ -201,14 +194,12 @@ class FakeApi { /// /// * [OuterComposite] outerComposite: /// Input composite as post body - Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite outerComposite, }) async { - // Verify required params are set. - + Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite? outerComposite, }) async { // ignore: prefer_const_declarations final path = r'/fake/outer/composite'; // ignore: prefer_final_locals - Object postBody = outerComposite; + Object? postBody = outerComposite; final queryParams = []; final headerParams = {}; @@ -225,7 +216,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -236,7 +227,7 @@ class FakeApi { /// /// * [OuterComposite] outerComposite: /// Input composite as post body - Future fakeOuterCompositeSerialize({ OuterComposite outerComposite, }) async { + Future fakeOuterCompositeSerialize({ OuterComposite? outerComposite, }) async { final response = await fakeOuterCompositeSerializeWithHttpInfo( outerComposite: outerComposite, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -244,11 +235,11 @@ class FakeApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OuterComposite',) as OuterComposite; } - return Future.value(); + return null; } /// Test serialization of outer number types @@ -259,14 +250,12 @@ class FakeApi { /// /// * [num] body: /// Input number as post body - Future fakeOuterNumberSerializeWithHttpInfo({ num body, }) async { - // Verify required params are set. - + Future fakeOuterNumberSerializeWithHttpInfo({ num? body, }) async { // ignore: prefer_const_declarations final path = r'/fake/outer/number'; // ignore: prefer_final_locals - Object postBody = body; + Object? postBody = body; final queryParams = []; final headerParams = {}; @@ -283,7 +272,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -294,7 +283,7 @@ class FakeApi { /// /// * [num] body: /// Input number as post body - Future fakeOuterNumberSerialize({ num body, }) async { + Future fakeOuterNumberSerialize({ num? body, }) async { final response = await fakeOuterNumberSerializeWithHttpInfo( body: body, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -302,11 +291,11 @@ class FakeApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'num',) as num; } - return Future.value(); + return null; } /// Test serialization of outer string types @@ -317,14 +306,12 @@ class FakeApi { /// /// * [String] body: /// Input string as post body - Future fakeOuterStringSerializeWithHttpInfo({ String body, }) async { - // Verify required params are set. - + Future fakeOuterStringSerializeWithHttpInfo({ String? body, }) async { // ignore: prefer_const_declarations final path = r'/fake/outer/string'; // ignore: prefer_final_locals - Object postBody = body; + Object? postBody = body; final queryParams = []; final headerParams = {}; @@ -341,7 +328,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -352,7 +339,7 @@ class FakeApi { /// /// * [String] body: /// Input string as post body - Future fakeOuterStringSerialize({ String body, }) async { + Future fakeOuterStringSerialize({ String? body, }) async { final response = await fakeOuterStringSerializeWithHttpInfo( body: body, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -360,11 +347,11 @@ class FakeApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; } - return Future.value(); + return null; } /// Test serialization of enum (int) properties with examples @@ -376,16 +363,11 @@ class FakeApi { /// * [OuterObjectWithEnumProperty] outerObjectWithEnumProperty (required): /// Input enum (int) as post body Future fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { - // Verify required params are set. - if (outerObjectWithEnumProperty == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: outerObjectWithEnumProperty'); - } - // ignore: prefer_const_declarations final path = r'/fake/property/enum-int'; // ignore: prefer_final_locals - Object postBody = outerObjectWithEnumProperty; + Object? postBody = outerObjectWithEnumProperty; final queryParams = []; final headerParams = {}; @@ -402,7 +384,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -413,7 +395,7 @@ class FakeApi { /// /// * [OuterObjectWithEnumProperty] outerObjectWithEnumProperty (required): /// Input enum (int) as post body - Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { + Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { final response = await fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -421,11 +403,11 @@ class FakeApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OuterObjectWithEnumProperty',) as OuterObjectWithEnumProperty; } - return Future.value(); + return null; } /// For this test, the body has to be a binary file. @@ -437,16 +419,11 @@ class FakeApi { /// * [MultipartFile] body (required): /// image to upload Future testBodyWithBinaryWithHttpInfo(MultipartFile body,) async { - // Verify required params are set. - if (body == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: body'); - } - // ignore: prefer_const_declarations final path = r'/fake/body-with-binary'; // ignore: prefer_final_locals - Object postBody = body; + Object? postBody = body; final queryParams = []; final headerParams = {}; @@ -463,7 +440,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -489,16 +466,11 @@ class FakeApi { /// /// * [FileSchemaTestClass] fileSchemaTestClass (required): Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass,) async { - // Verify required params are set. - if (fileSchemaTestClass == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: fileSchemaTestClass'); - } - // ignore: prefer_const_declarations final path = r'/fake/body-with-file-schema'; // ignore: prefer_final_locals - Object postBody = fileSchemaTestClass; + Object? postBody = fileSchemaTestClass; final queryParams = []; final headerParams = {}; @@ -515,7 +487,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -539,25 +511,17 @@ class FakeApi { /// /// * [User] user (required): Future testBodyWithQueryParamsWithHttpInfo(String query, User user,) async { - // Verify required params are set. - if (query == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: query'); - } - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/fake/body-with-query-params'; // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('', 'query', query)); + queryParams.addAll(_queryParams('', 'query', query)); const authNames = []; const contentTypes = ['application/json']; @@ -570,7 +534,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -598,16 +562,11 @@ class FakeApi { /// * [ModelClient] modelClient (required): /// client model Future testClientModelWithHttpInfo(ModelClient modelClient,) async { - // Verify required params are set. - if (modelClient == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); - } - // ignore: prefer_const_declarations final path = r'/fake'; // ignore: prefer_final_locals - Object postBody = modelClient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -624,7 +583,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -637,7 +596,7 @@ class FakeApi { /// /// * [ModelClient] modelClient (required): /// client model - Future testClientModel(ModelClient modelClient,) async { + Future testClientModel(ModelClient modelClient,) async { final response = await testClientModelWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -645,11 +604,11 @@ class FakeApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ModelClient',) as ModelClient; } - return Future.value(); + return null; } /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -701,26 +660,12 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, MultipartFile binary, DateTime date, DateTime dateTime, String password, String callback, }) async { - // Verify required params are set. - if (number == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: number'); - } - if (double_ == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: double_'); - } - if (patternWithoutDelimiter == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: patternWithoutDelimiter'); - } - if (byte == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: byte'); - } - + Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? dateTime, String? password, String? callback, }) async { // ignore: prefer_const_declarations final path = r'/fake'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -776,7 +721,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -828,7 +773,7 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, MultipartFile binary, DateTime date, DateTime dateTime, String password, String callback, }) async { + Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? dateTime, String? password, String? callback, }) async { final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -866,30 +811,28 @@ class FakeApi { /// /// * [String] enumFormString: /// Form parameter enum test (string) - Future testEnumParametersWithHttpInfo({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumFormStringArray, String enumFormString, }) async { - // Verify required params are set. - + Future testEnumParametersWithHttpInfo({ List? enumHeaderStringArray, String? enumHeaderString, List? enumQueryStringArray, String? enumQueryString, int? enumQueryInteger, double? enumQueryDouble, List? enumFormStringArray, String? enumFormString, }) async { // ignore: prefer_const_declarations final path = r'/fake'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; if (enumQueryStringArray != null) { - queryParams.addAll(_convertParametersForCollectionFormat('multi', 'enum_query_string_array', enumQueryStringArray)); + queryParams.addAll(_queryParams('multi', 'enum_query_string_array', enumQueryStringArray)); } if (enumQueryString != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'enum_query_string', enumQueryString)); + queryParams.addAll(_queryParams('', 'enum_query_string', enumQueryString)); } if (enumQueryInteger != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'enum_query_integer', enumQueryInteger)); + queryParams.addAll(_queryParams('', 'enum_query_integer', enumQueryInteger)); } if (enumQueryDouble != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'enum_query_double', enumQueryDouble)); + queryParams.addAll(_queryParams('', 'enum_query_double', enumQueryDouble)); } if (enumHeaderStringArray != null) { @@ -916,7 +859,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -950,7 +893,7 @@ class FakeApi { /// /// * [String] enumFormString: /// Form parameter enum test (string) - Future testEnumParameters({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumFormStringArray, String enumFormString, }) async { + Future testEnumParameters({ List? enumHeaderStringArray, String? enumHeaderString, List? enumQueryStringArray, String? enumQueryString, int? enumQueryInteger, double? enumQueryDouble, List? enumFormStringArray, String? enumFormString, }) async { final response = await testEnumParametersWithHttpInfo( enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -982,35 +925,24 @@ class FakeApi { /// /// * [int] int64Group: /// Integer in group parameters - Future testGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group, }) async { - // Verify required params are set. - if (requiredStringGroup == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredStringGroup'); - } - if (requiredBooleanGroup == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredBooleanGroup'); - } - if (requiredInt64Group == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredInt64Group'); - } - + Future testGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int? stringGroup, bool? booleanGroup, int? int64Group, }) async { // ignore: prefer_const_declarations final path = r'/fake'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('', 'required_string_group', requiredStringGroup)); - queryParams.addAll(_convertParametersForCollectionFormat('', 'required_int64_group', requiredInt64Group)); + queryParams.addAll(_queryParams('', 'required_string_group', requiredStringGroup)); + queryParams.addAll(_queryParams('', 'required_int64_group', requiredInt64Group)); if (stringGroup != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'string_group', stringGroup)); + queryParams.addAll(_queryParams('', 'string_group', stringGroup)); } if (int64Group != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'int64_group', int64Group)); + queryParams.addAll(_queryParams('', 'int64_group', int64Group)); } headerParams[r'required_boolean_group'] = parameterToString(requiredBooleanGroup); @@ -1029,7 +961,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -1057,7 +989,7 @@ class FakeApi { /// /// * [int] int64Group: /// Integer in group parameters - Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group, }) async { + Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int? stringGroup, bool? booleanGroup, int? int64Group, }) async { final response = await testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -1073,16 +1005,11 @@ class FakeApi { /// * [Map] requestBody (required): /// request body Future testInlineAdditionalPropertiesWithHttpInfo(Map requestBody,) async { - // Verify required params are set. - if (requestBody == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: requestBody'); - } - // ignore: prefer_const_declarations final path = r'/fake/inline-additionalProperties'; // ignore: prefer_final_locals - Object postBody = requestBody; + Object? postBody = requestBody; final queryParams = []; final headerParams = {}; @@ -1099,7 +1026,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -1129,19 +1056,11 @@ class FakeApi { /// * [String] param2 (required): /// field2 Future testJsonFormDataWithHttpInfo(String param, String param2,) async { - // Verify required params are set. - if (param == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: param'); - } - if (param2 == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: param2'); - } - // ignore: prefer_const_declarations final path = r'/fake/jsonFormData'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -1164,7 +1083,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -1204,46 +1123,26 @@ class FakeApi { /// * [String] allowEmpty (required): /// /// * [Map] language: - Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map language, }) async { - // Verify required params are set. - if (pipe == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: pipe'); - } - if (ioutil == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: ioutil'); - } - if (http == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: http'); - } - if (url == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: url'); - } - if (context == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: context'); - } - if (allowEmpty == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: allowEmpty'); - } - + Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map? language, }) async { // ignore: prefer_const_declarations final path = r'/fake/test-query-parameters'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('pipes', 'pipe', pipe)); - queryParams.addAll(_convertParametersForCollectionFormat('csv', 'ioutil', ioutil)); - queryParams.addAll(_convertParametersForCollectionFormat('ssv', 'http', http)); - queryParams.addAll(_convertParametersForCollectionFormat('csv', 'url', url)); - queryParams.addAll(_convertParametersForCollectionFormat('multi', 'context', context)); + queryParams.addAll(_queryParams('pipes', 'pipe', pipe)); + queryParams.addAll(_queryParams('csv', 'ioutil', ioutil)); + queryParams.addAll(_queryParams('ssv', 'http', http)); + queryParams.addAll(_queryParams('csv', 'url', url)); + queryParams.addAll(_queryParams('multi', 'context', context)); if (language != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'language', language)); + queryParams.addAll(_queryParams('', 'language', language)); } - queryParams.addAll(_convertParametersForCollectionFormat('', 'allowEmpty', allowEmpty)); + queryParams.addAll(_queryParams('', 'allowEmpty', allowEmpty)); const authNames = []; const contentTypes = []; @@ -1256,7 +1155,7 @@ class FakeApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -1278,7 +1177,7 @@ class FakeApi { /// * [String] allowEmpty (required): /// /// * [Map] language: - Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map language, }) async { + Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map? language, }) async { final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language: language, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart index 8686e9e7bab5..158c127195bf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class FakeClassnameTags123Api { - FakeClassnameTags123Api([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + FakeClassnameTags123Api([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -27,16 +27,11 @@ class FakeClassnameTags123Api { /// * [ModelClient] modelClient (required): /// client model Future testClassnameWithHttpInfo(ModelClient modelClient,) async { - // Verify required params are set. - if (modelClient == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: modelClient'); - } - // ignore: prefer_const_declarations final path = r'/fake_classname_test'; // ignore: prefer_final_locals - Object postBody = modelClient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -53,7 +48,7 @@ class FakeClassnameTags123Api { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -66,7 +61,7 @@ class FakeClassnameTags123Api { /// /// * [ModelClient] modelClient (required): /// client model - Future testClassname(ModelClient modelClient,) async { + Future testClassname(ModelClient modelClient,) async { final response = await testClassnameWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -74,10 +69,10 @@ class FakeClassnameTags123Api { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ModelClient',) as ModelClient; } - return Future.value(); + return null; } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart index 8cfcf9eb9a09..a91754608983 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class PetApi { - PetApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + PetApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -25,16 +25,11 @@ class PetApi { /// * [Pet] pet (required): /// Pet object that needs to be added to the store Future addPetWithHttpInfo(Pet pet,) async { - // Verify required params are set. - if (pet == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); - } - // ignore: prefer_const_declarations final path = r'/pet'; // ignore: prefer_final_locals - Object postBody = pet; + Object? postBody = pet; final queryParams = []; final headerParams = {}; @@ -51,7 +46,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -79,18 +74,13 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petId, { String apiKey, }) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - + Future deletePetWithHttpInfo(int petId, { String? apiKey, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -111,7 +101,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -124,7 +114,7 @@ class PetApi { /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petId, { String apiKey, }) async { + Future deletePet(int petId, { String? apiKey, }) async { final response = await deletePetWithHttpInfo(petId, apiKey: apiKey, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -142,22 +132,17 @@ class PetApi { /// * [List] status (required): /// Status values that need to be considered for filter Future findPetsByStatusWithHttpInfo(List status,) async { - // Verify required params are set. - if (status == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: status'); - } - // ignore: prefer_const_declarations final path = r'/pet/findByStatus'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('csv', 'status', status)); + queryParams.addAll(_queryParams('csv', 'status', status)); const authNames = ['petstore_auth']; const contentTypes = []; @@ -170,7 +155,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -183,7 +168,7 @@ class PetApi { /// /// * [List] status (required): /// Status values that need to be considered for filter - Future> findPetsByStatus(List status,) async { + Future?> findPetsByStatus(List status,) async { final response = await findPetsByStatusWithHttpInfo(status,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -191,14 +176,14 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); return (await apiClient.deserializeAsync(responseBody, 'List') as List) .cast() - .toList(growable: false); + .toList(); } - return Future>.value(); + return null; } /// Finds Pets by tags @@ -212,22 +197,17 @@ class PetApi { /// * [Set] tags (required): /// Tags to filter by Future findPetsByTagsWithHttpInfo(Set tags,) async { - // Verify required params are set. - if (tags == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: tags'); - } - // ignore: prefer_const_declarations final path = r'/pet/findByTags'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('csv', 'tags', tags)); + queryParams.addAll(_queryParams('csv', 'tags', tags)); const authNames = ['petstore_auth']; const contentTypes = []; @@ -240,7 +220,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -253,7 +233,7 @@ class PetApi { /// /// * [Set] tags (required): /// Tags to filter by - Future> findPetsByTags(Set tags,) async { + Future?> findPetsByTags(Set tags,) async { final response = await findPetsByTagsWithHttpInfo(tags,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -261,14 +241,14 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); return (await apiClient.deserializeAsync(responseBody, 'Set') as List) .cast() .toSet(); } - return Future>.value(); + return null; } /// Find pet by ID @@ -282,17 +262,12 @@ class PetApi { /// * [int] petId (required): /// ID of pet to return Future getPetByIdWithHttpInfo(int petId,) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - // ignore: prefer_const_declarations final path = r'/pet/{petId}' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -309,7 +284,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -322,7 +297,7 @@ class PetApi { /// /// * [int] petId (required): /// ID of pet to return - Future getPetById(int petId,) async { + Future getPetById(int petId,) async { final response = await getPetByIdWithHttpInfo(petId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -330,11 +305,11 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Pet',) as Pet; } - return Future.value(); + return null; } /// Update an existing pet @@ -346,16 +321,11 @@ class PetApi { /// * [Pet] pet (required): /// Pet object that needs to be added to the store Future updatePetWithHttpInfo(Pet pet,) async { - // Verify required params are set. - if (pet == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: pet'); - } - // ignore: prefer_const_declarations final path = r'/pet'; // ignore: prefer_final_locals - Object postBody = pet; + Object? postBody = pet; final queryParams = []; final headerParams = {}; @@ -372,7 +342,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -404,18 +374,13 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petId, { String name, String status, }) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - + Future updatePetWithFormWithHttpInfo(int petId, { String? name, String? status, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -438,7 +403,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -455,7 +420,7 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petId, { String name, String status, }) async { + Future updatePetWithForm(int petId, { String? name, String? status, }) async { final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -476,18 +441,13 @@ class PetApi { /// /// * [MultipartFile] file: /// file to upload - Future uploadFileWithHttpInfo(int petId, { String additionalMetadata, MultipartFile file, }) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - + Future uploadFileWithHttpInfo(int petId, { String? additionalMetadata, MultipartFile? file, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}/uploadImage' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -518,7 +478,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -535,7 +495,7 @@ class PetApi { /// /// * [MultipartFile] file: /// file to upload - Future uploadFile(int petId, { String additionalMetadata, MultipartFile file, }) async { + Future uploadFile(int petId, { String? additionalMetadata, MultipartFile? file, }) async { final response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -543,11 +503,11 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiResponse',) as ApiResponse; } - return Future.value(); + return null; } /// uploads an image (required) @@ -564,21 +524,13 @@ class PetApi { /// /// * [String] additionalMetadata: /// Additional data to pass to server - Future uploadFileWithRequiredFileWithHttpInfo(int petId, MultipartFile requiredFile, { String additionalMetadata, }) async { - // Verify required params are set. - if (petId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: petId'); - } - if (requiredFile == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: requiredFile'); - } - + Future uploadFileWithRequiredFileWithHttpInfo(int petId, MultipartFile requiredFile, { String? additionalMetadata, }) async { // ignore: prefer_const_declarations final path = r'/fake/{petId}/uploadImageWithRequiredFile' .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -609,7 +561,7 @@ class PetApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -626,7 +578,7 @@ class PetApi { /// /// * [String] additionalMetadata: /// Additional data to pass to server - Future uploadFileWithRequiredFile(int petId, MultipartFile requiredFile, { String additionalMetadata, }) async { + Future uploadFileWithRequiredFile(int petId, MultipartFile requiredFile, { String? additionalMetadata, }) async { final response = await uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata: additionalMetadata, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -634,10 +586,10 @@ class PetApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiResponse',) as ApiResponse; } - return Future.value(); + return null; } } 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 121f16a9f90d..3cb580f1e197 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 @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class StoreApi { - StoreApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + StoreApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -27,17 +27,12 @@ class StoreApi { /// * [String] orderId (required): /// ID of the order that needs to be deleted Future deleteOrderWithHttpInfo(String orderId,) async { - // Verify required params are set. - if (orderId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); - } - // ignore: prefer_const_declarations final path = r'/store/order/{order_id}' .replaceAll('{order_id}', orderId); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -54,7 +49,7 @@ class StoreApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -84,7 +79,7 @@ class StoreApi { final path = r'/store/inventory'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -101,7 +96,7 @@ class StoreApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -109,7 +104,7 @@ class StoreApi { /// Returns pet inventories by status /// /// Returns a map of status codes to quantities - Future> getInventory() async { + Future?> getInventory() async { final response = await getInventoryWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -117,11 +112,11 @@ class StoreApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return Map.from(await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Map'),); } - return Future>.value(); + return null; } /// Find purchase order by ID @@ -135,17 +130,12 @@ class StoreApi { /// * [int] orderId (required): /// ID of pet that needs to be fetched Future getOrderByIdWithHttpInfo(int orderId,) async { - // Verify required params are set. - if (orderId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: orderId'); - } - // ignore: prefer_const_declarations final path = r'/store/order/{order_id}' .replaceAll('{order_id}', orderId.toString()); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -162,7 +152,7 @@ class StoreApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -175,7 +165,7 @@ class StoreApi { /// /// * [int] orderId (required): /// ID of pet that needs to be fetched - Future getOrderById(int orderId,) async { + Future getOrderById(int orderId,) async { final response = await getOrderByIdWithHttpInfo(orderId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -183,11 +173,11 @@ class StoreApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Order',) as Order; } - return Future.value(); + return null; } /// Place an order for a pet @@ -199,16 +189,11 @@ class StoreApi { /// * [Order] order (required): /// order placed for purchasing the pet Future placeOrderWithHttpInfo(Order order,) async { - // Verify required params are set. - if (order == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: order'); - } - // ignore: prefer_const_declarations final path = r'/store/order'; // ignore: prefer_final_locals - Object postBody = order; + Object? postBody = order; final queryParams = []; final headerParams = {}; @@ -225,7 +210,7 @@ class StoreApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -236,7 +221,7 @@ class StoreApi { /// /// * [Order] order (required): /// order placed for purchasing the pet - Future placeOrder(Order order,) async { + Future placeOrder(Order order,) async { final response = await placeOrderWithHttpInfo(order,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -244,10 +229,10 @@ class StoreApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Order',) as Order; } - return Future.value(); + return null; } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart index 9838b689d7a7..7cc0b7e18224 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/user_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -12,7 +12,7 @@ part of openapi.api; class UserApi { - UserApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + UserApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -27,16 +27,11 @@ class UserApi { /// * [User] user (required): /// Created user object Future createUserWithHttpInfo(User user,) async { - // Verify required params are set. - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/user'; // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; @@ -53,7 +48,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -82,16 +77,11 @@ class UserApi { /// * [List] user (required): /// List of user object Future createUsersWithArrayInputWithHttpInfo(List user,) async { - // Verify required params are set. - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/user/createWithArray'; // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; @@ -108,7 +98,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -135,16 +125,11 @@ class UserApi { /// * [List] user (required): /// List of user object Future createUsersWithListInputWithHttpInfo(List user,) async { - // Verify required params are set. - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/user/createWithList'; // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; @@ -161,7 +146,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -190,17 +175,12 @@ class UserApi { /// * [String] username (required): /// The name that needs to be deleted Future deleteUserWithHttpInfo(String username,) async { - // Verify required params are set. - if (username == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); - } - // ignore: prefer_const_declarations final path = r'/user/{username}' .replaceAll('{username}', username); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -217,7 +197,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -246,17 +226,12 @@ class UserApi { /// * [String] username (required): /// The name that needs to be fetched. Use user1 for testing. Future getUserByNameWithHttpInfo(String username,) async { - // Verify required params are set. - if (username == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); - } - // ignore: prefer_const_declarations final path = r'/user/{username}' .replaceAll('{username}', username); // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -273,7 +248,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -284,7 +259,7 @@ class UserApi { /// /// * [String] username (required): /// The name that needs to be fetched. Use user1 for testing. - Future getUserByName(String username,) async { + Future getUserByName(String username,) async { final response = await getUserByNameWithHttpInfo(username,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -292,11 +267,11 @@ class UserApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'User',) as User; } - return Future.value(); + return null; } /// Logs user into the system @@ -311,26 +286,18 @@ class UserApi { /// * [String] password (required): /// The password for login in clear text Future loginUserWithHttpInfo(String username, String password,) async { - // Verify required params are set. - if (username == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); - } - if (password == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: password'); - } - // ignore: prefer_const_declarations final path = r'/user/login'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat('', 'username', username)); - queryParams.addAll(_convertParametersForCollectionFormat('', 'password', password)); + queryParams.addAll(_queryParams('', 'username', username)); + queryParams.addAll(_queryParams('', 'password', password)); const authNames = []; const contentTypes = []; @@ -343,7 +310,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -357,7 +324,7 @@ class UserApi { /// /// * [String] password (required): /// The password for login in clear text - Future loginUser(String username, String password,) async { + Future loginUser(String username, String password,) async { final response = await loginUserWithHttpInfo(username, password,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -365,11 +332,11 @@ class UserApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body != null && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; } - return Future.value(); + return null; } /// Logs out current logged in user session @@ -380,7 +347,7 @@ class UserApi { final path = r'/user/logout'; // ignore: prefer_final_locals - Object postBody; + Object? postBody; final queryParams = []; final headerParams = {}; @@ -397,7 +364,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } @@ -424,20 +391,12 @@ class UserApi { /// * [User] user (required): /// Updated user object Future updateUserWithHttpInfo(String username, User user,) async { - // Verify required params are set. - if (username == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: username'); - } - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - // ignore: prefer_const_declarations final path = r'/user/{username}' .replaceAll('{username}', username); // ignore: prefer_final_locals - Object postBody = user; + Object? postBody = user; final queryParams = []; final headerParams = {}; @@ -454,7 +413,7 @@ class UserApi { postBody, headerParams, formParams, - contentTypes.isEmpty ? null : contentTypes[0], + contentTypes.isEmpty ? null : contentTypes.first, authNames, ); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart index d3c64b9adc3c..8277ac92e7ca 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -30,12 +30,7 @@ class ApiClient { Client get client => _client; /// Requests to use a new HTTP [Client] in this class. - /// - /// If the [newClient] is null, an [ArgumentError] is thrown. set client(Client newClient) { - if (newClient == null) { - throw ArgumentError('New client instance cannot be null.'); - } _client = newClient; } @@ -52,7 +47,7 @@ class ApiClient { /// or deleted. Map get authentications => Map.unmodifiable(_authentications); - T getAuthentication(String name) { + T? getAuthentication(String name) { final authentication = _authentications[name]; return authentication is T ? authentication : null; } @@ -63,35 +58,28 @@ class ApiClient { String path, String method, List queryParams, - Object body, + Object? body, Map headerParams, Map formParams, - String nullableContentType, + String? contentType, List authNames, ) async { _updateParamsForAuth(authNames, queryParams, headerParams); headerParams.addAll(_defaultHeaderMap); + if (contentType != null) { + headerParams['Content-Type'] = contentType; + } - final urlEncodedQueryParams = queryParams - .where((param) => param.value != null) - .map((param) => '$param'); - - final queryString = urlEncodedQueryParams.isNotEmpty - ? '?${urlEncodedQueryParams.join('&')}' - : ''; - + final urlEncodedQueryParams = queryParams.map((param) => '$param'); + final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; final uri = Uri.parse('$basePath$path$queryString'); - if (nullableContentType != null) { - headerParams['Content-Type'] = nullableContentType; - } - try { // Special case for uploading a single file which isn't a 'multipart/form-data'. if ( - body is MultipartFile && (nullableContentType == null || - !nullableContentType.toLowerCase().startsWith('multipart/form-data')) + body is MultipartFile && (contentType == null || + !contentType.toLowerCase().startsWith('multipart/form-data')) ) { final request = StreamedRequest(method, uri); request.headers.addAll(headerParams); @@ -117,7 +105,7 @@ class ApiClient { return Response.fromStream(response); } - final msgBody = nullableContentType == 'application/x-www-form-urlencoded' + final msgBody = contentType == 'application/x-www-form-urlencoded' ? formParams : await serializeAsync(body); final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; @@ -130,41 +118,69 @@ class ApiClient { case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,); case 'GET': return await _client.get(uri, headers: nullableHeaderParams,); } - } on SocketException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'Socket operation failed: $method $path', e, trace,); - } on TlsException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'TLS/SSL communication failed: $method $path', e, trace,); - } on IOException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'I/O operation failed: $method $path', e, trace,); - } on ClientException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'HTTP connection failed: $method $path', e, trace,); - } on Exception catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'Exception occurred: $method $path', e, trace,); + } on SocketException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Socket operation failed: $method $path', + error, + trace, + ); + } on TlsException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'TLS/SSL communication failed: $method $path', + error, + trace, + ); + } on IOException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'I/O operation failed: $method $path', + error, + trace, + ); + } on ClientException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'HTTP connection failed: $method $path', + error, + trace, + ); + } on Exception catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Exception occurred: $method $path', + error, + trace, + ); } - throw ApiException(HttpStatus.badRequest, 'Invalid HTTP operation: $method $path',); + throw ApiException( + HttpStatus.badRequest, + 'Invalid HTTP operation: $method $path', + ); } - Future deserializeAsync(String json, String targetType, {bool growable}) async => + Future deserializeAsync(String json, String targetType, {bool growable = false,}) async => // ignore: deprecated_member_use_from_same_package deserialize(json, targetType, growable: growable); @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') - dynamic deserialize(String json, String targetType, {bool growable}) { + dynamic deserialize(String json, String targetType, {bool growable = false,}) { // Remove all spaces. Necessary for regular expressions as well. targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments // If the expected target type is String, nothing to do... return targetType == 'String' ? json - : _deserialize(jsonDecode(json), targetType, growable: growable == true); + : _deserialize(jsonDecode(json), targetType, growable: growable); } // ignore: deprecated_member_use_from_same_package - Future serializeAsync(Object value) async => serialize(value); + Future serializeAsync(Object? value) async => serialize(value); @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') - String serialize(Object value) => value == null ? '' : json.encode(value); + String serialize(Object? value) => value == null ? '' : json.encode(value); /// Update query and header parameters based on authentication settings. /// @param authNames The authentications to apply @@ -182,7 +198,7 @@ class ApiClient { } } - static dynamic _deserialize(dynamic value, String targetType, {bool growable}) { + static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) { try { switch (targetType) { case 'String': @@ -290,24 +306,21 @@ class ApiClient { case 'User': return User.fromJson(value); default: - Match match; - if (value is List && (match = _regList.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + dynamic match; + if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, targetType, growable: growable)) + .map((dynamic v) => _deserialize(v, match, growable: growable,)) .toList(growable: growable); } - if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, targetType, growable: growable)) + .map((dynamic v) => _deserialize(v, match, growable: growable,)) .toSet(); } - if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { - targetType = match[1]; // ignore: parameter_assignments + if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { return Map.fromIterables( value.keys.cast(), - value.values.map((dynamic v) => _deserialize(v, targetType, growable: growable)), + value.values.map((dynamic v) => _deserialize(v, match, growable: growable,)), ); } } @@ -321,9 +334,9 @@ class ApiClient { /// Primarily intended for use in an isolate. class DeserializationMessage { const DeserializationMessage({ - @required this.json, - @required this.targetType, - this.growable, + required this.json, + required this.targetType, + this.growable = false, }); /// The JSON value to deserialize. @@ -347,9 +360,9 @@ Future deserializeAsync(DeserializationMessage message) async { : ApiClient._deserialize( jsonDecode(message.json), targetType, - growable: message.growable == true, + growable: message.growable, ); } /// Primarily intended for use in an isolate. -Future serializeAsync(Object value) async => value == null ? '' : json.encode(value); +Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_exception.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_exception.dart index 8ffc340b4c9d..796f7f7ee74e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_exception.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_exception.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,9 +16,9 @@ class ApiException implements Exception { ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); int code = 0; - String message; - Exception innerException; - StackTrace stackTrace; + String? message; + Exception? innerException; + StackTrace? stackTrace; @override String toString() { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_helper.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_helper.dart index bdb7b1fc166a..1aaf1dae8eb3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_helper.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_helper.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,32 +21,27 @@ class QueryParam { } // Ported from the Java version. -Iterable _convertParametersForCollectionFormat( - String collectionFormat, - String name, - dynamic value, -) { +Iterable _queryParams(String collectionFormat, String name, dynamic value,) { + // Assertions to run in debug mode only. + assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); + final params = []; - // preconditions - if (name != null && name.isNotEmpty && value != null) { - if (value is List) { - if (collectionFormat == 'multi') { - return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); - } + if (value is List) { + if (collectionFormat == 'multi') { + return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); + } - // Default collection format is 'csv'. - if (collectionFormat == null || collectionFormat.isEmpty) { - // ignore: parameter_assignments - collectionFormat = 'csv'; - } + // Default collection format is 'csv'. + if (collectionFormat.isEmpty) { + collectionFormat = 'csv'; // ignore: parameter_assignments + } - final delimiter = _delimiters[collectionFormat] ?? ','; + final delimiter = _delimiters[collectionFormat] ?? ','; - params.add(QueryParam(name, value.map(parameterToString).join(delimiter)),); - } else { - params.add(QueryParam(name, parameterToString(value),)); - } + params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); + } else if (value != null) { + params.add(QueryParam(name, parameterToString(value))); } return params; @@ -83,27 +78,27 @@ String parameterToString(dynamic value) { Future _decodeBodyBytes(Response response) async { final contentType = response.headers['content-type']; return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes == null ? null : utf8.decode(response.bodyBytes) + ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) : response.body; } /// Returns a valid [T] value found at the specified Map [key], null otherwise. -T mapValueOfType(dynamic map, String key) { +T? mapValueOfType(dynamic map, String key) { final dynamic value = map is Map ? map[key] : null; return value is T ? value : null; } /// Returns a valid Map found at the specified Map [key], null otherwise. -Map mapCastOfType(dynamic map, String key) { +Map? mapCastOfType(dynamic map, String key) { final dynamic value = map is Map ? map[key] : null; return value is Map ? value.cast() : null; } /// Returns a valid [DateTime] found at the specified Map [key], null otherwise. -DateTime mapDateTime(dynamic map, String key, [String pattern]) { +DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { final dynamic value = map is Map ? map[key] : null; if (value != null) { - int millis; + int? millis; if (value is int) { millis = value; } else if (value is String) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart index 0c2303af09e9..e304eda321ee 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,23 +16,25 @@ class ApiKeyAuth implements Authentication { final String location; final String paramName; - String apiKeyPrefix; - String apiKey; + String apiKeyPrefix = ''; + String apiKey = ''; @override void applyToParams(List queryParams, Map headerParams) { - final value = apiKeyPrefix == null ? apiKey : '$apiKeyPrefix $apiKey'; + final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; - if (location == 'query' && value != null) { - queryParams.add(QueryParam(paramName, value)); - } else if (location == 'header' && value != null) { - headerParams[paramName] = value; - } else if (location == 'cookie' && value != null) { - headerParams.update( - 'Cookie', - (existingCookie) => '$existingCookie; $paramName=$value', - ifAbsent: () => '$paramName=$value', - ); + if (paramValue.isNotEmpty) { + if (location == 'query') { + queryParams.add(QueryParam(paramName, paramValue)); + } else if (location == 'header') { + headerParams[paramName] = paramValue; + } else if (location == 'cookie') { + headerParams.update( + 'Cookie', + (existingCookie) => '$existingCookie; $paramName=$paramValue', + ifAbsent: () => '$paramName=$paramValue', + ); + } } } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/authentication.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/authentication.dart index 4257e1900069..49baf7c46a9c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/authentication.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/authentication.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_basic_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_basic_auth.dart index 0494f402d958..81abd7185f2d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_basic_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_basic_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -11,12 +11,16 @@ part of openapi.api; class HttpBasicAuth implements Authentication { + HttpBasicAuth({this.username = '', this.password = ''}); + String username; String password; @override void applyToParams(List queryParams, Map headerParams) { - final credentials = '${username ?? ''}:${password ?? ''}'; - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + if (username.isNotEmpty && password.isNotEmpty) { + final credentials = '$username:$password'; + headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + } } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_bearer_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_bearer_auth.dart index 23e243523dd8..213f3483b8fb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_bearer_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_bearer_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,19 +21,29 @@ class HttpBearerAuth implements Authentication { set accessToken(dynamic accessToken) { if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().'); + throw ArgumentError('accessToken value must be either a String or a String Function().'); } _accessToken = accessToken; } @override void applyToParams(List queryParams, Map headerParams) { + if (_accessToken == null) { + return; + } + + String accessToken; + if (_accessToken is String) { - headerParams['Authorization'] = 'Bearer $_accessToken'; + accessToken = _accessToken; } else if (_accessToken is HttpBearerAuthProvider) { - headerParams['Authorization'] = 'Bearer ${_accessToken()}'; + accessToken = _accessToken!(); } else { - throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().'); + return; + } + + if (accessToken.isNotEmpty) { + headerParams['Authorization'] = 'Bearer $accessToken'; } } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/oauth.dart index 9299ac13f5bf..e9b87cffb052 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/oauth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/oauth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -11,13 +11,13 @@ part of openapi.api; class OAuth implements Authentication { - OAuth({this.accessToken}); + OAuth({this.accessToken = ''}); String accessToken; @override void applyToParams(List queryParams, Map headerParams) { - if (accessToken != null) { + if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart index dc1f488f0b22..e82b8265bf59 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/additional_properties_class.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -28,68 +28,90 @@ class AdditionalPropertiesClass { @override int get hashCode => - // ignore: unnecessary_parenthesis - (mapProperty == null ? 0 : mapProperty.hashCode) + - (mapOfMapProperty == null ? 0 : mapOfMapProperty.hashCode); + // ignore: unnecessary_parenthesis + (mapProperty.hashCode) + + (mapOfMapProperty.hashCode); @override String toString() => 'AdditionalPropertiesClass[mapProperty=$mapProperty, mapOfMapProperty=$mapOfMapProperty]'; Map toJson() { final json = {}; - if (mapProperty != null) { json[r'map_property'] = mapProperty; - } - if (mapOfMapProperty != null) { json[r'map_of_map_property'] = mapOfMapProperty; - } return json; } /// Returns a new [AdditionalPropertiesClass] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static AdditionalPropertiesClass fromJson(dynamic value) { + static AdditionalPropertiesClass? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AdditionalPropertiesClass[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AdditionalPropertiesClass[$key]" has a null value in JSON.'); + }); + return true; + }()); + return AdditionalPropertiesClass( - mapProperty: mapCastOfType(json, r'map_property'), - mapOfMapProperty: mapCastOfType(json, r'map_of_map_property'), + mapProperty: mapCastOfType(json, r'map_property') ?? const {}, + mapOfMapProperty: mapCastOfType(json, r'map_of_map_property') ?? const {}, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(AdditionalPropertiesClass.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AdditionalPropertiesClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = AdditionalPropertiesClass.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AdditionalPropertiesClass.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of AdditionalPropertiesClass-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = AdditionalPropertiesClass.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AdditionalPropertiesClass.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart index d138a87c008b..2d279e07c494 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,7 +13,7 @@ part of openapi.api; class Animal { /// Returns a new [Animal] instance. Animal({ - @required this.className, + required this.className, this.color = 'red', }); @@ -28,9 +28,9 @@ class Animal { @override int get hashCode => - // ignore: unnecessary_parenthesis - (className == null ? 0 : className.hashCode) + - (color == null ? 0 : color.hashCode); + // ignore: unnecessary_parenthesis + (className.hashCode) + + (color.hashCode); @override String toString() => 'Animal[className=$className, color=$color]'; @@ -38,56 +38,81 @@ class Animal { Map toJson() { final json = {}; json[r'className'] = className; - if (color != null) { json[r'color'] = color; - } return json; } /// Returns a new [Animal] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Animal fromJson(dynamic value) { + static Animal? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Animal[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Animal[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Animal( - className: mapValueOfType(json, r'className'), - color: mapValueOfType(json, r'color'), + className: mapValueOfType(json, r'className')!, + color: mapValueOfType(json, r'color') ?? 'red', ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Animal.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Animal.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Animal.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Animal.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Animal-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Animal.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Animal.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'className', + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart index bfd43366211f..6042baea5514 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/api_response.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -18,11 +18,29 @@ class ApiResponse { this.message, }); - int code; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? code; - String type; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? type; - String message; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? message; @override bool operator ==(Object other) => identical(this, other) || other is ApiResponse && @@ -32,10 +50,10 @@ class ApiResponse { @override int get hashCode => - // ignore: unnecessary_parenthesis - (code == null ? 0 : code.hashCode) + - (type == null ? 0 : type.hashCode) + - (message == null ? 0 : message.hashCode); + // ignore: unnecessary_parenthesis + (code == null ? 0 : code!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (message == null ? 0 : message!.hashCode); @override String toString() => 'ApiResponse[code=$code, type=$type, message=$message]'; @@ -57,9 +75,21 @@ class ApiResponse { /// Returns a new [ApiResponse] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ApiResponse fromJson(dynamic value) { + static ApiResponse? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ApiResponse[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ApiResponse[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ApiResponse( code: mapValueOfType(json, r'code'), type: mapValueOfType(json, r'type'), @@ -69,36 +99,50 @@ class ApiResponse { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ApiResponse.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ApiResponse.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ApiResponse.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ApiResponse.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ApiResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ApiResponse.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ApiResponse.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart index 5525cd19379d..4314803a3ba5 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -24,67 +24,91 @@ class ArrayOfArrayOfNumberOnly { @override int get hashCode => - // ignore: unnecessary_parenthesis - (arrayArrayNumber == null ? 0 : arrayArrayNumber.hashCode); + // ignore: unnecessary_parenthesis + (arrayArrayNumber.hashCode); @override String toString() => 'ArrayOfArrayOfNumberOnly[arrayArrayNumber=$arrayArrayNumber]'; Map toJson() { final json = {}; - if (arrayArrayNumber != null) { json[r'ArrayArrayNumber'] = arrayArrayNumber; - } return json; } /// Returns a new [ArrayOfArrayOfNumberOnly] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ArrayOfArrayOfNumberOnly fromJson(dynamic value) { + static ArrayOfArrayOfNumberOnly? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ArrayOfArrayOfNumberOnly[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ArrayOfArrayOfNumberOnly[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ArrayOfArrayOfNumberOnly( arrayArrayNumber: json[r'ArrayArrayNumber'] is List ? (json[r'ArrayArrayNumber'] as List).map( (e) => e == null ? null : (e as List).cast() - ).toList(growable: false) + ).toList() : null, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ArrayOfArrayOfNumberOnly.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ArrayOfArrayOfNumberOnly.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ArrayOfArrayOfNumberOnly.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayOfArrayOfNumberOnly.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ArrayOfArrayOfNumberOnly-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ArrayOfArrayOfNumberOnly.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayOfArrayOfNumberOnly.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart index 1e23c3ad2d30..8e9d6784f804 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -24,65 +24,89 @@ class ArrayOfNumberOnly { @override int get hashCode => - // ignore: unnecessary_parenthesis - (arrayNumber == null ? 0 : arrayNumber.hashCode); + // ignore: unnecessary_parenthesis + (arrayNumber.hashCode); @override String toString() => 'ArrayOfNumberOnly[arrayNumber=$arrayNumber]'; Map toJson() { final json = {}; - if (arrayNumber != null) { json[r'ArrayNumber'] = arrayNumber; - } return json; } /// Returns a new [ArrayOfNumberOnly] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ArrayOfNumberOnly fromJson(dynamic value) { + static ArrayOfNumberOnly? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ArrayOfNumberOnly[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ArrayOfNumberOnly[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ArrayOfNumberOnly( arrayNumber: json[r'ArrayNumber'] is List - ? (json[r'ArrayNumber'] as List).cast() - : null, + ? (json[r'ArrayNumber'] as List).cast() + : const [], ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ArrayOfNumberOnly.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ArrayOfNumberOnly.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ArrayOfNumberOnly.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayOfNumberOnly.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ArrayOfNumberOnly-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ArrayOfNumberOnly.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayOfNumberOnly.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart index 6ae2096a5650..a914c04ee52a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_test.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -32,83 +32,103 @@ class ArrayTest { @override int get hashCode => - // ignore: unnecessary_parenthesis - (arrayOfString == null ? 0 : arrayOfString.hashCode) + - (arrayArrayOfInteger == null ? 0 : arrayArrayOfInteger.hashCode) + - (arrayArrayOfModel == null ? 0 : arrayArrayOfModel.hashCode); + // ignore: unnecessary_parenthesis + (arrayOfString.hashCode) + + (arrayArrayOfInteger.hashCode) + + (arrayArrayOfModel.hashCode); @override String toString() => 'ArrayTest[arrayOfString=$arrayOfString, arrayArrayOfInteger=$arrayArrayOfInteger, arrayArrayOfModel=$arrayArrayOfModel]'; Map toJson() { final json = {}; - if (arrayOfString != null) { json[r'array_of_string'] = arrayOfString; - } - if (arrayArrayOfInteger != null) { json[r'array_array_of_integer'] = arrayArrayOfInteger; - } - if (arrayArrayOfModel != null) { json[r'array_array_of_model'] = arrayArrayOfModel; - } return json; } /// Returns a new [ArrayTest] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ArrayTest fromJson(dynamic value) { + static ArrayTest? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ArrayTest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ArrayTest[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ArrayTest( arrayOfString: json[r'array_of_string'] is List - ? (json[r'array_of_string'] as List).cast() - : null, + ? (json[r'array_of_string'] as List).cast() + : const [], arrayArrayOfInteger: json[r'array_array_of_integer'] is List ? (json[r'array_array_of_integer'] as List).map( (e) => e == null ? null : (e as List).cast() - ).toList(growable: false) + ).toList() : null, arrayArrayOfModel: json[r'array_array_of_model'] is List ? (json[r'array_array_of_model'] as List).map( ReadOnlyFirst.listFromJson(json[r'array_array_of_model']) - ).toList(growable: false) + ).toList() : null, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ArrayTest.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ArrayTest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ArrayTest.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayTest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ArrayTest-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ArrayTest.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayTest.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart index 678bc6f2ea84..3e781d44c727 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,18 +21,54 @@ class Capitalization { this.ATT_NAME, }); - String smallCamel; - - String capitalCamel; - - String smallSnake; - - String capitalSnake; - - String sCAETHFlowPoints; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? smallCamel; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? capitalCamel; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? smallSnake; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? capitalSnake; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? sCAETHFlowPoints; /// Name of the pet - String ATT_NAME; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? ATT_NAME; @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && @@ -45,13 +81,13 @@ class Capitalization { @override int get hashCode => - // ignore: unnecessary_parenthesis - (smallCamel == null ? 0 : smallCamel.hashCode) + - (capitalCamel == null ? 0 : capitalCamel.hashCode) + - (smallSnake == null ? 0 : smallSnake.hashCode) + - (capitalSnake == null ? 0 : capitalSnake.hashCode) + - (sCAETHFlowPoints == null ? 0 : sCAETHFlowPoints.hashCode) + - (ATT_NAME == null ? 0 : ATT_NAME.hashCode); + // ignore: unnecessary_parenthesis + (smallCamel == null ? 0 : smallCamel!.hashCode) + + (capitalCamel == null ? 0 : capitalCamel!.hashCode) + + (smallSnake == null ? 0 : smallSnake!.hashCode) + + (capitalSnake == null ? 0 : capitalSnake!.hashCode) + + (sCAETHFlowPoints == null ? 0 : sCAETHFlowPoints!.hashCode) + + (ATT_NAME == null ? 0 : ATT_NAME!.hashCode); @override String toString() => 'Capitalization[smallCamel=$smallCamel, capitalCamel=$capitalCamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, sCAETHFlowPoints=$sCAETHFlowPoints, ATT_NAME=$ATT_NAME]'; @@ -82,9 +118,21 @@ class Capitalization { /// Returns a new [Capitalization] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Capitalization fromJson(dynamic value) { + static Capitalization? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Capitalization[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Capitalization[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Capitalization( smallCamel: mapValueOfType(json, r'smallCamel'), capitalCamel: mapValueOfType(json, r'CapitalCamel'), @@ -97,36 +145,50 @@ class Capitalization { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Capitalization.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Capitalization.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Capitalization.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Capitalization.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Capitalization-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Capitalization.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Capitalization.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart index b34fdc7d9a29..f5b639d8e342 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,7 +13,7 @@ part of openapi.api; class Cat { /// Returns a new [Cat] instance. Cat({ - @required this.className, + required this.className, this.color = 'red', this.declawed, }); @@ -22,7 +22,13 @@ class Cat { String color; - bool declawed; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? declawed; @override bool operator ==(Object other) => identical(this, other) || other is Cat && @@ -32,10 +38,10 @@ class Cat { @override int get hashCode => - // ignore: unnecessary_parenthesis - (className == null ? 0 : className.hashCode) + - (color == null ? 0 : color.hashCode) + - (declawed == null ? 0 : declawed.hashCode); + // ignore: unnecessary_parenthesis + (className.hashCode) + + (color.hashCode) + + (declawed == null ? 0 : declawed!.hashCode); @override String toString() => 'Cat[className=$className, color=$color, declawed=$declawed]'; @@ -43,9 +49,7 @@ class Cat { Map toJson() { final json = {}; json[r'className'] = className; - if (color != null) { json[r'color'] = color; - } if (declawed != null) { json[r'declawed'] = declawed; } @@ -55,48 +59,75 @@ class Cat { /// Returns a new [Cat] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Cat fromJson(dynamic value) { + static Cat? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Cat[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Cat[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Cat( - className: mapValueOfType(json, r'className'), - color: mapValueOfType(json, r'color'), + className: mapValueOfType(json, r'className')!, + color: mapValueOfType(json, r'color') ?? 'red', declawed: mapValueOfType(json, r'declawed'), ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Cat.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Cat.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Cat.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Cat.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Cat-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Cat.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Cat.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'className', + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart index 97bbde44213c..608082b26ad7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class CatAllOf { this.declawed, }); - bool declawed; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? declawed; @override bool operator ==(Object other) => identical(this, other) || other is CatAllOf && @@ -24,8 +30,8 @@ class CatAllOf { @override int get hashCode => - // ignore: unnecessary_parenthesis - (declawed == null ? 0 : declawed.hashCode); + // ignore: unnecessary_parenthesis + (declawed == null ? 0 : declawed!.hashCode); @override String toString() => 'CatAllOf[declawed=$declawed]'; @@ -41,9 +47,21 @@ class CatAllOf { /// Returns a new [CatAllOf] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static CatAllOf fromJson(dynamic value) { + static CatAllOf? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CatAllOf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CatAllOf[$key]" has a null value in JSON.'); + }); + return true; + }()); + return CatAllOf( declawed: mapValueOfType(json, r'declawed'), ); @@ -51,36 +69,50 @@ class CatAllOf { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(CatAllOf.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CatAllOf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = CatAllOf.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CatAllOf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of CatAllOf-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = CatAllOf.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CatAllOf.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart index 294c4f57e9c8..9b77fed5e7cb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/category.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,7 +17,13 @@ class Category { this.name = 'default-name', }); - int id; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; String name; @@ -28,9 +34,9 @@ class Category { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (name == null ? 0 : name.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name.hashCode); @override String toString() => 'Category[id=$id, name=$name]'; @@ -47,47 +53,74 @@ class Category { /// Returns a new [Category] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Category fromJson(dynamic value) { + static Category? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Category[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Category[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Category( id: mapValueOfType(json, r'id'), - name: mapValueOfType(json, r'name'), + name: mapValueOfType(json, r'name')!, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Category.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Category.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Category.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Category.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Category-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Category.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Category.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart index 4736fb60ca8e..8335e5810968 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/class_model.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class ClassModel { this.class_, }); - String class_; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? class_; @override bool operator ==(Object other) => identical(this, other) || other is ClassModel && @@ -24,8 +30,8 @@ class ClassModel { @override int get hashCode => - // ignore: unnecessary_parenthesis - (class_ == null ? 0 : class_.hashCode); + // ignore: unnecessary_parenthesis + (class_ == null ? 0 : class_!.hashCode); @override String toString() => 'ClassModel[class_=$class_]'; @@ -41,9 +47,21 @@ class ClassModel { /// Returns a new [ClassModel] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ClassModel fromJson(dynamic value) { + static ClassModel? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ClassModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ClassModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ClassModel( class_: mapValueOfType(json, r'_class'), ); @@ -51,36 +69,50 @@ class ClassModel { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ClassModel.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ClassModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ClassModel.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ClassModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ClassModel-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ClassModel.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ClassModel.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart index a84c7155c8ad..b8a5b443cc7e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/deprecated_object.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class DeprecatedObject { this.name, }); - String name; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; @override bool operator ==(Object other) => identical(this, other) || other is DeprecatedObject && @@ -24,8 +30,8 @@ class DeprecatedObject { @override int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name.hashCode); + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode); @override String toString() => 'DeprecatedObject[name=$name]'; @@ -41,9 +47,21 @@ class DeprecatedObject { /// Returns a new [DeprecatedObject] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static DeprecatedObject fromJson(dynamic value) { + static DeprecatedObject? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DeprecatedObject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DeprecatedObject[$key]" has a null value in JSON.'); + }); + return true; + }()); + return DeprecatedObject( name: mapValueOfType(json, r'name'), ); @@ -51,36 +69,50 @@ class DeprecatedObject { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(DeprecatedObject.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DeprecatedObject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = DeprecatedObject.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DeprecatedObject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of DeprecatedObject-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = DeprecatedObject.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DeprecatedObject.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart index 68d592bef451..8ec20b96c81a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,7 +13,7 @@ part of openapi.api; class Dog { /// Returns a new [Dog] instance. Dog({ - @required this.className, + required this.className, this.color = 'red', this.breed, }); @@ -22,7 +22,13 @@ class Dog { String color; - String breed; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? breed; @override bool operator ==(Object other) => identical(this, other) || other is Dog && @@ -32,10 +38,10 @@ class Dog { @override int get hashCode => - // ignore: unnecessary_parenthesis - (className == null ? 0 : className.hashCode) + - (color == null ? 0 : color.hashCode) + - (breed == null ? 0 : breed.hashCode); + // ignore: unnecessary_parenthesis + (className.hashCode) + + (color.hashCode) + + (breed == null ? 0 : breed!.hashCode); @override String toString() => 'Dog[className=$className, color=$color, breed=$breed]'; @@ -43,9 +49,7 @@ class Dog { Map toJson() { final json = {}; json[r'className'] = className; - if (color != null) { json[r'color'] = color; - } if (breed != null) { json[r'breed'] = breed; } @@ -55,48 +59,75 @@ class Dog { /// Returns a new [Dog] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Dog fromJson(dynamic value) { + static Dog? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Dog[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Dog[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Dog( - className: mapValueOfType(json, r'className'), - color: mapValueOfType(json, r'color'), + className: mapValueOfType(json, r'className')!, + color: mapValueOfType(json, r'color') ?? 'red', breed: mapValueOfType(json, r'breed'), ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Dog.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Dog.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Dog.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Dog.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Dog-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Dog.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Dog.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'className', + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart index a4e2559cd668..03d52a6cb2f9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class DogAllOf { this.breed, }); - String breed; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? breed; @override bool operator ==(Object other) => identical(this, other) || other is DogAllOf && @@ -24,8 +30,8 @@ class DogAllOf { @override int get hashCode => - // ignore: unnecessary_parenthesis - (breed == null ? 0 : breed.hashCode); + // ignore: unnecessary_parenthesis + (breed == null ? 0 : breed!.hashCode); @override String toString() => 'DogAllOf[breed=$breed]'; @@ -41,9 +47,21 @@ class DogAllOf { /// Returns a new [DogAllOf] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static DogAllOf fromJson(dynamic value) { + static DogAllOf? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DogAllOf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DogAllOf[$key]" has a null value in JSON.'); + }); + return true; + }()); + return DogAllOf( breed: mapValueOfType(json, r'breed'), ); @@ -51,36 +69,50 @@ class DogAllOf { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(DogAllOf.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DogAllOf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = DogAllOf.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DogAllOf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of DogAllOf-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = DogAllOf.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DogAllOf.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart index 96ff43d00383..ad8bff240a14 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_arrays.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,7 +17,7 @@ class EnumArrays { this.arrayEnum = const [], }); - EnumArraysJustSymbolEnum justSymbol; + EnumArraysJustSymbolEnum? justSymbol; List arrayEnum; @@ -28,9 +28,9 @@ class EnumArrays { @override int get hashCode => - // ignore: unnecessary_parenthesis - (justSymbol == null ? 0 : justSymbol.hashCode) + - (arrayEnum == null ? 0 : arrayEnum.hashCode); + // ignore: unnecessary_parenthesis + (justSymbol == null ? 0 : justSymbol!.hashCode) + + (arrayEnum.hashCode); @override String toString() => 'EnumArrays[justSymbol=$justSymbol, arrayEnum=$arrayEnum]'; @@ -40,57 +40,81 @@ class EnumArrays { if (justSymbol != null) { json[r'just_symbol'] = justSymbol; } - if (arrayEnum != null) { json[r'array_enum'] = arrayEnum; - } return json; } /// Returns a new [EnumArrays] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static EnumArrays fromJson(dynamic value) { + static EnumArrays? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "EnumArrays[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "EnumArrays[$key]" has a null value in JSON.'); + }); + return true; + }()); + return EnumArrays( justSymbol: EnumArraysJustSymbolEnum.fromJson(json[r'just_symbol']), - arrayEnum: EnumArraysArrayEnumEnum.listFromJson(json[r'array_enum']), + arrayEnum: EnumArraysArrayEnumEnum.listFromJson(json[r'array_enum']) ?? const [], ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumArrays.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumArrays.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = EnumArrays.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = EnumArrays.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of EnumArrays-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = EnumArrays.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = EnumArrays.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } @@ -102,7 +126,7 @@ class EnumArraysJustSymbolEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -115,13 +139,20 @@ class EnumArraysJustSymbolEnum { dollar, ]; - static EnumArraysJustSymbolEnum fromJson(dynamic value) => - EnumArraysJustSymbolEnumTypeTransformer().decode(value); + static EnumArraysJustSymbolEnum? fromJson(dynamic value) => EnumArraysJustSymbolEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumArraysJustSymbolEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumArraysJustSymbolEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [EnumArraysJustSymbolEnum] to String, @@ -141,13 +172,13 @@ class EnumArraysJustSymbolEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - EnumArraysJustSymbolEnum decode(dynamic data, {bool allowNull}) { + EnumArraysJustSymbolEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'>=': return EnumArraysJustSymbolEnum.greaterThanEqual; case r'$': return EnumArraysJustSymbolEnum.dollar; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -156,7 +187,7 @@ class EnumArraysJustSymbolEnumTypeTransformer { } /// Singleton [EnumArraysJustSymbolEnumTypeTransformer] instance. - static EnumArraysJustSymbolEnumTypeTransformer _instance; + static EnumArraysJustSymbolEnumTypeTransformer? _instance; } @@ -169,7 +200,7 @@ class EnumArraysArrayEnumEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -182,13 +213,20 @@ class EnumArraysArrayEnumEnum { crab, ]; - static EnumArraysArrayEnumEnum fromJson(dynamic value) => - EnumArraysArrayEnumEnumTypeTransformer().decode(value); + static EnumArraysArrayEnumEnum? fromJson(dynamic value) => EnumArraysArrayEnumEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumArraysArrayEnumEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumArraysArrayEnumEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [EnumArraysArrayEnumEnum] to String, @@ -208,13 +246,13 @@ class EnumArraysArrayEnumEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - EnumArraysArrayEnumEnum decode(dynamic data, {bool allowNull}) { + EnumArraysArrayEnumEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'fish': return EnumArraysArrayEnumEnum.fish; case r'crab': return EnumArraysArrayEnumEnum.crab; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -223,7 +261,7 @@ class EnumArraysArrayEnumEnumTypeTransformer { } /// Singleton [EnumArraysArrayEnumEnumTypeTransformer] instance. - static EnumArraysArrayEnumEnumTypeTransformer _instance; + static EnumArraysArrayEnumEnumTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart index e50e9471eacb..ad0fee194896 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -19,7 +19,7 @@ class EnumClass { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -34,13 +34,20 @@ class EnumClass { leftParenthesisXyzRightParenthesis, ]; - static EnumClass fromJson(dynamic value) => - EnumClassTypeTransformer().decode(value); + static EnumClass? fromJson(dynamic value) => EnumClassTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumClass.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [EnumClass] to String, @@ -60,14 +67,14 @@ class EnumClassTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - EnumClass decode(dynamic data, {bool allowNull}) { + EnumClass? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'_abc': return EnumClass.abc; case r'-efg': return EnumClass.efg; case r'(xyz)': return EnumClass.leftParenthesisXyzRightParenthesis; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -76,6 +83,6 @@ class EnumClassTypeTransformer { } /// Singleton [EnumClassTypeTransformer] instance. - static EnumClassTypeTransformer _instance; + static EnumClassTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart index ee1a8aff9f3c..06ff55540f79 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -14,7 +14,7 @@ class EnumTest { /// Returns a new [EnumTest] instance. EnumTest({ this.enumString, - @required this.enumStringRequired, + required this.enumStringRequired, this.enumInteger, this.enumNumber, this.outerEnum, @@ -23,21 +23,39 @@ class EnumTest { this.outerEnumIntegerDefaultValue, }); - EnumTestEnumStringEnum enumString; + EnumTestEnumStringEnum? enumString; EnumTestEnumStringRequiredEnum enumStringRequired; - EnumTestEnumIntegerEnum enumInteger; + EnumTestEnumIntegerEnum? enumInteger; - EnumTestEnumNumberEnum enumNumber; + EnumTestEnumNumberEnum? enumNumber; - OuterEnum outerEnum; + OuterEnum? outerEnum; - OuterEnumInteger outerEnumInteger; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + OuterEnumInteger? outerEnumInteger; - OuterEnumDefaultValue outerEnumDefaultValue; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + OuterEnumDefaultValue? outerEnumDefaultValue; - OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue; @override bool operator ==(Object other) => identical(this, other) || other is EnumTest && @@ -52,15 +70,15 @@ class EnumTest { @override int get hashCode => - // ignore: unnecessary_parenthesis - (enumString == null ? 0 : enumString.hashCode) + - (enumStringRequired == null ? 0 : enumStringRequired.hashCode) + - (enumInteger == null ? 0 : enumInteger.hashCode) + - (enumNumber == null ? 0 : enumNumber.hashCode) + - (outerEnum == null ? 0 : outerEnum.hashCode) + - (outerEnumInteger == null ? 0 : outerEnumInteger.hashCode) + - (outerEnumDefaultValue == null ? 0 : outerEnumDefaultValue.hashCode) + - (outerEnumIntegerDefaultValue == null ? 0 : outerEnumIntegerDefaultValue.hashCode); + // ignore: unnecessary_parenthesis + (enumString == null ? 0 : enumString!.hashCode) + + (enumStringRequired.hashCode) + + (enumInteger == null ? 0 : enumInteger!.hashCode) + + (enumNumber == null ? 0 : enumNumber!.hashCode) + + (outerEnum == null ? 0 : outerEnum!.hashCode) + + (outerEnumInteger == null ? 0 : outerEnumInteger!.hashCode) + + (outerEnumDefaultValue == null ? 0 : outerEnumDefaultValue!.hashCode) + + (outerEnumIntegerDefaultValue == null ? 0 : outerEnumIntegerDefaultValue!.hashCode); @override String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerEnum=$outerEnum, outerEnumInteger=$outerEnumInteger, outerEnumDefaultValue=$outerEnumDefaultValue, outerEnumIntegerDefaultValue=$outerEnumIntegerDefaultValue]'; @@ -95,12 +113,24 @@ class EnumTest { /// Returns a new [EnumTest] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static EnumTest fromJson(dynamic value) { + static EnumTest? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "EnumTest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "EnumTest[$key]" has a null value in JSON.'); + }); + return true; + }()); + return EnumTest( enumString: EnumTestEnumStringEnum.fromJson(json[r'enum_string']), - enumStringRequired: EnumTestEnumStringRequiredEnum.fromJson(json[r'enum_string_required']), + enumStringRequired: EnumTestEnumStringRequiredEnum.fromJson(json[r'enum_string_required'])!, enumInteger: EnumTestEnumIntegerEnum.fromJson(json[r'enum_integer']), enumNumber: EnumTestEnumNumberEnum.fromJson(json[r'enum_number']), outerEnum: OuterEnum.fromJson(json[r'outerEnum']), @@ -112,37 +142,52 @@ class EnumTest { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumTest.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = EnumTest.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = EnumTest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of EnumTest-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = EnumTest.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = EnumTest.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'enum_string_required', + }; } @@ -154,7 +199,7 @@ class EnumTestEnumStringEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -169,13 +214,20 @@ class EnumTestEnumStringEnum { empty, ]; - static EnumTestEnumStringEnum fromJson(dynamic value) => - EnumTestEnumStringEnumTypeTransformer().decode(value); + static EnumTestEnumStringEnum? fromJson(dynamic value) => EnumTestEnumStringEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumTestEnumStringEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTestEnumStringEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [EnumTestEnumStringEnum] to String, @@ -195,14 +247,14 @@ class EnumTestEnumStringEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - EnumTestEnumStringEnum decode(dynamic data, {bool allowNull}) { + EnumTestEnumStringEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'UPPER': return EnumTestEnumStringEnum.UPPER; case r'lower': return EnumTestEnumStringEnum.lower; case r'': return EnumTestEnumStringEnum.empty; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -211,7 +263,7 @@ class EnumTestEnumStringEnumTypeTransformer { } /// Singleton [EnumTestEnumStringEnumTypeTransformer] instance. - static EnumTestEnumStringEnumTypeTransformer _instance; + static EnumTestEnumStringEnumTypeTransformer? _instance; } @@ -224,7 +276,7 @@ class EnumTestEnumStringRequiredEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -239,13 +291,20 @@ class EnumTestEnumStringRequiredEnum { empty, ]; - static EnumTestEnumStringRequiredEnum fromJson(dynamic value) => - EnumTestEnumStringRequiredEnumTypeTransformer().decode(value); + static EnumTestEnumStringRequiredEnum? fromJson(dynamic value) => EnumTestEnumStringRequiredEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumTestEnumStringRequiredEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTestEnumStringRequiredEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [EnumTestEnumStringRequiredEnum] to String, @@ -265,14 +324,14 @@ class EnumTestEnumStringRequiredEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - EnumTestEnumStringRequiredEnum decode(dynamic data, {bool allowNull}) { + EnumTestEnumStringRequiredEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'UPPER': return EnumTestEnumStringRequiredEnum.UPPER; case r'lower': return EnumTestEnumStringRequiredEnum.lower; case r'': return EnumTestEnumStringRequiredEnum.empty; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -281,7 +340,7 @@ class EnumTestEnumStringRequiredEnumTypeTransformer { } /// Singleton [EnumTestEnumStringRequiredEnumTypeTransformer] instance. - static EnumTestEnumStringRequiredEnumTypeTransformer _instance; + static EnumTestEnumStringRequiredEnumTypeTransformer? _instance; } @@ -294,7 +353,7 @@ class EnumTestEnumIntegerEnum { final int value; @override - String toString() => value == null ? '' : value.toString(); + String toString() => value.toString(); int toJson() => value; @@ -307,13 +366,20 @@ class EnumTestEnumIntegerEnum { numberNegative1, ]; - static EnumTestEnumIntegerEnum fromJson(dynamic value) => - EnumTestEnumIntegerEnumTypeTransformer().decode(value); + static EnumTestEnumIntegerEnum? fromJson(dynamic value) => EnumTestEnumIntegerEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumTestEnumIntegerEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTestEnumIntegerEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [EnumTestEnumIntegerEnum] to int, @@ -333,13 +399,13 @@ class EnumTestEnumIntegerEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - EnumTestEnumIntegerEnum decode(dynamic data, {bool allowNull}) { + EnumTestEnumIntegerEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case 1: return EnumTestEnumIntegerEnum.number1; case -1: return EnumTestEnumIntegerEnum.numberNegative1; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -348,7 +414,7 @@ class EnumTestEnumIntegerEnumTypeTransformer { } /// Singleton [EnumTestEnumIntegerEnumTypeTransformer] instance. - static EnumTestEnumIntegerEnumTypeTransformer _instance; + static EnumTestEnumIntegerEnumTypeTransformer? _instance; } @@ -361,7 +427,7 @@ class EnumTestEnumNumberEnum { final double value; @override - String toString() => value == null ? '' : value.toString(); + String toString() => value.toString(); double toJson() => value; @@ -374,13 +440,20 @@ class EnumTestEnumNumberEnum { numberNegative1Period2, ]; - static EnumTestEnumNumberEnum fromJson(dynamic value) => - EnumTestEnumNumberEnumTypeTransformer().decode(value); + static EnumTestEnumNumberEnum? fromJson(dynamic value) => EnumTestEnumNumberEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(EnumTestEnumNumberEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTestEnumNumberEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [EnumTestEnumNumberEnum] to double, @@ -400,13 +473,13 @@ class EnumTestEnumNumberEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - EnumTestEnumNumberEnum decode(dynamic data, {bool allowNull}) { + EnumTestEnumNumberEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case '1.1': return EnumTestEnumNumberEnum.number1Period1; case '-1.2': return EnumTestEnumNumberEnum.numberNegative1Period2; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -415,7 +488,7 @@ class EnumTestEnumNumberEnumTypeTransformer { } /// Singleton [EnumTestEnumNumberEnumTypeTransformer] instance. - static EnumTestEnumNumberEnumTypeTransformer _instance; + static EnumTestEnumNumberEnumTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart index 82decacafc7f..0f53a5ed1f92 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/file_schema_test_class.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,7 +17,13 @@ class FileSchemaTestClass { this.files = const [], }); - ModelFile file; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ModelFile? file; List files; @@ -28,9 +34,9 @@ class FileSchemaTestClass { @override int get hashCode => - // ignore: unnecessary_parenthesis - (file == null ? 0 : file.hashCode) + - (files == null ? 0 : files.hashCode); + // ignore: unnecessary_parenthesis + (file == null ? 0 : file!.hashCode) + + (files.hashCode); @override String toString() => 'FileSchemaTestClass[file=$file, files=$files]'; @@ -40,56 +46,80 @@ class FileSchemaTestClass { if (file != null) { json[r'file'] = file; } - if (files != null) { json[r'files'] = files; - } return json; } /// Returns a new [FileSchemaTestClass] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static FileSchemaTestClass fromJson(dynamic value) { + static FileSchemaTestClass? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileSchemaTestClass[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileSchemaTestClass[$key]" has a null value in JSON.'); + }); + return true; + }()); + return FileSchemaTestClass( file: ModelFile.fromJson(json[r'file']), - files: ModelFile.listFromJson(json[r'files']), + files: ModelFile.listFromJson(json[r'files']) ?? const [], ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(FileSchemaTestClass.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileSchemaTestClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = FileSchemaTestClass.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileSchemaTestClass.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of FileSchemaTestClass-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = FileSchemaTestClass.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileSchemaTestClass.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart index fe73d2705506..4fd3f08d59a8 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/foo.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -24,63 +24,87 @@ class Foo { @override int get hashCode => - // ignore: unnecessary_parenthesis - (bar == null ? 0 : bar.hashCode); + // ignore: unnecessary_parenthesis + (bar.hashCode); @override String toString() => 'Foo[bar=$bar]'; Map toJson() { final json = {}; - if (bar != null) { json[r'bar'] = bar; - } return json; } /// Returns a new [Foo] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Foo fromJson(dynamic value) { + static Foo? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Foo[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Foo[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Foo( - bar: mapValueOfType(json, r'bar'), + bar: mapValueOfType(json, r'bar') ?? 'bar', ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Foo.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Foo.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Foo.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Foo.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Foo-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Foo.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Foo.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart index 978a67132264..48f039432af4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,64 +16,136 @@ class FormatTest { this.integer, this.int32, this.int64, - @required this.number, + required this.number, this.float, this.double_, this.decimal, this.string, - @required this.byte, + required this.byte, this.binary, - @required this.date, + required this.date, this.dateTime, this.uuid, - @required this.password, + required this.password, this.patternWithDigits, this.patternWithDigitsAndDelimiter, }); - // minimum: 10 - // maximum: 100 - int integer; + /// Minimum value: 10 + /// Maximum value: 100 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? integer; - // minimum: 20 - // maximum: 200 - int int32; + /// Minimum value: 20 + /// Maximum value: 200 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? int32; - int int64; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? int64; - // minimum: 32.1 - // maximum: 543.2 + /// Minimum value: 32.1 + /// Maximum value: 543.2 num number; - // minimum: 54.3 - // maximum: 987.6 - double float; + /// Minimum value: 54.3 + /// Maximum value: 987.6 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + double? float; - // minimum: 67.8 - // maximum: 123.4 - double double_; + /// Minimum value: 67.8 + /// Maximum value: 123.4 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + double? double_; - double decimal; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + double? decimal; - String string; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? string; String byte; - MultipartFile binary; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + MultipartFile? binary; DateTime date; - DateTime dateTime; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateTime; - String uuid; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? uuid; String password; /// A string that is a 10 digit number. Can have leading zeros. - String patternWithDigits; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? patternWithDigits; /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - String patternWithDigitsAndDelimiter; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? patternWithDigitsAndDelimiter; @override bool operator ==(Object other) => identical(this, other) || other is FormatTest && @@ -96,23 +168,23 @@ class FormatTest { @override int get hashCode => - // ignore: unnecessary_parenthesis - (integer == null ? 0 : integer.hashCode) + - (int32 == null ? 0 : int32.hashCode) + - (int64 == null ? 0 : int64.hashCode) + - (number == null ? 0 : number.hashCode) + - (float == null ? 0 : float.hashCode) + - (double_ == null ? 0 : double_.hashCode) + - (decimal == null ? 0 : decimal.hashCode) + - (string == null ? 0 : string.hashCode) + - (byte == null ? 0 : byte.hashCode) + - (binary == null ? 0 : binary.hashCode) + - (date == null ? 0 : date.hashCode) + - (dateTime == null ? 0 : dateTime.hashCode) + - (uuid == null ? 0 : uuid.hashCode) + - (password == null ? 0 : password.hashCode) + - (patternWithDigits == null ? 0 : patternWithDigits.hashCode) + - (patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter.hashCode); + // ignore: unnecessary_parenthesis + (integer == null ? 0 : integer!.hashCode) + + (int32 == null ? 0 : int32!.hashCode) + + (int64 == null ? 0 : int64!.hashCode) + + (number.hashCode) + + (float == null ? 0 : float!.hashCode) + + (double_ == null ? 0 : double_!.hashCode) + + (decimal == null ? 0 : decimal!.hashCode) + + (string == null ? 0 : string!.hashCode) + + (byte.hashCode) + + (binary == null ? 0 : binary!.hashCode) + + (date.hashCode) + + (dateTime == null ? 0 : dateTime!.hashCode) + + (uuid == null ? 0 : uuid!.hashCode) + + (password.hashCode) + + (patternWithDigits == null ? 0 : patternWithDigits!.hashCode) + + (patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter!.hashCode); @override String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, dateTime=$dateTime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; @@ -147,7 +219,7 @@ class FormatTest { } json[r'date'] = _dateFormatter.format(date.toUtc()); if (dateTime != null) { - json[r'dateTime'] = dateTime.toUtc().toIso8601String(); + json[r'dateTime'] = dateTime!.toUtc().toIso8601String(); } if (uuid != null) { json[r'uuid'] = uuid; @@ -165,26 +237,38 @@ class FormatTest { /// Returns a new [FormatTest] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static FormatTest fromJson(dynamic value) { + static FormatTest? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FormatTest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FormatTest[$key]" has a null value in JSON.'); + }); + return true; + }()); + return FormatTest( integer: mapValueOfType(json, r'integer'), int32: mapValueOfType(json, r'int32'), int64: mapValueOfType(json, r'int64'), number: json[r'number'] == null - ? null - : num.parse(json[r'number'].toString()), + ? null + : num.parse(json[r'number'].toString()), float: mapValueOfType(json, r'float'), double_: mapValueOfType(json, r'double'), decimal: mapValueOfType(json, r'decimal'), string: mapValueOfType(json, r'string'), - byte: mapValueOfType(json, r'byte'), + byte: mapValueOfType(json, r'byte')!, binary: null, // No support for decoding binary content from JSON - date: mapDateTime(json, r'date', ''), + date: mapDateTime(json, r'date', '')!, dateTime: mapDateTime(json, r'dateTime', ''), uuid: mapValueOfType(json, r'uuid'), - password: mapValueOfType(json, r'password'), + password: mapValueOfType(json, r'password')!, patternWithDigits: mapValueOfType(json, r'pattern_with_digits'), patternWithDigitsAndDelimiter: mapValueOfType(json, r'pattern_with_digits_and_delimiter'), ); @@ -192,36 +276,54 @@ class FormatTest { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(FormatTest.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FormatTest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = FormatTest.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FormatTest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of FormatTest-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = FormatTest.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FormatTest.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'number', + 'byte', + 'date', + 'password', + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart index c827adf295ec..8d6811c7d9b2 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/has_only_read_only.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,9 +17,21 @@ class HasOnlyReadOnly { this.foo, }); - String bar; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? bar; - String foo; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? foo; @override bool operator ==(Object other) => identical(this, other) || other is HasOnlyReadOnly && @@ -28,9 +40,9 @@ class HasOnlyReadOnly { @override int get hashCode => - // ignore: unnecessary_parenthesis - (bar == null ? 0 : bar.hashCode) + - (foo == null ? 0 : foo.hashCode); + // ignore: unnecessary_parenthesis + (bar == null ? 0 : bar!.hashCode) + + (foo == null ? 0 : foo!.hashCode); @override String toString() => 'HasOnlyReadOnly[bar=$bar, foo=$foo]'; @@ -49,9 +61,21 @@ class HasOnlyReadOnly { /// Returns a new [HasOnlyReadOnly] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static HasOnlyReadOnly fromJson(dynamic value) { + static HasOnlyReadOnly? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HasOnlyReadOnly[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HasOnlyReadOnly[$key]" has a null value in JSON.'); + }); + return true; + }()); + return HasOnlyReadOnly( bar: mapValueOfType(json, r'bar'), foo: mapValueOfType(json, r'foo'), @@ -60,36 +84,50 @@ class HasOnlyReadOnly { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(HasOnlyReadOnly.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HasOnlyReadOnly.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = HasOnlyReadOnly.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HasOnlyReadOnly.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of HasOnlyReadOnly-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = HasOnlyReadOnly.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HasOnlyReadOnly.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart index 52359ee4003e..94c1561bd548 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,7 @@ class HealthCheckResult { this.nullableMessage, }); - String nullableMessage; + String? nullableMessage; @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && @@ -24,8 +24,8 @@ class HealthCheckResult { @override int get hashCode => - // ignore: unnecessary_parenthesis - (nullableMessage == null ? 0 : nullableMessage.hashCode); + // ignore: unnecessary_parenthesis + (nullableMessage == null ? 0 : nullableMessage!.hashCode); @override String toString() => 'HealthCheckResult[nullableMessage=$nullableMessage]'; @@ -41,9 +41,21 @@ class HealthCheckResult { /// Returns a new [HealthCheckResult] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static HealthCheckResult fromJson(dynamic value) { + static HealthCheckResult? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HealthCheckResult[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HealthCheckResult[$key]" has a null value in JSON.'); + }); + return true; + }()); + return HealthCheckResult( nullableMessage: mapValueOfType(json, r'NullableMessage'), ); @@ -51,36 +63,50 @@ class HealthCheckResult { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(HealthCheckResult.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HealthCheckResult.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = HealthCheckResult.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HealthCheckResult.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of HealthCheckResult-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = HealthCheckResult.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HealthCheckResult.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/inline_response_default.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/inline_response_default.dart index 12ac601d7e3a..d66b3546637a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/inline_response_default.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/inline_response_default.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class InlineResponseDefault { this.string, }); - Foo string; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Foo? string; @override bool operator ==(Object other) => identical(this, other) || other is InlineResponseDefault && @@ -24,8 +30,8 @@ class InlineResponseDefault { @override int get hashCode => - // ignore: unnecessary_parenthesis - (string == null ? 0 : string.hashCode); + // ignore: unnecessary_parenthesis + (string == null ? 0 : string!.hashCode); @override String toString() => 'InlineResponseDefault[string=$string]'; @@ -41,9 +47,21 @@ class InlineResponseDefault { /// Returns a new [InlineResponseDefault] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static InlineResponseDefault fromJson(dynamic value) { + static InlineResponseDefault? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "InlineResponseDefault[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "InlineResponseDefault[$key]" has a null value in JSON.'); + }); + return true; + }()); + return InlineResponseDefault( string: Foo.fromJson(json[r'string']), ); @@ -51,36 +69,50 @@ class InlineResponseDefault { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(InlineResponseDefault.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = InlineResponseDefault.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = InlineResponseDefault.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = InlineResponseDefault.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of InlineResponseDefault-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = InlineResponseDefault.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = InlineResponseDefault.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart index cbb3f1982522..5afcb48e86fa 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -36,79 +36,97 @@ class MapTest { @override int get hashCode => - // ignore: unnecessary_parenthesis - (mapMapOfString == null ? 0 : mapMapOfString.hashCode) + - (mapOfEnumString == null ? 0 : mapOfEnumString.hashCode) + - (directMap == null ? 0 : directMap.hashCode) + - (indirectMap == null ? 0 : indirectMap.hashCode); + // ignore: unnecessary_parenthesis + (mapMapOfString.hashCode) + + (mapOfEnumString.hashCode) + + (directMap.hashCode) + + (indirectMap.hashCode); @override String toString() => 'MapTest[mapMapOfString=$mapMapOfString, mapOfEnumString=$mapOfEnumString, directMap=$directMap, indirectMap=$indirectMap]'; Map toJson() { final json = {}; - if (mapMapOfString != null) { json[r'map_map_of_string'] = mapMapOfString; - } - if (mapOfEnumString != null) { json[r'map_of_enum_string'] = mapOfEnumString; - } - if (directMap != null) { json[r'direct_map'] = directMap; - } - if (indirectMap != null) { json[r'indirect_map'] = indirectMap; - } return json; } /// Returns a new [MapTest] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static MapTest fromJson(dynamic value) { + static MapTest? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "MapTest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapTest[$key]" has a null value in JSON.'); + }); + return true; + }()); + return MapTest( - mapMapOfString: mapCastOfType(json, r'map_map_of_string'), - mapOfEnumString: mapCastOfType(json, r'map_of_enum_string'), - directMap: mapCastOfType(json, r'direct_map'), - indirectMap: mapCastOfType(json, r'indirect_map'), + mapMapOfString: mapCastOfType(json, r'map_map_of_string') ?? const {}, + mapOfEnumString: mapCastOfType(json, r'map_of_enum_string') ?? const {}, + directMap: mapCastOfType(json, r'direct_map') ?? const {}, + indirectMap: mapCastOfType(json, r'indirect_map') ?? const {}, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(MapTest.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapTest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = MapTest.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapTest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of MapTest-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = MapTest.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapTest.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } @@ -120,7 +138,7 @@ class MapTestMapOfEnumStringEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -133,13 +151,20 @@ class MapTestMapOfEnumStringEnum { lower, ]; - static MapTestMapOfEnumStringEnum fromJson(dynamic value) => - MapTestMapOfEnumStringEnumTypeTransformer().decode(value); + static MapTestMapOfEnumStringEnum? fromJson(dynamic value) => MapTestMapOfEnumStringEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(MapTestMapOfEnumStringEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapTestMapOfEnumStringEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [MapTestMapOfEnumStringEnum] to String, @@ -159,13 +184,13 @@ class MapTestMapOfEnumStringEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - MapTestMapOfEnumStringEnum decode(dynamic data, {bool allowNull}) { + MapTestMapOfEnumStringEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'UPPER': return MapTestMapOfEnumStringEnum.UPPER; case r'lower': return MapTestMapOfEnumStringEnum.lower; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -174,7 +199,7 @@ class MapTestMapOfEnumStringEnumTypeTransformer { } /// Singleton [MapTestMapOfEnumStringEnumTypeTransformer] instance. - static MapTestMapOfEnumStringEnumTypeTransformer _instance; + static MapTestMapOfEnumStringEnumTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart index 994be26f9e39..599c817a66ad 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -18,9 +18,21 @@ class MixedPropertiesAndAdditionalPropertiesClass { this.map = const {}, }); - String uuid; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? uuid; - DateTime dateTime; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateTime; Map map; @@ -32,10 +44,10 @@ class MixedPropertiesAndAdditionalPropertiesClass { @override int get hashCode => - // ignore: unnecessary_parenthesis - (uuid == null ? 0 : uuid.hashCode) + - (dateTime == null ? 0 : dateTime.hashCode) + - (map == null ? 0 : map.hashCode); + // ignore: unnecessary_parenthesis + (uuid == null ? 0 : uuid!.hashCode) + + (dateTime == null ? 0 : dateTime!.hashCode) + + (map.hashCode); @override String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, dateTime=$dateTime, map=$map]'; @@ -46,59 +58,83 @@ class MixedPropertiesAndAdditionalPropertiesClass { json[r'uuid'] = uuid; } if (dateTime != null) { - json[r'dateTime'] = dateTime.toUtc().toIso8601String(); + json[r'dateTime'] = dateTime!.toUtc().toIso8601String(); } - if (map != null) { json[r'map'] = map; - } return json; } /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static MixedPropertiesAndAdditionalPropertiesClass fromJson(dynamic value) { + static MixedPropertiesAndAdditionalPropertiesClass? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "MixedPropertiesAndAdditionalPropertiesClass[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MixedPropertiesAndAdditionalPropertiesClass[$key]" has a null value in JSON.'); + }); + return true; + }()); + return MixedPropertiesAndAdditionalPropertiesClass( uuid: mapValueOfType(json, r'uuid'), dateTime: mapDateTime(json, r'dateTime', ''), - map: mapValueOfType>(json, r'map'), + map: mapValueOfType>(json, r'map') ?? const {}, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(MixedPropertiesAndAdditionalPropertiesClass.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MixedPropertiesAndAdditionalPropertiesClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = MixedPropertiesAndAdditionalPropertiesClass.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MixedPropertiesAndAdditionalPropertiesClass.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of MixedPropertiesAndAdditionalPropertiesClass-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = MixedPropertiesAndAdditionalPropertiesClass.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MixedPropertiesAndAdditionalPropertiesClass.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart index 01fbb8e4e9ae..de257edc7cc9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model200_response.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,9 +17,21 @@ class Model200Response { this.class_, }); - int name; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? name; - String class_; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? class_; @override bool operator ==(Object other) => identical(this, other) || other is Model200Response && @@ -28,9 +40,9 @@ class Model200Response { @override int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name.hashCode) + - (class_ == null ? 0 : class_.hashCode); + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode) + + (class_ == null ? 0 : class_!.hashCode); @override String toString() => 'Model200Response[name=$name, class_=$class_]'; @@ -49,9 +61,21 @@ class Model200Response { /// Returns a new [Model200Response] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Model200Response fromJson(dynamic value) { + static Model200Response? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Model200Response[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Model200Response[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Model200Response( name: mapValueOfType(json, r'name'), class_: mapValueOfType(json, r'class'), @@ -60,36 +84,50 @@ class Model200Response { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Model200Response.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Model200Response.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Model200Response.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Model200Response.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Model200Response-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Model200Response.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Model200Response.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart index 9b3ef92da879..d48d030c9d06 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_client.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class ModelClient { this.client, }); - String client; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? client; @override bool operator ==(Object other) => identical(this, other) || other is ModelClient && @@ -24,8 +30,8 @@ class ModelClient { @override int get hashCode => - // ignore: unnecessary_parenthesis - (client == null ? 0 : client.hashCode); + // ignore: unnecessary_parenthesis + (client == null ? 0 : client!.hashCode); @override String toString() => 'ModelClient[client=$client]'; @@ -41,9 +47,21 @@ class ModelClient { /// Returns a new [ModelClient] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ModelClient fromJson(dynamic value) { + static ModelClient? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ModelClient[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ModelClient[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ModelClient( client: mapValueOfType(json, r'client'), ); @@ -51,36 +69,50 @@ class ModelClient { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ModelClient.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ModelClient.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ModelClient.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelClient.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ModelClient-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ModelClient.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelClient.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart index 66907de557c8..dc0f89b1c4f9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,7 +17,13 @@ class ModelFile { }); /// Test capitalization - String sourceURI; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? sourceURI; @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && @@ -25,8 +31,8 @@ class ModelFile { @override int get hashCode => - // ignore: unnecessary_parenthesis - (sourceURI == null ? 0 : sourceURI.hashCode); + // ignore: unnecessary_parenthesis + (sourceURI == null ? 0 : sourceURI!.hashCode); @override String toString() => 'ModelFile[sourceURI=$sourceURI]'; @@ -42,9 +48,21 @@ class ModelFile { /// Returns a new [ModelFile] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ModelFile fromJson(dynamic value) { + static ModelFile? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ModelFile[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ModelFile[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ModelFile( sourceURI: mapValueOfType(json, r'sourceURI'), ); @@ -52,36 +70,50 @@ class ModelFile { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ModelFile.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ModelFile.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ModelFile.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelFile.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ModelFile-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ModelFile.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelFile.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart index e83b8055bc6f..d079e6aa221d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_list.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class ModelList { this.n123list, }); - String n123list; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? n123list; @override bool operator ==(Object other) => identical(this, other) || other is ModelList && @@ -24,8 +30,8 @@ class ModelList { @override int get hashCode => - // ignore: unnecessary_parenthesis - (n123list == null ? 0 : n123list.hashCode); + // ignore: unnecessary_parenthesis + (n123list == null ? 0 : n123list!.hashCode); @override String toString() => 'ModelList[n123list=$n123list]'; @@ -41,9 +47,21 @@ class ModelList { /// Returns a new [ModelList] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ModelList fromJson(dynamic value) { + static ModelList? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ModelList[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ModelList[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ModelList( n123list: mapValueOfType(json, r'123-list'), ); @@ -51,36 +69,50 @@ class ModelList { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ModelList.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ModelList.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ModelList.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelList.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ModelList-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ModelList.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelList.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart index 3c740b8be854..3042ac8b3af5 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_return.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class ModelReturn { this.return_, }); - int return_; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? return_; @override bool operator ==(Object other) => identical(this, other) || other is ModelReturn && @@ -24,8 +30,8 @@ class ModelReturn { @override int get hashCode => - // ignore: unnecessary_parenthesis - (return_ == null ? 0 : return_.hashCode); + // ignore: unnecessary_parenthesis + (return_ == null ? 0 : return_!.hashCode); @override String toString() => 'ModelReturn[return_=$return_]'; @@ -41,9 +47,21 @@ class ModelReturn { /// Returns a new [ModelReturn] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ModelReturn fromJson(dynamic value) { + static ModelReturn? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ModelReturn[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ModelReturn[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ModelReturn( return_: mapValueOfType(json, r'return'), ); @@ -51,36 +69,50 @@ class ModelReturn { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ModelReturn.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ModelReturn.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ModelReturn.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelReturn.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ModelReturn-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ModelReturn.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelReturn.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart index d0c3106e3266..10461ccba2b6 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/name.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,7 +13,7 @@ part of openapi.api; class Name { /// Returns a new [Name] instance. Name({ - @required this.name, + required this.name, this.snakeCase, this.property, this.n123number, @@ -21,11 +21,29 @@ class Name { int name; - int snakeCase; - - String property; - - int n123number; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? snakeCase; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? property; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? n123number; @override bool operator ==(Object other) => identical(this, other) || other is Name && @@ -36,11 +54,11 @@ class Name { @override int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name.hashCode) + - (snakeCase == null ? 0 : snakeCase.hashCode) + - (property == null ? 0 : property.hashCode) + - (n123number == null ? 0 : n123number.hashCode); + // ignore: unnecessary_parenthesis + (name.hashCode) + + (snakeCase == null ? 0 : snakeCase!.hashCode) + + (property == null ? 0 : property!.hashCode) + + (n123number == null ? 0 : n123number!.hashCode); @override String toString() => 'Name[name=$name, snakeCase=$snakeCase, property=$property, n123number=$n123number]'; @@ -63,11 +81,23 @@ class Name { /// Returns a new [Name] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Name fromJson(dynamic value) { + static Name? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Name[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Name[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Name( - name: mapValueOfType(json, r'name'), + name: mapValueOfType(json, r'name')!, snakeCase: mapValueOfType(json, r'snake_case'), property: mapValueOfType(json, r'property'), n123number: mapValueOfType(json, r'123Number'), @@ -76,36 +106,51 @@ class Name { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Name.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Name.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Name.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Name.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Name-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Name.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Name.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart index 469db464a5f9..2f3d55046fed 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/nullable_class.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -19,35 +19,35 @@ class NullableClass { this.stringProp, this.dateProp, this.datetimeProp, - this.arrayNullableProp, - this.arrayAndItemsNullableProp, + this.arrayNullableProp = const [], + this.arrayAndItemsNullableProp = const [], this.arrayItemsNullable = const [], - this.objectNullableProp, - this.objectAndItemsNullableProp, + this.objectNullableProp = const {}, + this.objectAndItemsNullableProp = const {}, this.objectItemsNullable = const {}, }); - int integerProp; + int? integerProp; - num numberProp; + num? numberProp; - bool booleanProp; + bool? booleanProp; - String stringProp; + String? stringProp; - DateTime dateProp; + DateTime? dateProp; - DateTime datetimeProp; + DateTime? datetimeProp; - List arrayNullableProp; + List? arrayNullableProp; - List arrayAndItemsNullableProp; + List? arrayAndItemsNullableProp; List arrayItemsNullable; - Map objectNullableProp; + Map? objectNullableProp; - Map objectAndItemsNullableProp; + Map? objectAndItemsNullableProp; Map objectItemsNullable; @@ -68,19 +68,19 @@ class NullableClass { @override int get hashCode => - // ignore: unnecessary_parenthesis - (integerProp == null ? 0 : integerProp.hashCode) + - (numberProp == null ? 0 : numberProp.hashCode) + - (booleanProp == null ? 0 : booleanProp.hashCode) + - (stringProp == null ? 0 : stringProp.hashCode) + - (dateProp == null ? 0 : dateProp.hashCode) + - (datetimeProp == null ? 0 : datetimeProp.hashCode) + - (arrayNullableProp == null ? 0 : arrayNullableProp.hashCode) + - (arrayAndItemsNullableProp == null ? 0 : arrayAndItemsNullableProp.hashCode) + - (arrayItemsNullable == null ? 0 : arrayItemsNullable.hashCode) + - (objectNullableProp == null ? 0 : objectNullableProp.hashCode) + - (objectAndItemsNullableProp == null ? 0 : objectAndItemsNullableProp.hashCode) + - (objectItemsNullable == null ? 0 : objectItemsNullable.hashCode); + // ignore: unnecessary_parenthesis + (integerProp == null ? 0 : integerProp!.hashCode) + + (numberProp == null ? 0 : numberProp!.hashCode) + + (booleanProp == null ? 0 : booleanProp!.hashCode) + + (stringProp == null ? 0 : stringProp!.hashCode) + + (dateProp == null ? 0 : dateProp!.hashCode) + + (datetimeProp == null ? 0 : datetimeProp!.hashCode) + + (arrayNullableProp == null ? 0 : arrayNullableProp!.hashCode) + + (arrayAndItemsNullableProp == null ? 0 : arrayAndItemsNullableProp!.hashCode) + + (arrayItemsNullable.hashCode) + + (objectNullableProp == null ? 0 : objectNullableProp!.hashCode) + + (objectAndItemsNullableProp == null ? 0 : objectAndItemsNullableProp!.hashCode) + + (objectItemsNullable.hashCode); @override String toString() => 'NullableClass[integerProp=$integerProp, numberProp=$numberProp, booleanProp=$booleanProp, stringProp=$stringProp, dateProp=$dateProp, datetimeProp=$datetimeProp, arrayNullableProp=$arrayNullableProp, arrayAndItemsNullableProp=$arrayAndItemsNullableProp, arrayItemsNullable=$arrayItemsNullable, objectNullableProp=$objectNullableProp, objectAndItemsNullableProp=$objectAndItemsNullableProp, objectItemsNullable=$objectItemsNullable]'; @@ -100,10 +100,10 @@ class NullableClass { json[r'string_prop'] = stringProp; } if (dateProp != null) { - json[r'date_prop'] = _dateFormatter.format(dateProp.toUtc()); + json[r'date_prop'] = _dateFormatter.format(dateProp!.toUtc()); } if (datetimeProp != null) { - json[r'datetime_prop'] = datetimeProp.toUtc().toIso8601String(); + json[r'datetime_prop'] = datetimeProp!.toUtc().toIso8601String(); } if (arrayNullableProp != null) { json[r'array_nullable_prop'] = arrayNullableProp; @@ -111,77 +111,99 @@ class NullableClass { if (arrayAndItemsNullableProp != null) { json[r'array_and_items_nullable_prop'] = arrayAndItemsNullableProp; } - if (arrayItemsNullable != null) { json[r'array_items_nullable'] = arrayItemsNullable; - } if (objectNullableProp != null) { json[r'object_nullable_prop'] = objectNullableProp; } if (objectAndItemsNullableProp != null) { json[r'object_and_items_nullable_prop'] = objectAndItemsNullableProp; } - if (objectItemsNullable != null) { json[r'object_items_nullable'] = objectItemsNullable; - } return json; } /// Returns a new [NullableClass] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static NullableClass fromJson(dynamic value) { + static NullableClass? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NullableClass[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NullableClass[$key]" has a null value in JSON.'); + }); + return true; + }()); + return NullableClass( integerProp: mapValueOfType(json, r'integer_prop'), numberProp: json[r'number_prop'] == null - ? null - : num.parse(json[r'number_prop'].toString()), + ? null + : num.parse(json[r'number_prop'].toString()), booleanProp: mapValueOfType(json, r'boolean_prop'), stringProp: mapValueOfType(json, r'string_prop'), dateProp: mapDateTime(json, r'date_prop', ''), datetimeProp: mapDateTime(json, r'datetime_prop', ''), - arrayNullableProp: Object.listFromJson(json[r'array_nullable_prop']), - arrayAndItemsNullableProp: Object.listFromJson(json[r'array_and_items_nullable_prop']), - arrayItemsNullable: Object.listFromJson(json[r'array_items_nullable']), - objectNullableProp: mapValueOfType>(json, r'object_nullable_prop'), - objectAndItemsNullableProp: mapValueOfType>(json, r'object_and_items_nullable_prop'), - objectItemsNullable: mapValueOfType>(json, r'object_items_nullable'), + arrayNullableProp: Object.listFromJson(json[r'array_nullable_prop']) ?? const [], + arrayAndItemsNullableProp: Object.listFromJson(json[r'array_and_items_nullable_prop']) ?? const [], + arrayItemsNullable: Object.listFromJson(json[r'array_items_nullable']) ?? const [], + objectNullableProp: mapValueOfType>(json, r'object_nullable_prop') ?? const {}, + objectAndItemsNullableProp: mapValueOfType>(json, r'object_and_items_nullable_prop') ?? const {}, + objectItemsNullable: mapValueOfType>(json, r'object_items_nullable') ?? const {}, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(NullableClass.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NullableClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = NullableClass.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NullableClass.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of NullableClass-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = NullableClass.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NullableClass.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart index 686cfff791f8..2a927dc41d6a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class NumberOnly { this.justNumber, }); - num justNumber; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + num? justNumber; @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && @@ -24,8 +30,8 @@ class NumberOnly { @override int get hashCode => - // ignore: unnecessary_parenthesis - (justNumber == null ? 0 : justNumber.hashCode); + // ignore: unnecessary_parenthesis + (justNumber == null ? 0 : justNumber!.hashCode); @override String toString() => 'NumberOnly[justNumber=$justNumber]'; @@ -41,48 +47,74 @@ class NumberOnly { /// Returns a new [NumberOnly] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static NumberOnly fromJson(dynamic value) { + static NumberOnly? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NumberOnly[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NumberOnly[$key]" has a null value in JSON.'); + }); + return true; + }()); + return NumberOnly( justNumber: json[r'JustNumber'] == null - ? null - : num.parse(json[r'JustNumber'].toString()), + ? null + : num.parse(json[r'JustNumber'].toString()), ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(NumberOnly.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NumberOnly.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = NumberOnly.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NumberOnly.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of NumberOnly-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = NumberOnly.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NumberOnly.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart index b5e83009cf92..924aaeaafae4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -19,11 +19,29 @@ class ObjectWithDeprecatedFields { this.bars = const [], }); - String uuid; - - num id; - - DeprecatedObject deprecatedRef; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? uuid; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + num? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DeprecatedObject? deprecatedRef; List bars; @@ -36,11 +54,11 @@ class ObjectWithDeprecatedFields { @override int get hashCode => - // ignore: unnecessary_parenthesis - (uuid == null ? 0 : uuid.hashCode) + - (id == null ? 0 : id.hashCode) + - (deprecatedRef == null ? 0 : deprecatedRef.hashCode) + - (bars == null ? 0 : bars.hashCode); + // ignore: unnecessary_parenthesis + (uuid == null ? 0 : uuid!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (deprecatedRef == null ? 0 : deprecatedRef!.hashCode) + + (bars.hashCode); @override String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedRef=$deprecatedRef, bars=$bars]'; @@ -56,62 +74,86 @@ class ObjectWithDeprecatedFields { if (deprecatedRef != null) { json[r'deprecatedRef'] = deprecatedRef; } - if (bars != null) { json[r'bars'] = bars; - } return json; } /// Returns a new [ObjectWithDeprecatedFields] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ObjectWithDeprecatedFields fromJson(dynamic value) { + static ObjectWithDeprecatedFields? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ObjectWithDeprecatedFields[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ObjectWithDeprecatedFields[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ObjectWithDeprecatedFields( uuid: mapValueOfType(json, r'uuid'), id: json[r'id'] == null - ? null - : num.parse(json[r'id'].toString()), + ? null + : num.parse(json[r'id'].toString()), deprecatedRef: DeprecatedObject.fromJson(json[r'deprecatedRef']), bars: json[r'bars'] is List - ? (json[r'bars'] as List).cast() - : null, + ? (json[r'bars'] as List).cast() + : const [], ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ObjectWithDeprecatedFields.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ObjectWithDeprecatedFields.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ObjectWithDeprecatedFields.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ObjectWithDeprecatedFields.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ObjectWithDeprecatedFields-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ObjectWithDeprecatedFields.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ObjectWithDeprecatedFields.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart index 61d01acfaaa8..ad84a894e8db 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,16 +21,40 @@ class Order { this.complete = false, }); - int id; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; - int petId; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? petId; - int quantity; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? quantity; - DateTime shipDate; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? shipDate; /// Order Status - OrderStatusEnum status; + OrderStatusEnum? status; bool complete; @@ -45,13 +69,13 @@ class Order { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (petId == null ? 0 : petId.hashCode) + - (quantity == null ? 0 : quantity.hashCode) + - (shipDate == null ? 0 : shipDate.hashCode) + - (status == null ? 0 : status.hashCode) + - (complete == null ? 0 : complete.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (petId == null ? 0 : petId!.hashCode) + + (quantity == null ? 0 : quantity!.hashCode) + + (shipDate == null ? 0 : shipDate!.hashCode) + + (status == null ? 0 : status!.hashCode) + + (complete.hashCode); @override String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; @@ -68,66 +92,90 @@ class Order { json[r'quantity'] = quantity; } if (shipDate != null) { - json[r'shipDate'] = shipDate.toUtc().toIso8601String(); + json[r'shipDate'] = shipDate!.toUtc().toIso8601String(); } if (status != null) { json[r'status'] = status; } - if (complete != null) { json[r'complete'] = complete; - } return json; } /// Returns a new [Order] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Order fromJson(dynamic value) { + static Order? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Order[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Order[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Order( id: mapValueOfType(json, r'id'), petId: mapValueOfType(json, r'petId'), quantity: mapValueOfType(json, r'quantity'), shipDate: mapDateTime(json, r'shipDate', ''), status: OrderStatusEnum.fromJson(json[r'status']), - complete: mapValueOfType(json, r'complete'), + complete: mapValueOfType(json, r'complete') ?? false, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Order.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Order.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Order.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Order.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Order-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Order.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Order.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } /// Order Status @@ -139,7 +187,7 @@ class OrderStatusEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -154,13 +202,20 @@ class OrderStatusEnum { delivered, ]; - static OrderStatusEnum fromJson(dynamic value) => - OrderStatusEnumTypeTransformer().decode(value); + static OrderStatusEnum? fromJson(dynamic value) => OrderStatusEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(OrderStatusEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OrderStatusEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [OrderStatusEnum] to String, @@ -180,14 +235,14 @@ class OrderStatusEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - OrderStatusEnum decode(dynamic data, {bool allowNull}) { + OrderStatusEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'placed': return OrderStatusEnum.placed; case r'approved': return OrderStatusEnum.approved; case r'delivered': return OrderStatusEnum.delivered; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -196,7 +251,7 @@ class OrderStatusEnumTypeTransformer { } /// Singleton [OrderStatusEnumTypeTransformer] instance. - static OrderStatusEnumTypeTransformer _instance; + static OrderStatusEnumTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart index 6ea8ef2ad983..c60b3d287a12 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_composite.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -18,11 +18,29 @@ class OuterComposite { this.myBoolean, }); - num myNumber; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + num? myNumber; - String myString; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? myString; - bool myBoolean; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? myBoolean; @override bool operator ==(Object other) => identical(this, other) || other is OuterComposite && @@ -32,10 +50,10 @@ class OuterComposite { @override int get hashCode => - // ignore: unnecessary_parenthesis - (myNumber == null ? 0 : myNumber.hashCode) + - (myString == null ? 0 : myString.hashCode) + - (myBoolean == null ? 0 : myBoolean.hashCode); + // ignore: unnecessary_parenthesis + (myNumber == null ? 0 : myNumber!.hashCode) + + (myString == null ? 0 : myString!.hashCode) + + (myBoolean == null ? 0 : myBoolean!.hashCode); @override String toString() => 'OuterComposite[myNumber=$myNumber, myString=$myString, myBoolean=$myBoolean]'; @@ -57,13 +75,25 @@ class OuterComposite { /// Returns a new [OuterComposite] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static OuterComposite fromJson(dynamic value) { + static OuterComposite? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OuterComposite[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OuterComposite[$key]" has a null value in JSON.'); + }); + return true; + }()); + return OuterComposite( myNumber: json[r'my_number'] == null - ? null - : num.parse(json[r'my_number'].toString()), + ? null + : num.parse(json[r'my_number'].toString()), myString: mapValueOfType(json, r'my_string'), myBoolean: mapValueOfType(json, r'my_boolean'), ); @@ -71,36 +101,50 @@ class OuterComposite { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(OuterComposite.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterComposite.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = OuterComposite.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OuterComposite.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of OuterComposite-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = OuterComposite.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OuterComposite.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum.dart index 13e54eb7e599..79990cc426ae 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -19,7 +19,7 @@ class OuterEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -34,13 +34,20 @@ class OuterEnum { delivered, ]; - static OuterEnum fromJson(dynamic value) => - OuterEnumTypeTransformer().decode(value); + static OuterEnum? fromJson(dynamic value) => OuterEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(OuterEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [OuterEnum] to String, @@ -60,14 +67,14 @@ class OuterEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - OuterEnum decode(dynamic data, {bool allowNull}) { + OuterEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'placed': return OuterEnum.placed; case r'approved': return OuterEnum.approved; case r'delivered': return OuterEnum.delivered; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -76,6 +83,6 @@ class OuterEnumTypeTransformer { } /// Singleton [OuterEnumTypeTransformer] instance. - static OuterEnumTypeTransformer _instance; + static OuterEnumTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart index 5b2b1d500e51..710bffc01d65 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -19,7 +19,7 @@ class OuterEnumDefaultValue { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -34,13 +34,20 @@ class OuterEnumDefaultValue { delivered, ]; - static OuterEnumDefaultValue fromJson(dynamic value) => - OuterEnumDefaultValueTypeTransformer().decode(value); + static OuterEnumDefaultValue? fromJson(dynamic value) => OuterEnumDefaultValueTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(OuterEnumDefaultValue.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterEnumDefaultValue.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [OuterEnumDefaultValue] to String, @@ -60,14 +67,14 @@ class OuterEnumDefaultValueTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - OuterEnumDefaultValue decode(dynamic data, {bool allowNull}) { + OuterEnumDefaultValue? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'placed': return OuterEnumDefaultValue.placed; case r'approved': return OuterEnumDefaultValue.approved; case r'delivered': return OuterEnumDefaultValue.delivered; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -76,6 +83,6 @@ class OuterEnumDefaultValueTypeTransformer { } /// Singleton [OuterEnumDefaultValueTypeTransformer] instance. - static OuterEnumDefaultValueTypeTransformer _instance; + static OuterEnumDefaultValueTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_integer.dart index 6becb11fd9ae..7d0f2e371b11 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_integer.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_integer.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -19,7 +19,7 @@ class OuterEnumInteger { final int value; @override - String toString() => value == null ? '' : value.toString(); + String toString() => value.toString(); int toJson() => value; @@ -34,13 +34,20 @@ class OuterEnumInteger { number2, ]; - static OuterEnumInteger fromJson(dynamic value) => - OuterEnumIntegerTypeTransformer().decode(value); + static OuterEnumInteger? fromJson(dynamic value) => OuterEnumIntegerTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(OuterEnumInteger.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterEnumInteger.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [OuterEnumInteger] to int, @@ -60,14 +67,14 @@ class OuterEnumIntegerTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - OuterEnumInteger decode(dynamic data, {bool allowNull}) { + OuterEnumInteger? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case 0: return OuterEnumInteger.number0; case 1: return OuterEnumInteger.number1; case 2: return OuterEnumInteger.number2; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -76,6 +83,6 @@ class OuterEnumIntegerTypeTransformer { } /// Singleton [OuterEnumIntegerTypeTransformer] instance. - static OuterEnumIntegerTypeTransformer _instance; + static OuterEnumIntegerTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart index 5e534ea0f5c4..f82ae23497b3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -19,7 +19,7 @@ class OuterEnumIntegerDefaultValue { final int value; @override - String toString() => value == null ? '' : value.toString(); + String toString() => value.toString(); int toJson() => value; @@ -34,13 +34,20 @@ class OuterEnumIntegerDefaultValue { number2, ]; - static OuterEnumIntegerDefaultValue fromJson(dynamic value) => - OuterEnumIntegerDefaultValueTypeTransformer().decode(value); + static OuterEnumIntegerDefaultValue? fromJson(dynamic value) => OuterEnumIntegerDefaultValueTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(OuterEnumIntegerDefaultValue.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterEnumIntegerDefaultValue.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [OuterEnumIntegerDefaultValue] to int, @@ -60,14 +67,14 @@ class OuterEnumIntegerDefaultValueTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - OuterEnumIntegerDefaultValue decode(dynamic data, {bool allowNull}) { + OuterEnumIntegerDefaultValue? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case 0: return OuterEnumIntegerDefaultValue.number0; case 1: return OuterEnumIntegerDefaultValue.number1; case 2: return OuterEnumIntegerDefaultValue.number2; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -76,6 +83,6 @@ class OuterEnumIntegerDefaultValueTypeTransformer { } /// Singleton [OuterEnumIntegerDefaultValueTypeTransformer] instance. - static OuterEnumIntegerDefaultValueTypeTransformer _instance; + static OuterEnumIntegerDefaultValueTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart index 3ca207b7b742..8b9b76380e6d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/outer_object_with_enum_property.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,7 +13,7 @@ part of openapi.api; class OuterObjectWithEnumProperty { /// Returns a new [OuterObjectWithEnumProperty] instance. OuterObjectWithEnumProperty({ - @required this.value, + required this.value, }); OuterEnumInteger value; @@ -24,8 +24,8 @@ class OuterObjectWithEnumProperty { @override int get hashCode => - // ignore: unnecessary_parenthesis - (value == null ? 0 : value.hashCode); + // ignore: unnecessary_parenthesis + (value.hashCode); @override String toString() => 'OuterObjectWithEnumProperty[value=$value]'; @@ -39,46 +39,73 @@ class OuterObjectWithEnumProperty { /// Returns a new [OuterObjectWithEnumProperty] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static OuterObjectWithEnumProperty fromJson(dynamic value) { + static OuterObjectWithEnumProperty? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OuterObjectWithEnumProperty[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OuterObjectWithEnumProperty[$key]" has a null value in JSON.'); + }); + return true; + }()); + return OuterObjectWithEnumProperty( - value: OuterEnumInteger.fromJson(json[r'value']), + value: OuterEnumInteger.fromJson(json[r'value'])!, ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(OuterObjectWithEnumProperty.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterObjectWithEnumProperty.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = OuterObjectWithEnumProperty.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OuterObjectWithEnumProperty.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of OuterObjectWithEnumProperty-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = OuterObjectWithEnumProperty.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OuterObjectWithEnumProperty.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'value', + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart index 988948fe7c77..e9a89d7b51b9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -15,15 +15,27 @@ class Pet { Pet({ this.id, this.category, - @required this.name, + required this.name, this.photoUrls = const {}, this.tags = const [], this.status, }); - int id; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; - Category category; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Category? category; String name; @@ -32,7 +44,7 @@ class Pet { List tags; /// pet status in the store - PetStatusEnum status; + PetStatusEnum? status; @override bool operator ==(Object other) => identical(this, other) || other is Pet && @@ -45,13 +57,13 @@ class Pet { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (category == null ? 0 : category.hashCode) + - (name == null ? 0 : name.hashCode) + - (photoUrls == null ? 0 : photoUrls.hashCode) + - (tags == null ? 0 : tags.hashCode) + - (status == null ? 0 : status.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (category == null ? 0 : category!.hashCode) + + (name.hashCode) + + (photoUrls.hashCode) + + (tags.hashCode) + + (status == null ? 0 : status!.hashCode); @override String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; @@ -66,9 +78,7 @@ class Pet { } json[r'name'] = name; json[r'photoUrls'] = photoUrls; - if (tags != null) { json[r'tags'] = tags; - } if (status != null) { json[r'status'] = status; } @@ -78,54 +88,82 @@ class Pet { /// Returns a new [Pet] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Pet fromJson(dynamic value) { + static Pet? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Pet[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Pet[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Pet( id: mapValueOfType(json, r'id'), category: Category.fromJson(json[r'category']), - name: mapValueOfType(json, r'name'), + name: mapValueOfType(json, r'name')!, photoUrls: json[r'photoUrls'] is Set - ? (json[r'photoUrls'] as Set).cast() - : null, - tags: Tag.listFromJson(json[r'tags']), + ? (json[r'photoUrls'] as Set).cast() + : const {}, + tags: Tag.listFromJson(json[r'tags']) ?? const [], status: PetStatusEnum.fromJson(json[r'status']), ); } return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Pet.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Pet.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Pet.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Pet.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Pet-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Pet.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Pet.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + 'photoUrls', + }; } /// pet status in the store @@ -137,7 +175,7 @@ class PetStatusEnum { final String value; @override - String toString() => value ?? ''; + String toString() => value; String toJson() => value; @@ -152,13 +190,20 @@ class PetStatusEnum { sold, ]; - static PetStatusEnum fromJson(dynamic value) => - PetStatusEnumTypeTransformer().decode(value); + static PetStatusEnum? fromJson(dynamic value) => PetStatusEnumTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(PetStatusEnum.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PetStatusEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } } /// Transformation class that can [encode] an instance of [PetStatusEnum] to String, @@ -178,14 +223,14 @@ class PetStatusEnumTypeTransformer { /// /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. - PetStatusEnum decode(dynamic data, {bool allowNull}) { + PetStatusEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data.toString()) { case r'available': return PetStatusEnum.available; case r'pending': return PetStatusEnum.pending; case r'sold': return PetStatusEnum.sold; default: - if (allowNull == false) { + if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } @@ -194,7 +239,7 @@ class PetStatusEnumTypeTransformer { } /// Singleton [PetStatusEnumTypeTransformer] instance. - static PetStatusEnumTypeTransformer _instance; + static PetStatusEnumTypeTransformer? _instance; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart index b1a1fe0c1d0f..6cda0773d11d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/read_only_first.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,9 +17,21 @@ class ReadOnlyFirst { this.baz, }); - String bar; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? bar; - String baz; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? baz; @override bool operator ==(Object other) => identical(this, other) || other is ReadOnlyFirst && @@ -28,9 +40,9 @@ class ReadOnlyFirst { @override int get hashCode => - // ignore: unnecessary_parenthesis - (bar == null ? 0 : bar.hashCode) + - (baz == null ? 0 : baz.hashCode); + // ignore: unnecessary_parenthesis + (bar == null ? 0 : bar!.hashCode) + + (baz == null ? 0 : baz!.hashCode); @override String toString() => 'ReadOnlyFirst[bar=$bar, baz=$baz]'; @@ -49,9 +61,21 @@ class ReadOnlyFirst { /// Returns a new [ReadOnlyFirst] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static ReadOnlyFirst fromJson(dynamic value) { + static ReadOnlyFirst? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ReadOnlyFirst[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ReadOnlyFirst[$key]" has a null value in JSON.'); + }); + return true; + }()); + return ReadOnlyFirst( bar: mapValueOfType(json, r'bar'), baz: mapValueOfType(json, r'baz'), @@ -60,36 +84,50 @@ class ReadOnlyFirst { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(ReadOnlyFirst.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ReadOnlyFirst.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = ReadOnlyFirst.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ReadOnlyFirst.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of ReadOnlyFirst-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = ReadOnlyFirst.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ReadOnlyFirst.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart index 5ed9408d26a2..bdfecbd2e7de 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,13 @@ class SpecialModelName { this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, }); - int dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && @@ -24,8 +30,8 @@ class SpecialModelName { @override int get hashCode => - // ignore: unnecessary_parenthesis - (dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == null ? 0 : dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket.hashCode); + // ignore: unnecessary_parenthesis + (dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == null ? 0 : dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket!.hashCode); @override String toString() => 'SpecialModelName[dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket=$dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket]'; @@ -41,9 +47,21 @@ class SpecialModelName { /// Returns a new [SpecialModelName] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static SpecialModelName fromJson(dynamic value) { + static SpecialModelName? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SpecialModelName[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SpecialModelName[$key]" has a null value in JSON.'); + }); + return true; + }()); + return SpecialModelName( dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: mapValueOfType(json, r'$special[property.name]'), ); @@ -51,36 +69,50 @@ class SpecialModelName { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(SpecialModelName.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SpecialModelName.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = SpecialModelName.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SpecialModelName.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of SpecialModelName-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = SpecialModelName.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SpecialModelName.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart index 193c7004028f..71b8799d1cb1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/tag.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,9 +17,21 @@ class Tag { this.name, }); - int id; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; - String name; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; @override bool operator ==(Object other) => identical(this, other) || other is Tag && @@ -28,9 +40,9 @@ class Tag { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (name == null ? 0 : name.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode); @override String toString() => 'Tag[id=$id, name=$name]'; @@ -49,9 +61,21 @@ class Tag { /// Returns a new [Tag] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static Tag fromJson(dynamic value) { + static Tag? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Tag[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Tag[$key]" has a null value in JSON.'); + }); + return true; + }()); + return Tag( id: mapValueOfType(json, r'id'), name: mapValueOfType(json, r'name'), @@ -60,36 +84,50 @@ class Tag { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(Tag.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Tag.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = Tag.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Tag.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of Tag-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = Tag.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Tag.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart index d2b94ed6a7ab..0b10d4fe7c23 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -23,22 +23,70 @@ class User { this.userStatus, }); - int id; - - String username; - - String firstName; - - String lastName; - - String email; - - String password; - - String phone; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? username; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? firstName; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? lastName; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? email; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? password; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? phone; /// User Status - int userStatus; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? userStatus; @override bool operator ==(Object other) => identical(this, other) || other is User && @@ -53,15 +101,15 @@ class User { @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id.hashCode) + - (username == null ? 0 : username.hashCode) + - (firstName == null ? 0 : firstName.hashCode) + - (lastName == null ? 0 : lastName.hashCode) + - (email == null ? 0 : email.hashCode) + - (password == null ? 0 : password.hashCode) + - (phone == null ? 0 : phone.hashCode) + - (userStatus == null ? 0 : userStatus.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (username == null ? 0 : username!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (password == null ? 0 : password!.hashCode) + + (phone == null ? 0 : phone!.hashCode) + + (userStatus == null ? 0 : userStatus!.hashCode); @override String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; @@ -98,9 +146,21 @@ class User { /// Returns a new [User] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static User fromJson(dynamic value) { + static User? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "User[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "User[$key]" has a null value in JSON.'); + }); + return true; + }()); + return User( id: mapValueOfType(json, r'id'), username: mapValueOfType(json, r'username'), @@ -115,36 +175,50 @@ class User { return null; } - static List listFromJson(dynamic json, {bool emptyIsNull, bool growable,}) => - json is List && json.isNotEmpty - ? json.map(User.fromJson).toList(growable: true == growable) - : true == emptyIsNull ? null : []; + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = User.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) => map[key] = User.fromJson(value)); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = User.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } } return map; } // maps a json object with a list of User-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool emptyIsNull, bool growable,}) { + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json - .cast() - .forEach((key, dynamic value) { - map[key] = User.listFromJson( - value, - emptyIsNull: emptyIsNull, - growable: growable, - ); - }); + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = User.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } } return map; } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/pom.xml b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/pom.xml deleted file mode 100644 index d09de2749f6a..000000000000 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - 4.0.0 - org.openapitools - Dart2PetstoreClientLibFakeTests - pom - 1.0.0-SNAPSHOT - Dart2 Petstore Client Lib Fake - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - export-dartfmt - pre-install-test - - exec - - - export - - DART_FMT_PATH=/usr/local/bin/dartfmt - - - - - pub-get - pre-integration-test - - exec - - - pub - - get - - - - - pub-test - integration-test - - exec - - - pub - - run - test - - - - - - - - diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/additional_properties_class_test.dart index 3f231dddf74d..ba464213ba93 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/additional_properties_class_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/additional_properties_class_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for AdditionalPropertiesClass void main() { - final instance = AdditionalPropertiesClass(); + // final instance = AdditionalPropertiesClass(); group('test AdditionalPropertiesClass', () { // Map mapProperty (default value: const {}) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/animal_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/animal_test.dart index 3e6526e71957..b4d1e331abee 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/animal_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/animal_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Animal void main() { - final instance = Animal(); + // final instance = Animal(); group('test Animal', () { // String className diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/another_fake_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/another_fake_api_test.dart index 355b4140bdd6..34367effd5a9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/another_fake_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/another_fake_api_test.dart @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for AnotherFakeApi void main() { - final instance = AnotherFakeApi(); + // final instance = AnotherFakeApi(); group('tests for AnotherFakeApi', () { // To test special tags diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/api_response_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/api_response_test.dart index b0c30615b926..e9743c1ddded 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/api_response_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/api_response_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ApiResponse void main() { - final instance = ApiResponse(); + // final instance = ApiResponse(); group('test ApiResponse', () { // int code diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart index 53ed7123a884..16ba1e3e45c3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ArrayOfArrayOfNumberOnly void main() { - final instance = ArrayOfArrayOfNumberOnly(); + // final instance = ArrayOfArrayOfNumberOnly(); group('test ArrayOfArrayOfNumberOnly', () { // List> arrayArrayNumber (default value: const []) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_of_number_only_test.dart index 99fb4e3ddf79..5a83508f431e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_of_number_only_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_of_number_only_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ArrayOfNumberOnly void main() { - final instance = ArrayOfNumberOnly(); + // final instance = ArrayOfNumberOnly(); group('test ArrayOfNumberOnly', () { // List arrayNumber (default value: const []) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_test_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_test_test.dart index f1af158fe2fe..7ed043205d9d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_test_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/array_test_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ArrayTest void main() { - final instance = ArrayTest(); + // final instance = ArrayTest(); group('test ArrayTest', () { // List arrayOfString (default value: const []) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/capitalization_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/capitalization_test.dart index c21e1a31c933..ec2cf7e54803 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/capitalization_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/capitalization_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Capitalization void main() { - final instance = Capitalization(); + // final instance = Capitalization(); group('test Capitalization', () { // String smallCamel diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart index f4d0a69b7ca3..018a5e89ce17 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for CatAllOf void main() { - final instance = CatAllOf(); + // final instance = CatAllOf(); group('test CatAllOf', () { // bool declawed diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_test.dart index e7d33048bbc4..cb2a70551331 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Cat void main() { - final instance = Cat(); + // final instance = Cat(); group('test Cat', () { // String className diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/category_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/category_test.dart index 54d51663d9d9..8e45f5de2e51 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/category_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/category_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Category void main() { - final instance = Category(); + // final instance = Category(); group('test Category', () { // int id diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/class_model_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/class_model_test.dart index 047ce788765a..0fa269691c11 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/class_model_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/class_model_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ClassModel void main() { - final instance = ClassModel(); + // final instance = ClassModel(); group('test ClassModel', () { // String class_ diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/default_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/default_api_test.dart index 2756c463df1c..530a221d7766 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/default_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/default_api_test.dart @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for DefaultApi void main() { - final instance = DefaultApi(); + // final instance = DefaultApi(); group('tests for DefaultApi', () { //Future fooGet() async diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/deprecated_object_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/deprecated_object_test.dart index a1c6df250582..cee2bb6a5be3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/deprecated_object_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/deprecated_object_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for DeprecatedObject void main() { - final instance = DeprecatedObject(); + // final instance = DeprecatedObject(); group('test DeprecatedObject', () { // String name diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart index 5a0209898b88..85b1bbc460ad 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for DogAllOf void main() { - final instance = DogAllOf(); + // final instance = DogAllOf(); group('test DogAllOf', () { // String breed diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_test.dart index bce7e5bbdece..7704643bc25c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Dog void main() { - final instance = Dog(); + // final instance = Dog(); group('test Dog', () { // String className diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_arrays_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_arrays_test.dart index b3364c9a89a6..07318b4510fe 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_arrays_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_arrays_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for EnumArrays void main() { - final instance = EnumArrays(); + // final instance = EnumArrays(); group('test EnumArrays', () { // String justSymbol diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_class_test.dart index 496ffbd68cfd..c93a03b32ffa 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_class_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_class_test.dart @@ -1,15 +1,17 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for EnumClass void main() { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_test_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_test_test.dart index 52618838aff4..a5330759e27a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_test_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/enum_test_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for EnumTest void main() { - final instance = EnumTest(); + // final instance = EnumTest(); group('test EnumTest', () { // String enumString diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/fake_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/fake_api_test.dart index 065e89afdc1e..0b0c6bcb8ac0 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/fake_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/fake_api_test.dart @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for FakeApi void main() { - final instance = FakeApi(); + // final instance = FakeApi(); group('tests for FakeApi', () { // Health check endpoint @@ -65,7 +67,14 @@ void main() { // TODO }); - // For this test, the body for this request much reference a schema named `File`. + // For this test, the body has to be a binary file. + // + //Future testBodyWithBinary(MultipartFile body) async + test('test testBodyWithBinary', () async { + // TODO + }); + + // For this test, the body for this request must reference a schema named `File`. // //Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) async test('test testBodyWithFileSchema', () async { @@ -129,7 +138,7 @@ void main() { // To test the collection format in query parameters // - //Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) async + //Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map language }) async test('test testQueryParameterCollectionFormat', () async { // TODO }); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart index 1a0f96589476..2570d74f567c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for FakeClassnameTags123Api void main() { - final instance = FakeClassnameTags123Api(); + // final instance = FakeClassnameTags123Api(); group('tests for FakeClassnameTags123Api', () { // To test class name in snake case diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/file_schema_test_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/file_schema_test_class_test.dart index 4316bb385a76..b69c027e926a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/file_schema_test_class_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/file_schema_test_class_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for FileSchemaTestClass void main() { - final instance = FileSchemaTestClass(); + // final instance = FileSchemaTestClass(); group('test FileSchemaTestClass', () { // ModelFile file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/foo_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/foo_test.dart index 7b72da51b0e8..82ac0359b8a6 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/foo_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/foo_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Foo void main() { - final instance = Foo(); + // final instance = Foo(); group('test Foo', () { // String bar (default value: 'bar') diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/format_test_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/format_test_test.dart index e776be1d9f68..5f382b03b5bf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/format_test_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/format_test_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for FormatTest void main() { - final instance = FormatTest(); + // final instance = FormatTest(); group('test FormatTest', () { // int integer diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/has_only_read_only_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/has_only_read_only_test.dart index 16b36e117094..b41796d19d62 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/has_only_read_only_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/has_only_read_only_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for HasOnlyReadOnly void main() { - final instance = HasOnlyReadOnly(); + // final instance = HasOnlyReadOnly(); group('test HasOnlyReadOnly', () { // String bar diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/health_check_result_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/health_check_result_test.dart index 1599fc46a283..5f09d312d74d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/health_check_result_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/health_check_result_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for HealthCheckResult void main() { - final instance = HealthCheckResult(); + // final instance = HealthCheckResult(); group('test HealthCheckResult', () { // String nullableMessage diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/inline_response_default_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/inline_response_default_test.dart index ecb2a874f05f..e344b8a6fd00 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/inline_response_default_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/inline_response_default_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for InlineResponseDefault void main() { - final instance = InlineResponseDefault(); + // final instance = InlineResponseDefault(); group('test InlineResponseDefault', () { // Foo string diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/map_test_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/map_test_test.dart index 21af0b85fa36..f7da040f3265 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/map_test_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/map_test_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for MapTest void main() { - final instance = MapTest(); + // final instance = MapTest(); group('test MapTest', () { // Map> mapMapOfString (default value: const {}) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart index a8e0fdd8da64..f23f59f58c72 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for MixedPropertiesAndAdditionalPropertiesClass void main() { - final instance = MixedPropertiesAndAdditionalPropertiesClass(); + // final instance = MixedPropertiesAndAdditionalPropertiesClass(); group('test MixedPropertiesAndAdditionalPropertiesClass', () { // String uuid diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model200_response_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model200_response_test.dart index c28d3671dfc1..46ccb12c5586 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model200_response_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model200_response_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Model200Response void main() { - final instance = Model200Response(); + // final instance = Model200Response(); group('test Model200Response', () { // int name diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_client_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_client_test.dart index c0a59729e3d5..e730318e0679 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_client_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_client_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ModelClient void main() { - final instance = ModelClient(); + // final instance = ModelClient(); group('test ModelClient', () { // String client diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_file_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_file_test.dart index b2f6d48afa74..663e0a76fb75 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_file_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_file_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ModelFile void main() { - final instance = ModelFile(); + // final instance = ModelFile(); group('test ModelFile', () { // Test capitalization diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_list_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_list_test.dart index 02e98011b21f..1300f29e4947 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_list_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_list_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ModelList void main() { - final instance = ModelList(); + // final instance = ModelList(); group('test ModelList', () { // String n123list diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_return_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_return_test.dart index b7f065e4fb45..525c88715ac4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_return_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/model_return_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ModelReturn void main() { - final instance = ModelReturn(); + // final instance = ModelReturn(); group('test ModelReturn', () { // int return_ diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/name_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/name_test.dart index 8e0ef41e9f2f..0d92245332bf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/name_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/name_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Name void main() { - final instance = Name(); + // final instance = Name(); group('test Name', () { // int name diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/nullable_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/nullable_class_test.dart index 6147fbe1336b..269e281027ba 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/nullable_class_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/nullable_class_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for NullableClass void main() { - final instance = NullableClass(); + // final instance = NullableClass(); group('test NullableClass', () { // int integerProp diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/number_only_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/number_only_test.dart index 3662bff150d9..04381ff2c543 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/number_only_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/number_only_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for NumberOnly void main() { - final instance = NumberOnly(); + // final instance = NumberOnly(); group('test NumberOnly', () { // num justNumber diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart index b5769dc67490..46275670a17a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ObjectWithDeprecatedFields void main() { - final instance = ObjectWithDeprecatedFields(); + // final instance = ObjectWithDeprecatedFields(); group('test ObjectWithDeprecatedFields', () { // String uuid diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/order_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/order_test.dart index 614a14e42bb9..b625abdaf9fc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/order_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/order_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Order void main() { - final instance = Order(); + // final instance = Order(); group('test Order', () { // int id diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_composite_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_composite_test.dart index 294c823443c3..33fe3a7ef1a6 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_composite_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_composite_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for OuterComposite void main() { - final instance = OuterComposite(); + // final instance = OuterComposite(); group('test OuterComposite', () { // num myNumber diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_default_value_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_default_value_test.dart index 84ae975ef189..fa0e93aaf7b0 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_default_value_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_default_value_test.dart @@ -1,15 +1,17 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for OuterEnumDefaultValue void main() { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart index bf3399ba4281..6d88d2c3d159 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart @@ -1,15 +1,17 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for OuterEnumIntegerDefaultValue void main() { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_integer_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_integer_test.dart index d807f03227ff..41715de4de58 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_integer_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_integer_test.dart @@ -1,15 +1,17 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for OuterEnumInteger void main() { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_test.dart index a2b79ce0c1c6..100df39ba80e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_enum_test.dart @@ -1,15 +1,17 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for OuterEnum void main() { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart index 6995c37ebb4c..ffb9f4019c9a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for OuterObjectWithEnumProperty void main() { - final instance = OuterObjectWithEnumProperty(); + // final instance = OuterObjectWithEnumProperty(); group('test OuterObjectWithEnumProperty', () { // OuterEnumInteger value diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_api_test.dart index 5f4c994acefa..939365f0f382 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_api_test.dart @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for PetApi void main() { - final instance = PetApi(); + // final instance = PetApi(); group('tests for PetApi', () { // Add a new pet to the store diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_test.dart index 23c26595c85c..8db1ddea4ec6 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Pet void main() { - final instance = Pet(); + // final instance = Pet(); group('test Pet', () { // int id diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/read_only_first_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/read_only_first_test.dart index d3326fd494d0..16d3a5662597 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/read_only_first_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/read_only_first_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for ReadOnlyFirst void main() { - final instance = ReadOnlyFirst(); + // final instance = ReadOnlyFirst(); group('test ReadOnlyFirst', () { // String bar diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/special_model_name_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/special_model_name_test.dart index f3b461364fbe..4b00f426a86c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/special_model_name_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/special_model_name_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for SpecialModelName void main() { - final instance = SpecialModelName(); + // final instance = SpecialModelName(); group('test SpecialModelName', () { // int dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket 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 4a7ed54abbbc..351ef2682801 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 @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for StoreApi void main() { - final instance = StoreApi(); + // final instance = StoreApi(); group('tests for StoreApi', () { // Delete purchase order by ID diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/tag_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/tag_test.dart index 66ecdfe488dc..78d5880e6d4c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/tag_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/tag_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for Tag void main() { - final instance = Tag(); + // final instance = Tag(); group('test Tag', () { // int id diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/user_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/user_api_test.dart index 73ee89a29451..4f82364bd172 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/user_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/user_api_test.dart @@ -1,19 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 /// tests for UserApi void main() { - final instance = UserApi(); + // final instance = UserApi(); group('tests for UserApi', () { // Create user diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/user_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/user_test.dart index b89cd360489d..d86551e10b64 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/user_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/user_test.dart @@ -1,18 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars import 'package:openapi/api.dart'; import 'package:test/test.dart'; +// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 // tests for User void main() { - final instance = User(); + // final instance = User(); group('test User', () { // int id From 508da12ca7bfaf889565ee985bc534d12d77f732 Mon Sep 17 00:00:00 2001 From: Thomas Bredzinski Date: Sun, 2 Jan 2022 20:55:01 -0500 Subject: [PATCH 049/175] Add support for asynchronous API for JavaJaxRsSpec (#10919) * Add support for asynchronous API for JavaJaxRsSpec https://github.com/OpenAPITools/openapi-generator/issues/4832 * Ran the requested command for a PR Run the following to build the project and update samples: ./mvnw clean package ./bin/generate-samples.sh ./bin/utils/export_docs_generators.sh * Set java 8 mode when using supportAsync=true `CompletionStage` are only introduced since 1.8, enabling async should for use java8 Co-authored-by: Thomas Bredzinski --- docs/generators/jaxrs-cxf-cdi.md | 1 + docs/generators/jaxrs-spec.md | 1 + .../languages/JavaJAXRSSpecServerCodegen.java | 9 + .../resources/JavaJaxRS/spec/api.mustache | 4 + .../JavaJaxRS/spec/apiInterface.mustache | 2 +- .../JavaJaxRS/spec/apiMethod.mustache | 4 +- .../resources/JavaJaxRS/spec/pom.mustache | 5 + .../spec/returnAsyncTypeInterface.mustache | 1 + .../jaxrs/JavaJAXRSSpecServerCodegenTest.java | 175 ++++++++++++++++++ .../src/test/resources/3_0/issue_4832.yaml | 31 ++++ 10 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/JavaJaxRS/spec/returnAsyncTypeInterface.mustache create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue_4832.yaml diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 621f0dc3a735..c46ec4c96310 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -58,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/gen/java| +|supportAsync|Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).| |false| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 621122f6eaa8..a29e8a931781 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -58,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|supportAsync|Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).| |false| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| 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 a0313a6bc8e0..8b50933247a7 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 @@ -102,6 +102,7 @@ public JavaJAXRSSpecServerCodegen() { cliOptions.add(CliOption.newBoolean(RETURN_RESPONSE, "Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.").defaultValue(String.valueOf(returnResponse))); cliOptions.add(CliOption.newBoolean(USE_SWAGGER_ANNOTATIONS, "Whether to generate Swagger annotations.", useSwaggerAnnotations)); cliOptions.add(CliOption.newString(OPEN_API_SPEC_FILE_LOCATION, "Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.")); + cliOptions.add(CliOption.newBoolean(SUPPORT_ASYNC, "Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).", supportAsync)); } @Override @@ -121,6 +122,14 @@ public void processOpts() { additionalProperties.remove(RETURN_RESPONSE); } } + if (additionalProperties.containsKey(SUPPORT_ASYNC)) { + supportAsync = Boolean.parseBoolean(additionalProperties.get(SUPPORT_ASYNC).toString()); + if (!supportAsync) { + additionalProperties.remove(SUPPORT_ASYNC); + } else { + setJava8ModeAndAdditionalProperties(true); + } + } if (QUARKUS_LIBRARY.equals(library) || THORNTAIL_LIBRARY.equals(library) || HELIDON_LIBRARY.equals(library) || OPEN_LIBERTY_LIBRARY.equals(library) || KUMULUZEE_LIBRARY.equals(library)) { useSwaggerAnnotations = false; } else { diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache index b19e2510d714..37f5ba040139 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache @@ -9,6 +9,10 @@ import javax.ws.rs.core.Response; {{#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; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache index 0fcf5420c282..77e7bd3e3dae 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache @@ -10,4 +10,4 @@ {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} - {{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}); \ No newline at end of file + {{#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/apiMethod.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache index d6c4ae7c82c1..edecd390f9cf 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache @@ -11,6 +11,6 @@ @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} - public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) { - return Response.ok().entity("magic!").build(); + 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/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache index 48ac267133b9..3aa05e79fbd8 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache @@ -140,6 +140,11 @@ {{/useBeanValidation}} +{{#java8}} + 1.8 + ${java.version} + ${java.version} +{{/java8}} 2.9.9 4.13.1 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/returnAsyncTypeInterface.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/returnAsyncTypeInterface.mustache new file mode 100644 index 000000000000..0da348c7a224 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/returnAsyncTypeInterface.mustache @@ -0,0 +1 @@ +CompletionStage<{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{#returnContainer}}{{#isMap}}Map{{/isMap}}{{#isArray}}{{{returnContainer}}}<{{{returnBaseType}}}>{{/isArray}}{{/returnContainer}}{{^returnContainer}}{{{returnBaseType}}}{{/returnContainer}}{{/returnResponse}}> \ 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 3fe1133d755c..c04197d9091c 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 @@ -28,6 +28,11 @@ import static org.openapitools.codegen.TestUtils.assertFileContains; import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles; +import static org.openapitools.codegen.languages.AbstractJavaCodegen.JAVA8_MODE; +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.SUPPORT_ASYNC; +import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.RETURN_RESPONSE; import static org.testng.Assert.assertTrue; /** @@ -95,6 +100,8 @@ public void testAdditionalPropertiesPutForConfigValues() throws Exception { codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "xyz.yyyyy.iiii.invoker"); codegen.additionalProperties().put("serverPort", "8088"); codegen.additionalProperties().put(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION, "openapi.yml"); + codegen.additionalProperties().put(SUPPORT_ASYNC, true); + codegen.additionalProperties().put(JAVA8_MODE, false); codegen.processOpts(); OpenAPI openAPI = new OpenAPI(); @@ -112,6 +119,8 @@ public void testAdditionalPropertiesPutForConfigValues() throws Exception { Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaJAXRSServerCodegen.SERVER_PORT), "8088"); Assert.assertEquals(codegen.getOpenApiSpecFileLocation(), "openapi.yml"); Assert.assertEquals(codegen.additionalProperties().get(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION), "openapi.yml"); + Assert.assertEquals(codegen.additionalProperties().get(SUPPORT_ASYNC), "true"); + Assert.assertEquals(codegen.additionalProperties().get(JAVA8_MODE), true); //overridden by supportAsync=true } /** @@ -419,4 +428,170 @@ public void addsImportForSetResponse() throws IOException { assertFileContains(path, "\nimport java.util.Set;\n"); } + + @Test + public void generateApiWithAsyncSupport() 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.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled + + 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 java.util.concurrent.CompletionStage;\n", + "\nimport java.util.concurrent.CompletableFuture;\n", + "\npublic CompletionStage pingGet() {\n", + "\nCompletableFuture.supplyAsync(() -> Response.ok().entity(\"magic!\").build())\n" + ); + } + + @Test + public void generateApiWithAsyncSupportAndInterfaceOnly() throws Exception { + final File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/ping.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled + codegen.additionalProperties().put(INTERFACE_ONLY, true); //And only interfaces are generated + + 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 interface 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 java.util.concurrent.CompletionStage;\n", + "\nCompletionStage pingGet();\n"); + } + + @Test + public void generateApiWithAsyncSupportAndInterfaceOnlyAndResponse() throws Exception { + final File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/ping.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled + codegen.additionalProperties().put(INTERFACE_ONLY, true); //And only interfaces are generated + codegen.additionalProperties().put(RETURN_RESPONSE, true); //And return type is Response + + 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 interface 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 java.util.concurrent.CompletionStage;\n", + "\nCompletionStage pingGet();\n"); + } + + + @Test + public void generatePetstoreAPIWithAsyncSupport() throws Exception { + final File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled + codegen.additionalProperties().put(INTERFACE_ONLY, true); //And only interfaces are generated + + 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 interfaces contains CompletionStage + TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PetApi.java"); + assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PetApi.java"), + "\nimport java.util.concurrent.CompletionStage;\n", + "CompletionStage deletePet", //Support empty response + "CompletionStage> findPetsByStatus", //Support type of arrays response + "CompletionStage getPetById" //Support single type response + ); + + TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/StoreApi.java"); + assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/StoreApi.java"), + "\nimport java.util.concurrent.CompletionStage;\n", + "CompletionStage>" //Support map response + ); + + TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/UserApi.java"); + assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/UserApi.java"), + "\nimport java.util.concurrent.CompletionStage;\n", + "CompletionStage" //Support simple types + ); + } + + @Test + public void generatePingWithAsyncSupportPrimitiveType() throws Exception { + final File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_4832.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled + codegen.additionalProperties().put(INTERFACE_ONLY, true); //And only interfaces are generated + codegen.additionalProperties().put(USE_TAGS, true); //And use tags to generate everything in PingApi.java + + 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 interfaces contains CompletionStage with proper classes instead of primitive types + TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java"); + TestUtils.assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PingApi.java"), + "CompletionStage pingGetBoolean", //Support primitive types response + "CompletionStage pingGetInteger" //Support primitive types response + ); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_4832.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_4832.yaml new file mode 100644 index 000000000000..581ffb146f67 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue_4832.yaml @@ -0,0 +1,31 @@ +openapi: 3.0.1 +info: + title: ping that return primitive types + version: '1.0' +servers: + - url: 'http://localhost:8082/' +paths: + /pingBoolean: + get: + operationId: pingGetBoolean + tags: [Ping] + responses: + '200': + description: OK + content: + 'application/json': + schema: + type: boolean + /pingInteger: + get: + operationId: pingGetInteger + tags: [Ping] + responses: + '200': + description: OK + content: + 'application/json': + schema: + type: integer + format: int32 + From ae880c94a939fd8af5aac399d0830e1a3e9e7217 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 3 Jan 2022 11:56:35 +0800 Subject: [PATCH 050/175] various minor bug fixes based on sonar report (#11214) --- .../languages/CppTizenClientCodegen.java | 2 +- .../languages/JavaMicronautClientCodegen.java | 19 ++++++++++--------- .../codegen/languages/K6ClientCodegen.java | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java index a67bc3f1845e..a60e1cdb6beb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java @@ -175,7 +175,7 @@ public String getTypeDeclaration(String name) { if (languageSpecificPrimitives.contains(name)) { return name; } else { - return name; + return super.getTypeDeclaration(name); } } 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 c8516efc020b..f3d398c8e763 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 @@ -15,6 +15,7 @@ import java.util.Arrays; import java.util.EnumSet; import java.util.HashMap; +import java.util.Map; import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE; @@ -97,18 +98,18 @@ public JavaMicronautClientCodegen() { cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation)); CliOption buildToolOption = new CliOption(OPT_BUILD, "Specify for which build tool to generate files").defaultValue(buildTool); - buildToolOption.setEnum(new HashMap() {{ - put(OPT_BUILD_GRADLE, "Gradle configuration is generated for the project"); - put(OPT_BUILD_MAVEN, "Maven configuration is generated for the project"); - put(OPT_BUILD_ALL, "Both Gradle and Maven configurations are generated"); - }}); + Map buildToolOptionMap = new HashMap(); + buildToolOptionMap.put(OPT_BUILD_GRADLE, "Gradle configuration is generated for the project"); + buildToolOptionMap.put(OPT_BUILD_MAVEN, "Maven configuration is generated for the project"); + buildToolOptionMap.put(OPT_BUILD_ALL, "Both Gradle and Maven configurations are generated"); + buildToolOption.setEnum(buildToolOptionMap); cliOptions.add(buildToolOption); CliOption testToolOption = new CliOption(OPT_TEST, "Specify which test tool to generate files for").defaultValue(testTool); - testToolOption.setEnum(new HashMap() {{ - put(OPT_TEST_JUNIT, "Use JUnit as test tool"); - put(OPT_TEST_SPOCK, "Use Spock as test tool"); - }}); + Map testToolOptionMap = new HashMap(); + testToolOptionMap.put(OPT_TEST_JUNIT, "Use JUnit as test tool"); + testToolOptionMap.put(OPT_TEST_SPOCK, "Use Spock as test tool"); + testToolOption.setEnum(testToolOptionMap); cliOptions.add(testToolOption); // Remove the date library option diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java index 681594ea8eb4..982a3fefbe03 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java @@ -1041,7 +1041,7 @@ private boolean shouldHideOperationResponse(ApiResponse resp) { Map respExtensions = (Map) resp.getExtensions().get(X_OPERATION_RESPONSE); Entry entry = respExtensions.entrySet().stream().findFirst().orElse(null); - if (entry.getKey().equals(X_OPERATION_RESPONSE_HIDE)) { + if (entry != null && entry.getKey().equals(X_OPERATION_RESPONSE_HIDE)) { return Boolean.parseBoolean(String.valueOf(entry.getValue())); } } From 63974213993553fb10b61b3677491c152ec64c93 Mon Sep 17 00:00:00 2001 From: sullis Date: Sun, 2 Jan 2022 19:56:58 -0800 Subject: [PATCH 051/175] [scala-gatling] add ScalaGatlingCodegenTest (#11212) --- .../scala/ScalaGatlingCodegenTest.java | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/scala/ScalaGatlingCodegenTest.java diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scala/ScalaGatlingCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scala/ScalaGatlingCodegenTest.java new file mode 100644 index 000000000000..5dfef81397a6 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scala/ScalaGatlingCodegenTest.java @@ -0,0 +1,100 @@ +package org.openapitools.codegen.scala; + +import com.google.common.collect.ImmutableList; + +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.config.CodegenConfigurator; +import org.openapitools.codegen.languages.ScalaGatlingCodegen; +import static org.testng.Assert.assertEquals; + +import org.testng.annotations.Test; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.List; +import java.util.stream.Collectors; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.DateTimeSchema; +import io.swagger.v3.oas.models.media.IntegerSchema; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.parser.util.SchemaTypeUtil; + +public class ScalaGatlingCodegenTest { + + private final ScalaGatlingCodegen codegen = new ScalaGatlingCodegen(); + + @Test + public void happyPath() throws IOException { + assertEquals(codegen.getName(), "scala-gatling"); + assertEquals(codegen.getTag(), CodegenType.CLIENT); + + final List filenames = codegen.supportingFiles().stream() + .map(supportingFile -> supportingFile.getDestinationFilename()) + .collect(Collectors.toList()); + assertEquals(filenames, ImmutableList.of( + "build.gradle", + "logback.xml", + "default.conf", + "CI.conf", + "CD.conf", + "stress.conf", + "baseline.conf", + "longevity.conf")); + + final Schema model = new Schema() + .description("a sample model") + .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) + .addProperties("name", new StringSchema()) + .addProperties("createdAt", new DateTimeSchema()) + .addRequiredItem("id") + .addRequiredItem("name"); + final OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + assertEquals(cm.name, "sample"); + assertEquals(cm.classname, "Sample"); + assertEquals(cm.description, "a sample model"); + assertEquals(cm.vars.size(), 3); + + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName(codegen.getName()) + .setInputSpec("src/test/resources/3_0/scala_reserved_words.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + + generator.setGenerateMetadata(false); + + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "true"); + + List files = generator.opts(clientOptInput).generate(); + + assertEquals(files.size(), 9); + + TestUtils.ensureContainsFile(files, output, "src/gatling/scala/org/openapitools/client/model/SomeObj.scala"); + TestUtils.ensureContainsFile(files, output, "build.gradle"); + TestUtils.ensureContainsFile(files, output, "src/gatling/resources/conf/logback.xml"); + TestUtils.ensureContainsFile(files, output, "src/gatling/resources/conf/baseline.conf"); + TestUtils.ensureContainsFile(files, output, "src/gatling/resources/conf/stress.conf"); + TestUtils.ensureContainsFile(files, output, "src/gatling/resources/conf/longevity.conf"); + } + +} From 15b228c3ca1abfe72f34acd05a29f050e47a7fb9 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 3 Jan 2022 17:05:38 +0800 Subject: [PATCH 052/175] fix import mapping for JsonValue (#11216) --- .../codegen/languages/KotlinSpringServerCodegen.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 8960b2f8e696..ebbe0eacca07 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -541,10 +541,12 @@ public Map postProcessModelsEnum(Map objs) { .forEach(cm -> { cm.imports.add(importMapping.get("JsonValue")); cm.imports.add(importMapping.get("JsonProperty")); - Map item = new HashMap<>(); - item.put("import", importMapping.get("JsonValue")); - item.put("import", importMapping.get("JsonProperty")); - imports.add(item); + Map itemJsonValue = new HashMap<>(); + itemJsonValue.put("import", importMapping.get("JsonValue")); + imports.add(itemJsonValue); + Map itemJsonProperty = new HashMap<>(); + itemJsonProperty.put("import", importMapping.get("JsonProperty")); + imports.add(itemJsonProperty); }); return objs; From 161de2cfdf8d044a8b772dfa2ea3e62a478f6b79 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 3 Jan 2022 18:05:08 +0800 Subject: [PATCH 053/175] update samples --- .../petstore/spring-cloud-date-time/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/DefaultApi.java | 2 +- .../petstore/spring-cloud-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-cloud-date-time/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/DefaultApi.java | 2 +- .../spring-cloud-oas3-fakeapi/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTags123Api.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-reactive/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-useoptional/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../springboot/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- 63 files changed, 63 insertions(+), 63 deletions(-) diff --git a/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 54e556cb9ed2..ecd5d0083e8d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 88803c5bac2a..72f18a325056 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 da999d740a5a..cd943ad87707 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 225627cbacc0..d6bd9b72b1ed 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 7dbf104466fb..bd799ae55a44 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 9085e07967bc..19999726fe75 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a9d785eaea31..1dd2e1db8bb1 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 4239438bd3c1..cc503e6ae215 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 c618e1e4d902..d720b78ba1a9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d8329e19d40b..88848f55a786 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 665546ec700e..f07ada0583b2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 9eb95c97b891..41d32bcb8e5b 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a11117a8c9fa..975a2451fcc7 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 f583fb099e73..0c01703e1f51 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 90dfd2c5f8e9..348133a5cbdd 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 c42b27e3a5b8..c20ade100d73 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 5b0522ee7758..35639141083e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 81ca2e8ee07c..df589e8850a5 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d634215d030b..747df25c92ee 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 5f640ca78deb..7a187a2960e9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d4cbbab6f7b1..4043144253af 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 26389c13ef58..7ce690b7a51b 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3cdc6eeed919..032e49e9e4c0 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 b36ef3022ad8..c218b2ac8e44 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a1667f68fd91..3d0c57a3deda 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 52e3ba4f096d..5b83617ed12f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 7ddf343bfc3a..27d9acc68cc5 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 de9cf4c59e2a..d52fb531b9d2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 e7dd25c6b5db..8e444d75f186 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 82a5df22e20e..7dd09141421b 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 456caa3cf66f..6ce73e648e13 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 8f1db4a34810..d335ce440dc1 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 67abf9f8cb5e..b5e20e011ace 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ce360c31059f..ced9959be444 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3f0113d6d1ad..8c49dc0dbd00 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 c7e2bb2b25a2..836fd23b7851 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 729f78eb8246..f6c3d07ae363 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 229cba518a2a..033122364a6d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 150f20d9401e..fff406061b77 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 056bfb145d45..3507fde27945 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 1bdbac92e64c..762cc80064db 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 ccd404fbf320..abbd497869b8 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 720457848da9..89d2bb8866e2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 62e378597251..bbece4326a5e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 f28b85a83435..37f094004be3 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 de9b9d16f830..c3450d2baee9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 5a85648b515c..7ac0232cc501 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file 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 0bec586d6930..03f93c03334e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 98cbb475200d..756596c05ac9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ 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 899416135fc5..c3a1c9db6bbc 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION index 0984c4c1ad21..5f68295fc196 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 9f899c5e6d546bc1a17fb4f8ddb130f098fe9d0b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 4 Jan 2022 13:39:57 +0800 Subject: [PATCH 054/175] minor bug fixes in ts fetch generator (#11215) --- .../TypeScriptFetchClientCodegen.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index bc0a2808aad1..5c810f7073b1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -1064,6 +1064,12 @@ public ExtendedCodegenParameter copy() { @Override public boolean equals(Object o) { + if (o == null) + return false; + + if (this.getClass() != o.getClass()) + return false; + boolean result = super.equals(o); ExtendedCodegenParameter that = (ExtendedCodegenParameter) o; return result && @@ -1109,7 +1115,7 @@ public String getItemsDataType() { public ExtendedCodegenProperty(CodegenProperty cp) { super(); - this.openApiType = openApiType; + this.openApiType = cp.openApiType; this.baseName = cp.baseName; this.complexType = cp.complexType; this.getter = cp.getter; @@ -1200,6 +1206,12 @@ public ExtendedCodegenProperty(CodegenProperty cp) { @Override public boolean equals(Object o) { + if (o == null) + return false; + + if (this.getClass() != o.getClass()) + return false; + boolean result = super.equals(o); ExtendedCodegenProperty that = (ExtendedCodegenProperty) o; return result && @@ -1306,6 +1318,12 @@ public ExtendedCodegenOperation(CodegenOperation o) { @Override public boolean equals(Object o) { + if (o == null) + return false; + + if (this.getClass() != o.getClass()) + return false; + boolean result = super.equals(o); ExtendedCodegenOperation that = (ExtendedCodegenOperation) o; return result && @@ -1440,6 +1458,12 @@ public void setModelImports(Set modelImports) { @Override public boolean equals(Object o) { + if (o == null) + return false; + + if (this.getClass() != o.getClass()) + return false; + boolean result = super.equals(o); ExtendedCodegenModel that = (ExtendedCodegenModel) o; return result && From 0a09f1faa35f5a678c63eb40e47129f6a73c802e Mon Sep 17 00:00:00 2001 From: Yuriy Belenko Date: Tue, 4 Jan 2022 08:41:22 +0300 Subject: [PATCH 055/175] [php][bug] Fix DateTime microseconds bug in ObjectSerializer (#11213) * fixing precision for php * remove a bracket * handling whitespace * format comment * Use regexp to trim needless microseconds That way we can save timezone suffix. Co-authored-by: Carmen Quan --- .../resources/php/ObjectSerializer.mustache | 21 +++++-- .../lib/ObjectSerializer.php | 21 +++++-- .../tests/ObjectSerializerTest.php | 62 +++++++++++++++++++ 3 files changed, 96 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index 6d1193099c50..7d48d3557c34 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -120,6 +120,20 @@ class ObjectSerializer } } + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + /** * Take value and turn it into a string suitable for inclusion in * the path, by url-encoding. @@ -313,10 +327,9 @@ class ObjectSerializer return new \DateTime($data); } catch (\Exception $exception) { // Some API's return a date-time with too high nanosecond - // precision for php's DateTime to handle. This conversion - // (string -> unix timestamp -> DateTime) is a workaround - // for the problem. - return (new \DateTime())->setTimestamp(strtotime($data)); + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); } } else { return null; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 9d9562bb6689..093c15794ed4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -129,6 +129,20 @@ public static function sanitizeFilename($filename) } } + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + /** * Take value and turn it into a string suitable for inclusion in * the path, by url-encoding. @@ -322,10 +336,9 @@ public static function deserialize($data, $class, $httpHeaders = null) return new \DateTime($data); } catch (\Exception $exception) { // Some API's return a date-time with too high nanosecond - // precision for php's DateTime to handle. This conversion - // (string -> unix timestamp -> DateTime) is a workaround - // for the problem. - return (new \DateTime())->setTimestamp(strtotime($data)); + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); } } else { return null; diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php index d7cc4a173f16..9c4e86d5bf1e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/ObjectSerializerTest.php @@ -64,4 +64,66 @@ public function provideFileStreams() ], ]; } + + /** + * @covers ObjectSerializer::sanitizeTimestamp + * @dataProvider provideTimestamps + */ + public function testSanitizeTimestamp(string $timestamp, string $expected): void + { + $this->assertEquals($expected, ObjectSerializer::sanitizeTimestamp($timestamp)); + } + + /** + * Test datetime deserialization. + * + * @covers ObjectSerializer::deserialize + * @dataProvider provideTimestamps + * + * @see https://github.com/OpenAPITools/openapi-generator/issues/7942 + * @see https://github.com/OpenAPITools/openapi-generator/issues/10548 + */ + public function testDateTimeParseSecondAccuracy(string $timestamp, string $expected): void + { + $dateTime = ObjectSerializer::deserialize($timestamp, '\DateTime'); + $this->assertEquals(new \DateTime($expected), $dateTime); + } + + public function provideTimestamps(): array + { + return [ + 'String from #7942' => [ + '2020-11-11T15:17:58.868722633Z', + '2020-11-11T15:17:58.868722Z', + ], + 'String from #10548' => [ + '2021-10-06T20:17:16.076372256Z', + '2021-10-06T20:17:16.076372Z', + ], + 'Without timezone' => [ + '2021-10-06T20:17:16.076372256', + '2021-10-06T20:17:16.076372', + ], + 'Without microseconds' => [ + '2021-10-06T20:17:16', + '2021-10-06T20:17:16', + ], + 'Without microseconds with timezone' => [ + '2021-10-06T20:17:16Z', + '2021-10-06T20:17:16Z', + ], + 'With numeric timezone' => [ + '2021-10-06T20:17:16.076372256+03:00', + '2021-10-06T20:17:16.076372+03:00', + ], + 'With numeric timezone without delimiter' => [ + '2021-10-06T20:17:16.076372256+0300', + '2021-10-06T20:17:16.076372+0300', + ], + 'With numeric short timezone' => [ + '2021-10-06T20:17:16.076372256+03', + '2021-10-06T20:17:16.076372+03', + ], + ]; + } } From 5a616757e736958d209c4d33edd4776ab89d417c Mon Sep 17 00:00:00 2001 From: Yohei Kitamura Date: Tue, 4 Jan 2022 01:36:28 -0500 Subject: [PATCH 056/175] Fix examples for request body with array to not raise java.lang.NullPointerException (#11170) --- .../codegen/languages/CrystalClientCodegen.java | 6 +++++- .../org/openapitools/codegen/languages/GoClientCodegen.java | 3 +++ .../codegen/languages/PowerShellClientCodegen.java | 6 +++++- .../openapitools/codegen/languages/RubyClientCodegen.java | 6 +++++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java index 2e77181d7a3d..21b18e18154b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java @@ -657,7 +657,11 @@ private String constructExampleCode(CodegenProperty codegenProperty, HashMap Date: Tue, 4 Jan 2022 13:37:06 +0700 Subject: [PATCH 057/175] update in readme: Manticore Search uses the generator too (#11223) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f8b8df917ae8..48bae346b512 100644 --- a/README.md +++ b/README.md @@ -626,6 +626,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Lumeris](https://www.lumeris.com) - [LVM Versicherungen](https://www.lvm.de) - [MailSlurp](https://www.mailslurp.com) +- [Manticore Search](https://manticoresearch.com) - [Médiavision](https://www.mediavision.fr/) - [Metaswitch](https://www.metaswitch.com/) - [MoonVision](https://www.moonvision.io/) From a3b90183aa123233381744ff6ee0e824d972d98f Mon Sep 17 00:00:00 2001 From: Mostafa Aghajani Date: Tue, 4 Jan 2022 08:47:42 +0200 Subject: [PATCH 058/175] Fix musache template to use "{{package}}.{{dataType}}" on all non primitive types (#11201) --- .../src/main/resources/avro-schema/typeProperty.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/avro-schema/typeProperty.mustache b/modules/openapi-generator/src/main/resources/avro-schema/typeProperty.mustache index a2d5c7a1f7e7..574d9b171248 100644 --- a/modules/openapi-generator/src/main/resources/avro-schema/typeProperty.mustache +++ b/modules/openapi-generator/src/main/resources/avro-schema/typeProperty.mustache @@ -1 +1 @@ -{{^isEnum}}{{^isContainer}}{{#isPrimitiveType}}"{{dataType}}"{{/isPrimitiveType}}{{#isModel}}"{{package}}.{{dataType}}"{{/isModel}}{{#isFile}}"{{package}}.{{dataType}}"{{/isFile}}{{/isContainer}}{{#isContainer}}{{>typeArray}}{{/isContainer}}{{/isEnum}}{{#isEnum}}{{>typeEnum}}{{/isEnum}} \ No newline at end of file +{{^isEnum}}{{^isContainer}}{{#isPrimitiveType}}"{{dataType}}"{{/isPrimitiveType}}{{^isPrimitiveType}}"{{package}}.{{dataType}}"{{/isPrimitiveType}}{{/isContainer}}{{#isContainer}}{{>typeArray}}{{/isContainer}}{{/isEnum}}{{#isEnum}}{{>typeEnum}}{{/isEnum}} \ No newline at end of file From 35a2fa6afc54c2ad2173ee70da9959da4dc1edc2 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 4 Jan 2022 15:01:28 +0800 Subject: [PATCH 059/175] move avro-schema.yaml to bin/configs --- bin/configs/{other => }/avro-schema.yaml | 0 .../schema/petstore/avro-schema/.openapi-generator/FILES | 2 -- .../schema/petstore/avro-schema/.openapi-generator/VERSION | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) rename bin/configs/{other => }/avro-schema.yaml (100%) diff --git a/bin/configs/other/avro-schema.yaml b/bin/configs/avro-schema.yaml similarity index 100% rename from bin/configs/other/avro-schema.yaml rename to bin/configs/avro-schema.yaml diff --git a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/FILES b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/FILES index 894d1ff1db0e..efd990ad5be5 100644 --- a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/FILES +++ b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/FILES @@ -1,7 +1,5 @@ ApiResponse.avsc Category.avsc -InlineObject.avsc -InlineObject1.avsc Order.avsc Pet.avsc Tag.avsc diff --git a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION index d99e7162d01f..0984c4c1ad21 100644 --- a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION +++ b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file From 8c090c978d2fe7ac4b1490f95a623eb89312050f Mon Sep 17 00:00:00 2001 From: Ignacio Campos Rivera Date: Tue, 4 Jan 2022 08:08:03 +0100 Subject: [PATCH 060/175] feat(python-asyncio): add support for proxy config using system env vars (#11171) Co-authored-by: Ignacio Campos --- .../src/main/resources/python-legacy/asyncio/rest.mustache | 3 ++- .../src/main/resources/python/asyncio/rest.mustache | 3 ++- samples/client/petstore/python-asyncio/petstore_api/rest.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-legacy/asyncio/rest.mustache b/modules/openapi-generator/src/main/resources/python-legacy/asyncio/rest.mustache index 538a69bf8eb4..61ad3f2ffa34 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/asyncio/rest.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/asyncio/rest.mustache @@ -62,7 +62,8 @@ class RESTClientObject(object): # https pool manager self.pool_manager = aiohttp.ClientSession( - connector=connector + connector=connector, + trust_env=True ) async def close(self): diff --git a/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache b/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache index 3744b62c81e1..d69e7fd8312e 100644 --- a/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache +++ b/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache @@ -60,7 +60,8 @@ class RESTClientObject(object): # https pool manager self.pool_manager = aiohttp.ClientSession( - connector=connector + connector=connector, + trust_env=True ) async def close(self): diff --git a/samples/client/petstore/python-asyncio/petstore_api/rest.py b/samples/client/petstore/python-asyncio/petstore_api/rest.py index 75ee140efbae..263fe1daafb5 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/rest.py +++ b/samples/client/petstore/python-asyncio/petstore_api/rest.py @@ -70,7 +70,8 @@ def __init__(self, configuration, pools_size=4, maxsize=None): # https pool manager self.pool_manager = aiohttp.ClientSession( - connector=connector + connector=connector, + trust_env=True ) async def close(self): From 74f39b442ead102d407a938fff4ba2e1f37158e9 Mon Sep 17 00:00:00 2001 From: Ilario Date: Tue, 4 Jan 2022 08:14:11 +0100 Subject: [PATCH 061/175] Bugfix of #11176 and related #10706 CPP-QT-QHTTPENGINE Server (#11177) * Fix extra m that prevents qt cpp server to build (#11176) * Fix regular expression to capture IDs on path (#11176) * Fix build issue missing QHttpEngine namespace (#10706) --- .../cpp-qt-qhttpengine-server/apirouter.h.mustache | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache index 028a3097e256..f30a069c19b1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache @@ -36,7 +36,7 @@ protected: if (socket->bytesAvailable() >= socket->contentLength()) { emit requestReceived(socket); } else { - connect(socket, &Socket::readChannelFinished, [this, socket, m]() { + connect(socket, &QHttpEngine::Socket::readChannelFinished, [this, socket]() { emit requestReceived(socket); }); } @@ -91,7 +91,7 @@ private : } inline QRegularExpressionMatch getRequestMatch(QString serverTemplatePath, QString requestPath){ - QRegularExpression parExpr( R"(\{([^\/\\s]+)\})" ); + QRegularExpression parExpr( R"(\{([^\/\s]+)\})" ); serverTemplatePath.replace( parExpr, R"((?<\1>[^\/\s]+))" ); serverTemplatePath.append("[\\/]?$"); QRegularExpression pathExpr( serverTemplatePath ); @@ -105,4 +105,4 @@ private : } {{/cppNamespaceDeclarations}} -#endif // {{prefix}}_APIROUTER_H \ No newline at end of file +#endif // {{prefix}}_APIROUTER_H From 98a28a075af1e80cd638c0b030b035512d346b9c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 4 Jan 2022 15:21:15 +0800 Subject: [PATCH 062/175] update cpp qt5 server samples --- .../server/src/handlers/OAIApiRouter.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIApiRouter.h b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIApiRouter.h index 5b8133a7b76a..22854f6ccfd8 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIApiRouter.h +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIApiRouter.h @@ -46,7 +46,7 @@ class OAIApiRequestHandler : public QHttpEngine::QObjectHandler if (socket->bytesAvailable() >= socket->contentLength()) { emit requestReceived(socket); } else { - connect(socket, &Socket::readChannelFinished, [this, socket, m]() { + connect(socket, &QHttpEngine::Socket::readChannelFinished, [this, socket]() { emit requestReceived(socket); }); } @@ -105,7 +105,7 @@ private : } inline QRegularExpressionMatch getRequestMatch(QString serverTemplatePath, QString requestPath){ - QRegularExpression parExpr( R"(\{([^\/\\s]+)\})" ); + QRegularExpression parExpr( R"(\{([^\/\s]+)\})" ); serverTemplatePath.replace( parExpr, R"((?<\1>[^\/\s]+))" ); serverTemplatePath.append("[\\/]?$"); QRegularExpression pathExpr( serverTemplatePath ); @@ -117,4 +117,4 @@ private : } -#endif // OAI_APIROUTER_H \ No newline at end of file +#endif // OAI_APIROUTER_H From 361b593da2c94cbaf731b724cf3743f2b0c1c550 Mon Sep 17 00:00:00 2001 From: S2021Git <91172466+S2021Git@users.noreply.github.com> Date: Tue, 4 Jan 2022 02:41:24 -0600 Subject: [PATCH 063/175] Not creating "Accept:null" header for Java-Jersey2 generator (#11084) * updated ApiClient.mustache for jersey2 * updated samples * corrected indentation * updated samples --- .../resources/Java/libraries/jersey2/ApiClient.mustache | 7 ++++++- .../src/main/java/org/openapitools/client/ApiClient.java | 7 ++++++- .../src/main/java/org/openapitools/client/ApiClient.java | 7 ++++++- .../src/main/java/org/openapitools/client/ApiClient.java | 7 ++++++- .../src/main/java/org/openapitools/client/ApiClient.java | 7 ++++++- .../src/main/java/org/openapitools/client/ApiClient.java | 7 ++++++- 6 files changed, 36 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache index 286838dcff45..e9190a25cca6 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache @@ -1190,7 +1190,12 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } } - Invocation.Builder invocationBuilder = target.request().accept(accept); + Invocation.Builder invocationBuilder; + if (accept != null) { + invocationBuilder = target.request().accept(accept); + } else { + invocationBuilder = target.request(); + } for (Entry entry : cookieParams.entrySet()) { String value = entry.getValue(); diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java index 5f4cb48efe22..9ba931faa551 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java @@ -1106,7 +1106,12 @@ public ApiResponse invokeAPI( } } - Invocation.Builder invocationBuilder = target.request().accept(accept); + Invocation.Builder invocationBuilder; + if (accept != null) { + invocationBuilder = target.request().accept(accept); + } else { + invocationBuilder = target.request(); + } for (Entry entry : cookieParams.entrySet()) { String value = entry.getValue(); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java index 5f4cb48efe22..9ba931faa551 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java @@ -1106,7 +1106,12 @@ public ApiResponse invokeAPI( } } - Invocation.Builder invocationBuilder = target.request().accept(accept); + Invocation.Builder invocationBuilder; + if (accept != null) { + invocationBuilder = target.request().accept(accept); + } else { + invocationBuilder = target.request(); + } for (Entry entry : cookieParams.entrySet()) { String value = entry.getValue(); diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java index 7f844074052a..e6bb7d3fad50 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java @@ -1036,7 +1036,12 @@ public ApiResponse invokeAPI( } } - Invocation.Builder invocationBuilder = target.request().accept(accept); + Invocation.Builder invocationBuilder; + if (accept != null) { + invocationBuilder = target.request().accept(accept); + } else { + invocationBuilder = target.request(); + } for (Entry entry : cookieParams.entrySet()) { String value = entry.getValue(); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java index 66eb9ca7f90a..5fb5eda63141 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java @@ -981,7 +981,12 @@ public ApiResponse invokeAPI( } } - Invocation.Builder invocationBuilder = target.request().accept(accept); + Invocation.Builder invocationBuilder; + if (accept != null) { + invocationBuilder = target.request().accept(accept); + } else { + invocationBuilder = target.request(); + } for (Entry entry : cookieParams.entrySet()) { String value = entry.getValue(); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java index 328fec6af920..5e115bca68ac 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java @@ -1190,7 +1190,12 @@ public ApiResponse invokeAPI( } } - Invocation.Builder invocationBuilder = target.request().accept(accept); + Invocation.Builder invocationBuilder; + if (accept != null) { + invocationBuilder = target.request().accept(accept); + } else { + invocationBuilder = target.request(); + } for (Entry entry : cookieParams.entrySet()) { String value = entry.getValue(); From 9c3d4ef2a6406a7d7f1af390649e55ab05fcd047 Mon Sep 17 00:00:00 2001 From: Aliaksei Zhuk Date: Tue, 4 Jan 2022 12:55:18 +0300 Subject: [PATCH 064/175] Parse integer array query parameters. Fix typos (#11105) --- .../src/main/resources/go-server/api.mustache | 2 +- .../go-server/controller-api.mustache | 27 +++++++++++++++++-- .../main/resources/go-server/helpers.mustache | 4 +-- .../main/resources/go-server/impl.mustache | 2 +- .../server/petstore/go-api-server/go/api.go | 6 ++--- .../petstore/go-api-server/go/api_pet.go | 2 +- .../petstore/go-api-server/go/api_store.go | 2 +- .../petstore/go-api-server/go/api_user.go | 2 +- .../petstore/go-api-server/go/helpers.go | 4 +-- .../server/petstore/go-api-server/go/impl.go | 2 +- .../server/petstore/go-chi-server/go/api.go | 6 ++--- .../petstore/go-chi-server/go/api_pet.go | 2 +- .../petstore/go-chi-server/go/api_store.go | 2 +- .../petstore/go-chi-server/go/api_user.go | 2 +- .../petstore/go-chi-server/go/helpers.go | 4 +-- .../server/petstore/go-chi-server/go/impl.go | 2 +- .../petstore/go-server-required/go/api.go | 6 ++--- .../petstore/go-server-required/go/api_pet.go | 2 +- .../go-server-required/go/api_store.go | 2 +- .../go-server-required/go/api_user.go | 2 +- .../petstore/go-server-required/go/helpers.go | 4 +-- .../petstore/go-server-required/go/impl.go | 2 +- 22 files changed, 56 insertions(+), 33 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go-server/api.mustache b/modules/openapi-generator/src/main/resources/go-server/api.mustache index b0ae118950dc..da459dc40e0f 100644 --- a/modules/openapi-generator/src/main/resources/go-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/api.mustache @@ -22,7 +22,7 @@ type {{classname}}Router interface { {{#operations}}{{#operation}} // {{classname}}Servicer defines the api actions for the {{classname}} service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type {{classname}}Servicer interface { {{#operations}}{{#operation}} {{#isDeprecated}} diff --git a/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache b/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache index dfc0fd049a28..f7b32e623d4d 100644 --- a/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache @@ -46,7 +46,7 @@ func New{{classname}}Controller(s {{classname}}Servicer, opts ...{{classname}}Op return controller } -// Routes returns all of the api route for the {{classname}}Controller +// Routes returns all the api routes for the {{classname}}Controller func (c *{{classname}}Controller) Routes() Routes { return Routes{ {{#operations}}{{#operation}} { @@ -130,10 +130,33 @@ func (c *{{classname}}Controller) {{nickname}}(w http.ResponseWriter, r *http.Re return } {{/isBoolean}} + {{#isArray}} + {{#items.isLong}} + {{paramName}}Param, err := parseInt64ArrayParameter(query.Get("{{baseName}}"), ",", {{required}}) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + {{/items.isLong}} + {{#items.isInteger}} + {{paramName}}Param, err := parseInt32ArrayParameter(query.Get("{{baseName}}"), ",", {{required}}) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + {{/items.isInteger}} + {{^items.isLong}} + {{^items.isInteger}} + {{paramName}}Param := strings.Split(query.Get("{{baseName}}"), ",") + {{/items.isInteger}} + {{/items.isLong}} + {{/isArray}} {{^isLong}} {{^isInteger}} {{^isBoolean}} - {{paramName}}Param := {{#isArray}}strings.Split({{/isArray}}query.Get("{{baseName}}"){{#isArray}}, ","){{/isArray}} + {{^isArray}} + {{paramName}}Param := query.Get("{{baseName}}") + {{/isArray}} {{/isBoolean}} {{/isInteger}} {{/isLong}} diff --git a/modules/openapi-generator/src/main/resources/go-server/helpers.mustache b/modules/openapi-generator/src/main/resources/go-server/helpers.mustache index 63b91ebb9911..6de33d11437d 100644 --- a/modules/openapi-generator/src/main/resources/go-server/helpers.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/helpers.mustache @@ -32,13 +32,13 @@ func IsZeroValue(val interface{}) bool { return val == nil || reflect.DeepEqual(val, reflect.Zero(reflect.TypeOf(val)).Interface()) } -// AssertInterfaceRequired recursively checks each struct in a slice against the callback. +// AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback. // This method traverse nested slices in a preorder fashion. func AssertRecurseInterfaceRequired(obj interface{}, callback func(interface{}) error) error { return AssertRecurseValueRequired(reflect.ValueOf(obj), callback) } -// AssertNestedValueRequired checks each struct in the nested slice against the callback. +// AssertRecurseValueRequired checks each struct in the nested slice against the callback. // This method traverse nested slices in a preorder fashion. func AssertRecurseValueRequired(value reflect.Value, callback func(interface{}) error) error { switch value.Kind() { diff --git a/modules/openapi-generator/src/main/resources/go-server/impl.mustache b/modules/openapi-generator/src/main/resources/go-server/impl.mustache index 48d5a3e5e5cd..81c25ffb9739 100644 --- a/modules/openapi-generator/src/main/resources/go-server/impl.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/impl.mustache @@ -1,7 +1,7 @@ {{>partial_header}} package {{packageName}} -//Implementation response defines an error code with the associated body +// ImplResponse response defines an error code with the associated body type ImplResponse struct { Code int {{#addResponseHeaders}} diff --git a/samples/server/petstore/go-api-server/go/api.go b/samples/server/petstore/go-api-server/go/api.go index c936f0b5efeb..bedb0f7985e5 100644 --- a/samples/server/petstore/go-api-server/go/api.go +++ b/samples/server/petstore/go-api-server/go/api.go @@ -57,7 +57,7 @@ type UserApiRouter interface { // PetApiServicer defines the api actions for the PetApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type PetApiServicer interface { AddPet(context.Context, Pet) (ImplResponse, error) @@ -74,7 +74,7 @@ type PetApiServicer interface { // StoreApiServicer defines the api actions for the StoreApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type StoreApiServicer interface { DeleteOrder(context.Context, string) (ImplResponse, error) @@ -86,7 +86,7 @@ type StoreApiServicer interface { // UserApiServicer defines the api actions for the UserApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type UserApiServicer interface { CreateUser(context.Context, User) (ImplResponse, error) diff --git a/samples/server/petstore/go-api-server/go/api_pet.go b/samples/server/petstore/go-api-server/go/api_pet.go index 537cdb586954..fb8041ee7301 100644 --- a/samples/server/petstore/go-api-server/go/api_pet.go +++ b/samples/server/petstore/go-api-server/go/api_pet.go @@ -47,7 +47,7 @@ func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router { return controller } -// Routes returns all of the api route for the PetApiController +// Routes returns all the api routes for the PetApiController func (c *PetApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-api-server/go/api_store.go b/samples/server/petstore/go-api-server/go/api_store.go index 8c40f3e79d01..b0df49b92d31 100644 --- a/samples/server/petstore/go-api-server/go/api_store.go +++ b/samples/server/petstore/go-api-server/go/api_store.go @@ -47,7 +47,7 @@ func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router { return controller } -// Routes returns all of the api route for the StoreApiController +// Routes returns all the api routes for the StoreApiController func (c *StoreApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-api-server/go/api_user.go b/samples/server/petstore/go-api-server/go/api_user.go index 02e23c6637d8..5eb1f57d4bef 100644 --- a/samples/server/petstore/go-api-server/go/api_user.go +++ b/samples/server/petstore/go-api-server/go/api_user.go @@ -47,7 +47,7 @@ func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router { return controller } -// Routes returns all of the api route for the UserApiController +// Routes returns all the api routes for the UserApiController func (c *UserApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-api-server/go/helpers.go b/samples/server/petstore/go-api-server/go/helpers.go index ef41ca1c8975..f18a261018dd 100644 --- a/samples/server/petstore/go-api-server/go/helpers.go +++ b/samples/server/petstore/go-api-server/go/helpers.go @@ -36,13 +36,13 @@ func IsZeroValue(val interface{}) bool { return val == nil || reflect.DeepEqual(val, reflect.Zero(reflect.TypeOf(val)).Interface()) } -// AssertInterfaceRequired recursively checks each struct in a slice against the callback. +// AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback. // This method traverse nested slices in a preorder fashion. func AssertRecurseInterfaceRequired(obj interface{}, callback func(interface{}) error) error { return AssertRecurseValueRequired(reflect.ValueOf(obj), callback) } -// AssertNestedValueRequired checks each struct in the nested slice against the callback. +// AssertRecurseValueRequired checks each struct in the nested slice against the callback. // This method traverse nested slices in a preorder fashion. func AssertRecurseValueRequired(value reflect.Value, callback func(interface{}) error) error { switch value.Kind() { diff --git a/samples/server/petstore/go-api-server/go/impl.go b/samples/server/petstore/go-api-server/go/impl.go index 1da96f41252a..8c72e26a342a 100644 --- a/samples/server/petstore/go-api-server/go/impl.go +++ b/samples/server/petstore/go-api-server/go/impl.go @@ -9,7 +9,7 @@ package petstoreserver -//Implementation response defines an error code with the associated body +// ImplResponse response defines an error code with the associated body type ImplResponse struct { Code int Headers map[string][]string diff --git a/samples/server/petstore/go-chi-server/go/api.go b/samples/server/petstore/go-chi-server/go/api.go index c936f0b5efeb..bedb0f7985e5 100644 --- a/samples/server/petstore/go-chi-server/go/api.go +++ b/samples/server/petstore/go-chi-server/go/api.go @@ -57,7 +57,7 @@ type UserApiRouter interface { // PetApiServicer defines the api actions for the PetApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type PetApiServicer interface { AddPet(context.Context, Pet) (ImplResponse, error) @@ -74,7 +74,7 @@ type PetApiServicer interface { // StoreApiServicer defines the api actions for the StoreApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type StoreApiServicer interface { DeleteOrder(context.Context, string) (ImplResponse, error) @@ -86,7 +86,7 @@ type StoreApiServicer interface { // UserApiServicer defines the api actions for the UserApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type UserApiServicer interface { CreateUser(context.Context, User) (ImplResponse, error) diff --git a/samples/server/petstore/go-chi-server/go/api_pet.go b/samples/server/petstore/go-chi-server/go/api_pet.go index 5fc093d2ef9c..2202804fb200 100644 --- a/samples/server/petstore/go-chi-server/go/api_pet.go +++ b/samples/server/petstore/go-chi-server/go/api_pet.go @@ -47,7 +47,7 @@ func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router { return controller } -// Routes returns all of the api route for the PetApiController +// Routes returns all the api routes for the PetApiController func (c *PetApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-chi-server/go/api_store.go b/samples/server/petstore/go-chi-server/go/api_store.go index bbf7cd72a291..67a30090afb3 100644 --- a/samples/server/petstore/go-chi-server/go/api_store.go +++ b/samples/server/petstore/go-chi-server/go/api_store.go @@ -47,7 +47,7 @@ func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router { return controller } -// Routes returns all of the api route for the StoreApiController +// Routes returns all the api routes for the StoreApiController func (c *StoreApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-chi-server/go/api_user.go b/samples/server/petstore/go-chi-server/go/api_user.go index 872c306992b8..a48ab1c454a4 100644 --- a/samples/server/petstore/go-chi-server/go/api_user.go +++ b/samples/server/petstore/go-chi-server/go/api_user.go @@ -47,7 +47,7 @@ func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router { return controller } -// Routes returns all of the api route for the UserApiController +// Routes returns all the api routes for the UserApiController func (c *UserApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-chi-server/go/helpers.go b/samples/server/petstore/go-chi-server/go/helpers.go index ef41ca1c8975..f18a261018dd 100644 --- a/samples/server/petstore/go-chi-server/go/helpers.go +++ b/samples/server/petstore/go-chi-server/go/helpers.go @@ -36,13 +36,13 @@ func IsZeroValue(val interface{}) bool { return val == nil || reflect.DeepEqual(val, reflect.Zero(reflect.TypeOf(val)).Interface()) } -// AssertInterfaceRequired recursively checks each struct in a slice against the callback. +// AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback. // This method traverse nested slices in a preorder fashion. func AssertRecurseInterfaceRequired(obj interface{}, callback func(interface{}) error) error { return AssertRecurseValueRequired(reflect.ValueOf(obj), callback) } -// AssertNestedValueRequired checks each struct in the nested slice against the callback. +// AssertRecurseValueRequired checks each struct in the nested slice against the callback. // This method traverse nested slices in a preorder fashion. func AssertRecurseValueRequired(value reflect.Value, callback func(interface{}) error) error { switch value.Kind() { diff --git a/samples/server/petstore/go-chi-server/go/impl.go b/samples/server/petstore/go-chi-server/go/impl.go index 1da96f41252a..8c72e26a342a 100644 --- a/samples/server/petstore/go-chi-server/go/impl.go +++ b/samples/server/petstore/go-chi-server/go/impl.go @@ -9,7 +9,7 @@ package petstoreserver -//Implementation response defines an error code with the associated body +// ImplResponse response defines an error code with the associated body type ImplResponse struct { Code int Headers map[string][]string diff --git a/samples/server/petstore/go-server-required/go/api.go b/samples/server/petstore/go-server-required/go/api.go index c936f0b5efeb..bedb0f7985e5 100644 --- a/samples/server/petstore/go-server-required/go/api.go +++ b/samples/server/petstore/go-server-required/go/api.go @@ -57,7 +57,7 @@ type UserApiRouter interface { // PetApiServicer defines the api actions for the PetApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type PetApiServicer interface { AddPet(context.Context, Pet) (ImplResponse, error) @@ -74,7 +74,7 @@ type PetApiServicer interface { // StoreApiServicer defines the api actions for the StoreApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type StoreApiServicer interface { DeleteOrder(context.Context, string) (ImplResponse, error) @@ -86,7 +86,7 @@ type StoreApiServicer interface { // UserApiServicer defines the api actions for the UserApi service // This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// while the service implementation can be ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type UserApiServicer interface { CreateUser(context.Context, User) (ImplResponse, error) diff --git a/samples/server/petstore/go-server-required/go/api_pet.go b/samples/server/petstore/go-server-required/go/api_pet.go index 5fc093d2ef9c..2202804fb200 100644 --- a/samples/server/petstore/go-server-required/go/api_pet.go +++ b/samples/server/petstore/go-server-required/go/api_pet.go @@ -47,7 +47,7 @@ func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router { return controller } -// Routes returns all of the api route for the PetApiController +// Routes returns all the api routes for the PetApiController func (c *PetApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-server-required/go/api_store.go b/samples/server/petstore/go-server-required/go/api_store.go index bbf7cd72a291..67a30090afb3 100644 --- a/samples/server/petstore/go-server-required/go/api_store.go +++ b/samples/server/petstore/go-server-required/go/api_store.go @@ -47,7 +47,7 @@ func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router { return controller } -// Routes returns all of the api route for the StoreApiController +// Routes returns all the api routes for the StoreApiController func (c *StoreApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-server-required/go/api_user.go b/samples/server/petstore/go-server-required/go/api_user.go index 872c306992b8..a48ab1c454a4 100644 --- a/samples/server/petstore/go-server-required/go/api_user.go +++ b/samples/server/petstore/go-server-required/go/api_user.go @@ -47,7 +47,7 @@ func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router { return controller } -// Routes returns all of the api route for the UserApiController +// Routes returns all the api routes for the UserApiController func (c *UserApiController) Routes() Routes { return Routes{ { diff --git a/samples/server/petstore/go-server-required/go/helpers.go b/samples/server/petstore/go-server-required/go/helpers.go index ef41ca1c8975..f18a261018dd 100644 --- a/samples/server/petstore/go-server-required/go/helpers.go +++ b/samples/server/petstore/go-server-required/go/helpers.go @@ -36,13 +36,13 @@ func IsZeroValue(val interface{}) bool { return val == nil || reflect.DeepEqual(val, reflect.Zero(reflect.TypeOf(val)).Interface()) } -// AssertInterfaceRequired recursively checks each struct in a slice against the callback. +// AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback. // This method traverse nested slices in a preorder fashion. func AssertRecurseInterfaceRequired(obj interface{}, callback func(interface{}) error) error { return AssertRecurseValueRequired(reflect.ValueOf(obj), callback) } -// AssertNestedValueRequired checks each struct in the nested slice against the callback. +// AssertRecurseValueRequired checks each struct in the nested slice against the callback. // This method traverse nested slices in a preorder fashion. func AssertRecurseValueRequired(value reflect.Value, callback func(interface{}) error) error { switch value.Kind() { diff --git a/samples/server/petstore/go-server-required/go/impl.go b/samples/server/petstore/go-server-required/go/impl.go index 1da96f41252a..8c72e26a342a 100644 --- a/samples/server/petstore/go-server-required/go/impl.go +++ b/samples/server/petstore/go-server-required/go/impl.go @@ -9,7 +9,7 @@ package petstoreserver -//Implementation response defines an error code with the associated body +// ImplResponse response defines an error code with the associated body type ImplResponse struct { Code int Headers map[string][]string From 3243279b4da86b25f4d9635642c8c6032abb14e6 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 5 Jan 2022 12:30:49 -0800 Subject: [PATCH 065/175] Adds python-experimental with dynamic base classes (#8325) --- bin/configs/python-experimental.yaml | 8 + docs/generators.md | 1 + docs/generators/python-experimental.md | 221 ++ .../openapitools/codegen/CodegenModel.java | 3 + .../openapitools/codegen/CodegenProperty.java | 4 + .../openapitools/codegen/DefaultCodegen.java | 25 +- .../codegen/DefaultGenerator.java | 3 +- .../PythonExperimentalClientCodegen.java | 2078 +++++++++++++ .../org.openapitools.codegen.CodegenConfig | 1 + .../python-experimental/README.handlebars | 57 + .../README_common.handlebars | 111 + .../README_onlypackage.handlebars | 43 + .../python-experimental/__init__.handlebars | 0 .../__init__api.handlebars | 9 + .../__init__apis.handlebars | 24 + .../__init__model.handlebars | 5 + .../__init__models.handlebars | 18 + .../__init__package.handlebars | 28 + .../python-experimental/api.handlebars | 26 + .../python-experimental/api_client.handlebars | 1380 +++++++++ .../python-experimental/api_doc.handlebars | 212 ++ .../api_doc_example.handlebars | 163 + .../api_doc_schema_type_hint.handlebars | 10 + .../python-experimental/api_test.handlebars | 34 + .../configuration.handlebars | 636 ++++ .../doc_auth_partial.handlebars | 109 + .../python-experimental/endpoint.handlebars | 549 ++++ .../endpoint_body_serialization.handlebars | 6 + .../endpoint_parameter.handlebars | 17 + .../python-experimental/exceptions.handlebars | 129 + .../git_push.sh.handlebars | 58 + .../python-experimental/gitignore.handlebars | 67 + .../python-experimental/gitlab-ci.handlebars | 29 + .../python-experimental/model.handlebars | 17 + .../python-experimental/model_doc.handlebars | 9 + .../composed_schemas.handlebars | 86 + .../model_templates/dict_partial.handlebars | 54 + .../enum_value_to_name.handlebars | 12 + .../model_templates/enums.handlebars | 16 + .../imports_schema_types.handlebars | 41 + .../imports_schemas.handlebars | 6 + .../model_templates/new.handlebars | 53 + .../model_templates/schema.handlebars | 46 + .../schema_composed_or_anytype.handlebars | 67 + .../model_templates/schema_dict.handlebars | 42 + .../model_templates/schema_list.handlebars | 39 + .../model_templates/schema_simple.handlebars | 35 + .../model_templates/validations.handlebars | 50 + .../model_templates/var_equals_cls.handlebars | 1 + .../model_templates/xbase_schema.handlebars | 48 + .../python-experimental/model_test.handlebars | 33 + .../partial_header.handlebars | 17 + .../requirements.handlebars | 5 + .../python-experimental/rest.handlebars | 251 ++ .../python-experimental/schema_doc.handlebars | 32 + .../python-experimental/schemas.handlebars | 1987 ++++++++++++ .../python-experimental/setup.handlebars | 51 + .../python-experimental/setup_cfg.handlebars | 13 + .../python-experimental/signing.handlebars | 409 +++ .../test-requirements.handlebars | 15 + .../python-experimental/tox.handlebars | 9 + .../python-experimental/travis.handlebars | 18 + ...odels-for-testing-with-http-signature.yaml | 2655 +++++++++++++++++ .../petstore/python-experimental/.gitignore | 67 + .../python-experimental/.gitlab-ci.yml | 24 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 262 ++ .../.openapi-generator/VERSION | 1 + .../petstore/python-experimental/.travis.yml | 13 + .../petstore/python-experimental/Makefile | 16 + .../petstore/python-experimental/README.md | 320 ++ .../python-experimental/dev-requirements.txt | 2 + .../docs/AdditionalPropertiesClass.md | 17 + .../AdditionalPropertiesWithArrayOfEnums.md | 9 + .../python-experimental/docs/Address.md | 9 + .../python-experimental/docs/Animal.md | 11 + .../python-experimental/docs/AnimalFarm.md | 8 + .../docs/AnotherFakeApi.md | 94 + .../python-experimental/docs/ApiResponse.md | 12 + .../python-experimental/docs/Apple.md | 11 + .../python-experimental/docs/AppleReq.md | 10 + .../docs/ArrayHoldingAnyType.md | 8 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../python-experimental/docs/ArrayOfEnums.md | 8 + .../docs/ArrayOfNumberOnly.md | 10 + .../python-experimental/docs/ArrayTest.md | 12 + .../docs/ArrayWithValidationsInItems.md | 8 + .../python-experimental/docs/Banana.md | 10 + .../python-experimental/docs/BananaReq.md | 10 + .../petstore/python-experimental/docs/Bar.md | 8 + .../python-experimental/docs/BasquePig.md | 10 + .../python-experimental/docs/Boolean.md | 8 + .../python-experimental/docs/BooleanEnum.md | 8 + .../docs/Capitalization.md | 15 + .../petstore/python-experimental/docs/Cat.md | 9 + .../python-experimental/docs/CatAllOf.md | 10 + .../python-experimental/docs/Category.md | 11 + .../python-experimental/docs/ChildCat.md | 9 + .../python-experimental/docs/ChildCatAllOf.md | 10 + .../python-experimental/docs/ClassModel.md | 12 + .../python-experimental/docs/Client.md | 10 + .../docs/ComplexQuadrilateral.md | 9 + .../docs/ComplexQuadrilateralAllOf.md | 10 + ...omposedAnyOfDifferentTypesNoValidations.md | 9 + .../python-experimental/docs/ComposedArray.md | 8 + .../python-experimental/docs/ComposedBool.md | 8 + .../python-experimental/docs/ComposedNone.md | 8 + .../docs/ComposedNumber.md | 8 + .../docs/ComposedObject.md | 9 + .../docs/ComposedOneOfDifferentTypes.md | 11 + .../docs/ComposedString.md | 8 + .../python-experimental/docs/DanishPig.md | 10 + .../python-experimental/docs/DateTimeTest.md | 8 + .../docs/DateTimeWithValidations.md | 8 + .../docs/DateWithValidations.md | 8 + .../python-experimental/docs/DefaultApi.md | 70 + .../petstore/python-experimental/docs/Dog.md | 9 + .../python-experimental/docs/DogAllOf.md | 10 + .../python-experimental/docs/Drawing.md | 13 + .../python-experimental/docs/EnumArrays.md | 11 + .../python-experimental/docs/EnumClass.md | 8 + .../python-experimental/docs/EnumTest.md | 18 + .../docs/EquilateralTriangle.md | 9 + .../docs/EquilateralTriangleAllOf.md | 10 + .../python-experimental/docs/FakeApi.md | 2604 ++++++++++++++++ .../docs/FakeClassnameTags123Api.md | 105 + .../petstore/python-experimental/docs/File.md | 12 + .../docs/FileSchemaTestClass.md | 11 + .../petstore/python-experimental/docs/Foo.md | 10 + .../python-experimental/docs/FormatTest.md | 30 + .../python-experimental/docs/Fruit.md | 10 + .../python-experimental/docs/FruitReq.md | 9 + .../python-experimental/docs/GmFruit.md | 10 + .../docs/GrandparentAnimal.md | 10 + .../docs/HasOnlyReadOnly.md | 11 + .../docs/HealthCheckResult.md | 12 + .../docs/InlineResponseDefault.md | 10 + .../python-experimental/docs/IntegerEnum.md | 8 + .../docs/IntegerEnumBig.md | 8 + .../docs/IntegerEnumOneValue.md | 8 + .../docs/IntegerEnumWithDefaultValue.md | 8 + .../python-experimental/docs/IntegerMax10.md | 8 + .../python-experimental/docs/IntegerMin15.md | 8 + .../docs/IsoscelesTriangle.md | 9 + .../docs/IsoscelesTriangleAllOf.md | 10 + .../python-experimental/docs/Mammal.md | 9 + .../python-experimental/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../docs/Model200Response.md | 13 + .../python-experimental/docs/ModelReturn.md | 12 + .../petstore/python-experimental/docs/Name.md | 14 + .../docs/NoAdditionalProperties.md | 10 + .../python-experimental/docs/NullableClass.md | 21 + .../python-experimental/docs/NullableShape.md | 11 + .../docs/NullableString.md | 8 + .../python-experimental/docs/Number.md | 8 + .../python-experimental/docs/NumberOnly.md | 10 + .../docs/NumberWithValidations.md | 8 + .../docs/ObjectInterface.md | 9 + .../docs/ObjectModelWithRefProps.md | 14 + .../docs/ObjectWithDifficultlyNamedProps.md | 14 + .../docs/ObjectWithValidations.md | 9 + .../python-experimental/docs/Order.md | 15 + .../python-experimental/docs/ParentPet.md | 9 + .../petstore/python-experimental/docs/Pet.md | 17 + .../python-experimental/docs/PetApi.md | 1362 +++++++++ .../petstore/python-experimental/docs/Pig.md | 9 + .../python-experimental/docs/Player.md | 13 + .../python-experimental/docs/Quadrilateral.md | 9 + .../docs/QuadrilateralInterface.md | 11 + .../python-experimental/docs/ReadOnlyFirst.md | 11 + .../docs/ScaleneTriangle.md | 9 + .../docs/ScaleneTriangleAllOf.md | 10 + .../python-experimental/docs/Shape.md | 9 + .../python-experimental/docs/ShapeOrNull.md | 11 + .../docs/SimpleQuadrilateral.md | 9 + .../docs/SimpleQuadrilateralAllOf.md | 10 + .../python-experimental/docs/SomeObject.md | 9 + .../docs/SpecialModelName.md | 12 + .../python-experimental/docs/StoreApi.md | 391 +++ .../python-experimental/docs/String.md | 8 + .../docs/StringBooleanMap.md | 9 + .../python-experimental/docs/StringEnum.md | 10 + .../docs/StringEnumWithDefaultValue.md | 8 + .../docs/StringWithValidation.md | 8 + .../petstore/python-experimental/docs/Tag.md | 11 + .../python-experimental/docs/Triangle.md | 9 + .../docs/TriangleInterface.md | 11 + .../petstore/python-experimental/docs/User.md | 21 + .../python-experimental/docs/UserApi.md | 784 +++++ .../python-experimental/docs/Whale.md | 12 + .../python-experimental/docs/Zebra.md | 11 + .../petstore/python-experimental/git_push.sh | 58 + .../petstore_api/__init__.py | 31 + .../petstore_api/api/__init__.py | 3 + .../petstore_api/api/another_fake_api.py | 25 + .../call_123_test_special_tags.py | 161 + .../petstore_api/api/default_api.py | 25 + .../api/default_api_endpoints/foo_get.py | 138 + .../petstore_api/api/fake_api.py | 73 + ...ditional_properties_with_array_of_enums.py | 158 + .../api/fake_api_endpoints/array_model.py | 157 + .../api/fake_api_endpoints/array_of_enums.py | 158 + .../body_with_file_schema.py | 146 + .../body_with_query_params.py | 186 ++ .../api/fake_api_endpoints/boolean.py | 155 + .../case_sensitive_params.py | 174 ++ .../api/fake_api_endpoints/client_model.py | 161 + .../composed_one_of_different_types.py | 157 + .../fake_api_endpoints/endpoint_parameters.py | 288 ++ .../api/fake_api_endpoints/enum_parameters.py | 480 +++ .../api/fake_api_endpoints/fake_health_get.py | 135 + .../fake_api_endpoints/group_parameters.py | 234 ++ .../inline_additional_properties.py | 164 + .../api/fake_api_endpoints/json_form_data.py | 164 + .../api/fake_api_endpoints/mammal.py | 160 + .../number_with_validations.py | 157 + .../object_model_with_ref_props.py | 157 + .../parameter_collisions.py | 425 +++ .../query_parameter_collection_format.py | 228 ++ .../api/fake_api_endpoints/string.py | 155 + .../api/fake_api_endpoints/string_enum.py | 157 + .../upload_download_file.py | 159 + .../api/fake_api_endpoints/upload_file.py | 182 ++ .../api/fake_api_endpoints/upload_files.py | 184 ++ .../api/fake_classname_tags_123_api.py | 25 + .../classname.py | 165 + .../petstore_api/api/pet_api.py | 41 + .../api/pet_api_endpoints/add_pet.py | 182 ++ .../api/pet_api_endpoints/delete_pet.py | 196 ++ .../pet_api_endpoints/find_pets_by_status.py | 246 ++ .../pet_api_endpoints/find_pets_by_tags.py | 220 ++ .../api/pet_api_endpoints/get_pet_by_id.py | 209 ++ .../api/pet_api_endpoints/update_pet.py | 194 ++ .../pet_api_endpoints/update_pet_with_form.py | 208 ++ .../api/pet_api_endpoints/upload_file.py | 216 ++ .../upload_file_with_required_file.py | 225 ++ .../api/pet_api_endpoints/upload_image.py | 223 ++ .../petstore_api/api/store_api.py | 31 + .../api/store_api_endpoints/delete_order.py | 166 ++ .../api/store_api_endpoints/get_inventory.py | 156 + .../store_api_endpoints/get_order_by_id.py | 214 ++ .../api/store_api_endpoints/place_order.py | 179 ++ .../petstore_api/api/user_api.py | 39 + .../api/user_api_endpoints/create_user.py | 151 + .../create_users_with_array_input.py | 160 + .../create_users_with_list_input.py | 160 + .../api/user_api_endpoints/delete_user.py | 166 ++ .../user_api_endpoints/get_user_by_name.py | 205 ++ .../api/user_api_endpoints/login_user.py | 224 ++ .../api/user_api_endpoints/logout_user.py | 119 + .../api/user_api_endpoints/update_user.py | 198 ++ .../petstore_api/api_client.py | 1379 +++++++++ .../petstore_api/apis/__init__.py | 24 + .../petstore_api/configuration.py | 610 ++++ .../petstore_api/exceptions.py | 136 + .../petstore_api/model/__init__.py | 5 + .../model/additional_properties_class.py | 211 ++ ...ditional_properties_with_array_of_enums.py | 98 + .../petstore_api/model/address.py | 87 + .../petstore_api/model/animal.py | 112 + .../petstore_api/model/animal_farm.py | 78 + .../petstore_api/model/api_response.py | 98 + .../petstore_api/model/apple.py | 120 + .../petstore_api/model/apple_req.py | 94 + .../model/array_holding_any_type.py | 72 + .../model/array_of_array_of_number_only.py | 100 + .../petstore_api/model/array_of_enums.py | 78 + .../model/array_of_number_only.py | 95 + .../petstore_api/model/array_test.py | 129 + .../model/array_with_validations_in_items.py | 87 + .../petstore_api/model/banana.py | 93 + .../petstore_api/model/banana_req.py | 94 + .../petstore_api/model/bar.py | 59 + .../petstore_api/model/basque_pig.py | 107 + .../petstore_api/model/boolean.py | 59 + .../petstore_api/model/boolean_enum.py | 80 + .../petstore_api/model/capitalization.py | 110 + .../petstore_api/model/cat.py | 109 + .../petstore_api/model/cat_all_of.py | 90 + .../petstore_api/model/category.py | 97 + .../petstore_api/model/child_cat.py | 109 + .../petstore_api/model/child_cat_all_of.py | 90 + .../petstore_api/model/class_model.py | 91 + .../petstore_api/model/client.py | 90 + .../model/complex_quadrilateral.py | 109 + .../model/complex_quadrilateral_all_of.py | 104 + ...d_any_of_different_types_no_validations.py | 141 + .../petstore_api/model/composed_array.py | 72 + .../petstore_api/model/composed_bool.py | 103 + .../petstore_api/model/composed_none.py | 103 + .../petstore_api/model/composed_number.py | 103 + .../petstore_api/model/composed_object.py | 107 + .../model/composed_one_of_different_types.py | 162 + .../petstore_api/model/composed_string.py | 103 + .../petstore_api/model/danish_pig.py | 107 + .../petstore_api/model/date_time_test.py | 59 + .../model/date_time_with_validations.py | 80 + .../model/date_with_validations.py | 80 + .../petstore_api/model/dog.py | 109 + .../petstore_api/model/dog_all_of.py | 90 + .../petstore_api/model/drawing.py | 133 + .../petstore_api/model/enum_arrays.py | 139 + .../petstore_api/model/enum_class.py | 92 + .../petstore_api/model/enum_test.py | 243 ++ .../model/equilateral_triangle.py | 109 + .../model/equilateral_triangle_all_of.py | 104 + .../petstore_api/model/file.py | 92 + .../model/file_schema_test_class.py | 109 + .../petstore_api/model/foo.py | 90 + .../petstore_api/model/format_test.py | 276 ++ .../petstore_api/model/fruit.py | 113 + .../petstore_api/model/fruit_req.py | 111 + .../petstore_api/model/gm_fruit.py | 113 + .../petstore_api/model/grandparent_animal.py | 108 + .../petstore_api/model/has_only_read_only.py | 94 + .../petstore_api/model/health_check_result.py | 110 + .../model/inline_response_default.py | 96 + .../petstore_api/model/integer_enum.py | 92 + .../petstore_api/model/integer_enum_big.py | 92 + .../model/integer_enum_one_value.py | 80 + .../model/integer_enum_with_default_value.py | 92 + .../petstore_api/model/integer_max10.py | 78 + .../petstore_api/model/integer_min15.py | 78 + .../petstore_api/model/isosceles_triangle.py | 109 + .../model/isosceles_triangle_all_of.py | 104 + .../petstore_api/model/mammal.py | 124 + .../petstore_api/model/map_test.py | 204 ++ ...perties_and_additional_properties_class.py | 121 + .../petstore_api/model/model200_response.py | 95 + .../petstore_api/model/model_return.py | 91 + .../petstore_api/model/name.py | 102 + .../model/no_additional_properties.py | 94 + .../petstore_api/model/nullable_class.py | 425 +++ .../petstore_api/model/nullable_shape.py | 125 + .../petstore_api/model/nullable_string.py | 84 + .../petstore_api/model/number.py | 59 + .../petstore_api/model/number_only.py | 90 + .../model/number_with_validations.py | 79 + .../petstore_api/model/object_interface.py | 59 + .../model/object_model_with_ref_props.py | 106 + .../object_with_difficultly_named_props.py | 103 + .../model/object_with_validations.py | 93 + .../petstore_api/model/order.py | 136 + .../petstore_api/model/parent_pet.py | 120 + .../petstore_api/model/pet.py | 163 + .../petstore_api/model/pig.py | 121 + .../petstore_api/model/player.py | 100 + .../petstore_api/model/quadrilateral.py | 121 + .../model/quadrilateral_interface.py | 111 + .../petstore_api/model/read_only_first.py | 94 + .../petstore_api/model/scalene_triangle.py | 109 + .../model/scalene_triangle_all_of.py | 104 + .../petstore_api/model/shape.py | 121 + .../petstore_api/model/shape_or_null.py | 125 + .../model/simple_quadrilateral.py | 109 + .../model/simple_quadrilateral_all_of.py | 104 + .../petstore_api/model/some_object.py | 107 + .../petstore_api/model/special_model_name.py | 92 + .../petstore_api/model/string.py | 59 + .../petstore_api/model/string_boolean_map.py | 87 + .../petstore_api/model/string_enum.py | 136 + .../model/string_enum_with_default_value.py | 92 + .../model/string_with_validation.py | 78 + .../petstore_api/model/tag.py | 94 + .../petstore_api/model/triangle.py | 124 + .../petstore_api/model/triangle_interface.py | 111 + .../petstore_api/model/user.py | 154 + .../petstore_api/model/whale.py | 115 + .../petstore_api/model/zebra.py | 137 + .../petstore_api/models/__init__.py | 126 + .../python-experimental/petstore_api/rest.py | 258 ++ .../petstore_api/schemas.py | 1994 +++++++++++++ .../petstore_api/signing.py | 416 +++ .../python-experimental/requirements.txt | 5 + .../petstore/python-experimental/setup.cfg | 2 + .../petstore/python-experimental/setup.py | 48 + .../python-experimental/test-requirements.txt | 4 + .../python-experimental/test/__init__.py | 0 .../test/test_additional_properties_class.py | 37 + ...ditional_properties_with_array_of_enums.py | 37 + .../python-experimental/test/test_address.py | 37 + .../python-experimental/test/test_animal.py | 37 + .../test/test_animal_farm.py | 37 + .../test/test_another_fake_api.py | 37 + .../test/test_api_response.py | 37 + .../python-experimental/test/test_apple.py | 37 + .../test/test_apple_req.py | 37 + .../test/test_array_holding_any_type.py | 37 + .../test_array_of_array_of_number_only.py | 37 + .../test/test_array_of_enums.py | 37 + .../test/test_array_of_number_only.py | 37 + .../test/test_array_test.py | 37 + .../test_array_with_validations_in_items.py | 37 + .../python-experimental/test/test_banana.py | 37 + .../test/test_banana_req.py | 37 + .../python-experimental/test/test_bar.py | 37 + .../test/test_basque_pig.py | 37 + .../python-experimental/test/test_boolean.py | 37 + .../test/test_boolean_enum.py | 37 + .../test/test_capitalization.py | 37 + .../python-experimental/test/test_cat.py | 37 + .../test/test_cat_all_of.py | 37 + .../python-experimental/test/test_category.py | 37 + .../test/test_child_cat.py | 37 + .../test/test_child_cat_all_of.py | 37 + .../test/test_class_model.py | 37 + .../python-experimental/test/test_client.py | 37 + .../test/test_complex_quadrilateral.py | 37 + .../test/test_complex_quadrilateral_all_of.py | 37 + ...d_any_of_different_types_no_validations.py | 37 + .../test/test_composed_array.py | 37 + .../test/test_composed_bool.py | 37 + .../test/test_composed_none.py | 37 + .../test/test_composed_number.py | 37 + .../test/test_composed_object.py | 37 + .../test_composed_one_of_different_types.py | 37 + .../test/test_composed_string.py | 37 + .../test/test_danish_pig.py | 37 + .../test/test_date_time_test.py | 37 + .../test/test_date_time_with_validations.py | 37 + .../test/test_date_with_validations.py | 37 + .../test/test_default_api.py | 36 + .../python-experimental/test/test_dog.py | 37 + .../test/test_dog_all_of.py | 37 + .../python-experimental/test/test_drawing.py | 37 + .../test/test_enum_arrays.py | 37 + .../test/test_enum_class.py | 37 + .../test/test_enum_test.py | 37 + .../test/test_equilateral_triangle.py | 37 + .../test/test_equilateral_triangle_all_of.py | 37 + .../python-experimental/test/test_fake_api.py | 192 ++ .../test/test_fake_classname_tags_123_api.py | 37 + .../python-experimental/test/test_file.py | 37 + .../test/test_file_schema_test_class.py | 37 + .../python-experimental/test/test_foo.py | 37 + .../test/test_format_test.py | 37 + .../python-experimental/test/test_fruit.py | 37 + .../test/test_fruit_req.py | 37 + .../python-experimental/test/test_gm_fruit.py | 37 + .../test/test_grandparent_animal.py | 37 + .../test/test_has_only_read_only.py | 37 + .../test/test_health_check_result.py | 37 + .../test/test_inline_response_default.py | 37 + .../test/test_integer_enum.py | 37 + .../test/test_integer_enum_big.py | 37 + .../test/test_integer_enum_one_value.py | 37 + .../test_integer_enum_with_default_value.py | 37 + .../test/test_integer_max10.py | 37 + .../test/test_integer_min15.py | 37 + .../test/test_isosceles_triangle.py | 37 + .../test/test_isosceles_triangle_all_of.py | 37 + .../python-experimental/test/test_mammal.py | 37 + .../python-experimental/test/test_map_test.py | 37 + ...perties_and_additional_properties_class.py | 37 + .../test/test_model200_response.py | 37 + .../test/test_model_return.py | 37 + .../python-experimental/test/test_name.py | 37 + .../test/test_no_additional_properties.py | 37 + .../test/test_nullable_class.py | 37 + .../test/test_nullable_shape.py | 37 + .../test/test_nullable_string.py | 37 + .../python-experimental/test/test_number.py | 37 + .../test/test_number_only.py | 37 + .../test/test_number_with_validations.py | 37 + .../test/test_object_interface.py | 37 + .../test/test_object_model_with_ref_props.py | 37 + ...est_object_with_difficultly_named_props.py | 55 + .../test/test_object_with_validations.py | 37 + .../python-experimental/test/test_order.py | 37 + .../test/test_parent_pet.py | 37 + .../python-experimental/test/test_pet.py | 37 + .../python-experimental/test/test_pet_api.py | 93 + .../python-experimental/test/test_pig.py | 37 + .../python-experimental/test/test_player.py | 37 + .../test/test_quadrilateral.py | 37 + .../test/test_quadrilateral_interface.py | 37 + .../test/test_read_only_first.py | 37 + .../test/test_scalene_triangle.py | 37 + .../test/test_scalene_triangle_all_of.py | 37 + .../python-experimental/test/test_shape.py | 37 + .../test/test_shape_or_null.py | 37 + .../test/test_simple_quadrilateral.py | 37 + .../test/test_simple_quadrilateral_all_of.py | 37 + .../test/test_some_object.py | 37 + .../test/test_special_model_name.py | 37 + .../test/test_store_api.py | 58 + .../python-experimental/test/test_string.py | 37 + .../test/test_string_boolean_map.py | 37 + .../test/test_string_enum.py | 37 + .../test_string_enum_with_default_value.py | 37 + .../test/test_string_with_validation.py | 37 + .../python-experimental/test/test_tag.py | 37 + .../python-experimental/test/test_triangle.py | 37 + .../test/test_triangle_interface.py | 37 + .../python-experimental/test/test_user.py | 37 + .../python-experimental/test/test_user_api.py | 86 + .../python-experimental/test/test_whale.py | 37 + .../python-experimental/test/test_zebra.py | 37 + .../python-experimental/test_python.sh | 33 + .../testfiles/1px_pic1.png | Bin 0 -> 67 bytes .../testfiles/1px_pic2.png | Bin 0 -> 67 bytes .../tests_manual/__init__.py | 0 .../tests_manual/test_animal.py | 97 + .../tests_manual/test_any_type_schema.py | 273 ++ .../test_array_holding_any_type.py | 64 + .../test_array_with_validations_in_items.py | 52 + .../tests_manual/test_boolean_enum.py | 39 + .../test_combine_object_schemas.py | 152 + .../tests_manual/test_combine_schemas.py | 104 + .../tests_manual/test_composed_bool.py | 42 + .../tests_manual/test_composed_none.py | 42 + .../tests_manual/test_composed_number.py | 42 + .../tests_manual/test_composed_object.py | 42 + .../test_composed_one_of_different_types.py | 107 + .../tests_manual/test_composed_string.py | 42 + .../tests_manual/test_configuration.py | 69 + .../test_date_time_with_validations.py | 87 + .../test_date_with_validations.py | 90 + .../tests_manual/test_deserialization.py | 458 +++ .../test_discard_unknown_properties.py | 157 + .../tests_manual/test_drawing.py | 166 ++ .../test_extra_pool_config_options.py | 61 + .../tests_manual/test_fake_api.py | 575 ++++ .../tests_manual/test_format_test.py | 134 + .../tests_manual/test_fruit.py | 170 ++ .../tests_manual/test_fruit_req.py | 122 + .../tests_manual/test_gm_fruit.py | 135 + .../tests_manual/test_http_signature.py | 518 ++++ .../test_integer_enum_one_value.py | 55 + .../tests_manual/test_json_encoder.py | 50 + .../tests_manual/test_mammal.py | 55 + .../test_no_additional_properties.py | 64 + .../tests_manual/test_nullable_string.py | 54 + .../test_number_with_validations.py | 46 + .../test_object_model_with_ref_props.py | 49 + ...est_object_with_difficultly_named_props.py | 37 + .../test_object_with_validations.py | 52 + .../tests_manual/test_parameters.py | 954 ++++++ .../tests_manual/test_parent_pet.py | 42 + .../tests_manual/test_quadrilateral.py | 40 + .../tests_manual/test_request_body.py | 147 + .../tests_manual/test_shape.py | 117 + .../tests_manual/test_string_enum.py | 56 + .../tests_manual/test_triangle.py | 38 + .../tests_manual/test_validate.py | 330 ++ .../tests_manual/test_whale.py | 49 + .../python-experimental/tests_manual/util.py | 8 + .../petstore/python-experimental/tox.ini | 9 + 549 files changed, 57573 insertions(+), 14 deletions(-) create mode 100644 bin/configs/python-experimental.yaml create mode 100644 docs/generators/python-experimental.md create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/README.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/README_onlypackage.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/__init__.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/__init__api.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/__init__model.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/__init__models.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/__init__package.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/api.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/api_doc.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/api_doc_example.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/api_doc_schema_type_hint.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/configuration.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/doc_auth_partial.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/endpoint_body_serialization.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/endpoint_parameter.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/exceptions.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/git_push.sh.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/gitignore.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/gitlab-ci.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_doc.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/dict_partial.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/enum_value_to_name.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/enums.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schemas.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_dict.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_list.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_simple.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/validations.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/partial_header.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/requirements.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/rest.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/setup_cfg.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/signing.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/test-requirements.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/tox.handlebars create mode 100644 modules/openapi-generator/src/main/resources/python-experimental/travis.handlebars create mode 100644 modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml create mode 100644 samples/openapi3/client/petstore/python-experimental/.gitignore create mode 100644 samples/openapi3/client/petstore/python-experimental/.gitlab-ci.yml create mode 100644 samples/openapi3/client/petstore/python-experimental/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/python-experimental/.travis.yml create mode 100644 samples/openapi3/client/petstore/python-experimental/Makefile create mode 100644 samples/openapi3/client/petstore/python-experimental/README.md create mode 100644 samples/openapi3/client/petstore/python-experimental/dev-requirements.txt create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesWithArrayOfEnums.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Address.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Animal.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/AnimalFarm.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ApiResponse.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Apple.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ArrayHoldingAnyType.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ArrayOfEnums.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ArrayTest.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ArrayWithValidationsInItems.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Banana.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/BananaReq.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Bar.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Boolean.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/BooleanEnum.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Capitalization.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Cat.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/CatAllOf.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Category.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ClassModel.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Client.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateralAllOf.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComposedAnyOfDifferentTypesNoValidations.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComposedArray.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComposedBool.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComposedNone.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComposedNumber.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComposedObject.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComposedOneOfDifferentTypes.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComposedString.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/DateTimeTest.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/DateTimeWithValidations.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/DateWithValidations.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Dog.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Drawing.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/EnumArrays.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/EnumClass.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/EnumTest.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/File.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/FileSchemaTestClass.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Foo.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/FormatTest.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Fruit.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/GrandparentAnimal.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/HasOnlyReadOnly.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/HealthCheckResult.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IntegerEnum.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumBig.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumOneValue.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumWithDefaultValue.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IntegerMax10.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IntegerMin15.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Mammal.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/MapTest.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Model200Response.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ModelReturn.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Name.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/NoAdditionalProperties.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/NullableString.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Number.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/NumberOnly.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/NumberWithValidations.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ObjectInterface.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ObjectModelWithRefProps.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDifficultlyNamedProps.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ObjectWithValidations.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Order.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Pet.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/PetApi.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Pig.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Player.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/QuadrilateralInterface.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ReadOnlyFirst.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Shape.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/SomeObject.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/SpecialModelName.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/String.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/StringBooleanMap.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/StringEnum.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/StringEnumWithDefaultValue.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/StringWithValidation.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Tag.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Triangle.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/TriangleInterface.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/User.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/UserApi.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Whale.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Zebra.md create mode 100644 samples/openapi3/client/petstore/python-experimental/git_push.sh create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/__init__.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/apis/__init__.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/configuration.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/exceptions.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/__init__.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/rest.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py create mode 100644 samples/openapi3/client/petstore/python-experimental/requirements.txt create mode 100644 samples/openapi3/client/petstore/python-experimental/setup.cfg create mode 100644 samples/openapi3/client/petstore/python-experimental/setup.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test-requirements.txt create mode 100644 samples/openapi3/client/petstore/python-experimental/test/__init__.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_address.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_animal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_api_response.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_apple.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_array_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_banana.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_bar.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_boolean.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_cat.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_category.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_class_model.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_client.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_default_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_dog.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_drawing.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_file.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_foo.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_format_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_fruit.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_mammal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_map_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_model_return.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_name.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_number.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_number_only.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_order.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_pet.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_pig.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_player.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_shape.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_some_object.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_store_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_tag.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_user.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_user_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_whale.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_zebra.py create mode 100755 samples/openapi3/client/petstore/python-experimental/test_python.sh create mode 100644 samples/openapi3/client/petstore/python-experimental/testfiles/1px_pic1.png create mode 100644 samples/openapi3/client/petstore/python-experimental/testfiles/1px_pic2.png create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/__init__.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_array_holding_any_type.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_array_with_validations_in_items.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_boolean_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_object_schemas.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_schemas.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_bool.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_none.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_number.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_object.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_one_of_different_types.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_configuration.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_date_time_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_date_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_deserialization.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_discard_unknown_properties.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_drawing.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_extra_pool_config_options.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_format_test.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit_req.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_gm_fruit.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_http_signature.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_integer_enum_one_value.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_json_encoder.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_mammal.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_no_additional_properties.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_nullable_string.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_number_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_model_with_ref_props.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_with_difficultly_named_props.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_with_validations.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_parameters.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_parent_pet.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_quadrilateral.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_request_body.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_shape.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_string_enum.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_triangle.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_whale.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/util.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tox.ini diff --git a/bin/configs/python-experimental.yaml b/bin/configs/python-experimental.yaml new file mode 100644 index 000000000000..1a8ea6e002c2 --- /dev/null +++ b/bin/configs/python-experimental.yaml @@ -0,0 +1,8 @@ +generatorName: python-experimental +outputDir: samples/openapi3/client/petstore/python-experimental +inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +templateDir: modules/openapi-generator/src/main/resources/python-experimental +templatingEngineName: handlebars +additionalProperties: + packageName: petstore_api + recursionLimit: "1234" diff --git a/docs/generators.md b/docs/generators.md index 6ce82ffadbbd..2d8876879115 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -54,6 +54,7 @@ The following generators are available: * [php-dt (beta)](generators/php-dt.md) * [powershell (beta)](generators/powershell.md) * [python (experimental)](generators/python.md) +* [python-experimental (experimental)](generators/python-experimental.md) * [python-legacy](generators/python-legacy.md) * [r](generators/r.md) * [ruby](generators/ruby.md) diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md new file mode 100644 index 000000000000..e61a03a4e606 --- /dev/null +++ b/docs/generators/python-experimental.md @@ -0,0 +1,221 @@ +--- +title: Config Options for python-experimental +sidebar_label: python-experimental +--- + +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. + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| +|packageName|python package name (convention: snake_case).| |openapi_client| +|packageUrl|python package URL.| |null| +|packageVersion|python package version.| |1.0.0| +|projectName|python project name in setup.py (e.g. petstore-api).| |null| +|recursionLimit|Set the recursion limit. If not set, use the system default value.| |null| +|useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|map|dict| + + +## LANGUAGE PRIMITIVES + +
    +
  • bool
  • +
  • bytes
  • +
  • date
  • +
  • datetime
  • +
  • dict
  • +
  • file
  • +
  • file_type
  • +
  • float
  • +
  • int
  • +
  • list
  • +
  • none_type
  • +
  • object
  • +
  • str
  • +
+ +## RESERVED WORDS + +
    +
  • all_params
  • +
  • and
  • +
  • as
  • +
  • assert
  • +
  • async
  • +
  • auth_settings
  • +
  • await
  • +
  • body_params
  • +
  • bool
  • +
  • break
  • +
  • class
  • +
  • continue
  • +
  • def
  • +
  • del
  • +
  • dict
  • +
  • elif
  • +
  • else
  • +
  • except
  • +
  • exec
  • +
  • false
  • +
  • file_type
  • +
  • finally
  • +
  • float
  • +
  • for
  • +
  • form_params
  • +
  • from
  • +
  • frozendict
  • +
  • global
  • +
  • header_params
  • +
  • if
  • +
  • import
  • +
  • in
  • +
  • int
  • +
  • is
  • +
  • lambda
  • +
  • list
  • +
  • local_var_files
  • +
  • none
  • +
  • none_type
  • +
  • nonlocal
  • +
  • not
  • +
  • or
  • +
  • pass
  • +
  • path_params
  • +
  • print
  • +
  • property
  • +
  • query_params
  • +
  • raise
  • +
  • resource_path
  • +
  • return
  • +
  • self
  • +
  • str
  • +
  • true
  • +
  • try
  • +
  • tuple
  • +
  • while
  • +
  • with
  • +
  • yield
  • +
+ +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension +|MockServer|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✓|OAS3 +|ParameterStyling|✓|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✓|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 39e7f784cc94..91c8870774a7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -1051,6 +1051,9 @@ public void setEmptyVars(boolean emptyVars) { this.emptyVars = emptyVars; } + public boolean getHasItems() { + return this.items != null; + } /** * Remove duplicated properties in all variable list */ 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 c7a22915dbff..7c2430f47149 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 @@ -778,6 +778,10 @@ public void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithN this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping; } + public boolean getHasItems() { + return this.items != null; + } + @Override public boolean getIsString() { return isString; } 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 8a96688f5fac..1af3ddbba392 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 @@ -2731,7 +2731,6 @@ public CodegenModel fromModel(String name, Schema schema) { addParentContainer(m, name, schema); } else if (ModelUtils.isIntegerSchema(schema)) { // integer type // NOTE: Integral schemas as CodegenModel is a rare use case and may be removed at a later date. - m.isNumeric = Boolean.TRUE; if (ModelUtils.isLongSchema(schema)) { // int64/long format m.isLong = Boolean.TRUE; @@ -2823,6 +2822,7 @@ public int compare(CodegenProperty one, CodegenProperty another) { postProcessModelProperty(m, prop); } } + return m; } @@ -2870,16 +2870,15 @@ protected void setAddProps(Schema schema, IJsonSchemaValidationProperties proper } } - - /** - * Recursively look in Schema sc for the discriminator discPropName - * and return a CodegenProperty with the dataType and required params set - * the returned CodegenProperty may not be required and it may not be of type string - * - * @param composedSchemaName The name of the sc Schema - * @param sc The Schema that may contain the discriminator - * @param discPropName The String that is the discriminator propertyName in the schema - */ + /** + * Recursively look in Schema sc for the discriminator discPropName + * and return a CodegenProperty with the dataType and required params set + * the returned CodegenProperty may not be required and it may not be of type string + * + * @param composedSchemaName The name of the sc Schema + * @param sc The Schema that may contain the discriminator + * @param discPropName The String that is the discriminator propertyName in the schema + */ private CodegenProperty discriminatorFound(String composedSchemaName, Schema sc, String discPropName, OpenAPI openAPI) { Schema refSchema = ModelUtils.getReferencedSchema(openAPI, sc); if (refSchema.getProperties() != null && refSchema.getProperties().get(discPropName) != null) { @@ -5199,7 +5198,7 @@ protected void addVars(CodegenModel m, Map properties, List vars, Map properties, Set mandatory) { + protected void addVars(IJsonSchemaValidationProperties m, List vars, Map properties, Set mandatory) { if (properties == null) { return; } @@ -6826,7 +6825,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S return codegenParameter; } - private void addVarsRequiredVarsAdditionalProps(Schema schema, IJsonSchemaValidationProperties property){ + protected void addVarsRequiredVarsAdditionalProps(Schema schema, IJsonSchemaValidationProperties property){ setAddProps(schema, property); if (!"object".equals(schema.getType())) { return; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 815342dfea74..8e3d27c6cd9c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -41,6 +41,7 @@ import org.openapitools.codegen.api.TemplateFileType; import org.openapitools.codegen.ignore.CodegenIgnoreProcessor; import org.openapitools.codegen.languages.PythonClientCodegen; +import org.openapitools.codegen.languages.PythonExperimentalClientCodegen; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.serializer.SerializerUtils; @@ -527,7 +528,7 @@ void generateModels(List files, List allModels, List unuse Map modelTemplate = (Map) modelList.get(0); if (modelTemplate != null && modelTemplate.containsKey("model")) { CodegenModel m = (CodegenModel) modelTemplate.get("model"); - if (m.isAlias && !(config instanceof PythonClientCodegen)) { + if (m.isAlias && !((config instanceof PythonClientCodegen) || (config instanceof PythonExperimentalClientCodegen))) { // alias to number, string, enum, etc, which should not be generated as model // for PythonClientCodegen, all aliases are generated as models continue; // Don't create user-defined classes for aliases diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java new file mode 100644 index 000000000000..187ae357e022 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -0,0 +1,2078 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.languages; + +import com.github.curiousoddman.rgxgen.RgxGen; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.responses.ApiResponse; +import io.swagger.v3.oas.models.servers.Server; +import io.swagger.v3.oas.models.tags.Tag; +import org.openapitools.codegen.api.TemplatePathLocator; +import org.openapitools.codegen.ignore.CodegenIgnoreProcessor; +import org.openapitools.codegen.templating.*; +import io.swagger.v3.core.util.Json; +import io.swagger.v3.oas.models.media.*; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.parameters.RequestBody; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.*; +import org.openapitools.codegen.CodegenDiscriminator.MappedModel; +import org.openapitools.codegen.api.TemplatingEngineAdapter; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.utils.ModelUtils; +import org.openapitools.codegen.utils.ProcessUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.openapitools.codegen.api.TemplateProcessor; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.openapitools.codegen.utils.OnceLogger.once; +import static org.openapitools.codegen.utils.StringUtils.underscore; + +public class PythonExperimentalClientCodegen extends AbstractPythonCodegen { + private final Logger LOGGER = LoggerFactory.getLogger(PythonExperimentalClientCodegen.class); + + public static final String PACKAGE_URL = "packageUrl"; + public static final String DEFAULT_LIBRARY = "urllib3"; + // nose is a python testing framework, we use pytest if USE_NOSE is unset + public static final String USE_NOSE = "useNose"; + public static final String RECURSION_LIMIT = "recursionLimit"; + + protected String packageUrl; + protected String apiDocPath = "docs/"; + protected String modelDocPath = "docs/"; + protected boolean useNose = Boolean.FALSE; + + protected Map regexModifiers; + + private String testFolder; + + // A cache to efficiently lookup a Schema instance based on the return value of `toModelName()`. + private Map modelNameToSchemaCache; + private DateTimeFormatter iso8601Date = DateTimeFormatter.ISO_DATE; + private DateTimeFormatter iso8601DateTime = DateTimeFormatter.ISO_DATE_TIME; + + private String templateExtension; + protected CodegenIgnoreProcessor ignoreProcessor; + protected TemplateProcessor templateProcessor = null; + + public PythonExperimentalClientCodegen() { + super(); + + modifyFeatureSet(features -> features + .includeSchemaSupportFeatures( + SchemaSupportFeature.Simple, + SchemaSupportFeature.Composite, + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .includeGlobalFeatures( + GlobalFeature.ParameterizedServer, + GlobalFeature.ParameterStyling + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects + ) + .excludeSchemaSupportFeatures( + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + ); + + // clear import mapping (from default generator) as python does not use it + // at the moment + importMapping.clear(); + + modelPackage = "model"; + apiPackage = "api"; + outputFolder = "generated-code" + File.separatorChar + "python"; + + embeddedTemplateDir = templateDir = "python-experimental"; + + testFolder = "test"; + + // default HIDE_GENERATION_TIMESTAMP to true + hideGenerationTimestamp = Boolean.TRUE; + + // from https://docs.python.org/3/reference/lexical_analysis.html#keywords + setReservedWordsLowerCase( + Arrays.asList( + // local variable name used in API methods (endpoints) + "all_params", "resource_path", "path_params", "query_params", + "header_params", "form_params", "local_var_files", "body_params", "auth_settings", + // @property + "property", + // python reserved words + "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", + "assert", "else", "if", "pass", "yield", "break", "except", "import", + "print", "class", "exec", "in", "raise", "continue", "finally", "is", + "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", + "False", "async", "await", + // types + "float", "int", "str", "bool", "none_type", "dict", "frozendict", "list", "tuple", "file_type")); + + regexModifiers = new HashMap(); + regexModifiers.put('i', "IGNORECASE"); + regexModifiers.put('l', "LOCALE"); + regexModifiers.put('m', "MULTILINE"); + regexModifiers.put('s', "DOTALL"); + regexModifiers.put('u', "UNICODE"); + regexModifiers.put('x', "VERBOSE"); + + cliOptions.clear(); + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "python package name (convention: snake_case).") + .defaultValue("openapi_client")); + cliOptions.add(new CliOption(CodegenConstants.PROJECT_NAME, "python project name in setup.py (e.g. petstore-api).")); + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "python package version.") + .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 + // required params + // optional params which are set to unset as their default for method signatures only + // optional params as **kwargs + cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) + .defaultValue(Boolean.TRUE.toString())); + cliOptions.add(new CliOption(CodegenConstants.SOURCECODEONLY_GENERATION, CodegenConstants.SOURCECODEONLY_GENERATION_DESC) + .defaultValue(Boolean.FALSE.toString())); + cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework"). + defaultValue(Boolean.FALSE.toString())); + cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value.")); + + supportedLibraries.put("urllib3", "urllib3-based client"); + supportedLibraries.put("asyncio", "Asyncio-based client (python 3.5+)"); + supportedLibraries.put("tornado", "tornado-based client"); + CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: asyncio, tornado, urllib3"); + libraryOption.setDefault(DEFAULT_LIBRARY); + cliOptions.add(libraryOption); + setLibrary(DEFAULT_LIBRARY); + + // Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema. + // In principle, this should be enabled by default for all code generators. However due to limitations + // in other code generators, support needs to be enabled on a case-by-case basis. + supportsAdditionalPropertiesWithComposedSchema = true; + + // When the 'additionalProperties' keyword is not present in a OAS schema, allow + // undeclared properties. This is compliant with the JSON schema specification. + this.setDisallowAdditionalPropertiesIfNotPresent(false); + + // this may set datatype right for additional properties + instantiationTypes.put("map", "dict"); + + languageSpecificPrimitives.add("file_type"); + languageSpecificPrimitives.add("none_type"); + + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.EXPERIMENTAL) + .build(); + } + + @Override + public void processOpts() { + this.setLegacyDiscriminatorBehavior(false); + + super.processOpts(); + + TemplatingEngineAdapter te = getTemplatingEngine(); + if (te instanceof HandlebarsEngineAdapter) { + HandlebarsEngineAdapter hea = (HandlebarsEngineAdapter) te; + hea.infiniteLoops(true); + hea.setPrettyPrint(true); + } else { + throw new RuntimeException("Only the HandlebarsEngineAdapter is supported for this generator"); + } + + TemplatePathLocator commonTemplateLocator = new CommonTemplateContentLocator(); + TemplatePathLocator generatorTemplateLocator = new GeneratorTemplateContentLocator(this); + TemplateManagerOptions templateManagerOptions = new TemplateManagerOptions(this.isEnableMinimalUpdate(),this.isSkipOverwrite()); + templateProcessor = new TemplateManager( + templateManagerOptions, + te, + new TemplatePathLocator[]{generatorTemplateLocator, commonTemplateLocator} + ); + templateExtension = te.getIdentifier(); + + String ignoreFileLocation = this.getIgnoreFilePathOverride(); + if (ignoreFileLocation != null) { + final File ignoreFile = new File(ignoreFileLocation); + if (ignoreFile.exists() && ignoreFile.canRead()) { + this.ignoreProcessor = new CodegenIgnoreProcessor(ignoreFile); + } else { + LOGGER.warn("Ignore file specified at {} is not valid. This will fall back to an existing ignore file if present in the output directory.", ignoreFileLocation); + } + } + + if (this.ignoreProcessor == null) { + this.ignoreProcessor = new CodegenIgnoreProcessor(this.getOutputDir()); + } + + modelTemplateFiles.put("model." + templateExtension, ".py"); + apiTemplateFiles.put("api." + templateExtension, ".py"); + modelTestTemplateFiles.put("model_test." + templateExtension, ".py"); + apiTestTemplateFiles.put("api_test." + templateExtension, ".py"); + modelDocTemplateFiles.put("model_doc." + templateExtension, ".md"); + apiDocTemplateFiles.put("api_doc." + templateExtension, ".md"); + + if (StringUtils.isEmpty(System.getenv("PYTHON_POST_PROCESS_FILE"))) { + LOGGER.info("Environment variable PYTHON_POST_PROCESS_FILE not defined so the Python code may not be properly formatted. To define it, try 'export PYTHON_POST_PROCESS_FILE=\"/usr/local/bin/yapf -i\"' (Linux/Mac)"); + LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); + } + + Boolean excludeTests = false; + + if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { + setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME)); + } + + if (additionalProperties.containsKey(CodegenConstants.PROJECT_NAME)) { + setProjectName((String) additionalProperties.get(CodegenConstants.PROJECT_NAME)); + } else { + // default: set project based on package name + // e.g. petstore_api (package name) => petstore-api (project name) + setProjectName(packageName.replaceAll("_", "-")); + } + + if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { + setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION)); + } + + additionalProperties.put(CodegenConstants.PROJECT_NAME, projectName); + additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); + additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion); + + if (additionalProperties.containsKey(CodegenConstants.EXCLUDE_TESTS)) { + excludeTests = Boolean.valueOf(additionalProperties.get(CodegenConstants.EXCLUDE_TESTS).toString()); + } + + Boolean generateSourceCodeOnly = false; + if (additionalProperties.containsKey(CodegenConstants.SOURCECODEONLY_GENERATION)) { + generateSourceCodeOnly = Boolean.valueOf(additionalProperties.get(CodegenConstants.SOURCECODEONLY_GENERATION).toString()); + } + + if (generateSourceCodeOnly) { + // tests in /test + testFolder = packagePath() + File.separatorChar + testFolder; + // api/model docs in /docs + apiDocPath = packagePath() + File.separatorChar + apiDocPath; + modelDocPath = packagePath() + File.separatorChar + modelDocPath; + } + // make api and model doc path available in templates + additionalProperties.put("apiDocPath", apiDocPath); + additionalProperties.put("modelDocPath", modelDocPath); + + if (additionalProperties.containsKey(PACKAGE_URL)) { + setPackageUrl((String) additionalProperties.get(PACKAGE_URL)); + } + + if (additionalProperties.containsKey(USE_NOSE)) { + setUseNose((String) additionalProperties.get(USE_NOSE)); + } + + // check to see if setRecursionLimit is set and whether it's an integer + if (additionalProperties.containsKey(RECURSION_LIMIT)) { + try { + Integer.parseInt((String) additionalProperties.get(RECURSION_LIMIT)); + } catch (NumberFormatException | NullPointerException e) { + throw new IllegalArgumentException("recursionLimit must be an integer, e.g. 2000."); + } + } + + String readmePath = "README.md"; + String readmeTemplate = "README." + templateExtension; + if (generateSourceCodeOnly) { + readmePath = packagePath() + "_" + readmePath; + readmeTemplate = "README_onlypackage." + templateExtension; + } + supportingFiles.add(new SupportingFile(readmeTemplate, "", readmePath)); + + if (!generateSourceCodeOnly) { + supportingFiles.add(new SupportingFile("tox." + templateExtension, "", "tox.ini")); + supportingFiles.add(new SupportingFile("test-requirements." + templateExtension, "", "test-requirements.txt")); + supportingFiles.add(new SupportingFile("requirements." + templateExtension, "", "requirements.txt")); + supportingFiles.add(new SupportingFile("setup_cfg." + templateExtension, "", "setup.cfg")); + + supportingFiles.add(new SupportingFile("git_push.sh." + templateExtension, "", "git_push.sh")); + supportingFiles.add(new SupportingFile("gitignore." + templateExtension, "", ".gitignore")); + supportingFiles.add(new SupportingFile("travis." + templateExtension, "", ".travis.yml")); + supportingFiles.add(new SupportingFile("gitlab-ci." + templateExtension, "", ".gitlab-ci.yml")); + supportingFiles.add(new SupportingFile("setup." + templateExtension, "", "setup.py")); + } + supportingFiles.add(new SupportingFile("configuration." + templateExtension, packagePath(), "configuration.py")); + supportingFiles.add(new SupportingFile("__init__package." + templateExtension, packagePath(), "__init__.py")); + + // If the package name consists of dots(openapi.client), then we need to create the directory structure like openapi/client with __init__ files. + String[] packageNameSplits = packageName.split("\\."); + String currentPackagePath = ""; + for (int i = 0; i < packageNameSplits.length - 1; i++) { + if (i > 0) { + currentPackagePath = currentPackagePath + File.separatorChar; + } + currentPackagePath = currentPackagePath + packageNameSplits[i]; + supportingFiles.add(new SupportingFile("__init__." + templateExtension, currentPackagePath, "__init__.py")); + } + + supportingFiles.add(new SupportingFile("exceptions." + templateExtension, packagePath(), "exceptions.py")); + + if (Boolean.FALSE.equals(excludeTests)) { + supportingFiles.add(new SupportingFile("__init__." + templateExtension, testFolder, "__init__.py")); + } + + supportingFiles.add(new SupportingFile("api_client." + templateExtension, packagePath(), "api_client.py")); + + if ("asyncio".equals(getLibrary())) { + supportingFiles.add(new SupportingFile("asyncio/rest." + templateExtension, packagePath(), "rest.py")); + additionalProperties.put("asyncio", "true"); + } else if ("tornado".equals(getLibrary())) { + supportingFiles.add(new SupportingFile("tornado/rest." + templateExtension, packagePath(), "rest.py")); + additionalProperties.put("tornado", "true"); + } else { + supportingFiles.add(new SupportingFile("rest." + templateExtension, packagePath(), "rest.py")); + } + + supportingFiles.add(new SupportingFile("schemas." + templateExtension, packagePath(), "schemas.py")); + + // add the models and apis folders + supportingFiles.add(new SupportingFile("__init__models." + templateExtension, packagePath() + File.separatorChar + "models", "__init__.py")); + supportingFiles.add(new SupportingFile("__init__model." + templateExtension, packagePath() + File.separatorChar + modelPackage, "__init__.py")); + supportingFiles.add(new SupportingFile("__init__apis." + templateExtension, packagePath() + File.separatorChar + "apis", "__init__.py")); + supportingFiles.add(new SupportingFile("__init__api." + templateExtension, packagePath() + File.separatorChar + apiPackage, "__init__.py")); + // Generate the 'signing.py' module, but only if the 'HTTP signature' security scheme is specified in the OAS. + Map securitySchemeMap = openAPI != null ? + (openAPI.getComponents() != null ? openAPI.getComponents().getSecuritySchemes() : null) : null; + List authMethods = fromSecurity(securitySchemeMap); + if (ProcessUtils.hasHttpSignatureMethods(authMethods)) { + supportingFiles.add(new SupportingFile("signing." + templateExtension, packagePath(), "signing.py")); + } + + // default this to true so the python ModelSimple models will be generated + ModelUtils.setGenerateAliasAsModel(true); + LOGGER.info(CodegenConstants.GENERATE_ALIAS_AS_MODEL + " is hard coded to true in this generator. Alias models will only be generated if they contain validations or enums"); + + // check library option to ensure only urllib3 is supported + if (!DEFAULT_LIBRARY.equals(getLibrary())) { + throw new RuntimeException("Only the `urllib3` library is supported in the refactored `python` client generator at the moment. Please fall back to `python-legacy` client generator for the time being. We welcome contributions to add back `asyncio`, `tornado` support to the `python` client generator."); + } + } + + public String endpointFilename(String templateName, String tag, String operationId) { + return apiFileFolder() + File.separator + toApiFilename(tag) + "_endpoints" + File.separator + operationId + ".py"; + } + + protected File processTemplateToFile(Map templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption) throws IOException { + String adjustedOutputFilename = outputFilename.replaceAll("//", "/").replace('/', File.separatorChar); + File target = new File(adjustedOutputFilename); + if (ignoreProcessor.allowsFile(target)) { + if (shouldGenerate) { + Path outDir = java.nio.file.Paths.get(this.getOutputDir()).toAbsolutePath(); + Path absoluteTarget = target.toPath().toAbsolutePath(); + if (!absoluteTarget.startsWith(outDir)) { + throw new RuntimeException(String.format(Locale.ROOT, "Target files must be generated within the output directory; absoluteTarget=%s outDir=%s", absoluteTarget, outDir)); + } + return this.templateProcessor.write(templateData,templateName, target); + } else { + this.templateProcessor.skip(target.toPath(), String.format(Locale.ROOT, "Skipped by %s options supplied by user.", skippedByOption)); + return null; + } + } else { + this.templateProcessor.ignore(target.toPath(), "Ignored by rule in ignore file."); + return null; + } + } + + /* + I made this method because endpoint parameters not contain a lot of needed metadata + It is very verbose to write all of this info into the api template + This ingests all operations under a tag in the objs input and writes out one file for each endpoint + */ + protected void generateEndpoints(Map objs) { + if (!(Boolean) additionalProperties.get(CodegenConstants.GENERATE_APIS)) { + return; + } + HashMap operations = (HashMap) objs.get("operations"); + ArrayList codegenOperations = (ArrayList) operations.get("operation"); + for (CodegenOperation co: codegenOperations) { + for (Tag tag: co.tags) { + String tagName = tag.getName(); + String pythonTagName = toVarName(tagName); + Map operationMap = new HashMap<>(); + operationMap.put("operation", co); + operationMap.put("imports", co.imports); + operationMap.put("packageName", packageName); + + String templateName = "endpoint.handlebars"; + String filename = endpointFilename(templateName, pythonTagName, co.operationId); + try { + File written = processTemplateToFile(operationMap, templateName, filename, true, CodegenConstants.APIS); + } catch (IOException e) { + LOGGER.error("Error when writing template file {}", e.toString()); + } + } + } + } + + /* + We have a custom version of this method so for composed schemas and object schemas we add properties only if they + are defined in that schema (x.properties). We do this because validation should be done independently in each schema + If properties are hosted into composed schemas, they can collide or incorrectly list themself as required when + they are not. + */ + @Override + protected void addVarsRequiredVarsAdditionalProps(Schema schema, IJsonSchemaValidationProperties property){ + setAddProps(schema, property); + if (schema instanceof ComposedSchema && supportsAdditionalPropertiesWithComposedSchema) { + // if schema has properties outside of allOf/oneOf/anyOf also add them + ComposedSchema cs = (ComposedSchema) schema; + if (schema.getProperties() != null && !schema.getProperties().isEmpty()) { + if (cs.getOneOf() != null && !cs.getOneOf().isEmpty()) { + LOGGER.warn("'oneOf' is intended to include only the additional optional OAS extension discriminator object. " + + "For more details, see https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.2.1.3 and the OAS section on 'Composition and Inheritance'."); + } + HashSet requiredVars = new HashSet<>(); + if (schema.getRequired() != null) { + requiredVars.addAll(schema.getRequired()); + } + addVars(property, property.getVars(), schema.getProperties(), requiredVars); + } + return; + } else if (ModelUtils.isTypeObjectSchema(schema)) { + HashSet requiredVars = new HashSet<>(); + if (schema.getRequired() != null) { + requiredVars.addAll(schema.getRequired()); + property.setHasRequired(true); + } + addVars(property, property.getVars(), schema.getProperties(), requiredVars); + if (property.getVars() != null && !property.getVars().isEmpty()) { + property.setHasVars(true); + } + } + return; + } + + /** + * Configures a friendly name for the generator. This will be used by the + * generator to select the library with the -g flag. + * + * @return the friendly name for the generator + */ + @Override + public String getName() { + return "python-experimental"; + } + + @Override + public String getHelp() { + String newLine = System.getProperty("line.separator"); + return String.join(newLine, + "Generates a Python client library", + "", + "Features in this generator:", + "- type hints on endpoints and model creation", + "- model parameter names use the spec defined keys and cases", + "- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only", + "- endpoint parameter names use the spec defined keys and cases", + "- inline schemas are supported at any location including composition", + "- multiple content types supported in request body and response bodies", + "- run time type checking", + "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", + "- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed", + "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", + "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor", + " - Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int"); + } + + @Override + public Schema unaliasSchema(Schema schema, Map usedImportMappings) { + Map allSchemas = ModelUtils.getSchemas(openAPI); + if (allSchemas == null || allSchemas.isEmpty()) { + // skip the warning as the spec can have no model defined + //LOGGER.warn("allSchemas cannot be null/empty in unaliasSchema. Returned 'schema'"); + return schema; + } + + if (schema != null && StringUtils.isNotEmpty(schema.get$ref())) { + String simpleRef = ModelUtils.getSimpleRef(schema.get$ref()); + if (usedImportMappings.containsKey(simpleRef)) { + LOGGER.debug("Schema unaliasing of {} omitted because aliased class is to be mapped to {}", simpleRef, usedImportMappings.get(simpleRef)); + return schema; + } + Schema ref = allSchemas.get(simpleRef); + if (ref == null) { + once(LOGGER).warn("{} is not defined", schema.get$ref()); + return schema; + } else if (ref.getEnum() != null && !ref.getEnum().isEmpty()) { + // top-level enum class + return schema; + } else if (ModelUtils.isArraySchema(ref)) { + if (ModelUtils.isGenerateAliasAsModel(ref)) { + return schema; // generate a model extending array + } else { + return unaliasSchema(allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())), + usedImportMappings); + } + } else if (ModelUtils.isComposedSchema(ref)) { + return schema; + } else if (ModelUtils.isMapSchema(ref)) { + if (ref.getProperties() != null && !ref.getProperties().isEmpty()) // has at least one property + return schema; // treat it as model + else { + if (ModelUtils.isGenerateAliasAsModel(ref)) { + return schema; // generate a model extending map + } else { + // treat it as a typical map + return unaliasSchema(allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())), + usedImportMappings); + } + } + } else if (ModelUtils.isObjectSchema(ref)) { // model + if (ref.getProperties() != null && !ref.getProperties().isEmpty()) { // has at least one property + return schema; + } else { + // free form object (type: object) + if (ModelUtils.hasValidation(ref)) { + return schema; + } else if (getAllOfDescendants(simpleRef, openAPI).size() > 0) { + return schema; + } + return unaliasSchema(allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())), + usedImportMappings); + } + } else if (ModelUtils.hasValidation(ref)) { + // non object non array non map schemas that have validations + // are returned so we can generate those schemas as models + // we do this to: + // - preserve the validations in that model class in python + // - use those validations when we use this schema in composed oneOf schemas + return schema; + } else if (Boolean.TRUE.equals(ref.getNullable()) && ref.getEnum() == null) { + // non enum primitive with nullable True + // we make these models so instances of this will be subclasses of this model + return schema; + } else { + return unaliasSchema(allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())), usedImportMappings); + } + } + return schema; + } + + public String pythonDate(Object dateValue) { + String strValue = null; + if (dateValue instanceof OffsetDateTime) { + OffsetDateTime date = null; + try { + date = (OffsetDateTime) dateValue; + } catch (ClassCastException e) { + LOGGER.warn("Invalid `date` format for value {}", dateValue.toString()); + date = ((Date) dateValue).toInstant().atOffset(ZoneOffset.UTC); + } + strValue = date.format(iso8601Date); + } else { + strValue = dateValue.toString(); + } + return "isoparse('" + strValue + "').date()"; + } + + public String pythonDateTime(Object dateTimeValue) { + String strValue = null; + if (dateTimeValue instanceof OffsetDateTime) { + OffsetDateTime dateTime = null; + try { + dateTime = (OffsetDateTime) dateTimeValue; + } catch (ClassCastException e) { + LOGGER.warn("Invalid `date-time` format for value {}", dateTimeValue.toString()); + dateTime = ((Date) dateTimeValue).toInstant().atOffset(ZoneOffset.UTC); + } + strValue = dateTime.format(iso8601DateTime); + } else { + strValue = dateTimeValue.toString(); + } + return "isoparse('" + strValue + "')"; + } + + /** + * Return the default value of the property + * + * @param p OpenAPI property object + * @return string presentation of the default value of the property + */ + @Override + public String toDefaultValue(Schema p) { + Object defaultObject = null; + if (p.getDefault() != null) { + defaultObject = p.getDefault(); + } + + if (defaultObject == null) { + return null; + } + + String defaultValue = defaultObject.toString(); + if (ModelUtils.isDateSchema(p)) { + defaultValue = pythonDate(defaultObject); + } else if (ModelUtils.isDateTimeSchema(p)) { + defaultValue = pythonDateTime(defaultObject); + } else if (ModelUtils.isStringSchema(p) && !ModelUtils.isByteArraySchema(p) && !ModelUtils.isBinarySchema(p) && !ModelUtils.isFileSchema(p) && !ModelUtils.isUUIDSchema(p) && !ModelUtils.isEmailSchema(p)) { + defaultValue = ensureQuotes(defaultValue); + } else if (ModelUtils.isBooleanSchema(p)) { + if (Boolean.valueOf(defaultValue) == false) { + defaultValue = "False"; + } else { + defaultValue = "True"; + } + } + return defaultValue; + } + + @Override + public String toModelImport(String name) { + // name looks like Cat + return "from " + packagePath() + "." + modelPackage() + "." + toModelFilename(name) + " import " + toModelName(name); + } + + @Override + @SuppressWarnings("static-method") + public Map postProcessOperationsWithModels(Map objs, List allModels) { + // fix the imports that each model has, add the module reference to the model + // loops through imports and converts them all + // from 'Pet' to 'from petstore_api.model.pet import Pet' + + HashMap val = (HashMap) objs.get("operations"); + ArrayList operations = (ArrayList) val.get("operation"); + ArrayList> imports = (ArrayList>) objs.get("imports"); + for (CodegenOperation operation : operations) { + if (operation.imports.size() == 0) { + continue; + } + String[] modelNames = operation.imports.toArray(new String[0]); + operation.imports.clear(); + for (String modelName : modelNames) { + operation.imports.add(toModelImport(modelName)); + } + } + generateEndpoints(objs); + return objs; + } + + /*** + * Override with special post-processing for all models. + * we have a custom version of this method to: + * - remove any primitive models that do not contain validations + * these models are unaliased as inline definitions wherever the spec has them as refs + * this means that the generated client does not use these models + * because they are not used we do not write them + * - fix the model imports, go from model name to the full import string with toModelImport + globalImportFixer + * + * @param objs a map going from the model name to a object hoding the model info + * @return the updated objs + */ + @Override + public Map postProcessAllModels(Map objs) { + super.postProcessAllModels(objs); + + Map allDefinitions = ModelUtils.getSchemas(this.openAPI); + for (String schemaName : allDefinitions.keySet()) { + Schema refSchema = new Schema().$ref("#/components/schemas/" + schemaName); + Schema unaliasedSchema = unaliasSchema(refSchema, importMapping); + String modelName = toModelName(schemaName); + if (unaliasedSchema.get$ref() == null) { + continue; + } else { + HashMap objModel = (HashMap) objs.get(modelName); + if (objModel != null) { // to avoid form parameter's models that are not generated (skipFormModel=true) + List> models = (List>) objModel.get("models"); + for (Map model : models) { + CodegenModel cm = (CodegenModel) model.get("model"); + String[] importModelNames = cm.imports.toArray(new String[0]); + cm.imports.clear(); + for (String importModelName : importModelNames) { + cm.imports.add(toModelImport(importModelName)); + } + } + } + } + } + + return objs; + } + + public CodegenParameter fromParameter(Parameter parameter, Set imports) { + CodegenParameter cp = super.fromParameter(parameter, imports); + switch(parameter.getStyle()) { + case MATRIX: + cp.style = "MATRIX"; + break; + case LABEL: + cp.style = "LABEL"; + break; + case FORM: + cp.style = "FORM"; + break; + case SIMPLE: + cp.style = "SIMPLE"; + break; + case SPACEDELIMITED: + cp.style = "SPACE_DELIMITED"; + break; + case PIPEDELIMITED: + cp.style = "PIPE_DELIMITED"; + break; + case DEEPOBJECT: + cp.style = "DEEP_OBJECT"; + break; + } + // clone this so we can change some properties on it + CodegenProperty schemaProp = cp.getSchema().clone(); + // parameters may have valid python names like some_val or invalid ones like Content-Type + // we always set nameInSnakeCase to null so special handling will not be done for these names + // invalid python names will be handled in python by using a TypedDict which will allow us to have a type hint + // for keys that cannot be variable names to the schema baseName + if (schemaProp != null) { + schemaProp.nameInSnakeCase = null; + schemaProp.baseName = toModelName(cp.baseName) + "Schema"; + cp.setSchema(schemaProp); + } + return cp; + } + + private boolean isValidPythonVarOrClassName(String name) { + return name.matches("^[_a-zA-Z][_a-zA-Z0-9]*$"); + } + + + /** + * Convert OAS Property object to Codegen Property object + * We have a custom version of this method to always set allowableValues.enumVars on all enum variables + * Together with unaliasSchema this sets primitive types with validations as models + * This method is used by fromResponse + * + * @param name name of the property + * @param p OAS property object + * @return Codegen Property object + */ + @Override + public CodegenProperty fromProperty(String name, Schema p) { + CodegenProperty cp = super.fromProperty(name, p); + if (cp.isAnyType && cp.isNullable) { + cp.isNullable = false; + } + if (cp.isNullable && cp.complexType == null) { + cp.setIsNull(true); + cp.isNullable = false; + cp.setHasMultipleTypes(true); + } + postProcessPattern(cp.pattern, cp.vendorExtensions); + // if we have a property that has a difficult name, either: + // 1. name is reserved, like class int float + // 2. name is invalid in python like '3rd' or 'Content-Type' + // set cp.nameInSnakeCase to a value so we can tell that we are in this use case + // we handle this in the schema templates + // templates use its presence to handle these badly named variables / keys + if ((isReservedWord(name) || !isValidPythonVarOrClassName(name)) && !name.equals(cp.name)) { + cp.nameInSnakeCase = cp.name; + } else { + cp.nameInSnakeCase = null; + } + if (cp.isEnum) { + updateCodegenPropertyEnum(cp); + } + Schema unaliasedSchema = unaliasSchema(p, importMapping); + 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 + * In the future, we may rename this function to "isEnumString" + * + * @param dataType data type + * @return true if it's a enum string + */ + @Override + public boolean isDataTypeString(String dataType) { + return "str".equals(dataType); + } + + /** + * Update codegen property's enum by adding "enumVars" (with name and value) + * + * @param var list of CodegenProperty + */ + @Override + public void updateCodegenPropertyEnum(CodegenProperty var) { + // we have a custom version of this method to omit overwriting the defaultValue + Map allowableValues = var.allowableValues; + + // handle array + if (var.mostInnerItems != null) { + allowableValues = var.mostInnerItems.allowableValues; + } + + if (allowableValues == null) { + return; + } + + List values = (List) allowableValues.get("values"); + if (values == null) { + return; + } + + String varDataType = var.mostInnerItems != null ? var.mostInnerItems.dataType : var.dataType; + Schema referencedSchema = getModelNameToSchemaCache().get(varDataType); + String dataType = (referencedSchema != null) ? getTypeDeclaration(referencedSchema) : varDataType; + + // put "enumVars" map into `allowableValues", including `name` and `value` + List> enumVars = buildEnumVars(values, dataType); + + // if "x-enum-varnames" or "x-enum-descriptions" defined, update varnames + Map extensions = var.mostInnerItems != null ? var.mostInnerItems.getVendorExtensions() : var.getVendorExtensions(); + if (referencedSchema != null) { + extensions = referencedSchema.getExtensions(); + } + updateEnumVarsWithExtensions(enumVars, extensions, dataType); + allowableValues.put("enumVars", enumVars); + // overwriting defaultValue omitted from here + } + + /*** + * 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 imports import collection + * @param bodyParameterName body parameter name + * @return the resultant CodegenParameter + */ + @Override + public CodegenParameter fromRequestBody(RequestBody body, Set imports, String bodyParameterName) { + CodegenParameter cp = super.fromRequestBody(body, imports, bodyParameterName); + cp.baseName = "body"; + Schema schema = ModelUtils.getSchemaFromRequestBody(body); + if (schema.get$ref() == null) { + return cp; + } + Schema unaliasedSchema = unaliasSchema(schema, importMapping); + CodegenProperty unaliasedProp = fromProperty("body", unaliasedSchema); + Boolean dataTypeMismatch = !cp.dataType.equals(unaliasedProp.dataType); + Boolean baseTypeMismatch = !cp.baseType.equals(unaliasedProp.complexType) && unaliasedProp.complexType != null; + if (dataTypeMismatch || baseTypeMismatch) { + cp.dataType = unaliasedProp.dataType; + cp.baseType = unaliasedProp.complexType; + } + return cp; + } + + /*** + * Adds the body model schema to the body parameter + * We have a custom version of this method so we can flip forceSimpleRef + * to True based upon the results of unaliasSchema + * With this customization, we ensure that when schemas are passed to getSchemaType + * - if they have ref in them they are a model + * - if they do not have ref in them they are not a model + * + * @param codegenParameter the body parameter + * @param name model schema ref key in components + * @param schema the model schema (not refed) + * @param imports collection of imports + * @param bodyParameterName body parameter name + * @param forceSimpleRef if true use a model reference + */ + @Override + protected void addBodyModelSchema(CodegenParameter codegenParameter, String name, Schema schema, Set imports, String bodyParameterName, boolean forceSimpleRef) { + if (name != null) { + Schema bodySchema = new Schema().$ref("#/components/schemas/" + name); + Schema unaliased = unaliasSchema(bodySchema, importMapping); + if (unaliased.get$ref() != null) { + forceSimpleRef = true; + } + } + super.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, forceSimpleRef); + + } + + + /** + * Return the sanitized variable name for enum + * + * @param value enum variable name + * @param datatype data type + * @return the sanitized variable name for enum + */ + public String toEnumVarName(String value, String datatype) { + // our enum var names are keys in a python dict, so change spaces to underscores + if (value.length() == 0) { + return "EMPTY"; + } + + String intPattern = "^[-\\+]?\\d+$"; + String floatPattern = "^[-\\+]?\\d+\\.\\d+$"; + Boolean intMatch = Pattern.matches(intPattern, value); + Boolean floatMatch = Pattern.matches(floatPattern, value); + if (intMatch || floatMatch) { + String plusSign = "^\\+.+"; + String negSign = "^-.+"; + if (Pattern.matches(plusSign, value)) { + value = value.replace("+", "POSITIVE_"); + } else if (Pattern.matches(negSign, value)) { + value = value.replace("-", "NEGATIVE_"); + } else { + value = "POSITIVE_" + value; + } + if (floatMatch) { + value = value.replace(".", "_PT_"); + } + return value; + } + // Replace " " with _ + String usedValue = value.replaceAll("\\s+", "_").toUpperCase(Locale.ROOT); + // strip first character if it is invalid + usedValue = usedValue.replaceAll("^[^_a-zA-Z]", ""); + usedValue = usedValue.replaceAll("[^_a-zA-Z0-9]*", ""); + if (usedValue.length() == 0) { + for (int i = 0; i < value.length(); i++){ + Character c = value.charAt(i); + String charName = Character.getName(c.hashCode()); + usedValue += charNameToVarName(charName); + } + // remove trailing _ + usedValue = usedValue.replaceAll("[_]$", ""); + } + return usedValue; + } + + /** + * Replace - and " " with _ + * Remove SIGN + * + * @param charName + * @return + */ + private String charNameToVarName(String charName) { + String varName = charName.replaceAll("[\\-\\s]", "_"); + varName = varName.replaceAll("SIGN", ""); + return varName; + } + + /** + * Return the enum value in the language specified format + * e.g. status becomes "status" + * + * @param value enum variable name + * @param datatype data type + * @return the sanitized value for enum + */ + public String toEnumValue(String value, String datatype) { + if ("int".equals(datatype) || "float".equals(datatype) || datatype.equals("int, float")) { + return value; + } else if ("bool".equals(datatype)) { + return value.substring(0, 1).toUpperCase(Locale.ROOT) + value.substring(1); + } else { + return ensureQuotes(value); + } + } + + @Override + public void postProcessParameter(CodegenParameter p) { + postProcessPattern(p.pattern, p.vendorExtensions); + if (p.baseType != null && languageSpecificPrimitives.contains(p.baseType)) { + // set baseType to null so the api docs will not point to a model for languageSpecificPrimitives + p.baseType = null; + } + } + + /** + * Sets the value of the 'model.parent' property in CodegenModel + * We have a custom version of this function so we can add the dataType on the ArrayModel + */ + @Override + protected void addParentContainer(CodegenModel model, String name, Schema schema) { + super.addParentContainer(model, name, schema); + + List referencedModelNames = new ArrayList(); + model.dataType = getTypeString(schema, "", "", referencedModelNames); + } + + /** + * Convert OAS Model object to Codegen Model object + * We have a custom version of this method so we can: + * - set the correct regex values for requiredVars + optionalVars + * - set model.defaultValue and model.hasRequired per the three use cases defined in this method + * + * @param name the name of the model + * @param sc OAS Model object + * @return Codegen Model object + */ + @Override + public CodegenModel fromModel(String name, Schema sc) { + CodegenModel cm = super.fromModel(name, sc); + if (cm.isNullable) { + cm.setIsNull(true); + cm.isNullable = false; + cm.setHasMultipleTypes(true); + } + // TODO improve this imports addition code + if (cm.isArray && cm.getItems() != null && cm.getItems().complexType != null) { + cm.imports.add(cm.getItems().complexType); + } + if (cm.isArray && cm.getItems() != null && cm.getItems().mostInnerItems != null && cm.getItems().mostInnerItems.complexType != null) { + cm.imports.add(cm.getItems().mostInnerItems.complexType); + } + Boolean isNotPythonModelSimpleModel = (ModelUtils.isComposedSchema(sc) || ModelUtils.isObjectSchema(sc) || ModelUtils.isMapSchema(sc)); + setAdditionalPropsAndItemsVarNames(cm); + if (isNotPythonModelSimpleModel) { + return cm; + } + String defaultValue = toDefaultValue(sc); + if (sc.getDefault() != null) { + cm.defaultValue = defaultValue; + } + return cm; + } + + /** + * Returns the python type for the property. + * + * @param schema property schema + * @return string presentation of the type + **/ + @SuppressWarnings("static-method") + @Override + public String getSchemaType(Schema schema) { + String openAPIType = getSingleSchemaType(schema); + if (typeMapping.containsKey(openAPIType)) { + String type = typeMapping.get(openAPIType); + return type; + } + return toModelName(openAPIType); + } + + public String getModelName(Schema sc) { + if (sc.get$ref() != null) { + Schema unaliasedSchema = unaliasSchema(sc, importMapping); + if (unaliasedSchema.get$ref() != null) { + return toModelName(ModelUtils.getSimpleRef(sc.get$ref())); + } + } + return null; + } + + /** + * Return a string representation of the Python types for the specified OAS schema. + * Primitive types in the OAS specification are implemented in Python using the corresponding + * Python primitive types. + * Composed types (e.g. allAll, oneOf, anyOf) are represented in Python using list of types. + *

+ * The caller should set the prefix and suffix arguments to empty string, except when + * getTypeString invokes itself recursively. A non-empty prefix/suffix may be specified + * to wrap the return value in a python dict, list or tuple. + *

+ * Examples: + * - "bool, date, float" The data must be a bool, date or float. + * - "[bool, date]" The data must be an array, and the array items must be a bool or date. + * + * @param p The OAS schema. + * @param prefix prepended to the returned value. + * @param suffix appended to the returned value. + * @param referencedModelNames a list of models that are being referenced while generating the types, + * may be used to generate imports. + * @return a comma-separated string representation of the Python types + */ + private String getTypeString(Schema p, String prefix, String suffix, List referencedModelNames) { + String fullSuffix = suffix; + if (")".equals(suffix)) { + fullSuffix = "," + suffix; + } + if (StringUtils.isNotEmpty(p.get$ref())) { + // The input schema is a reference. If the resolved schema is + // a composed schema, convert the name to a Python class. + Schema unaliasedSchema = unaliasSchema(p, importMapping); + if (unaliasedSchema.get$ref() != null) { + String modelName = toModelName(ModelUtils.getSimpleRef(p.get$ref())); + if (referencedModelNames != null) { + referencedModelNames.add(modelName); + } + return prefix + modelName + fullSuffix; + } + } + if (isAnyTypeSchema(p)) { + return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + suffix; + } + // Resolve $ref because ModelUtils.isXYZ methods do not automatically resolve references. + if (ModelUtils.isNullable(ModelUtils.getReferencedSchema(this.openAPI, p))) { + fullSuffix = ", none_type" + suffix; + } + if (isFreeFormObject(p) && getAdditionalProperties(p) == null) { + return prefix + "bool, date, datetime, dict, float, int, list, str" + fullSuffix; + } else if (ModelUtils.isNumberSchema(p)) { + return prefix + "int, float" + fullSuffix; + } else if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && getAdditionalProperties(p) != null) { + Schema inner = getAdditionalProperties(p); + return prefix + "{str: " + getTypeString(inner, "(", ")", referencedModelNames) + "}" + fullSuffix; + } else if (ModelUtils.isArraySchema(p)) { + ArraySchema ap = (ArraySchema) p; + Schema inner = ap.getItems(); + if (inner == null) { + // In OAS 3.0.x, the array "items" attribute is required. + // In OAS >= 3.1, the array "items" attribute is optional such that the OAS + // specification is aligned with the JSON schema specification. + // When "items" is not specified, the elements of the array may be anything at all. + // In that case, the return value should be: + // "[bool, date, datetime, dict, float, int, list, str, none_type]" + // Using recursion to wrap the allowed python types in an array. + Schema anyType = new Schema(); // A Schema without any attribute represents 'any type'. + return getTypeString(anyType, "[", "]", referencedModelNames); + } else { + return prefix + getTypeString(inner, "[", "]", referencedModelNames) + fullSuffix; + } + } + if (ModelUtils.isFileSchema(p)) { + return prefix + "file_type" + fullSuffix; + } + String baseType = getSchemaType(p); + return prefix + baseType + fullSuffix; + } + + /** + * Output the type declaration of a given name + * + * @param p property schema + * @return a string presentation of the type + */ + @Override + public String getTypeDeclaration(Schema p) { + // this is used to set dataType, which defines a python tuple of classes + // in Python we will wrap this in () to make it a tuple but here we + // will omit the parens so the generated documentaion will not include + // them + return getTypeString(p, "", "", null); + } + + @Override + public String toInstantiationType(Schema property) { + if (ModelUtils.isArraySchema(property) || ModelUtils.isMapSchema(property) || property.getAdditionalProperties() != null) { + return getSchemaType(property); + } + return super.toInstantiationType(property); + } + + @Override + protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { + Schema addProps = getAdditionalProperties(schema); + if (addProps != null) { + // if AdditionalProperties exists, get its datatype and + // store it in codegenModel.additionalPropertiesType. + // The 'addProps' may be a reference, getTypeDeclaration will resolve + // the reference. + List referencedModelNames = new ArrayList(); + codegenModel.additionalPropertiesType = getTypeString(addProps, "", "", referencedModelNames); + if (referencedModelNames.size() != 0) { + // Models that are referenced in the 'additionalPropertiesType' keyword + // must be added to the imports. + codegenModel.imports.addAll(referencedModelNames); + } + } + // If addProps is null, the value of the 'additionalProperties' keyword is set + // to false, i.e. no additional properties are allowed. + } + + /** + * Gets an example if it exists + * + * @param sc input schema + * @return the example value + */ + protected Object getObjectExample(Schema sc) { + Schema schema = sc; + String ref = sc.get$ref(); + if (ref != null) { + schema = ModelUtils.getSchema(this.openAPI, ModelUtils.getSimpleRef(ref)); + } + // TODO handle examples in object models in the future + Boolean objectModel = (ModelUtils.isObjectSchema(schema) || ModelUtils.isMapSchema(schema) || ModelUtils.isComposedSchema(schema)); + if (objectModel) { + return null; + } + if (schema.getExample() != null) { + return schema.getExample(); + } + if (schema.getDefault() != null) { + return schema.getDefault(); + } else if (schema.getEnum() != null && !schema.getEnum().isEmpty()) { + return schema.getEnum().get(0); + } + return null; + } + + /*** + * Ensures that the string has a leading and trailing quote + * + * @param in input string + * @return quoted string + */ + private String ensureQuotes(String in) { + Pattern pattern = Pattern.compile("\r\n|\r|\n"); + Matcher matcher = pattern.matcher(in); + if (matcher.find()) { + // if a string has a new line in it add triple quotes to make it a python multiline string + return "'''" + in + "'''"; + } + String strPattern = "^['\"].*?['\"]$"; + if (in.matches(strPattern)) { + return in; + } + return "\"" + in + "\""; + } + + public String toExampleValue(Schema schema, Object objExample) { + String modelName = getModelName(schema); + return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0); + } + + private Boolean simpleStringSchema(Schema schema) { + Schema sc = schema; + String ref = schema.get$ref(); + if (ref != null) { + sc = ModelUtils.getSchema(this.openAPI, ModelUtils.getSimpleRef(ref)); + } + if (ModelUtils.isStringSchema(sc) && !ModelUtils.isDateSchema(sc) && !ModelUtils.isDateTimeSchema(sc) && !"Number".equalsIgnoreCase(sc.getFormat()) && !ModelUtils.isByteArraySchema(sc) && !ModelUtils.isBinarySchema(sc) && schema.getPattern() == null) { + return true; + } + return false; + } + + private MappedModel getDiscriminatorMappedModel(CodegenDiscriminator disc) { + for (MappedModel mm : disc.getMappedModels()) { + String modelName = mm.getModelName(); + Schema modelSchema = getModelNameToSchemaCache().get(modelName); + if (ModelUtils.isObjectSchema(modelSchema)) { + return mm; + } + } + return null; + } + + /*** + * Recursively generates string examples for schemas + * + * @param modelName the string name of the refed model that will be generated for the schema or null + * @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 + * @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: + * prop = ModelName( line 0 + * some_property='some_property_example' line 1 + * ) line 2 + * and our example value is: + * ModelName( line 0 + * some_property='some_property_example' line 1 + * ) line 2 + * @return the string example + */ + private String toExampleValueRecursive(String modelName, Schema schema, Object objExample, int indentationLevel, String prefix, Integer exampleLine) { + final String indentionConst = " "; + String currentIndentation = ""; + String closingIndentation = ""; + for (int i = 0; i < indentationLevel; i++) currentIndentation += indentionConst; + if (exampleLine.equals(0)) { + closingIndentation = currentIndentation; + currentIndentation = ""; + } else { + closingIndentation = currentIndentation; + } + String openChars = ""; + String closeChars = ""; + if (modelName != null) { + openChars = modelName + "("; + closeChars = ")"; + } + + String fullPrefix = currentIndentation + prefix + openChars; + + String example = null; + if (objExample != null) { + example = objExample.toString(); + } + if (null != schema.get$ref()) { + Map allDefinitions = ModelUtils.getSchemas(this.openAPI); + String ref = ModelUtils.getSimpleRef(schema.get$ref()); + Schema refSchema = allDefinitions.get(ref); + if (null == refSchema) { + LOGGER.warn("Unable to find referenced schema " + schema.get$ref() + "\n"); + return fullPrefix + "None" + closeChars; + } + String refModelName = getModelName(schema); + return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine); + } else if (ModelUtils.isNullType(schema) || isAnyTypeSchema(schema)) { + // The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x, + // though this tooling supports it. + return fullPrefix + "None" + closeChars; + } else if (ModelUtils.isBooleanSchema(schema)) { + if (objExample == null) { + example = "True"; + } else { + if ("false".equalsIgnoreCase(objExample.toString())) { + example = "False"; + } else { + example = "True"; + } + } + return fullPrefix + example + closeChars; + } else if (ModelUtils.isDateSchema(schema)) { + if (objExample == null) { + example = pythonDate("1970-01-01"); + } else { + example = pythonDate(objExample); + } + return fullPrefix + example + closeChars; + } else if (ModelUtils.isDateTimeSchema(schema)) { + if (objExample == null) { + example = pythonDateTime("1970-01-01T00:00:00.00Z"); + } else { + example = pythonDateTime(objExample); + } + return fullPrefix + example + closeChars; + } else if (ModelUtils.isBinarySchema(schema)) { + if (objExample == null) { + example = "/path/to/file"; + } + example = "open('" + example + "', 'rb')"; + return fullPrefix + example + closeChars; + } else if (ModelUtils.isByteArraySchema(schema)) { + if (objExample == null) { + example = "'YQ=='"; + } + return fullPrefix + example + closeChars; + } else if (ModelUtils.isStringSchema(schema)) { + if (objExample == null) { + // a BigDecimal: + if ("Number".equalsIgnoreCase(schema.getFormat())) { + example = "2"; + return fullPrefix + example + closeChars; + } else if (StringUtils.isNotBlank(schema.getPattern())) { + String pattern = schema.getPattern(); + RgxGen rgxGen = new RgxGen(pattern); + // this seed makes it so if we have [a-z] we pick a + Random random = new Random(18); + String sample = rgxGen.generate(random); + // omit leading / and trailing /, omit trailing /i + Pattern valueExtractor = Pattern.compile("^/?(.+?)/?.?$"); + Matcher m = valueExtractor.matcher(sample); + if (m.find()) { + example = m.group(m.groupCount()); + } else { + example = ""; + } + } else if (schema.getMinLength() != null) { + example = ""; + int len = schema.getMinLength().intValue(); + for (int i = 0; i < len; i++) example += "a"; + } else if (ModelUtils.isUUIDSchema(schema)) { + example = "046b6c7f-0b8a-43b9-b35d-6489e6daee91"; + } else { + example = "string_example"; + } + } + return fullPrefix + ensureQuotes(example) + closeChars; + } else if (ModelUtils.isIntegerSchema(schema)) { + if (objExample == null) { + if (schema.getMinimum() != null) { + example = schema.getMinimum().toString(); + } else { + example = "1"; + } + } + return fullPrefix + example + closeChars; + } else if (ModelUtils.isNumberSchema(schema)) { + if (objExample == null) { + if (schema.getMinimum() != null) { + example = schema.getMinimum().toString(); + } else { + example = "3.14"; + } + } + return fullPrefix + example + closeChars; + } else if (ModelUtils.isArraySchema(schema)) { + if (objExample instanceof Iterable) { + // If the example is already a list, return it directly instead of wrongly wrap it in another list + return fullPrefix + objExample.toString(); + } + ArraySchema arrayschema = (ArraySchema) schema; + Schema itemSchema = arrayschema.getItems(); + String itemModelName = getModelName(itemSchema); + example = fullPrefix + "[" + "\n" + toExampleValueRecursive(itemModelName, itemSchema, objExample, indentationLevel + 1, "", exampleLine + 1) + ",\n" + closingIndentation + "]" + closeChars; + return example; + } else if (ModelUtils.isMapSchema(schema)) { + if (modelName == null) { + fullPrefix += "dict("; + closeChars = ")"; + } + Object addPropsObj = schema.getAdditionalProperties(); + // TODO handle true case for additionalProperties + if (addPropsObj instanceof Schema) { + Schema addPropsSchema = (Schema) addPropsObj; + String key = "key"; + Object addPropsExample = getObjectExample(addPropsSchema); + if (addPropsSchema.getEnum() != null && !addPropsSchema.getEnum().isEmpty()) { + key = addPropsSchema.getEnum().get(0).toString(); + } + addPropsExample = exampleFromStringOrArraySchema(addPropsSchema, addPropsExample, key); + String addPropPrefix = key + "="; + if (modelName == null) { + addPropPrefix = ensureQuotes(key) + ": "; + } + String addPropsModelName = getModelName(addPropsSchema); + example = fullPrefix + "\n" + toExampleValueRecursive(addPropsModelName, addPropsSchema, addPropsExample, indentationLevel + 1, addPropPrefix, exampleLine + 1) + ",\n" + closingIndentation + closeChars; + } else { + example = fullPrefix + closeChars; + } + return example; + } else if (ModelUtils.isObjectSchema(schema)) { + if (modelName == null) { + fullPrefix += "dict("; + closeChars = ")"; + } + CodegenDiscriminator disc = createDiscriminator(modelName, schema, openAPI); + if (disc != null) { + MappedModel mm = getDiscriminatorMappedModel(disc); + if (mm != null) { + String discPropNameValue = mm.getMappingName(); + String chosenModelName = mm.getModelName(); + // TODO handle this case in the future, this is when the discriminated + // schema allOf includes this schema, like Cat allOf includes Pet + // so this is the composed schema use case + } else { + return fullPrefix + closeChars; + } + } + return exampleForObjectModel(schema, fullPrefix, closeChars, null, indentationLevel, exampleLine, closingIndentation); + } else if (ModelUtils.isComposedSchema(schema)) { + // TODO add examples for composed schema models without discriminators + + CodegenDiscriminator disc = createDiscriminator(modelName, schema, openAPI); + if (disc != null) { + MappedModel mm = getDiscriminatorMappedModel(disc); + if (mm != null) { + String discPropNameValue = mm.getMappingName(); + String chosenModelName = mm.getModelName(); + Schema modelSchema = getModelNameToSchemaCache().get(chosenModelName); + CodegenProperty cp = new CodegenProperty(); + cp.setName(disc.getPropertyName()); + cp.setExample(discPropNameValue); + return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation); + } else { + return fullPrefix + closeChars; + } + } + return fullPrefix + closeChars; + } else { + LOGGER.warn("Type " + schema.getType() + " not handled properly in toExampleValue"); + } + + return example; + } + + private String exampleForObjectModel(Schema schema, String fullPrefix, String closeChars, CodegenProperty discProp, int indentationLevel, int exampleLine, String closingIndentation) { + Map requiredAndOptionalProps = schema.getProperties(); + if (requiredAndOptionalProps == null || requiredAndOptionalProps.isEmpty()) { + return fullPrefix + closeChars; + } + + String example = fullPrefix + "\n"; + for (Map.Entry entry : requiredAndOptionalProps.entrySet()) { + String propName = entry.getKey(); + Schema propSchema = entry.getValue(); + propName = toVarName(propName); + String propModelName = null; + Object propExample = null; + if (discProp != null && propName.equals(discProp.name)) { + propModelName = null; + propExample = discProp.example; + } else { + propModelName = getModelName(propSchema); + propExample = exampleFromStringOrArraySchema(propSchema, null, propName); + } + example += toExampleValueRecursive(propModelName, propSchema, propExample, indentationLevel + 1, propName + "=", exampleLine + 1) + ",\n"; + } + // TODO handle additionalProperties also + example += closingIndentation + closeChars; + return example; + } + + private Object exampleFromStringOrArraySchema(Schema sc, Object currentExample, String propName) { + if (currentExample != null) { + return currentExample; + } + Schema schema = sc; + String ref = sc.get$ref(); + if (ref != null) { + schema = ModelUtils.getSchema(this.openAPI, ModelUtils.getSimpleRef(ref)); + } + Object example = getObjectExample(schema); + if (example != null) { + return example; + } else if (simpleStringSchema(schema)) { + return propName + "_example"; + } else if (ModelUtils.isArraySchema(schema)) { + ArraySchema arraySchema = (ArraySchema) schema; + Schema itemSchema = arraySchema.getItems(); + example = getObjectExample(itemSchema); + if (example != null) { + return example; + } else if (simpleStringSchema(itemSchema)) { + return propName + "_example"; + } + } + return null; + } + + + /*** + * + * Set the codegenParameter example value + * We have a custom version of this function so we can invoke toExampleValue + * + * @param codegenParameter the item we are setting the example on + * @param parameter the base parameter that came from the spec + */ + @Override + public void setParameterExampleValue(CodegenParameter codegenParameter, Parameter parameter) { + Schema schema = parameter.getSchema(); + if (schema == null) { + LOGGER.warn("CodegenParameter.example defaulting to null because parameter lacks a schema"); + return; + } + + Object example = null; + if (codegenParameter.vendorExtensions != null && codegenParameter.vendorExtensions.containsKey("x-example")) { + example = codegenParameter.vendorExtensions.get("x-example"); + } else if (parameter.getExample() != null) { + example = parameter.getExample(); + } else if (parameter.getExamples() != null && !parameter.getExamples().isEmpty() && parameter.getExamples().values().iterator().next().getValue() != null) { + example = parameter.getExamples().values().iterator().next().getValue(); + } else { + example = getObjectExample(schema); + } + example = exampleFromStringOrArraySchema(schema, example, parameter.getName()); + String finalExample = toExampleValue(schema, example); + codegenParameter.example = finalExample; + } + + /** + * Return the example value of the parameter. + * + * @param codegenParameter Codegen parameter + * @param requestBody Request body + */ + @Override + public void setParameterExampleValue(CodegenParameter codegenParameter, RequestBody requestBody) { + if (codegenParameter.vendorExtensions != null && codegenParameter.vendorExtensions.containsKey("x-example")) { + codegenParameter.example = Json.pretty(codegenParameter.vendorExtensions.get("x-example")); + } + + Content content = requestBody.getContent(); + + if (content.size() > 1) { + // @see ModelUtils.getSchemaFromContent() + once(LOGGER).warn("Multiple MediaTypes found, using only the first one"); + } + + MediaType mediaType = content.values().iterator().next(); + Schema schema = mediaType.getSchema(); + if (schema == null) { + LOGGER.warn("CodegenParameter.example defaulting to null because requestBody content lacks a schema"); + return; + } + + Object example = null; + if (mediaType.getExample() != null) { + example = mediaType.getExample(); + } else if (mediaType.getExamples() != null && !mediaType.getExamples().isEmpty() && mediaType.getExamples().values().iterator().next().getValue() != null) { + example = mediaType.getExamples().values().iterator().next().getValue(); + } else { + example = getObjectExample(schema); + } + example = exampleFromStringOrArraySchema(schema, example, codegenParameter.paramName); + codegenParameter.example = toExampleValue(schema, example); + } + + /** + * Create a CodegenParameter for a Form Property + * We have a custom version of this method so we can invoke + * setParameterExampleValue(codegenParameter, parameter) + * rather than setParameterExampleValue(codegenParameter) + * This ensures that all of our samples are generated in + * toExampleValueRecursive + * + * @param name the property name + * @param propertySchema the property schema + * @param imports our import set + * @return the resultant CodegenParameter + */ + @Override + public CodegenParameter fromFormProperty(String name, Schema propertySchema, Set imports) { + CodegenParameter cp = super.fromFormProperty(name, propertySchema, imports); + Parameter p = new Parameter(); + p.setSchema(propertySchema); + p.setName(cp.paramName); + setParameterExampleValue(cp, p); + return cp; + } + + /** + * Return a map from model name to Schema for efficient lookup. + * + * @return map from model name to Schema. + */ + protected Map getModelNameToSchemaCache() { + if (modelNameToSchemaCache == null) { + // Create a cache to efficiently lookup schema based on model name. + Map m = new HashMap(); + ModelUtils.getSchemas(openAPI).forEach((key, schema) -> { + m.put(toModelName(key), schema); + }); + modelNameToSchemaCache = Collections.unmodifiableMap(m); + } + return modelNameToSchemaCache; + } + + @Override + protected void setAddProps(Schema schema, IJsonSchemaValidationProperties property){ + if (schema.equals(new Schema())) { + // if we are trying to set additionalProperties on an empty schema stop recursing + return; + } + boolean additionalPropertiesIsAnyType = false; + CodegenModel m = null; + if (property instanceof CodegenModel) { + m = (CodegenModel) property; + } + CodegenProperty addPropProp = null; + boolean isAdditionalPropertiesTrue = false; + if (schema.getAdditionalProperties() == null) { + if (!disallowAdditionalPropertiesIfNotPresent) { + isAdditionalPropertiesTrue = true; + // pass in the hashCode as the name to ensure that the returned property is not from the cache + // if we need to set indent on every one, then they need to be different + addPropProp = fromProperty(String.valueOf(property.hashCode()), new Schema()); + addPropProp.name = ""; + addPropProp.baseName = ""; + addPropProp.nameInSnakeCase = null; + additionalPropertiesIsAnyType = true; + } + } else if (schema.getAdditionalProperties() instanceof Boolean) { + if (Boolean.TRUE.equals(schema.getAdditionalProperties())) { + isAdditionalPropertiesTrue = true; + addPropProp = fromProperty(String.valueOf(property.hashCode()), new Schema()); + addPropProp.name = ""; + addPropProp.baseName = ""; + addPropProp.nameInSnakeCase = null; + additionalPropertiesIsAnyType = true; + } + } else { + addPropProp = fromProperty(String.valueOf(property.hashCode()), (Schema) schema.getAdditionalProperties()); + addPropProp.name = ""; + addPropProp.baseName = ""; + addPropProp.nameInSnakeCase = null; + if (isAnyTypeSchema((Schema) schema.getAdditionalProperties())) { + additionalPropertiesIsAnyType = true; + } + } + if (additionalPropertiesIsAnyType) { + property.setAdditionalPropertiesIsAnyType(true); + } + if (m != null && isAdditionalPropertiesTrue) { + m.isAdditionalPropertiesTrue = true; + } + if (ModelUtils.isComposedSchema(schema) && !supportsAdditionalPropertiesWithComposedSchema) { + return; + } + if (addPropProp != null) { + property.setAdditionalProperties(addPropProp); + } + } + + /** + * Update property for array(list) container + * + * @param property Codegen property + * @param innerProperty Codegen inner property of map or list + */ + @Override + protected void updatePropertyForArray(CodegenProperty property, CodegenProperty innerProperty) { + if (innerProperty == null) { + if(LOGGER.isWarnEnabled()) { + LOGGER.warn("skipping invalid array property {}", Json.pretty(property)); + } + return; + } + property.dataFormat = innerProperty.dataFormat; + if (languageSpecificPrimitives.contains(innerProperty.baseType)) { + property.isPrimitiveType = true; + } + property.items = innerProperty; + property.mostInnerItems = getMostInnerItems(innerProperty); + // inner item is Enum + if (isPropertyInnerMostEnum(property)) { + // isEnum is set to true when the type is an enum + // or the inner type of an array/map is an enum + property.isEnum = true; + // update datatypeWithEnum and default value for array + // e.g. List => List + updateDataTypeWithEnumForArray(property); + // set allowable values to enum values (including array/map of enum) + property.allowableValues = getInnerEnumAllowableValues(property); + } + + } + + protected void updatePropertyForString(CodegenProperty property, Schema p) { + if (ModelUtils.isByteArraySchema(p)) { + property.isByteArray = true; + property.setIsString(false); + } else if (ModelUtils.isBinarySchema(p)) { + property.isBinary = true; + property.isFile = true; // file = binary in OAS3 + } else if (ModelUtils.isUUIDSchema(p)) { + property.isUuid = true; + } else if (ModelUtils.isURISchema(p)) { + property.isUri = true; + } else if (ModelUtils.isEmailSchema(p)) { + property.isEmail = true; + } else if (ModelUtils.isDateSchema(p)) { // date format + property.setIsString(false); // for backward compatibility with 2.x + property.isDate = true; + } else if (ModelUtils.isDateTimeSchema(p)) { // date-time format + property.setIsString(false); // for backward compatibility with 2.x + property.isDateTime = true; + } else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number + property.isDecimal = true; + property.setIsString(false); + } + property.pattern = toRegularExpression(p.getPattern()); + } + + @Override + protected void updatePropertyForObject(CodegenProperty property, Schema p) { + addVarsRequiredVarsAdditionalProps(p, property); + } + + @Override + protected void updatePropertyForAnyType(CodegenProperty property, Schema p) { + // The 'null' value is allowed when the OAS schema is 'any type'. + // See https://github.com/OAI/OpenAPI-Specification/issues/1389 + if (Boolean.FALSE.equals(p.getNullable())) { + LOGGER.warn("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", p.getName()); + } + addVarsRequiredVarsAdditionalProps(p, property); + } + + @Override + protected void updateModelForObject(CodegenModel m, Schema schema) { + if (schema.getProperties() != null || schema.getRequired() != null) { + // passing null to allProperties and allRequired as there's no parent + addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); + } + // an object or anyType composed schema that has additionalProperties set + addAdditionPropertiesToCodeGenModel(m, schema); + // process 'additionalProperties' + setAddProps(schema, m); + } + + @Override + protected void updateModelForAnyType(CodegenModel m, Schema schema) { + // The 'null' value is allowed when the OAS schema is 'any type'. + // See https://github.com/OAI/OpenAPI-Specification/issues/1389 + if (Boolean.FALSE.equals(schema.getNullable())) { + LOGGER.error("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", m.name); + } + // todo add items support here in the future + if (schema.getProperties() != null || schema.getRequired() != null) { + // passing null to allProperties and allRequired as there's no parent + addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); + } + addAdditionPropertiesToCodeGenModel(m, schema); + // process 'additionalProperties' + setAddProps(schema, m); + } + + @Override + protected void updateModelForComposedSchema(CodegenModel m, Schema schema, Map allDefinitions) { + final ComposedSchema composed = (ComposedSchema) schema; + + // TODO revise the logic below to set discriminator, xml attributes + if (composed.getAllOf() != null) { + int modelImplCnt = 0; // only one inline object allowed in a ComposedModel + int modelDiscriminators = 0; // only one discriminator allowed in a ComposedModel + for (Schema innerSchema : composed.getAllOf()) { // TODO need to work with anyOf, oneOf as well + if (m.discriminator == null && innerSchema.getDiscriminator() != null) { + LOGGER.debug("discriminator is set to null (not correctly set earlier): {}", m.name); + m.setDiscriminator(createDiscriminator(m.name, innerSchema, this.openAPI)); + if (!this.getLegacyDiscriminatorBehavior()) { + m.addDiscriminatorMappedModelsImports(); + } + modelDiscriminators++; + } + + if (innerSchema.getXml() != null) { + m.xmlPrefix = innerSchema.getXml().getPrefix(); + m.xmlNamespace = innerSchema.getXml().getNamespace(); + m.xmlName = innerSchema.getXml().getName(); + } + if (modelDiscriminators > 1) { + LOGGER.error("Allof composed schema is inheriting >1 discriminator. Only use one discriminator: {}", composed); + } + + if (modelImplCnt++ > 1) { + LOGGER.warn("More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored."); + break; // only one schema with discriminator allowed in allOf + } + } + } + + CodegenComposedSchemas cs = m.getComposedSchemas(); + if (cs != null) { + if (cs.getAllOf() != null && !cs.getAllOf().isEmpty()) { + for (CodegenProperty cp: cs.getAllOf()) { + if (cp.complexType != null) { + addImport(m, cp.complexType); + } + } + } + if (cs.getOneOf() != null && !cs.getOneOf().isEmpty()) { + for (CodegenProperty cp: cs.getOneOf()) { + if (cp.complexType != null) { + addImport(m, cp.complexType); + } + } + } + if (cs.getAnyOf() != null && !cs.getAnyOf().isEmpty()) { + for (CodegenProperty cp: cs.getAnyOf()) { + if (cp.complexType != null) { + addImport(m, cp.complexType); + } + } + } + } + } + + @Override + public Map postProcessModels(Map objs) { + // process enum in models + return postProcessModelsEnum(objs); + } + + /* + * The OpenAPI pattern spec follows the Perl convention and style of modifiers. Python + * does not support this in as natural a way so it needs to convert it. See + * https://docs.python.org/2/howto/regex.html#compilation-flags for details. + */ + public void postProcessPattern(String pattern, Map vendorExtensions) { + if (pattern != null) { + int i = pattern.lastIndexOf('/'); + + //Must follow Perl /pattern/modifiers convention + if (pattern.charAt(0) != '/' || i < 2) { + throw new IllegalArgumentException("Pattern must follow the Perl " + + "/pattern/modifiers convention. " + pattern + " is not valid."); + } + + String regex = pattern.substring(1, i).replace("'", "\\'"); + List modifiers = new ArrayList(); + + for (char c : pattern.substring(i).toCharArray()) { + if (regexModifiers.containsKey(c)) { + String modifier = regexModifiers.get(c); + modifiers.add(modifier); + } + } + + vendorExtensions.put("x-regex", regex); + vendorExtensions.put("x-modifiers", modifiers); + } + } + + @Override + public CodegenType getTag() { + return CodegenType.CLIENT; + } + + @Override + public String apiDocFileFolder() { + return (outputFolder + "/" + apiDocPath); + } + + @Override + public String modelDocFileFolder() { + return (outputFolder + "/" + modelDocPath); + } + + @Override + public String toModelDocFilename(String name) { + return toModelName(name); + } + + @Override + public String toApiDocFilename(String name) { + return toApiName(name); + } + + @Override + public String addRegularExpressionDelimiter(String pattern) { + if (StringUtils.isEmpty(pattern)) { + return pattern; + } + + if (!pattern.matches("^/.*")) { + // Perform a negative lookbehind on each `/` to ensure that it is escaped. + return "/" + pattern.replaceAll("(? + * (PEP 0008) Python packages should also have short, all-lowercase names, + * although the use of underscores is discouraged. + * + * @param packageName Package name + * @return Python package name that conforms to PEP 0008 + */ + @SuppressWarnings("static-method") + public String generatePackageName(String packageName) { + return underscore(packageName.replaceAll("[^\\w]+", "")); + } + + /** + * A custom version of this method is needed to ensure that the form object parameter is kept as-is + * as an object and is not exploded into separate parameters + * @param body the body that is being handled + * @param imports the imports for this body + * @return the list of length one containing a single type object CodegenParameter + */ + @Override + public List fromRequestBodyToFormParameters(RequestBody body, Set imports) { + List parameters = new ArrayList<>(); + LOGGER.debug("debugging fromRequestBodyToFormParameters= {}", body); + Schema schema = ModelUtils.getSchemaFromRequestBody(body); + schema = ModelUtils.getReferencedSchema(this.openAPI, schema); + CodegenParameter cp = fromFormProperty("body", schema, imports); + cp.setContent(getContent(body.getContent(), imports, "RequestBody")); + cp.isFormParam = false; + cp.isBodyParam = true; + parameters.add(cp); + return parameters; + } + + /** + * Custom version of this method so we can move the body parameter into bodyParam + * + * @param path the path of the operation + * @param httpMethod HTTP method + * @param operation OAS operation object + * @param servers list of servers + * @return the resultant CodegenOperation instance + */ + @Override + public CodegenOperation fromOperation(String path, + String httpMethod, + Operation operation, + List servers) { + CodegenOperation co = super.fromOperation(path, httpMethod, operation, servers); + if (co.bodyParam == null) { + for (CodegenParameter cp: co.allParams) { + if (cp.isBodyParam) { + co.bodyParam = cp; + co.bodyParams.add(cp); + } + } + } + return co; + } +} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 727ec5d990f3..c353b2a28464 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -102,6 +102,7 @@ org.openapitools.codegen.languages.ProtobufSchemaCodegen org.openapitools.codegen.languages.PythonLegacyClientCodegen org.openapitools.codegen.languages.PythonClientCodegen org.openapitools.codegen.languages.PythonFastAPIServerCodegen +org.openapitools.codegen.languages.PythonExperimentalClientCodegen org.openapitools.codegen.languages.PythonFlaskConnexionServerCodegen org.openapitools.codegen.languages.PythonAiohttpConnexionServerCodegen org.openapitools.codegen.languages.PythonBluePlanetServerCodegen diff --git a/modules/openapi-generator/src/main/resources/python-experimental/README.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/README.handlebars new file mode 100644 index 000000000000..e03e96972ab3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/README.handlebars @@ -0,0 +1,57 @@ +# {{{projectName}}} +{{#if appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/if}} + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{#unless hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/unless}} +- Build package: {{generatorClass}} +{{#if infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/if}} + +## Requirements. + +Python >= 3.9 +v3.9 is needed so one can combine classmethod and property decorators to define +object schema properties as classes + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git`) + +Then import the package: +```python +import {{{packageName}}} +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import {{{packageName}}} +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +{{> README_common }} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars new file mode 100644 index 000000000000..17663663d7c1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars @@ -0,0 +1,111 @@ +```python +{{#with apiInfo}}{{#each apis}}{{#unless hasMore}}{{#if hasHttpSignatureMethods}}import datetime{{/if}}{{/unless}}{{/each}}{{/with}} +import time +import {{{packageName}}} +from pprint import pprint +{{#with apiInfo}} +{{#each apis}} +{{#if @first}} +from {{packageName}}.{{apiPackage}} import {{classVarName}} +{{#each imports}} +{{{import}}} +{{/each}} +{{#with operations}} +{{#each operation}} +{{#if @first}} +{{> doc_auth_partial}} + +# Enter a context with an instance of the API client +with {{{packageName}}}.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = {{classVarName}}.{{{classname}}}(api_client) + {{#each allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{#unless required}} (optional){{/unless}}{{#if defaultValue}} (default to {{{.}}}){{/if}} + {{/each}} + + try: + {{#if summary}} # {{{summary}}} + {{/if}} {{#if returnType}}api_response = {{/if}}api_instance.{{{operationId}}}({{#each allParams}}{{#if required}}{{paramName}}{{/if}}{{#unless required}}{{paramName}}={{paramName}}{{/unless}}{{#if hasMore}}, {{/if}}{{/each}}){{#if returnType}} + pprint(api_response){{/if}} + except {{{packageName}}}.ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) +{{/if}} +{{/each}} +{{/with}} +{{/if}} +{{/each}} +{{/with}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#with apiInfo}}{{#each apis}}{{#with operations}}{{#each operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#if summary}}{{summary}}{{/if}} +{{/each}}{{/with}}{{/each}}{{/with}} + +## Documentation For Models + +{{#each models}}{{#with model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/with}}{{/each}} + +## Documentation For Authorization + +{{#unless authMethods}} + All endpoints do not require authorization. +{{/unless}} +{{#each authMethods}} +{{#if @last}} Authentication schemes defined for the API:{{/if}} +## {{{name}}} + +{{#if isApiKey}} +- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#if isKeyInQuery}}URL query string{{/if}}{{#if isKeyInHeader}}HTTP header{{/if}} +{{/if}} +{{#if isBasic}} +{{#if isBasicBasic}} +- **Type**: HTTP basic authentication +{{/if}} +{{#if isBasicBearer}} +- **Type**: Bearer authentication{{#if bearerFormat}} ({{{bearerFormat}}}){{/if}} +{{/if}} +{{#if isHttpSignature}} +- **Type**: HTTP signature authentication +{{/if}} +{{/if}} +{{#if isOAuth}} +- **Type**: OAuth +- **Flow**: {{{flow}}} +- **Authorization URL**: {{{authorizationUrl}}} +- **Scopes**: {{#unless scopes}}N/A{{/unless}} +{{#each scopes}} - **{{{scope}}}**: {{{description}}} +{{/each}} +{{/if}} + +{{/each}} + +## Author + +{{#with apiInfo}}{{#each apis}}{{#unless hasMore}}{{infoEmail}} +{{/unless}}{{/each}}{{/with}} + +## Notes for Large OpenAPI documents +If the OpenAPI document is large, imports in {{{packageName}}}.apis and {{{packageName}}}.models may fail with a +RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: + +Solution 1: +Use specific imports for apis and models like: +- `from {{{packageName}}}.{{apiPackage}}.default_api import DefaultApi` +- `from {{{packageName}}}.{{modelPackage}}.pet import Pet` + +Solution 1: +Before importing the package, adjust the maximum recursion limit as shown below: +``` +import sys +sys.setrecursionlimit(1500) +import {{{packageName}}} +from {{{packageName}}}.apis import * +from {{{packageName}}}.models import * +``` diff --git a/modules/openapi-generator/src/main/resources/python-experimental/README_onlypackage.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/README_onlypackage.handlebars new file mode 100644 index 000000000000..f9fda7de212a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/README_onlypackage.handlebars @@ -0,0 +1,43 @@ +# {{{projectName}}} +{{#if appDescription}} +{{{appDescription}}} +{{/if}} + +The `{{packageName}}` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{#unless hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/unless}} +- Build package: {{generatorClass}} +{{#if infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/if}} + +## Requirements. + +Python >= 3.6 + +## Installation & Usage + +This python library package is generated without supporting files like setup.py or requirements files + +To be able to use it, you will need these dependencies in your own package that uses this library: + +* urllib3 >= 1.15 +* certifi +* python-dateutil +{{#if asyncio}} +* aiohttp +{{/if}} +{{#if tornado}} +* tornado>=4.2,<5 +{{/if}} + +## Getting Started + +In your own code, to use this library to connect and interact with {{{projectName}}}, +you can run the following: + +{{> README_common }} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__.handlebars new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__api.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__api.handlebars new file mode 100644 index 000000000000..1e059f73613a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__api.handlebars @@ -0,0 +1,9 @@ +{{#with apiInfo}} +{{#each apis}} +{{#if @first}} +# do not import all apis into this module because that uses a lot of memory and stack frames +# if you need the ability to import all apis from one package, import them with +# from {{packageName}}.apis import {{classname}} +{{/if}} +{{/each}} +{{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars new file mode 100644 index 000000000000..c8466369da77 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars @@ -0,0 +1,24 @@ +{{#with apiInfo}} +{{#each apis}} +{{#if @first}} +# coding: utf-8 + +# flake8: noqa + +# Import all APIs into this package. +# If you have many APIs here with many many models used in each API this may +# raise a `RecursionError`. +# In order to avoid this, import only the API that you directly need like: +# +# from {{packagename}}.{{apiPackage}}.{{classVarName}} import {{classname}} +# +# or import this package, but before doing it, use: +# +# import sys +# sys.setrecursionlimit(n) + +# Import APIs into API package: +{{/if}} +from {{packageName}}.{{apiPackage}}.{{classVarName}} import {{classname}} +{{/each}} +{{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__model.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__model.handlebars new file mode 100644 index 000000000000..b6b698b04528 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__model.handlebars @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from {{packageName}}.models import ModelA, ModelB diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__models.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__models.handlebars new file mode 100644 index 000000000000..31eac9cd5440 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__models.handlebars @@ -0,0 +1,18 @@ +# coding: utf-8 + +# flake8: noqa + +# import all models into this package +# 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 +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +{{#each models}} +{{#with model}} +from {{packageName}}.{{modelPackage}}.{{classFilename}} import {{classname}} +{{/with}} +{{/each}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__package.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__package.handlebars new file mode 100644 index 000000000000..26350c7252d3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__package.handlebars @@ -0,0 +1,28 @@ +# coding: utf-8 + +# flake8: noqa + +{{>partial_header}} + +__version__ = "{{packageVersion}}" + +# import ApiClient +from {{packageName}}.api_client import ApiClient + +# import Configuration +from {{packageName}}.configuration import Configuration +{{#if hasHttpSignatureMethods}} +from {{packageName}}.signing import HttpSigningConfiguration +{{/if}} + +# import exceptions +from {{packageName}}.exceptions import OpenApiException +from {{packageName}}.exceptions import ApiAttributeError +from {{packageName}}.exceptions import ApiTypeError +from {{packageName}}.exceptions import ApiValueError +from {{packageName}}.exceptions import ApiKeyError +from {{packageName}}.exceptions import ApiException +{{#if recursionLimit}} + +__import__('sys').setrecursionlimit({{recursionLimit}}) +{{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api.handlebars new file mode 100644 index 000000000000..c6c0b423707f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/api.handlebars @@ -0,0 +1,26 @@ +# coding: utf-8 + +{{>partial_header}} + +from {{packageName}}.api_client import ApiClient +{{#with operations}} +{{#each operation}} +from {{packageName}}.api.{{classFilename}}_endpoints.{{operationId}} import {{operationIdCamelCase}} +{{/each}} +{{/with}} + + +{{#with operations}} +class {{classname}}( +{{#each operation}} + {{operationIdCamelCase}}, +{{/each}} + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass +{{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars new file mode 100644 index 000000000000..47c28bff18d0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars @@ -0,0 +1,1380 @@ +# coding: utf-8 +{{>partial_header}} + +from dataclasses import dataclass +from decimal import Decimal +import enum +import json +import os +import io +import atexit +from multiprocessing.pool import ThreadPool +import re +import tempfile +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict +from urllib.parse import quote +from urllib3.fields import RequestField as RequestFieldBase + +{{#if tornado}} +import tornado.gen +{{/if}} + +from {{packageName}} import rest +from {{packageName}}.configuration import Configuration +from {{packageName}}.exceptions import ApiTypeError, ApiValueError +from {{packageName}}.schemas import ( + Decimal, + NoneClass, + BoolClass, + Schema, + FileIO, + BinarySchema, + InstantiationMetadata, + date, + datetime, + none_type, + frozendict, + Unset, + unset, +) + + +class RequestField(RequestFieldBase): + def __eq__(self, other): + if not isinstance(other, RequestField): + return False + return self.__dict__ == other.__dict__ + + +class JSONEncoder(json.JSONEncoder): + def default(self, obj): + if isinstance(obj, (str, int, float)): + # instances based on primitive classes + return obj + elif isinstance(obj, Decimal): + if obj.as_tuple().exponent >= 0: + return int(obj) + return float(obj) + elif isinstance(obj, NoneClass): + return None + elif isinstance(obj, BoolClass): + return bool(obj) + elif isinstance(obj, (dict, frozendict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +class ParameterSerializerBase: + @staticmethod + def __serialize_number( + in_data: typing.Union[int, float], name: str, prefix='' + ) -> typing.Tuple[typing.Tuple[str, str]]: + return tuple([(name, prefix + str(in_data))]) + + @staticmethod + def __serialize_str( + in_data: str, name: str, prefix='' + ) -> typing.Tuple[typing.Tuple[str, str]]: + return tuple([(name, prefix + quote(in_data))]) + + @staticmethod + def __serialize_bool(in_data: bool, name: str, prefix='') -> typing.Tuple[typing.Tuple[str, str]]: + if in_data: + return tuple([(name, prefix + 'true')]) + return tuple([(name, prefix + 'false')]) + + @staticmethod + def __urlencode(in_data: typing.Any) -> str: + return quote(str(in_data)) + + def __serialize_list( + self, + in_data: typing.List[typing.Any], + style: ParameterStyle, + name: str, + explode: bool, + empty_val: typing.Union[typing.Tuple[str, str], typing.Tuple] = tuple(), + prefix: str = '', + separator: str = ',', + ) -> typing.Tuple[typing.Union[typing.Tuple[str, str], typing.Tuple], ...]: + if not in_data: + return empty_val + if explode and style in { + ParameterStyle.FORM, + ParameterStyle.MATRIX, + ParameterStyle.SPACE_DELIMITED, + ParameterStyle.PIPE_DELIMITED + }: + if style is ParameterStyle.FORM: + return tuple((name, prefix + self.__urlencode(val)) for val in in_data) + else: + joined_vals = prefix + separator.join(name + '=' + self.__urlencode(val) for val in in_data) + else: + joined_vals = prefix + separator.join(map(self.__urlencode, in_data)) + return tuple([(name, joined_vals)]) + + def __form_item_representation(self, in_data: typing.Any) -> typing.Optional[str]: + if isinstance(in_data, none_type): + return None + elif isinstance(in_data, list): + if not in_data: + return None + raise ApiValueError('Unable to generate a form representation of {}'.format(in_data)) + elif isinstance(in_data, dict): + if not in_data: + return None + raise ApiValueError('Unable to generate a form representation of {}'.format(in_data)) + elif isinstance(in_data, (bool, bytes)): + raise ApiValueError('Unable to generate a form representation of {}'.format(in_data)) + # str, float, int + return self.__urlencode(in_data) + + def __serialize_dict( + self, + in_data: typing.Dict[str, typing.Any], + style: ParameterStyle, + name: str, + explode: bool, + empty_val: typing.Union[typing.Tuple[str, str], typing.Tuple] = tuple(), + prefix: str = '', + separator: str = ',', + ) -> typing.Tuple[typing.Tuple[str, str]]: + if not in_data: + return empty_val + if all(val is None for val in in_data.values()): + return empty_val + + form_items = {} + if style is ParameterStyle.FORM: + for key, val in in_data.items(): + new_val = self.__form_item_representation(val) + if new_val is None: + continue + form_items[key] = new_val + + if explode: + if style is ParameterStyle.FORM: + return tuple((key, prefix + val) for key, val in form_items.items()) + elif style in { + ParameterStyle.SIMPLE, + ParameterStyle.LABEL, + ParameterStyle.MATRIX, + ParameterStyle.SPACE_DELIMITED, + ParameterStyle.PIPE_DELIMITED + }: + joined_vals = prefix + separator.join(key + '=' + self.__urlencode(val) for key, val in in_data.items()) + else: + raise ApiValueError(f'Invalid style {style} for dict serialization with explode=True') + elif style is ParameterStyle.FORM: + joined_vals = prefix + separator.join(key + separator + val for key, val in form_items.items()) + else: + joined_vals = prefix + separator.join( + key + separator + self.__urlencode(val) for key, val in in_data.items()) + return tuple([(name, joined_vals)]) + + def _serialize_x( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + style: ParameterStyle, + name: str, + explode: bool, + empty_val: typing.Union[typing.Tuple[str, str], typing.Tuple] = (), + prefix: str = '', + separator: str = ',', + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + if isinstance(in_data, none_type): + return empty_val + elif isinstance(in_data, bool): + # must be before int check + return self.__serialize_bool(in_data, name=name, prefix=prefix) + elif isinstance(in_data, (int, float)): + return self.__serialize_number(in_data, name=name, prefix=prefix) + elif isinstance(in_data, str): + return self.__serialize_str(in_data, name=name, prefix=prefix) + elif isinstance(in_data, list): + return self.__serialize_list( + in_data, + style=style, + name=name, + explode=explode, + empty_val=empty_val, + prefix=prefix, + separator=separator + ) + elif isinstance(in_data, dict): + return self.__serialize_dict( + in_data, + style=style, + name=name, + explode=explode, + empty_val=empty_val, + prefix=prefix, + separator=separator + ) + + +class StyleFormSerializer(ParameterSerializerBase): + + def _serialize_form( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + return self._serialize_x(in_data, style=ParameterStyle.FORM, name=name, explode=explode) + + +class StyleSimpleSerializer(ParameterSerializerBase): + + def _serialize_simple_tuple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + in_type: ParameterInType, + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + if in_type is ParameterInType.HEADER: + empty_val = () + else: + empty_val = ((name, ''),) + return self._serialize_x(in_data, style=ParameterStyle.SIMPLE, name=name, explode=explode, empty_val=empty_val) + + +@dataclass +class ParameterBase: + name: str + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] + + __style_to_in_type = { + ParameterStyle.MATRIX: {ParameterInType.PATH}, + ParameterStyle.LABEL: {ParameterInType.PATH}, + ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, + ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, + ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, + ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, + ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, + } + __in_type_to_default_style = { + ParameterInType.QUERY: ParameterStyle.FORM, + ParameterInType.PATH: ParameterStyle.SIMPLE, + ParameterInType.HEADER: ParameterStyle.SIMPLE, + ParameterInType.COOKIE: ParameterStyle.FORM, + } + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + _json_encoder = JSONEncoder() + _json_content_type = 'application/json' + + @classmethod + def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): + if style is None: + return + in_type_set = cls.__style_to_in_type[style] + if in_type not in in_type_set: + raise ValueError( + 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( + style, in_type_set + ) + ) + + def __init__( + self, + name: str, + in_type: ParameterInType, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + if schema is None and content is None: + raise ValueError('Value missing; Pass in either schema or content') + if schema and content: + raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') + if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + self.__verify_style_to_in_type(style, in_type) + if content is None and style is None: + style = self.__in_type_to_default_style[in_type] + if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: + raise ValueError('Invalid content length, content length must equal 1') + self.in_type = in_type + self.name = name + self.required = required + self.style = style + self.explode = explode + self.allow_reserved = allow_reserved + self.schema = schema + self.content = content + + @staticmethod + def _remove_empty_and_cast( + in_data: typing.Tuple[typing.Tuple[str, str]], + ) -> typing.Dict[str, str]: + data = tuple(t for t in in_data if t) + if not data: + return dict() + return dict(data) + + def _serialize_json( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Tuple[typing.Tuple[str, str]]: + return tuple([(self.name, json.dumps(in_data))]) + + +class PathParameter(ParameterBase, StyleSimpleSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.PATH, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def __serialize_label( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + empty_val = ((self.name, ''),) + prefix = '.' + separator = '.' + return self._remove_empty_and_cast( + self._serialize_x( + in_data, + style=ParameterStyle.LABEL, + name=self.name, + explode=self.explode, + empty_val=empty_val, + prefix=prefix, + separator=separator + ) + ) + + def __serialize_matrix( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + separator = ',' + if in_data == '': + prefix = ';' + self.name + elif isinstance(in_data, (dict, list)) and self.explode: + prefix = ';' + separator = ';' + else: + prefix = ';' + self.name + '=' + empty_val = ((self.name, ''),) + return self._remove_empty_and_cast( + self._serialize_x( + in_data, + style=ParameterStyle.MATRIX, + name=self.name, + explode=self.explode, + prefix=prefix, + empty_val=empty_val, + separator=separator + ) + ) + + def _serialize_simple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + tuple_data = self._serialize_simple_tuple(in_data, self.name, self.explode, self.in_type) + return self._remove_empty_and_cast(tuple_data) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict] + ) -> typing.Dict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if self.style: + if self.style is ParameterStyle.SIMPLE: + return self._serialize_simple(cast_in_data) + elif self.style is ParameterStyle.LABEL: + return self.__serialize_label(cast_in_data) + elif self.style is ParameterStyle.MATRIX: + return self.__serialize_matrix(cast_in_data) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if content_type == self._json_content_type: + tuple_data = self._serialize_json(cast_in_data) + return self._remove_empty_and_cast(tuple_data) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class QueryParameter(ParameterBase, StyleFormSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.QUERY, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def __serialize_space_delimited( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + separator = '%20' + empty_val = () + return self._serialize_x( + in_data, + style=ParameterStyle.SPACE_DELIMITED, + name=self.name, + explode=self.explode, + separator=separator, + empty_val=empty_val + ) + + def __serialize_pipe_delimited( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + separator = '|' + empty_val = () + return self._serialize_x( + in_data, + style=ParameterStyle.PIPE_DELIMITED, + name=self.name, + explode=self.explode, + separator=separator, + empty_val=empty_val + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict] + ) -> typing.Tuple[typing.Tuple[str, str]]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if self.style: + # TODO update query ones to omit setting values when [] {} or None is input + if self.style is ParameterStyle.FORM: + return self._serialize_form(cast_in_data, explode=self.explode, name=self.name) + elif self.style is ParameterStyle.SPACE_DELIMITED: + return self.__serialize_space_delimited(cast_in_data) + elif self.style is ParameterStyle.PIPE_DELIMITED: + return self.__serialize_pipe_delimited(cast_in_data) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if content_type == self._json_content_type: + return self._serialize_json(cast_in_data) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class CookieParameter(ParameterBase, StyleFormSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.COOKIE, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict] + ) -> typing.Tuple[typing.Tuple[str, str]]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if self.style: + return self._serialize_form(cast_in_data, explode=self.explode, name=self.name) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if content_type == self._json_content_type: + return self._serialize_json(cast_in_data) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class HeaderParameter(ParameterBase, StyleSimpleSerializer): + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.HEADER, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict[str, str]: + data = tuple(t for t in in_data if t) + headers = HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + def _serialize_simple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> HTTPHeaderDict[str, str]: + tuple_data = self._serialize_simple_tuple(in_data, self.name, self.explode, self.in_type) + return self.__to_headers(tuple_data) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict] + ) -> HTTPHeaderDict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if self.style: + return self._serialize_simple(cast_in_data) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if content_type == self._json_content_type: + tuple_data = self._serialize_json(cast_in_data) + return self.__to_headers(tuple_data) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class Encoding: + def __init__( + self, + content_type: str, + headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: bool = False, + ): + self.content_type = content_type + self.headers = headers + self.style = style + self.explode = explode + self.allow_reserved = allow_reserved + + +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + + def __init__( + self, + schema: typing.Type[Schema], + encoding: typing.Optional[typing.Dict[str, Encoding]] = None, + ): + self.schema = schema + self.encoding = encoding + + +@dataclass +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[Unset, typing.Type[Schema]] + headers: typing.Union[Unset, typing.List[HeaderParameter]] + + def __init__( + self, + response: urllib3.HTTPResponse, + body: typing.Union[Unset, typing.Type[Schema]], + headers: typing.Union[Unset, typing.List[HeaderParameter]] + ): + """ + pycharm needs this to prevent 'Unexpected argument' warnings + """ + self.response = response + self.body = body + self.headers = headers + + +@dataclass +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[Unset, typing.Type[Schema]] = unset + headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + + +class OpenApiResponse: + def __init__( + self, + response_cls: typing.Type[ApiResponse] = ApiResponse, + content: typing.Optional[typing.Dict[str, MediaType]] = None, + headers: typing.Optional[typing.List[HeaderParameter]] = None, + ): + self.headers = headers + if content is not None and len(content) == 0: + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + self.content = content + self.response_cls = response_cls + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + decoded_data = response.data.decode("utf-8") + return json.loads(decoded_data) + + @staticmethod + def __file_name_from_content_disposition(content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = re.search('filename="(.+?)"', content_disposition) + if not match: + return None + return match.group(1) + + def __deserialize_application_octet_stream( + self, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = self.__file_name_from_content_disposition(response.headers.get('content-disposition')) + + if file_name is None: + _fd, path = tempfile.mkstemp() + else: + path = os.path.join(tempfile.gettempdir(), file_name) + # TODO get file_name from the filename at the end of the url if it exists + with open(path, 'wb') as new_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + new_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file + else: + return response.data + + def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: + content_type = response.getheader('content-type') + deserialized_body = unset + streamed = response.supports_chunked_reads() + if self.content is not None: + if content_type == 'application/json': + body_data = self.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = self.__deserialize_application_octet_stream(response) + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + body_schema = self.content[content_type].schema + _instantiation_metadata = InstantiationMetadata(from_server=True, configuration=configuration) + deserialized_body = body_schema._from_openapi_data( + body_data, _instantiation_metadata=_instantiation_metadata) + elif streamed: + response.release_conn() + + deserialized_headers = unset + if self.headers is not None: + deserialized_headers = unset + + return self.response_cls( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) + + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + _pool = None + __json_encoder = JSONEncoder() + + def __init__( + self, + configuration: typing.Optional[Configuration] = None, + header_name: typing.Optional[str] = None, + header_value: typing.Optional[str] = None, + cookie: typing.Optional[str] = None, + pool_threads: int = 1 + ): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = '{{#if httpUserAgent}}{{{httpUserAgent}}}{{/if}}{{#unless httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/unless}}' + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + {{#if tornado}} + @tornado.gen.coroutine + {{/if}} + {{#if asyncio}}async {{/if}}def __call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + headers: typing.Optional[HTTPHeaderDict] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + host: typing.Optional[str] = None, + ) -> urllib3.HTTPResponse: + + # header parameters + headers = headers or {} + headers.update(self.default_headers) + if self.cookie: + headers['Cookie'] = self.cookie + + # path parameters + if path_params: + for k, v in path_params.items(): + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=self.configuration.safe_chars_for_path_param) + ) + + # auth setting + self.update_params_for_auth(headers, query_params, + auth_settings, resource_path, method, body) + + # request url + if host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = host + resource_path + + # perform request and return response + response = {{#if asyncio}}await {{/if}}{{#if tornado}}yield {{/if}}self.request( + method, + url, + query_params=query_params, + headers=headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + headers: typing.Optional[HTTPHeaderDict] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + async_req: typing.Optional[bool] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + host: typing.Optional[str] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param headers: Header parameters to be + placed in the request header. + :param body: Request body. + :param fields: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings: Auth Settings names for the request. + :param async_req: execute request asynchronously + :type async_req: bool, optional TODO remove, unused + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystme file and the BinarySchema + instance will also inherit from FileSchema and FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param host: api endpoint host + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + + if not async_req: + return self.__call_api( + resource_path, + method, + path_params, + query_params, + headers, + body, + fields, + auth_settings, + stream, + timeout, + host, + ) + + return self.pool.apply_async( + self.__call_api, + ( + resource_path, + method, + path_params, + query_params, + headers, + body, + json, + fields, + auth_settings, + stream, + timeout, + host, + ) + ) + + def request( + self, + method: str, + url: str, + query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + stream=stream, + timeout=timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def update_params_for_auth(self, headers, querys, auth_settings, + resource_path, method, body): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if auth_setting['in'] == 'cookie': + headers.add('Cookie', auth_setting['value']) + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers.add(auth_setting['key'], auth_setting['value']) +{{#if hasHttpSignatureMethods}} + else: + # The HTTP signature scheme requires multiple HTTP headers + # that are calculated dynamically. + signing_info = self.configuration.signing_info + auth_headers = signing_info.get_http_signature_headers( + resource_path, method, headers, body, querys) + for key, value in auth_headers.items(): + headers.add(key, value) +{{/if}} + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + +class Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: typing.Optional[ApiClient] = None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + @staticmethod + def _verify_typed_dict_inputs(cls: typing.Type[typing.TypedDict], data: typing.Dict[str, typing.Any]): + """ + Ensures that: + - required keys are present + - additional properties are not input + - value stored under required keys do not have the value unset + Note: detailed value checking is done in schema classes + """ + missing_required_keys = [] + required_keys_with_unset_values = [] + for required_key in cls.__required_keys__: + if required_key not in data: + missing_required_keys.append(required_key) + continue + value = data[required_key] + if value is unset: + required_keys_with_unset_values.append(required_key) + if missing_required_keys: + raise ApiTypeError( + '{} missing {} required arguments: {}'.format( + cls.__name__, len(missing_required_keys), missing_required_keys + ) + ) + if required_keys_with_unset_values: + raise ApiValueError( + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + ) + ) + + disallowed_additional_keys = [] + for key in data: + if key in cls.__required_keys__ or key in cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) + if disallowed_additional_keys: + raise ApiTypeError( + '{} got {} unexpected keyword arguments: {}'.format( + cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys + ) + ) + + def get_host( + self, + operation_id: str, + servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), + host_index: typing.Optional[int] = None + ) -> typing.Optional[str]: + configuration = self.api_client.configuration + try: + if host_index is None: + index = configuration.server_operation_index.get( + operation_id, configuration.server_index + ) + else: + index = host_index + server_variables = configuration.server_operation_variables.get( + operation_id, configuration.server_variables + ) + host = configuration.get_host_from_settings( + index, variables=server_variables, servers=servers + ) + except IndexError: + if servers: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(servers) + ) + host = None + return host + + +class SerializedRequestBody(typing.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[typing.Union[RequestField, tuple[str, str]], ...] + + +class RequestBody(StyleFormSerializer): + """ + A request body parameter + content: content_type to MediaType Schema info + """ + __json_encoder = JSONEncoder() + + def __init__( + self, + content: typing.Dict[str, MediaType], + required: bool = False, + ): + self.required = required + if len(content) == 0: + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + self.content = content + + def __serialize_json( + self, + in_data: typing.Any + ) -> typing.Dict[str, bytes]: + in_data = self.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return dict(body=json_str) + + @staticmethod + def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: + if isinstance(in_data, frozendict): + raise ValueError('Unable to serialize type frozendict to text/plain') + elif isinstance(in_data, tuple): + raise ValueError('Unable to serialize type tuple to text/plain') + elif isinstance(in_data, NoneClass): + raise ValueError('Unable to serialize type NoneClass to text/plain') + elif isinstance(in_data, BoolClass): + raise ValueError('Unable to serialize type BoolClass to text/plain') + return dict(body=str(in_data)) + + def __multipart_json_item(self, key: str, value: Schema) -> RequestField: + json_value = self.__json_encoder.default(value) + return RequestField(name=key, data=json.dumps(json_value), headers={'Content-Type': 'application/json'}) + + def __multipart_form_item(self, key: str, value: Schema) -> RequestField: + if isinstance(value, str): + return RequestField(name=key, data=str(value), headers={'Content-Type': 'text/plain'}) + elif isinstance(value, bytes): + return RequestField(name=key, data=value, headers={'Content-Type': 'application/octet-stream'}) + elif isinstance(value, FileIO): + request_field = RequestField( + name=key, + data=value.read(), + filename=os.path.basename(value.name), + headers={'Content-Type': 'application/octet-stream'} + ) + value.close() + return request_field + else: + return self.__multipart_json_item(key=key, value=value) + + def __serialize_multipart_form_data( + self, in_data: Schema + ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: + if not isinstance(in_data, frozendict): + raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') + """ + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. + + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: + + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a RequestField for each item with name=key + for item in value: + request_field = self.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = self.__multipart_json_item(key=key, value=value) + fields.append(request_field) + else: + request_field = self.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return dict(fields=tuple(fields)) + + def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: + if isinstance(in_data, bytes): + return dict(body=in_data) + # FileIO type + result = dict(body=in_data.read()) + in_data.close() + return result + + def __serialize_application_x_www_form_data( + self, in_data: typing.Any + ) -> typing.Dict[str, tuple[tuple[str, str], ...]]: + if not isinstance(in_data, frozendict): + raise ValueError( + f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') + cast_in_data = self.__json_encoder.default(in_data) + fields = self._serialize_form(cast_in_data, explode=True, name='') + if not fields: + return {} + return {'fields': fields} + + def serialize( + self, in_data: typing.Any, content_type: str + ) -> SerializedRequestBody: + """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of + + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = self.content[content_type] + if isinstance(in_data, media_type.schema): + cast_in_data = in_data + elif isinstance(in_data, (dict, frozendict)) and in_data: + cast_in_data = media_type.schema(**in_data) + else: + cast_in_data = media_type.schema(in_data) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if content_type == 'application/json': + return self.__serialize_json(cast_in_data) + elif content_type == 'text/plain': + return self.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + return self.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + return self.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + return self.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_doc.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_doc.handlebars new file mode 100644 index 000000000000..6e74b8abb831 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_doc.handlebars @@ -0,0 +1,212 @@ +# {{packageName}}.{{classname}}{{#if description}} +{{description}}{{/if}} + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#with operations}}{{#each operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#if summary}}{{summary}}{{/if}} +{{/each}}{{/with}} + +{{#with operations}} +{{#each operation}} +# **{{{operationId}}}** +> {{#if returnType}}{{{returnType}}} {{/if}}{{{operationId}}}({{#each requiredParams}}{{#unless defaultValue}}{{paramName}}{{#if hasMore}}, {{/if}}{{/unless}}{{/each}}) + +{{{summary}}}{{#if notes}} + +{{{notes}}}{{/if}} + +### Example + +{{#if hasAuthMethods}} +{{#each authMethods}} +{{#if isBasic}} +{{#if isBasicBasic}} +* Basic Authentication ({{name}}): +{{/if}} +{{#if isBasicBearer}} +* Bearer{{#if bearerFormat}} ({{{bearerFormat}}}){{/if}} Authentication ({{name}}): +{{/if}} +{{/if}} +{{#if isApiKey}} +* Api Key Authentication ({{name}}): +{{/if}} +{{#if isOAuth}} +* OAuth Authentication ({{name}}): +{{/if}} +{{/each}} +{{/if}} +{{> api_doc_example }} +### Parameters +{{#if allParams}} + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + {{#with bodyParam}} +{{baseName}} | typing.Union[{{#each content}}{{#unless @first}}, {{/unless}}{{this.schema.baseName}}{{/each}}{{#unless required}}, Unset]{{else}}]{{/unless}} | {{#if required}}required{{else}}optional, default is unset{{/if}} | + {{/with}} + {{#if queryParams}} +query_params | RequestQueryParams | | + {{/if}} + {{#if headerParams}} +header_params | RequestHeaderParams | | + {{/if}} + {{#if pathParams}} +path_params | RequestPathParams | | + {{/if}} + {{#if cookieParams}} +cookie_params | RequestCookieParams | | + {{/if}} + {{#with bodyParam}} + {{#each content}} + {{#if @first}} +content_type | str | optional, default is '{{@key}}' | Selects the schema and serialization of the request body + {{/if}} + {{/each}} + {{/with}} + {{#if produces}} +accept_content_types | typing.Tuple[str] | default is ({{#each produces}}'{{this.mediaType}}', {{/each}}) | Tells the server the content type(s) that are accepted by the client + {{/if}} + {{#if servers}} +host_index | typing.Optional[int] | default is None | Allows one to select a different host + {{/if}} +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 + {{#with bodyParam}} + +### body + {{#each content}} + {{#with this.schema}} +{{> api_doc_schema_type_hint }} + {{/with}} + {{/each}} + {{/with}} + {{#if queryParams}} + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + {{#each queryParams}} +{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} + {{/each}} + + {{#each queryParams}} + {{#with schema}} +{{> api_doc_schema_type_hint }} + {{/with}} + {{/each}} + {{/if}} + {{#if headerParams}} + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + {{#each headerParams}} +{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} + {{/each}} + {{#each headerParams}} + {{#with schema}} +{{> api_doc_schema_type_hint }} + {{/with}} + {{/each}} + {{/if}} + {{#if pathParams}} + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + {{#each pathParams}} +{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} + {{/each}} + {{#each pathParams}} + {{#with schema}} +{{> api_doc_schema_type_hint }} + {{/with}} + {{/each}} + {{/if}} + {{#if cookieParams}} + +### cookie_params +#### RequestCookieParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + {{#each cookieParams}} +{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} + {{/each}} + {{#each cookieParams}} + {{#with schema}} +{{> api_doc_schema_type_hint }} + {{/with}} + {{/each}} + {{/if}} +{{else}} +This endpoint does not need any parameter. +{{/if}} + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +{{#each responses}} +{{#if isDefault}} +default | ApiResponseForDefault | {{message}} {{description}} +{{else}} +{{code}} | ApiResponseFor{{code}} | {{message}} {{description}} +{{/if}} +{{/each}} +{{#each responses}} +{{#if isDefault}} + +#### ApiResponseForDefault +{{else}} + +#### ApiResponseFor{{code}} +{{/if}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | {{#unless content}}Unset{{else}}typing.Union[{{#each content}}{{this.schema.baseName}}, {{/each}}]{{/unless}} | {{#unless content}}body was not defined{{/unless}} | +headers | {{#unless responseHeaders}}Unset{{else}}ResponseHeadersFor{{code}}{{/unless}} | {{#unless responseHeaders}}headers were not defined{{/unless}} | +{{#each content}} +{{#with this.schema}} +{{> api_doc_schema_type_hint }} +{{/with}} +{{/each}} +{{#if responseHeaders}} +#### ResponseHeadersFor{{code}} + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + {{#each responseHeaders}} +{{baseName}} | {{#with schema}}{{baseName}}{{/with}} | | {{#unless required}}optional{{/unless}} + {{/each}} + {{#each responseHeaders}} + {{#with schema}} +{{> api_doc_schema_type_hint }} + {{/with}} + {{/each}} + +{{/if}} +{{/each}} + + +{{#if returnType}}{{#if returnTypeIsPrimitive}}**{{{returnType}}}**{{/if}}{{#unless returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/unless}}{{/if}}{{#unless returnType}}void (empty response body){{/unless}} + +### Authorization + +{{#unless authMethods}}No authorization required{{/unless}}{{#each authMethods}}[{{{name}}}](../README.md#{{{name}}}){{#unless @last}}, {{/unless}}{{/each}} + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +{{/each}} +{{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_doc_example.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_doc_example.handlebars new file mode 100644 index 000000000000..eaa2260e3f05 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_doc_example.handlebars @@ -0,0 +1,163 @@ +```python +import {{{packageName}}} +from {{packageName}}.{{apiPackage}} import {{classVarName}} +{{#each imports}} +{{{.}}} +{{/each}} +from pprint import pprint +{{> doc_auth_partial}} +# Enter a context with an instance of the API client +with {{{packageName}}}.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = {{classVarName}}.{{{classname}}}(api_client) +{{#if requiredParams}} + + # example passing only required values which don't have defaults set +{{#if pathParams}} + path_params = { + {{#each pathParams}} + {{#if required}} + '{{baseName}}': {{{example}}}, + {{/if}} + {{/each}} + } +{{/if}} +{{#if queryParams}} + query_params = { + {{#each queryParams}} + {{#if required}} + '{{baseName}}': {{{example}}}, + {{/if}} + {{/each}} + } +{{/if}} +{{#if cookieParams}} + cookie_params = { + {{#each cookieParams}} + {{#if required}} + '{{baseName}}': {{{example}}}, + {{/if}} + {{/each}} + } +{{/if}} +{{#if headerParams}} + header_params = { + {{#each headerParams}} + {{#if required}} + '{{baseName}}': {{{example}}}, + {{/if}} + {{/each}} + } +{{/if}} +{{#with bodyParam}} + {{#if required}} + body = {{{example}}} + {{/if}} +{{/with}} + try: +{{#if summary}} + # {{{summary}}} +{{/if}} + api_response = api_instance.{{{operationId}}}( + {{#if pathParams}} + path_params=path_params, + {{/if}} + {{#if queryParams}} + query_params=query_params, + {{/if}} + {{#if headerParams}} + header_params=header_params, + {{/if}} + {{#if cookieParams}} + cookie_params=cookie_params, + {{/if}} + {{#with bodyParam}} + {{#if required}} + body=body, + {{/if}} + {{/with}} + ) +{{#if returnType}} + pprint(api_response) +{{/if}} + except {{{packageName}}}.ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) +{{/if}} +{{#if optionalParams}} + + # example passing only optional values +{{#if pathParams}} + path_params = { + {{#each pathParams}} + '{{baseName}}': {{{example}}}, + {{/each}} + } +{{/if}} +{{#if queryParams}} + query_params = { + {{#each queryParams}} + '{{baseName}}': {{{example}}}, + {{/each}} + } +{{/if}} +{{#if cookieParams}} + cookie_params = { + {{#each cookieParams}} + '{{baseName}}': {{{example}}}, + {{/each}} + } +{{/if}} +{{#if headerParams}} + header_params = { + {{#each headerParams}} + '{{baseName}}': {{{example}}}, + {{/each}} + } +{{/if}} +{{#with bodyParam}} + body = {{{example}}} +{{/with}} + try: +{{#if summary}} + # {{{summary}}} +{{/if}} + api_response = api_instance.{{{operationId}}}( + {{#if pathParams}} + path_params=path_params, + {{/if}} + {{#if queryParams}} + query_params=query_params, + {{/if}} + {{#if headerParams}} + header_params=header_params, + {{/if}} + {{#if cookieParams}} + cookie_params=cookie_params, + {{/if}} + {{#if bodyParam}} + body=body, + {{/if}} + ) +{{#if returnType}} + pprint(api_response) +{{/if}} + except {{{packageName}}}.ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) +{{/if}} +{{#unless requiredParams}} +{{#unless optionalParams}} + + # example, this endpoint has no required or optional parameters + try: +{{#if summary}} + # {{{summary}}} +{{/if}} + api_response = api_instance.{{{operationId}}}() +{{#if returnType}} + pprint(api_response) +{{/if}} + except {{{packageName}}}.ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) +{{/unless}} +{{/unless}} +``` diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_doc_schema_type_hint.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_doc_schema_type_hint.handlebars new file mode 100644 index 000000000000..0698320ad88d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_doc_schema_type_hint.handlebars @@ -0,0 +1,10 @@ + +#### {{baseName}} +{{#if complexType}} +Type | Description | Notes +------------- | ------------- | ------------- +[**{{dataType}}**]({{complexType}}.md) | {{description}} | {{#if isReadOnly}}[readonly] {{/if}} + +{{else}} +{{> schema_doc }} +{{/if}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars new file mode 100644 index 000000000000..a999b4b16c90 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars @@ -0,0 +1,34 @@ +# coding: utf-8 + +{{>partial_header}} + +import unittest + +import {{packageName}} +from {{packageName}}.api.{{classFilename}} import {{classname}} # noqa: E501 + + +class {{#with operations}}Test{{classname}}(unittest.TestCase): + """{{classname}} unit test stubs""" + + def setUp(self): + self.api = {{classname}}() # noqa: E501 + + def tearDown(self): + pass + + {{#each operation}} + def test_{{operationId}}(self): + """Test case for {{{operationId}}} + +{{#if summary}} + {{{summary}}} # noqa: E501 +{{/if}} + """ + pass + + {{/each}} +{{/with}} + +if __name__ == '__main__': + unittest.main() diff --git a/modules/openapi-generator/src/main/resources/python-experimental/configuration.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/configuration.handlebars new file mode 100644 index 000000000000..c0a0dc7dcc27 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/configuration.handlebars @@ -0,0 +1,636 @@ +# coding: utf-8 + +{{>partial_header}} + +import copy +import logging +{{#unless asyncio}} +import multiprocessing +{{/unless}} +import sys +import urllib3 + +from http import client as http_client +from {{packageName}}.exceptions import ApiValueError + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems', + 'uniqueItems', 'maxProperties', 'minProperties', +} + +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. +{{#if hasHttpSignatureMethods}} + :param signing_info: Configuration parameters for the HTTP signature security scheme. + Must be an instance of {{{packageName}}}.signing.HttpSigningConfiguration +{{/if}} + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + +{{#if hasAuthMethods}} + :Example: +{{#if hasApiKeyMethods}} + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = {{{packageName}}}.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 +{{/if}} +{{#if hasHttpBasicMethods}} + + HTTP Basic Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: basic + + Configure API client with HTTP basic authentication: + +conf = {{{packageName}}}.Configuration( + username='the-user', + password='the-password', +) + +{{/if}} +{{#if hasHttpSignatureMethods}} + + HTTP Signature Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: signature + + Configure API client with HTTP signature authentication. Use the 'hs2019' signature scheme, + sign the HTTP requests with the RSA-SSA-PSS signature algorithm, and set the expiration time + of the signature to 5 minutes after the signature has been created. + Note you can use the constants defined in the {{{packageName}}}.signing module, and you can + also specify arbitrary HTTP headers to be included in the HTTP signature, except for the + '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 + load balancers may add/modify/remove headers. Include the HTTP headers that you know + are not going to be modified in transit. + +conf = {{{packageName}}}.Configuration( + signing_info = {{{packageName}}}.signing.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'rsa.pem', + signing_scheme = {{{packageName}}}.signing.SCHEME_HS2019, + signing_algorithm = {{{packageName}}}.signing.ALGORITHM_RSASSA_PSS, + signed_headers = [{{{packageName}}}.signing.HEADER_REQUEST_TARGET, + {{{packageName}}}.signing.HEADER_CREATED, + {{{packageName}}}.signing.HEADER_EXPIRES, + {{{packageName}}}.signing.HEADER_HOST, + {{{packageName}}}.signing.HEADER_DATE, + {{{packageName}}}.signing.HEADER_DIGEST, + 'Content-Type', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) +{{/if}} +{{/if}} + """ + + _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, +{{/if}} + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ): + """Constructor + """ + self._base_path = "{{{basePath}}}" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """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 +{{#if hasHttpSignatureMethods}} + if signing_info is not None: + signing_info.host = host + self.signing_info = signing_info + """The HTTP signing configuration + """ +{{/if}} +{{#if hasOAuthMethods}} + 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}} + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("{{packageName}}") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + {{#if asyncio}} + self.connection_pool_maxsize = 100 + """This value is passed to the aiohttp to limit simultaneous connections. + Default values is 100, None means no-limit. + """ + {{/if}} + {{#unless asyncio}} + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + {{/unless}} + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + 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 + # Configuration.host. + value.host = self.host +{{/if}} + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} +{{#each authMethods}} +{{#if isApiKey}} + if '{{name}}' in self.api_key{{#each vendorExtensions.x-auth-id-alias}} or '{{.}}' in self.api_key{{/each}}: + auth['{{name}}'] = { + 'type': 'api_key', + 'in': {{#if isKeyInCookie}}'cookie'{{/if}}{{#if isKeyInHeader}}'header'{{/if}}{{#if isKeyInQuery}}'query'{{/if}}, + 'key': '{{keyParamName}}', + 'value': self.get_api_key_with_prefix( + '{{name}}',{{#each vendorExtensions.x-auth-id-alias}} + alias='{{.}}',{{/each}} + ), + } +{{/if}} +{{#if isBasic}} + {{#if isBasicBasic}} + if self.username is not None and self.password is not None: + auth['{{name}}'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } + {{/if}} + {{#if isBasicBearer}} + if self.access_token is not None: + auth['{{name}}'] = { + 'type': 'bearer', + 'in': 'header', + {{#if bearerFormat}} + 'format': '{{{bearerFormat}}}', + {{/if}} + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + {{/if}} + {{#if isHttpSignature}} + if self.signing_info is not None: + auth['{{name}}'] = { + 'type': 'http-signature', + 'in': 'header', + 'key': 'Authorization', + 'value': None # Signature headers are calculated for every HTTP request + } + {{/if}} +{{/if}} +{{#if isOAuth}} + if self.access_token is not None: + auth['{{name}}'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } +{{/if}} +{{/each}} + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: {{version}}\n"\ + "SDK Package Version: {{packageVersion}}".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + {{#each servers}} + { + 'url': "{{{url}}}", + 'description': "{{{description}}}{{#unless description}}No description provided{{/unless}}", + {{#each variables}} + {{#if @first}} + 'variables': { + {{/if}} + '{{{name}}}': { + 'description': "{{{description}}}{{#unless description}}No description provided{{/unless}}", + 'default_value': "{{{defaultValue}}}", + {{#each enumValues}} + {{#if @first}} + 'enum_values': [ + {{/if}} + "{{{.}}}"{{#unless @last}},{{/unless}} + {{#if @last}} + ] + {{/if}} + {{/each}} + }{{#unless @last}},{{/unless}} + {{#if @last}} + } + {{/if}} + {{/each}} + }{{#unless @last}},{{/unless}} + {{/each}} + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/modules/openapi-generator/src/main/resources/python-experimental/doc_auth_partial.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/doc_auth_partial.handlebars new file mode 100644 index 000000000000..b16451d867e0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/doc_auth_partial.handlebars @@ -0,0 +1,109 @@ +# Defining the host is optional and defaults to {{{basePath}}} +# See configuration.py for a list of all supported configuration parameters. +configuration = {{{packageName}}}.Configuration( + host = "{{{basePath}}}" +) + +{{#if hasAuthMethods}} +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. +{{#each authMethods}} +{{#if isBasic}} +{{#if isBasicBasic}} + +# Configure HTTP basic authorization: {{{name}}} +configuration = {{{packageName}}}.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) +{{/if}} +{{#if isBasicBearer}} + +# Configure Bearer authorization{{#if bearerFormat}} ({{{bearerFormat}}}){{/if}}: {{{name}}} +configuration = {{{packageName}}}.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) +{{/if}} +{{#if isHttpSignature}} + +# Configure HTTP message signature: {{{name}}} +# The HTTP Signature Header mechanism that can be used by a client to +# authenticate the sender of a message and ensure that particular headers +# have not been modified in transit. +# +# You can specify the signing key-id, private key path, signing scheme, +# signing algorithm, list of signed headers and signature max validity. +# The 'key_id' parameter is an opaque string that the API server can use +# to lookup the client and validate the signature. +# The 'private_key_path' parameter should be the path to a file that +# contains a DER or base-64 encoded private key. +# The 'private_key_passphrase' parameter is optional. Set the passphrase +# if the private key is encrypted. +# The 'signed_headers' parameter is used to specify the list of +# HTTP headers included when generating the signature for the message. +# You can specify HTTP headers that you want to protect with a cryptographic +# signature. Note that proxies may add, modify or remove HTTP headers +# for legitimate reasons, so you should only add headers that you know +# will not be modified. For example, if you want to protect the HTTP request +# body, you can specify the Digest header. In that case, the client calculates +# the digest of the HTTP request body and includes the digest in the message +# signature. +# The 'signature_max_validity' parameter is optional. It is configured as a +# duration to express when the signature ceases to be valid. The client calculates +# the expiration date every time it generates the cryptographic signature +# of an HTTP request. The API server may have its own security policy +# that controls the maximum validity of the signature. The client max validity +# must be lower than the server max validity. +# The time on the client and server must be synchronized, otherwise the +# server may reject the client signature. +# +# The client must use a combination of private key, signing scheme, +# signing algorithm and hash algorithm that matches the security policy of +# the API server. +# +# See {{{packageName}}}.signing for a list of all supported parameters. +configuration = {{{packageName}}}.Configuration( + host = "{{{basePath}}}", + signing_info = {{{packageName}}}.signing.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'private_key.pem', + private_key_passphrase = 'YOUR_PASSPHRASE', + signing_scheme = {{{packageName}}}.signing.SCHEME_HS2019, + signing_algorithm = {{{packageName}}}.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, + hash_algorithm = {{{packageName}}}.signing.SCHEME_RSA_SHA256, + signed_headers = [ + {{{packageName}}}.signing.HEADER_REQUEST_TARGET, + {{{packageName}}}.signing.HEADER_CREATED, + {{{packageName}}}.signing.HEADER_EXPIRES, + {{{packageName}}}.signing.HEADER_HOST, + {{{packageName}}}.signing.HEADER_DATE, + {{{packageName}}}.signing.HEADER_DIGEST, + 'Content-Type', + 'Content-Length', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) +{{/if}} +{{/if}} +{{#if isApiKey}} + +# Configure API key authorization: {{{name}}} +configuration.api_key['{{{name}}}'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['{{name}}'] = 'Bearer' +{{/if}} +{{#if isOAuth}} + +# Configure OAuth2 access token for authorization: {{{name}}} +configuration = {{{packageName}}}.Configuration( + host = "{{{basePath}}}" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' +{{/if}} +{{/each}} +{{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars new file mode 100644 index 000000000000..f6de978e4781 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars @@ -0,0 +1,549 @@ +# coding: utf-8 + +{{>partial_header}} + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +{{#with operation}} +{{#or headerParams bodyParam produces}} +from urllib3._collections import HTTPHeaderDict +{{/or}} +{{/with}} + +from {{packageName}} import api_client, exceptions +{{> model_templates/imports_schema_types }} +{{> model_templates/imports_schemas }} + +{{#with operation}} +{{#if queryParams}} +# query params +{{#each queryParams}} +{{#with schema}} +{{> model_templates/schema }} +{{/with}} +{{/each}} +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { +{{#each queryParams}} +{{#if required}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/if}} +{{/each}} + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { +{{#each queryParams}} +{{#unless required}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/unless}} +{{/each}} + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +{{#each queryParams}} +{{> endpoint_parameter }} +{{/each}} +{{/if}} +{{#if headerParams}} +# header params +{{#each headerParams}} +{{#with schema}} +{{> model_templates/schema }} +{{/with}} +{{/each}} +RequestRequiredHeaderParams = typing.TypedDict( + 'RequestRequiredHeaderParams', + { +{{#each headerParams}} +{{#if required}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/if}} +{{/each}} + } +) +RequestOptionalHeaderParams = typing.TypedDict( + 'RequestOptionalHeaderParams', + { +{{#each headerParams}} +{{#unless required}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/unless}} +{{/each}} + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +{{#each headerParams}} +{{> endpoint_parameter }} +{{/each}} +{{/if}} +{{#if pathParams}} +# path params +{{#each pathParams}} +{{#with schema}} +{{> model_templates/schema }} +{{/with}} +{{/each}} +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { +{{#each pathParams}} +{{#if required}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/if}} +{{/each}} + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { +{{#each pathParams}} +{{#unless required}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/unless}} +{{/each}} + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +{{#each pathParams}} +{{> endpoint_parameter }} +{{/each}} +{{/if}} +{{#if cookieParams}} +# cookie params +{{#each cookieParams}} +{{#with schema}} +{{> model_templates/schema }} +{{/with}} +{{/each}} +RequestRequiredCookieParams = typing.TypedDict( + 'RequestRequiredCookieParams', + { +{{#each cookieParams}} +{{#if required}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/if}} +{{/each}} + } +) +RequestOptionalCookieParams = typing.TypedDict( + 'RequestOptionalCookieParams', + { +{{#each cookieParams}} +{{#unless required}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/unless}} +{{/each}} + }, + total=False +) + + +class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookieParams): + pass + + +{{#each cookieParams}} +{{> endpoint_parameter }} +{{/each}} +{{/if}} +{{#with bodyParam}} +# body param +{{#each content}} +{{#with this.schema}} +{{> model_templates/schema }} +{{/with}} +{{/each}} + + +request_body_{{paramName}} = api_client.RequestBody( + content={ +{{#each content}} + '{{@key}}': api_client.MediaType( + schema={{this.schema.baseName}}), +{{/each}} + }, +{{#if required}} + required=True, +{{/if}} +) +{{/with}} +_path = '{{{path}}}' +_method = '{{httpMethod}}' +{{#each authMethods}} +{{#if @first}} +_auth = [ +{{/if}} + '{{name}}', +{{#if @last}} +] +{{/if}} +{{/each}} +{{#each servers}} +{{#if @first}} +_servers = ( +{{/if}} + { + 'url': "{{{url}}}", + 'description': "{{{description}}}{{#unless description}}No description provided{{/unless}}", + {{#each variables}} + {{#if @first}} + 'variables': { + {{/if}} + '{{{name}}}': { + 'description': "{{{description}}}{{#unless description}}No description provided{{/unless}}", + 'default_value': "{{{defaultValue}}}", + {{#each enumValues}} + {{#if @first}} + 'enum_values': [ + {{/if}} + "{{{.}}}"{{#unless @last}},{{/unless}} + {{#if @last}} + ] + {{/if}} + {{/each}} + }{{#unless @last}},{{/unless}} + {{#if @last}} + } + {{/if}} + {{/each}} + }, +{{#if @last}} +) +{{/if}} +{{/each}} +{{#each responses}} +{{#each responseHeaders}} +{{#with schema}} +{{> model_templates/schema }} +{{/with}} +{{paramName}}_parameter = api_client.HeaderParameter( + name="{{baseName}}", +{{#if style}} + style=api_client.ParameterStyle.{{style}}, +{{/if}} +{{#if schema}} +{{#with schema}} + schema={{baseName}}, +{{/with}} +{{/if}} +{{#if required}} + required=True, +{{/if}} +{{#if isExplode}} + explode=True, +{{/if}} +) +{{/each}} +{{#each content}} +{{#with this.schema}} +{{> model_templates/schema }} +{{/with}} +{{/each}} +{{#if responseHeaders}} +ResponseHeadersFor{{code}} = typing.TypedDict( + 'ResponseHeadersFor{{code}}', + { +{{#each responseHeaders}} + '{{baseName}}': {{#with schema}}{{baseName}},{{/with}} +{{/each}} + } +) +{{/if}} + + +@dataclass +{{#if isDefault}} +class ApiResponseForDefault(api_client.ApiResponse): +{{else}} +class ApiResponseFor{{code}}(api_client.ApiResponse): +{{/if}} + response: urllib3.HTTPResponse +{{#and responseHeaders content}} + body: typing.Union[ +{{#each content}} + {{this.schema.baseName}}, +{{/each}} + ] + headers: ResponseHeadersFor{{code}} +{{else}} +{{#or responseHeaders content}} +{{#if responseHeaders}} + headers: ResponseHeadersFor{{code}} + body: Unset = unset +{{else}} + body: typing.Union[ +{{#each content}} + {{this.schema.baseName}}, +{{/each}} + ] + headers: Unset = unset +{{/if}} +{{/or}} +{{/and}} +{{#unless responseHeaders}} +{{#unless content}} + body: Unset = unset + headers: Unset = unset +{{/unless}} +{{/unless}} + + +{{#if isDefault}} +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +{{else}} +_response_for_{{code}} = api_client.OpenApiResponse( + response_cls=ApiResponseFor{{code}}, +{{/if}} +{{#each content}} +{{#if @first}} + content={ +{{/if}} + '{{@key}}': api_client.MediaType( + schema={{this.schema.baseName}}), +{{#if @last}} + }, +{{/if}} +{{/each}} +{{#if responseHeaders}} + headers=[ +{{#each responseHeaders}} + {{paramName}}_parameter, +{{/each}} + ] +{{/if}} +) +{{/each}} +_status_code_to_response = { +{{#each responses}} +{{#if isDefault}} + 'default': _response_for_default, +{{else}} + '{{code}}': _response_for_{{code}}, +{{/if}} +{{/each}} +} +{{#each produces}} +{{#if @first}} +_all_accept_content_types = ( +{{/if}} + '{{this.mediaType}}', +{{#if @last}} +) +{{/if}} +{{/each}} + + +class {{operationIdCamelCase}}(api_client.Api): + + def {{operationId}}( + self: api_client.Api, + {{#if bodyParam}} + {{#with bodyParam}} + {{baseName}}: typing.Union[{{#each content}}{{#unless @first}}, {{/unless}}{{this.schema.baseName}}{{/each}}{{#unless required}}, Unset] = unset{{else}}]{{/unless}}, + {{/with}} + {{/if}} + {{#if queryParams}} + query_params: RequestQueryParams = frozendict(), + {{/if}} + {{#if headerParams}} + header_params: RequestHeaderParams = frozendict(), + {{/if}} + {{#if pathParams}} + path_params: RequestPathParams = frozendict(), + {{/if}} + {{#if cookieParams}} + cookie_params: RequestCookieParams = frozendict(), + {{/if}} + {{#with bodyParam}} + {{#each content}} + {{#if @first}} + content_type: str = '{{@key}}', + {{/if}} + {{/each}} + {{/with}} + {{#if produces}} + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + {{/if}} + {{#if servers}} + host_index: typing.Optional[int] = None, + {{/if}} + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + {{#each responses}} + {{#if isDefault}} + ApiResponseForDefault, + {{else}} + {{#if is2xx}} + ApiResponseFor{{code}}, + {{/if}} + {{/if}} + {{/each}} + api_client.ApiResponseWithoutDeserialization + ]: + """ + {{#if summary}} + {{summary}} + {{/if}} + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + {{#if queryParams}} + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + {{/if}} + {{#if headerParams}} + self._verify_typed_dict_inputs(RequestHeaderParams, header_params) + {{/if}} + {{#if pathParams}} + self._verify_typed_dict_inputs(RequestPathParams, path_params) + {{/if}} + {{#if cookieParams}} + self._verify_typed_dict_inputs(RequestCookieParams, cookie_params) + {{/if}} + {{#if pathParams}} + + _path_params = {} + for parameter in ( + {{#each pathParams}} + request_path_{{paramName}}, + {{/each}} + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + {{/if}} + {{#if queryParams}} + + _query_params = [] + for parameter in ( + {{#each queryParams}} + request_query_{{paramName}}, + {{/each}} + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + {{/if}} + {{#or headerParams bodyParam produces}} + + _headers = HTTPHeaderDict() + {{else}} + {{/or}} + {{#if headerParams}} + for parameter in ( + {{#each headerParams}} + request_header_{{paramName}}, + {{/each}} + ): + parameter_data = header_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + {{/if}} + # TODO add cookie handling + {{#if produces}} + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + {{/if}} + {{#with bodyParam}} + + {{#if required}} + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + {{/if}} + _fields = None + _body = None + {{#if required}} + {{> endpoint_body_serialization }} + {{else}} + if body is not unset: + {{> endpoint_body_serialization }} + {{/if}} + {{/with}} + {{#if servers}} + + host = self.get_host('{{operationId}}', _servers, host_index) + {{/if}} + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + {{#if pathParams}} + path_params=_path_params, + {{/if}} + {{#if queryParams}} + query_params=tuple(_query_params), + {{/if}} + {{#or headerParams bodyParam produces}} + headers=_headers, + {{/or}} + {{#if bodyParam}} + fields=_fields, + body=_body, + {{/if}} + {{#if hasAuthMethods}} + auth_settings=_auth, + {{/if}} + {{#if servers}} + host=host, + {{/if}} + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + {{#if hasDefaultResponse}} + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + {{else}} + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + {{/if}} + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response +{{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/endpoint_body_serialization.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/endpoint_body_serialization.handlebars new file mode 100644 index 000000000000..f00d9f05d278 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/endpoint_body_serialization.handlebars @@ -0,0 +1,6 @@ +serialized_data = request_body_{{paramName}}.serialize(body, content_type) +_headers.add('Content-Type', content_type) +if 'fields' in serialized_data: + _fields = serialized_data['fields'] +elif 'body' in serialized_data: + _body = serialized_data['body'] \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/endpoint_parameter.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/endpoint_parameter.handlebars new file mode 100644 index 000000000000..4b9d815af83e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/endpoint_parameter.handlebars @@ -0,0 +1,17 @@ +request_{{#if isQueryParam}}query{{/if}}{{#if isPathParam}}path{{/if}}{{#if isHeaderParam}}header{{/if}}{{#if isCookieParam}}cookie{{/if}}_{{paramName}} = api_client.{{#if isQueryParam}}Query{{/if}}{{#if isPathParam}}Path{{/if}}{{#if isHeaderParam}}Header{{/if}}{{#if isCookieParam}}Cookie{{/if}}Parameter( + name="{{baseName}}", +{{#if style}} + style=api_client.ParameterStyle.{{style}}, +{{/if}} +{{#if schema}} +{{#with schema}} + schema={{baseName}}, +{{/with}} +{{/if}} +{{#if required}} + required=True, +{{/if}} +{{#if isExplode}} + explode=True, +{{/if}} +) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/exceptions.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/exceptions.handlebars new file mode 100644 index 000000000000..fa5f75347892 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/exceptions.handlebars @@ -0,0 +1,129 @@ +# coding: utf-8 + +{{>partial_header}} + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + 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 + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/modules/openapi-generator/src/main/resources/python-experimental/git_push.sh.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/git_push.sh.handlebars new file mode 100644 index 000000000000..8b3f689c9121 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/git_push.sh.handlebars @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="{{{gitHost}}}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="{{{gitUserId}}}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="{{{gitRepoId}}}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="{{{releaseNote}}}" + 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/modules/openapi-generator/src/main/resources/python-experimental/gitignore.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/gitignore.handlebars new file mode 100644 index 000000000000..a62e8aba43f8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/gitignore.handlebars @@ -0,0 +1,67 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt +dev-requirements.txt.log + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/modules/openapi-generator/src/main/resources/python-experimental/gitlab-ci.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/gitlab-ci.handlebars new file mode 100644 index 000000000000..0cfe8f74ecfc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/gitlab-ci.handlebars @@ -0,0 +1,29 @@ +# ref: https://docs.gitlab.com/ee/ci/README.html + +stages: + - test + +.tests: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + {{#if useNose}} + - nosetests + {{/if}} + {{#unless useNose}} + - pytest --cov={{{packageName}}} + {{/unless}} + +test-3.5: + extends: .tests + image: python:3.5-alpine +test-3.6: + extends: .tests + image: python:3.6-alpine +test-3.7: + extends: .tests + image: python:3.7-alpine +test-3.8: + extends: .tests + image: python:3.8-alpine diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model.handlebars new file mode 100644 index 000000000000..d8c1e63ae4d4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model.handlebars @@ -0,0 +1,17 @@ +# coding: utf-8 + +{{>partial_header}} + +import re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +{{#each models}} +{{#with model}} +{{> model_templates/imports_schema_types }} +{{> model_templates/schema }} +{{> model_templates/imports_schemas }} +{{/with}} +{{/each}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_doc.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_doc.handlebars new file mode 100644 index 000000000000..2c4136a142ae --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_doc.handlebars @@ -0,0 +1,9 @@ +{{#each models}} +{{#with model}} +# {{classname}} +{{> schema_doc }} +{{/with}} +{{/each}} + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars new file mode 100644 index 000000000000..6aef3311b6e3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars @@ -0,0 +1,86 @@ +@classmethod +@property +def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading +{{#with composedSchemas}} +{{#each allOf}} +{{#unless complexType}} +{{#unless isAnyType}} + {{> model_templates/schema }} +{{/unless}} +{{/unless}} +{{#if isAnyType}} + {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = AnyTypeSchema +{{/if}} +{{/each}} +{{#each oneOf}} +{{#unless complexType}} +{{#unless isAnyType}} + {{> model_templates/schema }} +{{/unless}} +{{/unless}} +{{#if isAnyType}} + {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = AnyTypeSchema +{{/if}} +{{/each}} +{{#each anyOf}} +{{#unless complexType}} +{{#unless isAnyType}} + {{> model_templates/schema }} +{{/unless}} +{{/unless}} +{{#if isAnyType}} + {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = AnyTypeSchema +{{/if}} +{{/each}} +{{/with}} + return { + 'allOf': [ +{{#with composedSchemas}} +{{#each allOf}} +{{#if complexType}} + {{complexType}}, +{{/if}} +{{#unless complexType}} + {{#if nameInSnakeCase}}{{name}}{{/if}}{{#unless nameInSnakeCase}}{{baseName}}{{/unless}}, +{{/unless}} +{{/each}} + ], + 'oneOf': [ +{{#each oneOf}} +{{#if complexType}} + {{complexType}}, +{{/if}} +{{#unless complexType}} +{{#if isAnyType}} + AnyTypeSchema, +{{/if}} +{{#unless isAnyType}} + {{#if nameInSnakeCase}}{{name}}{{/if}}{{#unless nameInSnakeCase}}{{baseName}}{{/unless}}, +{{/unless}} +{{/unless}} +{{/each}} + ], + 'anyOf': [ +{{#each anyOf}} +{{#if complexType}} + {{complexType}}, +{{/if}} +{{#unless complexType}} +{{#if isAnyType}} + AnyTypeSchema, +{{/if}} +{{#unless isAnyType}} + {{#if nameInSnakeCase}}{{name}}{{/if}}{{#unless nameInSnakeCase}}{{baseName}}{{/unless}}, +{{/unless}} +{{/unless}} +{{/each}} +{{/with}} + ], + } diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/dict_partial.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/dict_partial.handlebars new file mode 100644 index 000000000000..15338b38f1db --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/dict_partial.handlebars @@ -0,0 +1,54 @@ +{{#if getHasRequired}} + _required_property_names = set(( + {{#each requiredVars}} + '{{baseName}}', + {{/each}} + )) +{{/if}} +{{#each vars}} +{{#if complexType}} + + @classmethod + @property + def {{baseName}}(cls) -> typing.Type['{{complexType}}']: + return {{complexType}} +{{else}} + {{> model_templates/schema }} +{{/if}} +{{/each}} +{{#if getHasDiscriminatorWithNonEmptyMapping}} +{{#with discriminator}} +{{#each mappedModels}} +{{#if @first}} + + @classmethod + @property + def _discriminator(cls): + return { + '{{{propertyBaseName}}}': { +{{/if}} + '{{mappingName}}': {{{modelName}}}, +{{#if @last}} + } + } +{{/if}} +{{/each}} +{{/with}} +{{/if}} +{{#with additionalProperties}} +{{#if complexType}} + + @classmethod + @property + def _additional_properties(cls) -> typing.Type['{{complexType}}']: + return {{complexType}} +{{/if}} +{{#unless complexType}} +{{#unless isAnyType}} + {{> model_templates/schema }} +{{/unless}} +{{/unless}} +{{/with}} +{{#unless additionalProperties}} + _additional_properties = None +{{/unless}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enum_value_to_name.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enum_value_to_name.handlebars new file mode 100644 index 000000000000..ea2cb759fbef --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enum_value_to_name.handlebars @@ -0,0 +1,12 @@ +_SchemaEnumMaker( + enum_value_to_name={ +{{#if isNull}} + None: "NONE", +{{/if}} +{{#with allowableValues}} +{{#each enumVars}} + {{{value}}}: "{{name}}", +{{/each}} +{{/with}} + } +), diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enums.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enums.handlebars new file mode 100644 index 000000000000..5cbc68dc173e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/enums.handlebars @@ -0,0 +1,16 @@ +{{#if isNull}} + +@classmethod +@property +def NONE(cls): + return cls._enum_by_value[None](None) +{{/if}} +{{#with allowableValues}} +{{#each enumVars}} + +@classmethod +@property +def {{name}}(cls): + return cls._enum_by_value[{{{value}}}]({{{value}}}) +{{/each}} +{{/with}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars new file mode 100644 index 000000000000..0741ba482fe6 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars @@ -0,0 +1,41 @@ +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from {{packageName}}.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schemas.handlebars new file mode 100644 index 000000000000..b925cf92c698 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schemas.handlebars @@ -0,0 +1,6 @@ +{{#each imports}} +{{#if @first}} + +{{/if}} +{{{.}}} +{{/each}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars new file mode 100644 index 000000000000..bb220e4b8f3a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars @@ -0,0 +1,53 @@ +def __new__( + cls, + *args: typing.Union[{{#if isAnyType}}dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes{{/if}}{{#if isUnboundedInteger}}int, {{/if}}{{#if isNumber}}float, {{/if}}{{#if isBoolean}}bool, {{/if}}{{#if isArray}}list, tuple, {{/if}}{{#if isMap}}dict, frozendict, {{/if}}{{#if isString}}str, {{/if}}{{#if isNull}}None, {{/if}}], +{{#unless isNull}} +{{#if getHasRequired}} +{{#each requiredVars}} +{{#unless nameInSnakeCase}} + {{baseName}}: {{baseName}}, +{{/unless}} +{{/each}} +{{/if}} +{{/unless}} +{{#each vars}} +{{#unless nameInSnakeCase}} +{{#unless getRequired}} +{{#unless complexType}} + {{baseName}}: typing.Union[{{baseName}}, Unset] = unset, +{{/unless}} +{{#if complexType}} + {{baseName}}: typing.Union['{{complexType}}', Unset] = unset, +{{/if}} +{{/unless}} +{{/unless}} +{{/each}} + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, +{{#with additionalProperties}} + **kwargs: typing.Type[Schema], +{{/with}} +): + return super().__new__( + cls, + *args, +{{#unless isNull}} +{{#if getHasRequired}} +{{#each requiredVars}} +{{#unless nameInSnakeCase}} + {{baseName}}={{baseName}}, +{{/unless}} +{{/each}} +{{/if}} +{{/unless}} +{{#each vars}} +{{#unless getRequired}} +{{#unless nameInSnakeCase}} + {{baseName}}={{baseName}}, +{{/unless}} +{{/unless}} +{{/each}} + _instantiation_metadata=_instantiation_metadata, +{{#with additionalProperties}} + **kwargs, +{{/with}} + ) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema.handlebars new file mode 100644 index 000000000000..7523d39f0eae --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema.handlebars @@ -0,0 +1,46 @@ +{{#if composedSchemas}} +{{> model_templates/schema_composed_or_anytype }} +{{/if}} +{{#unless composedSchemas}} + {{#if getHasMultipleTypes}} +{{> model_templates/schema_composed_or_anytype }} + {{else}} + {{#or isMap isArray isAnyType}} + {{#if isMap}} + {{#or hasVars hasValidation hasRequiredVars getHasDiscriminatorWithNonEmptyMapping}} +{{> model_templates/schema_dict }} + {{else}} + {{#if additionalPropertiesIsAnyType}} +{{> model_templates/var_equals_cls }} + {{else}} +{{> model_templates/schema_dict }} + {{/if}} + {{/or}} + {{/if}} + {{#if isArray}} + {{#or hasItems hasValidation}} +{{> model_templates/schema_list }} + {{else}} +{{> model_templates/var_equals_cls }} + {{/or}} + {{/if}} + {{#if isAnyType}} + {{#or isEnum hasVars hasValidation hasRequiredVars getHasDiscriminatorWithNonEmptyMapping items}} +{{> model_templates/schema_composed_or_anytype }} + {{else}} +{{> model_templates/var_equals_cls }} + {{/or}} + {{/if}} + {{else}} + {{#or isEnum hasValidation}} +{{> model_templates/schema_simple }} + {{else}} +{{> model_templates/var_equals_cls }} + {{/or}} + {{/or}} + {{#if nameInSnakeCase}} +locals()['{{baseName}}'] = {{name}} +del locals()['{{name}}'] + {{/if}} + {{/if}} +{{/unless}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars new file mode 100644 index 000000000000..18527e02effd --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars @@ -0,0 +1,67 @@ + + +class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}( +{{#if hasValidation}} + {{> model_templates/validations }} +{{/if}} +{{#if getIsAnyType}} + {{#if composedSchemas}} + ComposedSchema + {{else}} + AnyTypeSchema + {{/if}} +{{else}} + {{#if getHasMultipleTypes}} + _SchemaTypeChecker(typing.Union[{{#if isArray}}tuple, {{/if}}{{#if isMap}}frozendict, {{/if}}{{#if isNull}}none_type, {{/if}}{{#if isString}}str, {{/if}}{{#if isByteArray}}str, {{/if}}{{#if isUnboundedInteger}}Decimal, {{/if}}{{#if isShort}}Decimal, {{/if}}{{#if isLong}}Decimal, {{/if}}{{#if isFloat}}Decimal, {{/if}}{{#if isDouble}}Decimal, {{/if}}{{#if isNumber}}Decimal, {{/if}}{{#if isDate}}str, {{/if}}{{#if isDateTime}}str, {{/if}}{{#if isBoolean}}bool, {{/if}}]), + {{/if}} + {{#if composedSchemas}} + ComposedBase, + {{/if}} + {{#if isEnum}} + {{> model_templates/enum_value_to_name }} + {{/if}} + {{> model_templates/xbase_schema }} +{{/if}} +): +{{#if this.classname}} + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. +{{#if description}} + + {{{unescapedDescription}}} +{{/if}} + + Attributes: +{{#each vars}} + {{baseName}} ({{#if isArray}}tuple,{{/if}}{{#if isBoolean}}bool,{{/if}}{{#if isDate}}date,{{/if}}{{#if isDateTime}}datetime,{{/if}}{{#if isMap}}dict,{{/if}}{{#if isFloat}}float,{{/if}}{{#if isNumber}}float,{{/if}}{{#if isUnboundedInteger}}int,{{/if}}{{#if isShort}}int,{{/if}}{{#if isLong}}int,{{/if}}{{#if isString}}str,{{/if}}{{#if isByteArray}}str,{{/if}}{{#if isNull}} none_type,{{/if}}): {{#if description}}{{description}}{{/if}} +{{/each}} +{{#if hasValidation}} + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. +{{/if}} +{{#with additionalProperties}} + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties +{{/with}} +{{#if getHasDiscriminatorWithNonEmptyMapping}} + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class +{{/if}} + """ +{{/if}} +{{#or isMap isAnyType}} +{{> model_templates/dict_partial }} +{{/or}} +{{#if composedSchemas}} + + {{> model_templates/composed_schemas }} +{{/if}} +{{#if isEnum}} + {{> model_templates/enums }} +{{/if}} + + {{> model_templates/new }} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_dict.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_dict.handlebars new file mode 100644 index 000000000000..f811b092e506 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_dict.handlebars @@ -0,0 +1,42 @@ + + +class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}( +{{#if hasValidation}} + {{> model_templates/validations }} +{{/if}} + DictSchema +): +{{#if this.classname}} + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. +{{#if description}} + + {{{unescapedDescription}}} +{{/if}} + + Attributes: +{{#each vars}} + {{baseName}} ({{#if isArray}}tuple,{{/if}}{{#if isBoolean}}bool,{{/if}}{{#if isDate}}date,{{/if}}{{#if isDateTime}}datetime,{{/if}}{{#if isMap}}dict,{{/if}}{{#if isFloat}}float,{{/if}}{{#if isDouble}}float,{{/if}}{{#if isNumber}}int, float,{{/if}}{{#if isUnboundedInteger}}int,{{/if}}{{#if isShort}}int,{{/if}}{{#if isLong}}int,{{/if}}{{#if isString}}str,{{/if}}{{#if isByteArray}}str,{{/if}}{{#if isNull}} none_type,{{/if}}): {{#if description}}{{description}}{{/if}} +{{/each}} +{{#if hasValidation}} + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. +{{/if}} +{{#with additionalProperties}} + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties +{{/with}} +{{#if getHasDiscriminatorWithNonEmptyMapping}} + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class +{{/if}} + """ +{{/if}} +{{> model_templates/dict_partial }} + + + {{> model_templates/new }} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_list.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_list.handlebars new file mode 100644 index 000000000000..8617eeb0559e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_list.handlebars @@ -0,0 +1,39 @@ + + +class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}( +{{#if hasValidation}} + {{> model_templates/validations }} +{{/if}} + ListSchema +): +{{#if this.classname}} + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. +{{#if description}} + + {{{unescapedDescription}}} +{{/if}} + + Attributes: + _items (Schema): the schema definition of the array items +{{#if hasValidation}} + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. +{{/if}} + """ +{{/if}} +{{#with items}} +{{#if complexType}} + + @classmethod + @property + def _items(cls) -> typing.Type['{{complexType}}']: + return {{complexType}} +{{else}} + {{> model_templates/schema }} +{{/if}} +{{/with}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_simple.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_simple.handlebars new file mode 100644 index 000000000000..06ba2af1917a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_simple.handlebars @@ -0,0 +1,35 @@ + + +class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}( +{{#if hasValidation}} + {{> model_templates/validations }} +{{/if}} +{{#if isEnum}} + {{> model_templates/enum_value_to_name }} +{{/if}} + {{> model_templates/xbase_schema }} +): +{{#if this.classname}} + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. +{{#if description}} + + {{{unescapedDescription}}} +{{/if}} + + Attributes: +{{#if hasValidation}} + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. +{{/if}} + """ +{{/if}} +{{#if isEnum}} + {{> model_templates/enums }} +{{else}} + pass +{{/if}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/validations.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/validations.handlebars new file mode 100644 index 000000000000..2384ac063d24 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/validations.handlebars @@ -0,0 +1,50 @@ +_SchemaValidator( +{{#if getUniqueItems}} + unique_items=True, +{{/if}} +{{#if maxLength}} + max_length={{maxLength}}, +{{/if}} +{{#if minLength}} + min_length={{minLength}}, +{{/if}} +{{#if maxItems}} + max_items={{maxItems}}, +{{/if}} +{{#if minItems}} + min_items={{minItems}}, +{{/if}} +{{#if maxProperties}} + max_properties={{maxProperties}}, +{{/if}} +{{#if minProperties}} + min_properties={{minProperties}}, +{{/if}} +{{#if maximum}} + {{#if exclusiveMaximum}}exclusive_maximum{{/if}}inclusive_maximum{{#unless exclusiveMaximum}}{{/unless}}={{maximum}}, +{{/if}} +{{#if minimum}} + {{#if exclusiveMinimum}}exclusive_minimum{{/if}}inclusive_minimum{{#unless exclusiveMinimum}}{{/unless}}={{minimum}}, +{{/if}} +{{#if pattern}} + regex=[{ +{{#if vendorExtensions.x-regex}} + 'pattern': r'{{{vendorExtensions.x-regex}}}', # noqa: E501 +{{else}} + 'pattern': r'{{{pattern}}}', # noqa: E501 +{{/if}} +{{#each vendorExtensions.x-modifiers}} +{{#if @first}} + 'flags': ( +{{/if}} + {{#unless @first}}| {{/unless}}re.{{.}} +{{#if @last}} + ) +{{/if}} +{{/each}} + }], +{{/if}} +{{#if multipleOf}} + multiple_of=[{{multipleOf}}], +{{/if}} +), diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars new file mode 100644 index 000000000000..14b4c5e0648f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars @@ -0,0 +1 @@ +{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = {{#if complexType}}{{complexType}}{{else}}{{#if isNullable}}Nullable{{/if}}{{#if getIsNull}}None{{/if}}{{#if isAnyType}}AnyType{{/if}}{{#if isMap}}Dict{{/if}}{{#if isArray}}List{{/if}}{{#if isString}}Str{{/if}}{{#if isByteArray}}Str{{/if}}{{#if isUnboundedInteger}}Int{{/if}}{{#if isShort}}Int32{{/if}}{{#if isLong}}Int64{{/if}}{{#if isFloat}}Float32{{/if}}{{#if isDouble}}Float64{{/if}}{{#if isNumber}}Number{{/if}}{{#if isDate}}Date{{/if}}{{#if isDateTime}}DateTime{{/if}}{{#if isBoolean}}Bool{{/if}}{{#if isBinary}}Binary{{/if}}Schema{{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars new file mode 100644 index 000000000000..0b345344c432 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars @@ -0,0 +1,48 @@ +{{#if isArray}} +List{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isMap}} +Dict{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isString}} +Str{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isByteArray}} +Str{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isUnboundedInteger}} +Int{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isNumber}} +Number{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#isShort}} +Int32{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/isShort}} +{{#isLong}} +Int64{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/isLong}} +{{#isFloat}} +Float32{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/isFloat}} +{{#isDouble}} +Float64{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/isDouble}} +{{#if isDate}} +Date{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isDateTime}} +DateTime{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isBoolean}} +Bool{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isBinary}} +Binary{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if isNull}} +None{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} +{{#if getHasMultipleTypes}} +Schema +{{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars new file mode 100644 index 000000000000..094d7f49b65d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars @@ -0,0 +1,33 @@ +# coding: utf-8 + +{{>partial_header}} + +import sys +import unittest + +import {{packageName}} +{{#each models}} +{{#with model}} +from {{modelPackage}}.{{classFilename}} import {{classname}} + + +class Test{{classname}}(unittest.TestCase): + """{{classname}} unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_{{classname}}(self): + """Test {{classname}}""" + # FIXME: construct object with mandatory attributes with example values + # model = {{classname}}() # noqa: E501 + pass + +{{/with}} +{{/each}} + +if __name__ == '__main__': + unittest.main() diff --git a/modules/openapi-generator/src/main/resources/python-experimental/partial_header.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/partial_header.handlebars new file mode 100644 index 000000000000..19b633be2579 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/partial_header.handlebars @@ -0,0 +1,17 @@ +""" +{{#if appName}} + {{{appName}}} +{{/if}} + +{{#if appDescription}} + {{{appDescription}}} # noqa: E501 +{{/if}} + + {{#if version}} + The version of the OpenAPI document: {{{version}}} + {{/if}} + {{#if infoEmail}} + Contact: {{{infoEmail}}} + {{/if}} + Generated by: https://openapi-generator.tech +""" diff --git a/modules/openapi-generator/src/main/resources/python-experimental/requirements.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/requirements.handlebars new file mode 100644 index 000000000000..c9227e58a1be --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/requirements.handlebars @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +frozendict >= 2.0.3 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/modules/openapi-generator/src/main/resources/python-experimental/rest.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/rest.handlebars new file mode 100644 index 000000000000..e30831938f15 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/rest.handlebars @@ -0,0 +1,251 @@ +# coding: utf-8 + +{{>partial_header}} + +import logging +import ssl +from urllib.parse import urlencode +import typing + +import certifi +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from {{packageName}}.exceptions import ApiException, ApiValueError + + +logger = logging.getLogger(__name__) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request( + self, + method: str, + url: str, + query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if fields and body: + raise ApiValueError( + "body parameter cannot be used with fields parameter." + ) + + fields = fields or {} + headers = headers or {} + + if timeout: + if isinstance(timeout, (int, float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=False, + preload_content=not stream, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=True, + preload_content=not stream, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=not stream, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=not stream, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if not stream: + # log response body + logger.debug("response body: %s", r.data) + + return r + + def GET(self, url, headers=None, query_params=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + query_params=query_params, fields=fields) + + def HEAD(self, url, headers=None, query_params=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + query_params=query_params, fields=fields) + + def OPTIONS(self, url, headers=None, query_params=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def DELETE(self, url, headers=None, query_params=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def POST(self, url, headers=None, query_params=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PUT(self, url, headers=None, query_params=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PATCH(self, url, headers=None, query_params=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars new file mode 100644 index 000000000000..556d2cbb5f95 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/schema_doc.handlebars @@ -0,0 +1,32 @@ + +{{#if description}} +{{&description}} + +{{/if}} +{{#or vars additionalProperties}} +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + {{#each vars}} +**{{baseName}}** | {{#unless complexType}}**{{dataType}}**{{/unless}}{{#if complexType}}[**{{dataType}}**]({{complexType}}.md){{/if}} | {{description}} | {{#unless required}}[optional] {{/unless}}{{#if isReadOnly}}[readonly] {{/if}}{{#if defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/if}} + {{/each}} + {{#with additionalProperties}} +**any string name** | **{{dataType}}** | any string name can be used but the value must be the correct type | [optional] + {{/with}} +{{else}} +Type | Description | Notes +------------- | ------------- | ------------- + {{#if isAnyType}} +typing.Union[dict, frozendict, str, date, datetime, int, float, bool, Decimal, None, list, tuple, bytes] | | + {{else}} + {{#if hasMultipleTypes}} +typing.Union[{{#if isMap}}dict, frozendict, {{/if}}{{#if isString}}str, {{/if}}{{#if isDate}}date, {{/if}}{{#if isDataTime}}datetime, {{/if}}{{#or isLong isShort isUnboundedInteger}}int, {{/or}}{{#or isFloat isDouble}}float, {{/or}}{{#if isNumber}}Decimal, {{/if}}{{#if isBoolean}}bool, {{/if}}{{#if isNull}}None, {{/if}}{{#if isArray}}list, tuple, {{/if}}{{#if isBinary}}bytes{{/if}}] | | {{#with allowableValues}}{{#if defaultValue}}, {{/if}} must be one of [{{#each enumVars}}{{{value}}}, {{/each}}]{{/with}} + {{else}} + {{#if isArray}} +{{#unless arrayModelType}}**{{dataType}}**{{/unless}}{{#if arrayModelType}}[**{{dataType}}**]({{arrayModelType}}.md){{/if}} | {{description}} | {{#if defaultValue}}{{#if hasRequired}} if omitted the server will use the default value of {{/if}}{{#unless hasRequired}}defaults to {{/unless}}{{{defaultValue}}}{{/if}} + {{else}} +{{#unless arrayModelType}}**{{dataType}}**{{/unless}} | {{description}} | {{#if defaultValue}}{{#if hasRequired}} if omitted the server will use the default value of {{/if}}{{#unless hasRequired}}defaults to {{/unless}}{{{defaultValue}}}{{/if}}{{#with allowableValues}}{{#if defaultValue}}, {{/if}} must be one of [{{#each enumVars}}{{{value}}}, {{/each}}]{{/with}} + {{/if}} + {{/if}} + {{/if}} +{{/or}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars new file mode 100644 index 000000000000..b238468f73a0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars @@ -0,0 +1,1987 @@ +# coding: utf-8 + +{{>partial_header}} + +from collections import defaultdict +from datetime import date, datetime, timedelta # noqa: F401 +from dataclasses import dataclass +import functools +from decimal import Decimal +import io +import os +import re +import tempfile +import typing + +from dateutil.parser.isoparser import isoparser, _takes_ascii +from frozendict import frozendict + +from {{packageName}}.exceptions import ( + ApiTypeError, + ApiValueError, +) +from {{packageName}}.configuration import ( + Configuration, +) + + +class Unset(object): + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset = Unset() + +none_type = type(None) +file_type = io.IOBase + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + 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') + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is defaultdict(set) + """ + for k, v in u.items(): + d[k] = d[k].union(v) + return d + + +class InstantiationMetadata: + """ + A class to store metadata that is needed when instantiating OpenApi Schema subclasses + """ + def __init__( + self, + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), + from_server: bool = False, + configuration: typing.Optional[Configuration] = None, + base_classes: typing.FrozenSet[typing.Type] = frozenset(), + path_to_schemas: typing.Optional[typing.Dict[str, typing.Set[typing.Type]]] = None, + ): + """ + Args: + path_to_item: the path to the current data being instantiated. + For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) + from_server: whether or not this data came form the server + True when receiving server data + False when instantiating model with client side data not form the server + configuration: the Configuration instance to use + This is needed because in Configuration: + - one can disable validation checking + base_classes: when deserializing data that matches multiple schemas, this is used to store + the schemas that have been traversed. This is used to stop processing when a cycle is seen. + path_to_schemas: a dict that goes from path to a list of classes at each path location + """ + self.path_to_item = path_to_item + self.from_server = from_server + self.configuration = configuration + self.base_classes = base_classes + if path_to_schemas is None: + path_to_schemas = defaultdict(set) + self.path_to_schemas = path_to_schemas + + def __repr__(self): + return str(self.__dict__) + + def __eq__(self, other): + if not isinstance(other, InstantiationMetadata): + return False + return self.__dict__ == other.__dict__ + + +class ValidatorBase: + @staticmethod + def __is_json_validation_enabled(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + @staticmethod + def __raise_validation_error_message(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, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + @classmethod + def __check_str_validations(cls, + validations, input_values, + _instantiation_metadata: InstantiationMetadata): + + if (cls.__is_json_validation_enabled('maxLength', _instantiation_metadata.configuration) and + 'max_length' in validations and + len(input_values) > validations['max_length']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="length must be less than or equal to", + constraint_value=validations['max_length'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('minLength', _instantiation_metadata.configuration) and + 'min_length' in validations and + len(input_values) < validations['min_length']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="length must be greater than or equal to", + constraint_value=validations['min_length'], + path_to_item=_instantiation_metadata.path_to_item + ) + + checked_value = input_values + if (cls.__is_json_validation_enabled('pattern', _instantiation_metadata.configuration) and + 'regex' in validations): + for regex_dict in validations['regex']: + flags = regex_dict.get('flags', 0) + if not re.search(regex_dict['pattern'], checked_value, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must match regular expression", + constraint_value=regex_dict['pattern'], + path_to_item=_instantiation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must match regular expression", + constraint_value=regex_dict['pattern'], + path_to_item=_instantiation_metadata.path_to_item + ) + + @classmethod + def __check_tuple_validations( + cls, validations, input_values, + _instantiation_metadata: InstantiationMetadata): + + if (cls.__is_json_validation_enabled('maxItems', _instantiation_metadata.configuration) and + 'max_items' in validations and + len(input_values) > validations['max_items']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="number of items must be less than or equal to", + constraint_value=validations['max_items'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('minItems', _instantiation_metadata.configuration) and + 'min_items' in validations and + len(input_values) < validations['min_items']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="number of items must be greater than or equal to", + constraint_value=validations['min_items'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('uniqueItems', _instantiation_metadata.configuration) and + 'unique_items' in validations and validations['unique_items'] and input_values): + unique_items = [] + # print(validations) + for item in input_values: + if item not in unique_items: + unique_items.append(item) + if len(input_values) > len(unique_items): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=_instantiation_metadata.path_to_item + ) + + @classmethod + def __check_dict_validations( + cls, validations, input_values, + _instantiation_metadata: InstantiationMetadata): + + if (cls.__is_json_validation_enabled('maxProperties', _instantiation_metadata.configuration) and + 'max_properties' in validations and + len(input_values) > validations['max_properties']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="number of properties must be less than or equal to", + constraint_value=validations['max_properties'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('minProperties', _instantiation_metadata.configuration) and + 'min_properties' in validations and + len(input_values) < validations['min_properties']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=validations['min_properties'], + path_to_item=_instantiation_metadata.path_to_item + ) + + @classmethod + def __check_numeric_validations( + cls, validations, input_values, + _instantiation_metadata: InstantiationMetadata): + + if cls.__is_json_validation_enabled('multipleOf', + _instantiation_metadata.configuration) and 'multiple_of' in validations: + multiple_of_values = validations['multiple_of'] + for multiple_of_value in multiple_of_values: + if (isinstance(input_values, Decimal) and + not (float(input_values) / multiple_of_value).is_integer() + ): + # Note 'multipleOf' will be as good as the floating point arithmetic. + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of_value, + path_to_item=_instantiation_metadata.path_to_item + ) + + checking_max_or_min_values = {'exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum'}.isdisjoint(validations) is False + if not checking_max_or_min_values: + return + max_val = input_values + min_val = input_values + + if (cls.__is_json_validation_enabled('exclusiveMaximum', _instantiation_metadata.configuration) and + 'exclusive_maximum' in validations and + max_val >= validations['exclusive_maximum']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must be a value less than", + constraint_value=validations['exclusive_maximum'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('maximum', _instantiation_metadata.configuration) and + 'inclusive_maximum' in validations and + max_val > validations['inclusive_maximum']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must be a value less than or equal to", + constraint_value=validations['inclusive_maximum'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('exclusiveMinimum', _instantiation_metadata.configuration) and + 'exclusive_minimum' in validations and + min_val <= validations['exclusive_minimum']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must be a value greater than", + constraint_value=validations['exclusive_maximum'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('minimum', _instantiation_metadata.configuration) and + 'inclusive_minimum' in validations and + min_val < validations['inclusive_minimum']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must be a value greater than or equal to", + constraint_value=validations['inclusive_minimum'], + path_to_item=_instantiation_metadata.path_to_item + ) + + @classmethod + def _check_validations_for_types( + cls, + validations, + input_values, + _instantiation_metadata: InstantiationMetadata + ): + if isinstance(input_values, str): + cls.__check_str_validations(validations, input_values, _instantiation_metadata) + elif isinstance(input_values, tuple): + cls.__check_tuple_validations(validations, input_values, _instantiation_metadata) + elif isinstance(input_values, frozendict): + cls.__check_dict_validations(validations, input_values, _instantiation_metadata) + elif isinstance(input_values, Decimal): + cls.__check_numeric_validations(validations, input_values, _instantiation_metadata) + try: + return super()._validate_validations_pass(input_values, _instantiation_metadata) + except AttributeError: + return True + + +class Validator(typing.Protocol): + def _validate_validations_pass( + cls, + input_values, + _instantiation_metadata: InstantiationMetadata + ): + pass + + +def _SchemaValidator(**validations: typing.Union[str, bool, None, int, float, list[dict[str, typing.Union[str, int, float]]]]) -> Validator: + class SchemaValidator(ValidatorBase): + @classmethod + def _validate_validations_pass( + cls, + input_values, + _instantiation_metadata: InstantiationMetadata + ): + cls._check_validations_for_types(validations, input_values, _instantiation_metadata) + try: + return super()._validate_validations_pass(input_values, _instantiation_metadata) + except AttributeError: + return True + + return SchemaValidator + + +class TypeChecker(typing.Protocol): + @classmethod + def _validate_type( + cls, arg_simple_class: type + ) -> typing.Tuple[type]: + pass + + +def _SchemaTypeChecker(union_type_cls: typing.Union[typing.Any]) -> TypeChecker: + if typing.get_origin(union_type_cls) is typing.Union: + union_classes = typing.get_args(union_type_cls) + else: + # note: when a union of a single class is passed in, the union disappears + union_classes = tuple([union_type_cls]) + """ + I want the type hint... union_type_cls + and to use it as a base class but when I do, I get + TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases + """ + class SchemaTypeChecker: + @classmethod + def _validate_type(cls, arg_simple_class: type): + if arg_simple_class not in union_classes: + return union_classes + try: + return super()._validate_type(arg_simple_class) + except AttributeError: + return tuple() + + return SchemaTypeChecker + + +class EnumMakerBase: + @classmethod + @property + def _enum_by_value( + cls + ) -> type: + enum_classes = {} + if not hasattr(cls, "_enum_value_to_name"): + return enum_classes + for enum_value, enum_name in cls._enum_value_to_name.items(): + base_class = type(enum_value) + if base_class is none_type: + enum_classes[enum_value] = get_new_class( + "Dynamic" + cls.__name__, (cls, NoneClass)) + log_cache_usage(get_new_class) + elif base_class is bool: + enum_classes[enum_value] = get_new_class( + "Dynamic" + cls.__name__, (cls, BoolClass)) + log_cache_usage(get_new_class) + else: + enum_classes[enum_value] = get_new_class( + "Dynamic" + cls.__name__, (cls, Singleton, base_class)) + log_cache_usage(get_new_class) + return enum_classes + + +class EnumMakerInterface(typing.Protocol): + @classmethod + @property + def _enum_value_to_name( + cls + ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]: + pass + + @classmethod + @property + def _enum_by_value( + cls + ) -> type: + pass + + +def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, Decimal, bool, none_type], str]) -> EnumMakerInterface: + class SchemaEnumMaker(EnumMakerBase): + @classmethod + @property + def _enum_value_to_name( + cls + ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]: + pass + try: + super_enum_value_to_name = super()._enum_value_to_name + except AttributeError: + return enum_value_to_name + intersection = dict(enum_value_to_name.items() & super_enum_value_to_name.items()) + return intersection + + return SchemaEnumMaker + + +class Singleton: + """ + Enums and singletons are the same + The same instance is returned for a given key of (cls, arg) + """ + # TODO use bidict to store this so boolean enums can move through it in reverse to get their own arg value? + _instances = {} + + def __new__(cls, *args, **kwargs): + if not args: + raise ValueError('arg must be passed') + arg = args[0] + key = (cls, arg) + if key not in cls._instances: + if arg in {None, True, False}: + inst = super().__new__(cls) + # inst._value = arg + cls._instances[key] = inst + else: + cls._instances[key] = super().__new__(cls, arg) + return cls._instances[key] + + def __repr__(self): + return '({}, {})'.format(self.__class__.__name__, self) + + +class NoneClass(Singleton): + @classmethod + @property + def NONE(cls): + return cls(None) + + def is_none(self) -> bool: + return True + + def __bool__(self) -> bool: + return False + + +class BoolClass(Singleton): + @classmethod + @property + def TRUE(cls): + return cls(True) + + @classmethod + @property + def FALSE(cls): + return cls(False) + + @functools.cache + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return key[1] + raise ValueError('Unable to find the boolean value of this instance') + + def is_true(self): + return bool(self) + + def is_false(self): + return bool(self) + + +class BoolBase: + pass + + +class NoneBase: + pass + + +class StrBase: + @property + def as_str(self) -> str: + return self + + @property + def as_date(self) -> date: + raise Exception('not implemented') + + @property + def as_datetime(self) -> datetime: + raise Exception('not implemented') + + +class CustomIsoparser(isoparser): + + @_takes_ascii + def parse_isodatetime(self, dt_str): + components, pos = self._parse_isodate(dt_str) + if len(dt_str) > pos: + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + components += self._parse_isotime(dt_str[pos + 1:]) + else: + raise ValueError('String contains unknown ISO components') + + if len(components) > 3 and components[3] == 24: + components[3] = 0 + return datetime(*components) + timedelta(days=1) + + if len(components) <= 3: + raise ValueError('Value is not a datetime') + + return datetime(*components) + + @_takes_ascii + def parse_isodate(self, datestr): + components, pos = self._parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return date(*components) + + +DEFAULT_ISOPARSER = CustomIsoparser() + + +class DateBase(StrBase): + @property + @functools.cache + def as_date(self) -> date: + return DEFAULT_ISOPARSER.parse_isodate(self) + + @classmethod + def _validate_format(cls, arg: typing.Optional[str], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, str): + try: + DEFAULT_ISOPARSER.parse_isodate(arg) + return True + except ValueError: + raise ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DateBase _validate + """ + cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata) + return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + +class DateTimeBase: + @property + @functools.cache + def as_datetime(self) -> datetime: + return DEFAULT_ISOPARSER.parse_isodatetime(self) + + @classmethod + def _validate_format(cls, arg: typing.Optional[str], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, str): + try: + DEFAULT_ISOPARSER.parse_isodatetime(arg) + return True + except ValueError: + raise ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DateTimeBase _validate + """ + cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata) + return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + +class NumberBase: + @property + def as_int(self) -> int: + try: + return self._as_int + except AttributeError: + """ + Note: for some numbers like 9.0 they could be represented as an + integer but our code chooses to store them as + >>> Decimal('9.0').as_tuple() + DecimalTuple(sign=0, digits=(9, 0), exponent=-1) + so we can tell that the value came from a float and convert it back to a float + during later serialization + """ + if self.as_tuple().exponent < 0: + # this could be represented as an integer but should be represented as a float + # because that's what it was serialized from + raise ApiValueError(f'{self} is not an integer') + self._as_int = int(self) + return self._as_int + + @property + def as_float(self) -> float: + try: + return self._as_float + except AttributeError: + if self.as_tuple().exponent >= 0: + raise ApiValueError(f'{self} is not an float') + self._as_float = float(self) + return self._as_float + + +class ListBase: + @classmethod + def _validate_items(cls, list_items, _instantiation_metadata: InstantiationMetadata): + """ + Ensures that: + - values passed in for items are valid + Exceptions will be raised if: + - invalid arguments were passed in + + Args: + list_items: the input list of items + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + + # if we have definitions for an items schema, use it + # otherwise accept anything + item_cls = getattr(cls, '_items', AnyTypeSchema) + path_to_schemas = defaultdict(set) + for i, value in enumerate(list_items): + if isinstance(value, item_cls): + continue + item_instantiation_metadata = InstantiationMetadata( + from_server=_instantiation_metadata.from_server, + configuration=_instantiation_metadata.configuration, + path_to_item=_instantiation_metadata.path_to_item+(i,) + ) + other_path_to_schemas = item_cls._validate( + value, _instantiation_metadata=item_instantiation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + ListBase _validate + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + arg = args[0] + _path_to_schemas = super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + if not isinstance(arg, tuple): + return _path_to_schemas + if cls in _instantiation_metadata.base_classes: + # we have already moved through this class so stop here + return _path_to_schemas + _instantiation_metadata.base_classes |= frozenset({cls}) + other_path_to_schemas = cls._validate_items(arg, _instantiation_metadata=_instantiation_metadata) + update(_path_to_schemas, other_path_to_schemas) + return _path_to_schemas + + @classmethod + def _get_items(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + ''' + ListBase _get_items + ''' + _instantiation_metadata = InstantiationMetadata() if _instantiation_metadata is None else _instantiation_metadata + + list_items = args[0] + cast_items = [] + # if we have definitions for an items schema, use it + # otherwise accept anything + + cls_item_cls = getattr(cls, '_items', AnyTypeSchema) + for i, value in enumerate(list_items): + item_path_to_item = _instantiation_metadata.path_to_item+(i,) + if item_path_to_item in _instantiation_metadata.path_to_schemas: + item_cls = _instantiation_metadata.path_to_schemas[item_path_to_item] + else: + item_cls = cls_item_cls + + if isinstance(value, item_cls): + cast_items.append(value) + continue + item_instantiation_metadata = InstantiationMetadata( + configuration=_instantiation_metadata.configuration, + from_server=_instantiation_metadata.from_server, + path_to_item=item_path_to_item, + path_to_schemas=_instantiation_metadata.path_to_schemas, + ) + + if _instantiation_metadata.from_server: + new_value = item_cls._from_openapi_data(value, _instantiation_metadata=item_instantiation_metadata) + else: + new_value = item_cls(value, _instantiation_metadata=item_instantiation_metadata) + cast_items.append(new_value) + + return cast_items + + +class Discriminable: + @classmethod + def _ensure_discriminator_value_present(cls, disc_property_name: str, _instantiation_metadata: InstantiationMetadata, *args): + if not args or args and disc_property_name not in args[0]: + # The input data does not contain the discriminator property + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + if not hasattr(cls, '_discriminator'): + return None + disc = cls._discriminator + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + elif not hasattr(cls, '_composed_schemas'): + return None + # TODO stop traveling if a cycle is hit + for allof_cls in cls._composed_schemas['allOf']: + discriminated_cls = allof_cls._get_discriminated_class( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + for oneof_cls in cls._composed_schemas['oneOf']: + discriminated_cls = oneof_cls._get_discriminated_class( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + for anyof_cls in cls._composed_schemas['anyOf']: + discriminated_cls = anyof_cls._get_discriminated_class( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + + +class DictBase(Discriminable): + # subclass properties + _required_property_names = set() + + @classmethod + def _validate_arg_presence(cls, arg): + """ + Ensures that: + - all required arguments are passed in + - the input variable names are valid + - present in properties or + - accepted because additionalProperties exists + Exceptions will be raised if: + - invalid arguments were passed in + - a var_name is invalid if additionProperties == None and var_name not in _properties + - required properties were not passed in + + Args: + arg: the input dict + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + seen_required_properties = set() + invalid_arguments = [] + for property_name in arg: + if property_name in cls._required_property_names: + seen_required_properties.add(property_name) + elif property_name in cls._property_names: + continue + elif cls._additional_properties: + continue + else: + invalid_arguments.append(property_name) + missing_required_arguments = list(cls._required_property_names - seen_required_properties) + if missing_required_arguments: + missing_required_arguments.sort() + raise ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + if invalid_arguments: + invalid_arguments.sort() + raise ApiTypeError( + "{} was passed {} invalid argument{}: {}".format( + cls.__name__, + len(invalid_arguments), + "s" if len(invalid_arguments) > 1 else "", + invalid_arguments + ) + ) + + @classmethod + def _validate_args(cls, arg, _instantiation_metadata: InstantiationMetadata): + """ + Ensures that: + - values passed in for properties are valid + Exceptions will be raised if: + - invalid arguments were passed in + + Args: + arg: the input dict + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + path_to_schemas = defaultdict(set) + for property_name, value in arg.items(): + if property_name in cls._required_property_names or property_name in cls._property_names: + schema = getattr(cls, property_name) + elif cls._additional_properties: + schema = cls._additional_properties + else: + raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( + value, cls, _instantiation_metadata.path_to_item+(property_name,) + )) + if isinstance(value, schema): + continue + arg_instantiation_metadata = InstantiationMetadata( + from_server=_instantiation_metadata.from_server, + configuration=_instantiation_metadata.configuration, + path_to_item=_instantiation_metadata.path_to_item+(property_name,) + ) + other_path_to_schemas = schema._validate(value, _instantiation_metadata=arg_instantiation_metadata) + update(path_to_schemas, other_path_to_schemas) + _instantiation_metadata.path_to_schemas.update(arg_instantiation_metadata.path_to_schemas) + return path_to_schemas + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DictBase _validate + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + if args and isinstance(args[0], cls): + # an instance of the correct type was passed in + return {} + arg = args[0] + _path_to_schemas = super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + if not isinstance(arg, frozendict): + return _path_to_schemas + cls._validate_arg_presence(args[0]) + other_path_to_schemas = cls._validate_args(args[0], _instantiation_metadata=_instantiation_metadata) + update(_path_to_schemas, other_path_to_schemas) + try: + _discriminator = cls._discriminator + except AttributeError: + return _path_to_schemas + # discriminator exists + disc_prop_name = list(_discriminator.keys())[0] + cls._ensure_discriminator_value_present(disc_prop_name, _instantiation_metadata, *args) + discriminated_cls = cls._get_discriminated_class( + disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) + if discriminated_cls is None: + raise ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(_discriminator[disc_prop_name].keys()), + _instantiation_metadata.path_to_item + (disc_prop_name,) + ) + ) + if discriminated_cls in _instantiation_metadata.base_classes: + # we have already moved through this class so stop here + return _path_to_schemas + _instantiation_metadata.base_classes |= frozenset({cls}) + other_path_to_schemas = discriminated_cls._validate(*args, _instantiation_metadata=_instantiation_metadata) + update(_path_to_schemas, other_path_to_schemas) + return _path_to_schemas + + @classmethod + @property + def _additional_properties(cls): + return AnyTypeSchema + + @classmethod + @property + @functools.cache + def _property_names(cls): + property_names = set() + for var_name, var_value in cls.__dict__.items(): + # referenced models are classmethods + is_classmethod = type(var_value) is classmethod + if is_classmethod: + property_names.add(var_name) + continue + is_class = type(var_value) is type + if not is_class: + continue + if not issubclass(var_value, Schema): + continue + if var_name == '_additional_properties': + continue + property_names.add(var_name) + property_names = list(property_names) + property_names.sort() + return tuple(property_names) + + @classmethod + def _get_properties(cls, arg: typing.Dict[str, typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DictBase _get_properties, this is how properties are set + These values already passed validation + """ + dict_items = {} + # if we have definitions for property schemas convert values using it + # otherwise accept anything + + _instantiation_metadata = InstantiationMetadata() if _instantiation_metadata is None else _instantiation_metadata + + for property_name_js, value in arg.items(): + property_cls = getattr(cls, property_name_js, cls._additional_properties) + property_path_to_item = _instantiation_metadata.path_to_item+(property_name_js,) + stored_property_cls = _instantiation_metadata.path_to_schemas.get(property_path_to_item) + if stored_property_cls: + property_cls = stored_property_cls + + if isinstance(value, property_cls): + dict_items[property_name_js] = value + continue + + prop_instantiation_metadata = InstantiationMetadata( + configuration=_instantiation_metadata.configuration, + from_server=_instantiation_metadata.from_server, + path_to_item=property_path_to_item, + path_to_schemas=_instantiation_metadata.path_to_schemas, + ) + if _instantiation_metadata.from_server: + new_value = property_cls._from_openapi_data(value, _instantiation_metadata=prop_instantiation_metadata) + else: + new_value = property_cls(value, _instantiation_metadata=prop_instantiation_metadata) + dict_items[property_name_js] = new_value + return dict_items + + def __setattr__(self, name, value): + if not isinstance(self, FileIO): + raise AttributeError('property setting not supported on immutable instances') + + def __getattr__(self, name): + if isinstance(self, frozendict): + # if an attribute does not exist + try: + return self[name] + except KeyError as ex: + raise AttributeError(str(ex)) + # print(('non-frozendict __getattr__', name)) + return super().__getattr__(self, name) + + def __getattribute__(self, name): + # print(('__getattribute__', name)) + # if an attribute does exist (for example as a class property but not as an instance method) + try: + return self[name] + except (KeyError, TypeError): + return super().__getattribute__(name) + + +inheritable_primitive_types_set = {Decimal, str, tuple, frozendict, FileIO, bytes} + + +class Schema: + """ + the base class of all swagger/openapi schemas/models + + ensures that: + - payload passes required validations + - payload is of allowed types + - payload value is an allowed enum value + """ + + @staticmethod + def __get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, frozendict): + return frozendict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, bytes): + return bytes + elif isinstance(input_value, (io.FileIO, io.BufferedReader)): + return FileIO + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + return int + elif isinstance(input_value, float): + return float + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif isinstance(input_value, str): + return str + return type(input_value) + + @staticmethod + def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + @classmethod + def __type_error_message( + cls, var_value=None, var_name=None, valid_classes=None, key_type=None + ): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + @classmethod + def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): + error_msg = cls.__type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + @classmethod + def _class_by_base_class(cls, base_cls: type) -> type: + cls_name = "Dynamic"+cls.__name__ + if base_cls is bool: + new_cls = get_new_class(cls_name, (cls, BoolBase, BoolClass)) + elif base_cls is str: + new_cls = get_new_class(cls_name, (cls, StrBase, str)) + elif base_cls is Decimal: + new_cls = get_new_class(cls_name, (cls, NumberBase, Decimal)) + elif base_cls is tuple: + new_cls = get_new_class(cls_name, (cls, ListBase, tuple)) + elif base_cls is frozendict: + new_cls = get_new_class(cls_name, (cls, DictBase, frozendict)) + elif base_cls is none_type: + new_cls = get_new_class(cls_name, (cls, NoneBase, NoneClass)) + log_cache_usage(get_new_class) + return new_cls + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + Schema _validate + Runs all schema validation logic and + returns a dynamic class of different bases depending upon the input + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Use cases: + 1. inheritable type: string/Decimal/frozendict/tuple + 2. enum value cases: 'hi', 1 -> no base_class set because the enum includes the base class + 3. uninheritable type: True/False/None -> no base_class because the base class is not inheritable + _enum_by_value will handle this use case + + Required Steps: + 1. verify type of input is valid vs the allowed _types + 2. check validations that are applicable for this type of input + 3. if enums exist, check that the value exists in the enum + + Returns: + path_to_schemas: a map of path to schemas + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + arg = args[0] + + base_class = cls.__get_simple_class(arg) + failed_type_check_classes = cls._validate_type(base_class) + if failed_type_check_classes: + raise cls.__get_type_error( + arg, + _instantiation_metadata.path_to_item, + failed_type_check_classes, + key_type=False, + ) + if hasattr(cls, '_validate_validations_pass'): + cls._validate_validations_pass(arg, _instantiation_metadata) + path_to_schemas = defaultdict(set) + path_to_schemas[_instantiation_metadata.path_to_item].add(cls) + + if hasattr(cls, "_enum_by_value"): + cls._validate_enum_value(arg) + return path_to_schemas + + if base_class is none_type or base_class is bool: + return path_to_schemas + + path_to_schemas[_instantiation_metadata.path_to_item].add(base_class) + return path_to_schemas + + @classmethod + def _validate_enum_value(cls, arg): + try: + cls._enum_by_value[arg] + except KeyError: + raise ApiValueError("Invalid value {} passed in to {}, {}".format(arg, cls, cls._enum_value_to_name)) + + @classmethod + def __get_new_cls(cls, arg, _instantiation_metadata: InstantiationMetadata): + """ + PATH 1 - make a new dynamic class and return an instance of that class + We are making an instance of cls, but instead of making cls + make a new class, new_cls + which includes dynamic bases including cls + return an instance of that new class + """ + if ( + _instantiation_metadata.path_to_schemas and + _instantiation_metadata.path_to_item in _instantiation_metadata.path_to_schemas): + chosen_new_cls = _instantiation_metadata.path_to_schemas[_instantiation_metadata.path_to_item] + # print('leaving __get_new_cls early for cls {} because path_to_schemas exists'.format(cls)) + # print(_instantiation_metadata.path_to_item) + # print(chosen_new_cls) + return chosen_new_cls + """ + Dict property + List Item Assignment Use cases: + 1. value is NOT an instance of the required schema class + the value is validated by _validate + _validate 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 + the value is NOT validated by _validate, _validate only checks that the instance is of the correct schema type + for this value, _validate does NOT return an entry for it in _path_to_schemas + and in list/dict _get_items,_get_properties the value will be directly assigned + because value is of the correct type, and validation was run earlier when the instance was created + """ + _path_to_schemas = cls._validate(arg, _instantiation_metadata=_instantiation_metadata) + from pprint import pprint + pprint(dict(_path_to_schemas)) + # loop through it make a new class for each entry + for path, schema_classes in _path_to_schemas.items(): + enum_schema = any( + hasattr(this_cls, '_enum_by_value') for this_cls in schema_classes) + inheritable_primitive_type = schema_classes.intersection(inheritable_primitive_types_set) + chosen_schema_classes = schema_classes + suffix = tuple() + if inheritable_primitive_type: + chosen_schema_classes = schema_classes - inheritable_primitive_types_set + if not enum_schema: + # include the inheritable_primitive_type + suffix = tuple(inheritable_primitive_type) + + if len(chosen_schema_classes) == 1 and not suffix: + mfg_cls = tuple(chosen_schema_classes)[0] + else: + x_schema = schema_descendents & chosen_schema_classes + if x_schema: + x_schema = x_schema.pop() + if any(c is not x_schema and issubclass(c, x_schema) for c in chosen_schema_classes): + # needed to not have a mro error in get_new_class + chosen_schema_classes.remove(x_schema) + used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix + mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) + + if inheritable_primitive_type and not enum_schema: + _instantiation_metadata.path_to_schemas[path] = mfg_cls + continue + + # Use case: value is None, True, False, or an enum value + # print('choosing enum class for path {} in arg {}'.format(path, arg)) + value = arg + for key in path[1:]: + value = value[key] + if hasattr(mfg_cls, '_enum_by_value'): + mfg_cls = mfg_cls._enum_by_value[value] + elif value in {True, False}: + mfg_cls = mfg_cls._class_by_base_class(bool) + elif value is None: + mfg_cls = mfg_cls._class_by_base_class(none_type) + else: + raise ApiValueError('Unhandled case value={} bases={}'.format(value, mfg_cls.__bases__)) + _instantiation_metadata.path_to_schemas[path] = mfg_cls + + return _instantiation_metadata.path_to_schemas[_instantiation_metadata.path_to_item] + + @classmethod + def __get_new_instance_without_conversion(cls, arg, _instantiation_metadata): + # PATH 2 - we have a Dynamic class and we are making an instance of it + if issubclass(cls, tuple): + items = cls._get_items(arg, _instantiation_metadata=_instantiation_metadata) + return super(Schema, cls).__new__(cls, items) + elif issubclass(cls, frozendict): + properties = cls._get_properties(arg, _instantiation_metadata=_instantiation_metadata) + return super(Schema, cls).__new__(cls, properties) + """ + str = openapi str, date, and datetime + Decimal = openapi int and float + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return super(Schema, cls).__new__(cls, arg) + + @classmethod + def _from_openapi_data( + cls, + arg: typing.Union[ + str, + date, + datetime, + int, + float, + Decimal, + bool, + None, + 'Schema', + dict, + frozendict, + tuple, + list, + io.FileIO, + io.BufferedReader, + bytes + ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] + ): + arg = cast_to_allowed_types(arg, from_server=True) + _instantiation_metadata = InstantiationMetadata(from_server=True) if _instantiation_metadata is None else _instantiation_metadata + if not _instantiation_metadata.from_server: + raise ApiValueError( + 'from_server must be True in this code path, if you need it to be False, use cls()' + ) + new_cls = cls.__get_new_cls(arg, _instantiation_metadata) + new_inst = new_cls.__get_new_instance_without_conversion(arg, _instantiation_metadata) + return new_inst + + @staticmethod + def __get_input_dict(*args, **kwargs) -> frozendict: + input_dict = {} + if args and isinstance(args[0], (dict, frozendict)): + input_dict.update(args[0]) + if kwargs: + input_dict.update(kwargs) + return frozendict(input_dict) + + @staticmethod + 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, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + """ + Schema __new__ + + Args: + args (int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): the value + kwargs (str, int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): dict values + _instantiation_metadata: contains the needed from_server, configuration, path_to_item + """ + kwargs = cls.__remove_unsets(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] + else: + arg = cls.__get_input_dict(*args, **kwargs) + _instantiation_metadata = InstantiationMetadata() if _instantiation_metadata is None else _instantiation_metadata + if _instantiation_metadata.from_server: + raise ApiValueError( + 'from_server must be False in this code path, if you need it to be True, use cls._from_openapi_data()' + ) + arg = cast_to_allowed_types(arg, from_server=_instantiation_metadata.from_server) + new_cls = cls.__get_new_cls(arg, _instantiation_metadata) + return new_cls.__get_new_instance_without_conversion(arg, _instantiation_metadata) + + def __init__( + self, + *args: typing.Union[ + dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Union[ + dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset + ] + ): + """ + this is needed to fix 'Unexpected argument' warning in pycharm + this code does nothing because all Schema instances are immutable + this means that all input data is passed into and used in new, and after the new instance is made + no new attributes are assigned and init is not used + """ + pass + + +def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, int, float, None, frozendict, tuple, Schema]: + """ + from_server=False date, datetime -> str + int, float -> Decimal + StrSchema will convert that to bytes and remember the encoding when we pass in str input + """ + if isinstance(arg, (date, datetime)): + if not from_server: + return arg.isoformat() + # ApiTypeError will be thrown later by _validate_type + return arg + elif isinstance(arg, bool): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + return arg + elif isinstance(arg, Decimal): + return arg + elif isinstance(arg, int): + return Decimal(arg) + elif isinstance(arg, float): + decimal_from_float = Decimal(arg) + if decimal_from_float.as_integer_ratio()[1] == 1: + # 9.0 -> Decimal('9.0') + # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') + return Decimal(str(decimal_from_float)+'.0') + return decimal_from_float + elif isinstance(arg, str): + return arg + elif isinstance(arg, bytes): + return arg + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: + raise ApiValueError('Invalid file state; file is closed and must be open') + return arg + elif type(arg) is list or type(arg) is tuple: + return tuple([cast_to_allowed_types(item) for item in arg]) + elif type(arg) is dict or type(arg) is frozendict: + return frozendict({key: cast_to_allowed_types(val) for key, val in arg.items() if val is not unset}) + elif arg is None: + return arg + elif isinstance(arg, Schema): + return arg + raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class ComposedBase(Discriminable): + + @classmethod + def __get_allof_classes(cls, *args, _instantiation_metadata: InstantiationMetadata): + path_to_schemas = defaultdict(set) + for allof_cls in cls._composed_schemas['allOf']: + if allof_cls in _instantiation_metadata.base_classes: + continue + other_path_to_schemas = allof_cls._validate(*args, _instantiation_metadata=_instantiation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def __get_oneof_class( + cls, + *args, + discriminated_cls, + _instantiation_metadata: InstantiationMetadata, + path_to_schemas: typing.Dict[typing.Tuple, typing.Set[typing.Type[Schema]]] + ): + oneof_classes = [] + chosen_oneof_cls = None + original_base_classes = _instantiation_metadata.base_classes + new_base_classes = _instantiation_metadata.base_classes + path_to_schemas = defaultdict(set) + for oneof_cls in cls._composed_schemas['oneOf']: + if oneof_cls in path_to_schemas[_instantiation_metadata.path_to_item]: + oneof_classes.append(oneof_cls) + continue + if isinstance(args[0], oneof_cls): + # passed in instance is the correct type + chosen_oneof_cls = oneof_cls + oneof_classes.append(oneof_cls) + continue + _instantiation_metadata.base_classes = original_base_classes + try: + path_to_schemas = oneof_cls._validate(*args, _instantiation_metadata=_instantiation_metadata) + new_base_classes = _instantiation_metadata.base_classes + except (ApiValueError, ApiTypeError) as ex: + if discriminated_cls is not None and oneof_cls is discriminated_cls: + raise ex + continue + chosen_oneof_cls = oneof_cls + oneof_classes.append(oneof_cls) + if not oneof_classes: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the oneOf schemas matched the input data.".format(cls) + ) + elif len(oneof_classes) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. Multiple " + "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) + ) + _instantiation_metadata.base_classes = new_base_classes + return path_to_schemas + + @classmethod + def __get_anyof_classes( + cls, + *args, + discriminated_cls, + _instantiation_metadata: InstantiationMetadata + ): + anyof_classes = [] + chosen_anyof_cls = None + original_base_classes = _instantiation_metadata.base_classes + path_to_schemas = defaultdict(set) + for anyof_cls in cls._composed_schemas['anyOf']: + if anyof_cls in _instantiation_metadata.base_classes: + continue + if isinstance(args[0], anyof_cls): + # passed in instance is the correct type + chosen_anyof_cls = anyof_cls + anyof_classes.append(anyof_cls) + continue + + _instantiation_metadata.base_classes = original_base_classes + try: + other_path_to_schemas = anyof_cls._validate(*args, _instantiation_metadata=_instantiation_metadata) + except (ApiValueError, ApiTypeError) as ex: + if discriminated_cls is not None and anyof_cls is discriminated_cls: + raise ex + continue + original_base_classes = _instantiation_metadata.base_classes + chosen_anyof_cls = anyof_cls + anyof_classes.append(anyof_cls) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + ComposedBase _validate + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + if args and isinstance(args[0], Schema) and _instantiation_metadata.from_server is False: + if isinstance(args[0], cls): + # an instance of the correct type was passed in + return {} + raise ApiTypeError( + 'Incorrect type passed in, required type was {} and passed type was {} at {}'.format( + cls, + type(args[0]), + _instantiation_metadata.path_to_item + ) + ) + + # validation checking on types, validations, and enums + path_to_schemas = super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + _instantiation_metadata.base_classes |= frozenset({cls}) + + # process composed schema + _discriminator = getattr(cls, '_discriminator', None) + discriminated_cls = None + if _discriminator and args and isinstance(args[0], frozendict): + disc_property_name = list(_discriminator.keys())[0] + cls._ensure_discriminator_value_present(disc_property_name, _instantiation_metadata, *args) + # get discriminated_cls by looking at the dict in the current class + discriminated_cls = cls._get_discriminated_class( + disc_property_name=disc_property_name, disc_payload_value=args[0][disc_property_name]) + if discriminated_cls is None: + raise ApiValueError( + "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( + args[0][disc_property_name], + cls.__name__, + disc_property_name, + list(_discriminator[disc_property_name].keys()), + _instantiation_metadata.path_to_item + (disc_property_name,) + ) + ) + + if cls._composed_schemas['allOf']: + other_path_to_schemas = cls.__get_allof_classes(*args, _instantiation_metadata=_instantiation_metadata) + update(path_to_schemas, other_path_to_schemas) + if cls._composed_schemas['oneOf']: + other_path_to_schemas = cls.__get_oneof_class( + *args, + discriminated_cls=discriminated_cls, + _instantiation_metadata=_instantiation_metadata, + path_to_schemas=path_to_schemas + ) + update(path_to_schemas, other_path_to_schemas) + if cls._composed_schemas['anyOf']: + other_path_to_schemas = cls.__get_anyof_classes( + *args, + discriminated_cls=discriminated_cls, + _instantiation_metadata=_instantiation_metadata + ) + update(path_to_schemas, other_path_to_schemas) + + if discriminated_cls is not None: + # TODO use an exception from this package here + assert discriminated_cls in path_to_schemas[_instantiation_metadata.path_to_item] + return path_to_schemas + + +# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase +class ComposedSchema( + _SchemaTypeChecker(typing.Union[none_type, str, Decimal, bool, tuple, frozendict]), + ComposedBase, + DictBase, + ListBase, + NumberBase, + StrBase, + BoolBase, + NoneBase, + Schema +): + + # subclass properties + _composed_schemas = {} + + @classmethod + def _from_openapi_data(cls, *args: typing.Any, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs): + if not args: + if not kwargs: + raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) + args = (kwargs, ) + return super()._from_openapi_data(args[0], _instantiation_metadata=_instantiation_metadata) + + +class ListSchema( + _SchemaTypeChecker(typing.Union[tuple]), + ListBase, + Schema +): + + @classmethod + def _from_openapi_data(cls, arg: typing.List[typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: typing.Union[list, tuple], **kwargs: InstantiationMetadata): + return super().__new__(cls, arg, **kwargs) + + +class NoneSchema( + _SchemaTypeChecker(typing.Union[none_type]), + NoneBase, + Schema +): + + @classmethod + def _from_openapi_data(cls, arg: None, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: None, **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class NumberSchema( + _SchemaTypeChecker(typing.Union[Decimal]), + NumberBase, + Schema +): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + + @classmethod + def _from_openapi_data(cls, arg: typing.Union[int, float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: typing.Union[Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class IntBase(NumberBase): + @property + def as_int(self) -> int: + try: + return self._as_int + except AttributeError: + self._as_int = int(self) + return self._as_int + + @classmethod + def _validate_format(cls, arg: typing.Optional[Decimal], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, Decimal): + exponent = arg.as_tuple().exponent + if exponent != 0: + raise ApiValueError( + "Invalid value '{}' for type integer at {}".format(arg, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + IntBase _validate + TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only + """ + cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata) + return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + +class IntSchema(IntBase, NumberSchema): + + @classmethod + def _from_openapi_data(cls, arg: int, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: typing.Union[Decimal, int], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class Int32Schema( + _SchemaValidator( + inclusive_minimum=Decimal(-2147483648), + inclusive_maximum=Decimal(2147483647) + ), + IntSchema +): + pass + +class Int64Schema( + _SchemaValidator( + inclusive_minimum=Decimal(-9223372036854775808), + inclusive_maximum=Decimal(9223372036854775807) + ), + IntSchema +): + pass + + +class Float32Schema( + _SchemaValidator( + inclusive_minimum=Decimal(-3.4028234663852886e+38), + inclusive_maximum=Decimal(3.4028234663852886e+38) + ), + NumberSchema +): + + @classmethod + def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + # todo check format + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + +class Float64Schema( + _SchemaValidator( + inclusive_minimum=Decimal(-1.7976931348623157E+308), + inclusive_maximum=Decimal(1.7976931348623157E+308) + ), + NumberSchema +): + + @classmethod + def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + # todo check format + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + +class StrSchema( + _SchemaTypeChecker(typing.Union[str]), + StrBase, + Schema +): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + + @classmethod + def _from_openapi_data(cls, arg: typing.Union[str], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None) -> 'StrSchema': + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: typing.Union[str, date, datetime], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class DateSchema(DateBase, StrSchema): + + def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class DateTimeSchema(DateTimeBase, StrSchema): + + def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class BytesSchema( + _SchemaTypeChecker(typing.Union[bytes]), + Schema, +): + """ + this class will subclass bytes and is immutable + """ + def __new__(cls, arg: typing.Union[bytes], **kwargs: typing.Union[InstantiationMetadata]): + return super(Schema, cls).__new__(cls, arg) + + +class FileSchema( + _SchemaTypeChecker(typing.Union[FileIO]), + Schema, +): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: typing.Union[InstantiationMetadata]): + return super(Schema, cls).__new__(cls, arg) + + +class BinaryBase: + pass + + +class BinarySchema( + _SchemaTypeChecker(typing.Union[bytes, FileIO]), + ComposedBase, + BinaryBase, + Schema, +): + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [], + 'oneOf': [ + BytesSchema, + FileSchema, + ], + 'anyOf': [ + ], + } + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg) + + +class BoolSchema( + _SchemaTypeChecker(typing.Union[bool]), + BoolBase, + Schema +): + + @classmethod + def _from_openapi_data(cls, arg: bool, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: bool, **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class AnyTypeSchema( + _SchemaTypeChecker( + typing.Union[frozendict, tuple, Decimal, str, bool, none_type, bytes, FileIO] + ), + DictBase, + ListBase, + NumberBase, + StrBase, + BoolBase, + NoneBase, + Schema +): + pass + + +class DictSchema( + _SchemaTypeChecker(typing.Union[frozendict]), + DictBase, + Schema +): + + @classmethod + def _from_openapi_data(cls, arg: typing.Dict[str, typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]): + return super().__new__(cls, *args, **kwargs) + + +schema_descendents = set([NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema]) + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +@functools.cache +def get_new_class( + class_name: str, + bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] +) -> typing.Type[Schema]: + """ + Returns a new class that is made with the subclass bases + """ + return type(class_name, bases, {}) + + +LOG_CACHE_USAGE = False + + +def log_cache_usage(cache_fn): + if LOG_CACHE_USAGE: + print(cache_fn.__name__, cache_fn.cache_info()) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars new file mode 100644 index 000000000000..476157a0c5d2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars @@ -0,0 +1,51 @@ +# coding: utf-8 + +{{>partial_header}} + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "{{{projectName}}}" +VERSION = "{{packageVersion}}" +{{#with apiInfo}} +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "urllib3 >= 1.15", + "certifi", + "python-dateutil", + "frozendict >= 2.0.3", +{{#if asyncio}} + "aiohttp >= 3.0.0", +{{/if}} +{{#if tornado}} + "tornado>=4.2,<5", +{{/if}} +{{#if hasHttpSignatureMethods}} + "pem>=19.3.0", + "pycryptodome>=3.9.0", +{{/if}} +] + +setup( + name=NAME, + version=VERSION, + description="{{appName}}", + author="{{#if infoName}}{{infoName}}{{/if}}{{#unless infoName}}OpenAPI Generator community{{/unless}}", + author_email="{{#if infoEmail}}{{infoEmail}}{{/if}}{{#unless infoEmail}}team@openapitools.org{{/unless}}", + url="{{packageUrl}}", + keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], + python_requires=">=3.9", + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + {{#if licenseInfo}}license="{{licenseInfo}}", + {{/if}}long_description="""\ + {{appDescription}} # noqa: E501 + """ +) +{{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/setup_cfg.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/setup_cfg.handlebars new file mode 100644 index 000000000000..8cb28d8c2852 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/setup_cfg.handlebars @@ -0,0 +1,13 @@ +{{#if useNose}} +[nosetests] +logging-clear-handlers=true +verbosity=2 +randomize=true +exe=true +with-coverage=true +cover-package={{{packageName}}} +cover-erase=true + +{{/if}} +[flake8] +max-line-length=99 diff --git a/modules/openapi-generator/src/main/resources/python-experimental/signing.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/signing.handlebars new file mode 100644 index 000000000000..26d2b8cb37c9 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/signing.handlebars @@ -0,0 +1,409 @@ +# coding: utf-8 +{{>partial_header}} + +from base64 import b64encode +from Crypto.IO import PEM, PKCS8 +from Crypto.Hash import SHA256, SHA512 +from Crypto.PublicKey import RSA, ECC +from Crypto.Signature import PKCS1_v1_5, pss, DSS +from email.utils import formatdate +import json +import os +import re +from time import time +from urllib.parse import urlencode, urlparse + +# The constants below define a subset of HTTP headers that can be included in the +# HTTP signature scheme. Additional headers may be included in the signature. + +# The '(request-target)' header is a calculated field that includes the HTTP verb, +# the URL path and the URL query. +HEADER_REQUEST_TARGET = '(request-target)' +# The time when the HTTP signature was generated. +HEADER_CREATED = '(created)' +# The time when the HTTP signature expires. The API server should reject HTTP requests +# that have expired. +HEADER_EXPIRES = '(expires)' +# The 'Host' header. +HEADER_HOST = 'Host' +# The 'Date' header. +HEADER_DATE = 'Date' +# When the 'Digest' header is included in the HTTP signature, the client automatically +# computes the digest of the HTTP request body, per RFC 3230. +HEADER_DIGEST = 'Digest' +# The 'Authorization' header is automatically generated by the client. It includes +# the list of signed headers and a base64-encoded signature. +HEADER_AUTHORIZATION = 'Authorization' + +# The constants below define the cryptographic schemes for the HTTP signature scheme. +SCHEME_HS2019 = 'hs2019' +SCHEME_RSA_SHA256 = 'rsa-sha256' +SCHEME_RSA_SHA512 = 'rsa-sha512' + +# The constants below define the signature algorithms that can be used for the HTTP +# signature scheme. +ALGORITHM_RSASSA_PSS = 'RSASSA-PSS' +ALGORITHM_RSASSA_PKCS1v15 = 'RSASSA-PKCS1-v1_5' + +ALGORITHM_ECDSA_MODE_FIPS_186_3 = 'fips-186-3' +ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 = 'deterministic-rfc6979' +ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS = { + ALGORITHM_ECDSA_MODE_FIPS_186_3, + ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 +} + +# The cryptographic hash algorithm for the message signature. +HASH_SHA256 = 'sha256' +HASH_SHA512 = 'sha512' + + +class HttpSigningConfiguration(object): + """The configuration parameters for the HTTP signature security scheme. + The HTTP signature security scheme is used to sign HTTP requests with a private key + which is in possession of the API client. + An 'Authorization' header is calculated by creating a hash of select headers, + and optionally the body of the HTTP request, then signing the hash value using + a private key. The 'Authorization' header is added to outbound HTTP requests. + + NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param key_id: A string value specifying the identifier of the cryptographic key, + when signing HTTP requests. + :param signing_scheme: A string value specifying the signature scheme, when + signing HTTP requests. + Supported value are hs2019, rsa-sha256, rsa-sha512. + Avoid using rsa-sha256, rsa-sha512 as they are deprecated. These values are + available for server-side applications that only support the older + HTTP signature algorithms. + :param private_key_path: A string value specifying the path of the file containing + a private key. The private key is used to sign HTTP requests. + :param private_key_passphrase: A string value specifying the passphrase to decrypt + the private key. + :param signed_headers: A list of strings. Each value is the name of a HTTP header + that must be included in the HTTP signature calculation. + The two special signature headers '(request-target)' and '(created)' SHOULD be + included in SignedHeaders. + The '(created)' header expresses when the signature was created. + The '(request-target)' header is a concatenation of the lowercased :method, an + ASCII space, and the :path pseudo-headers. + When signed_headers is not specified, the client defaults to a single value, + '(created)', in the list of HTTP headers. + When SignedHeaders contains the 'Digest' value, the client performs the + following operations: + 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. + 2. Set the 'Digest' header in the request body. + 3. Include the 'Digest' header and value in the HTTP signature. + :param signing_algorithm: A string value specifying the signature algorithm, when + signing HTTP requests. + Supported values are: + 1. For RSA keys: RSASSA-PSS, RSASSA-PKCS1-v1_5. + 2. For ECDSA keys: fips-186-3, deterministic-rfc6979. + If None, the signing algorithm is inferred from the private key. + The default signing algorithm for RSA keys is RSASSA-PSS. + The default signing algorithm for ECDSA keys is fips-186-3. + :param hash_algorithm: The hash algorithm for the signature. Supported values are + sha256 and sha512. + If the signing_scheme is rsa-sha256, the hash algorithm must be set + to None or sha256. + If the signing_scheme is rsa-sha512, the hash algorithm must be set + to None or sha512. + :param signature_max_validity: The signature max validity, expressed as + a datetime.timedelta value. It must be a positive value. + """ + def __init__(self, key_id, signing_scheme, private_key_path, + private_key_passphrase=None, + signed_headers=None, + signing_algorithm=None, + hash_algorithm=None, + signature_max_validity=None): + self.key_id = key_id + if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}: + raise Exception("Unsupported security scheme: {0}".format(signing_scheme)) + self.signing_scheme = signing_scheme + if not os.path.exists(private_key_path): + raise Exception("Private key file does not exist") + self.private_key_path = private_key_path + self.private_key_passphrase = private_key_passphrase + self.signing_algorithm = signing_algorithm + self.hash_algorithm = hash_algorithm + if signing_scheme == SCHEME_RSA_SHA256: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA256 + elif self.hash_algorithm != HASH_SHA256: + raise Exception("Hash algorithm must be sha256 when security scheme is %s" % + SCHEME_RSA_SHA256) + elif signing_scheme == SCHEME_RSA_SHA512: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA512 + elif self.hash_algorithm != HASH_SHA512: + raise Exception("Hash algorithm must be sha512 when security scheme is %s" % + SCHEME_RSA_SHA512) + elif signing_scheme == SCHEME_HS2019: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA256 + elif self.hash_algorithm not in {HASH_SHA256, HASH_SHA512}: + raise Exception("Invalid hash algorithm") + if signature_max_validity is not None and signature_max_validity.total_seconds() < 0: + raise Exception("The signature max validity must be a positive value") + self.signature_max_validity = signature_max_validity + # If the user has not provided any signed_headers, the default must be set to '(created)', + # as specified in the 'HTTP signature' standard. + if signed_headers is None or len(signed_headers) == 0: + signed_headers = [HEADER_CREATED] + if self.signature_max_validity is None and HEADER_EXPIRES in signed_headers: + raise Exception( + "Signature max validity must be set when " + "'(expires)' signature parameter is specified") + if len(signed_headers) != len(set(signed_headers)): + raise Exception("Cannot have duplicates in the signed_headers parameter") + if HEADER_AUTHORIZATION in signed_headers: + raise Exception("'Authorization' header cannot be included in signed headers") + self.signed_headers = signed_headers + self.private_key = None + """The private key used to sign HTTP requests. + Initialized when the PEM-encoded private key is loaded from a file. + """ + self.host = None + """The host name, optionally followed by a colon and TCP port number. + """ + self._load_private_key() + + def get_http_signature_headers(self, resource_path, method, headers, body, query_params): + """Create a cryptographic message signature for the HTTP request and add the signed headers. + + :param resource_path : A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method, e.g. GET, POST. + :param headers: A dict containing the HTTP request headers. + :param body: The object representing the HTTP request body. + :param query_params: A string representing the HTTP request query parameters. + :return: A dict of HTTP headers that must be added to the outbound HTTP request. + """ + if method is None: + raise Exception("HTTP method must be set") + if resource_path is None: + raise Exception("Resource path must be set") + + signed_headers_list, request_headers_dict = self._get_signed_header_info( + resource_path, method, headers, body, query_params) + + header_items = [ + "{0}: {1}".format(key.lower(), value) for key, value in signed_headers_list] + string_to_sign = "\n".join(header_items) + + digest, digest_prefix = self._get_message_digest(string_to_sign.encode()) + b64_signed_msg = self._sign_digest(digest) + + request_headers_dict[HEADER_AUTHORIZATION] = self._get_authorization_header( + signed_headers_list, b64_signed_msg) + + return request_headers_dict + + def get_public_key(self): + """Returns the public key object associated with the private key. + """ + pubkey = None + if isinstance(self.private_key, RSA.RsaKey): + pubkey = self.private_key.publickey() + elif isinstance(self.private_key, ECC.EccKey): + pubkey = self.private_key.public_key() + return pubkey + + def _load_private_key(self): + """Load the private key used to sign HTTP requests. + The private key is used to sign HTTP requests as defined in + https://datatracker.ietf.org/doc/draft-cavage-http-signatures/. + """ + if self.private_key is not None: + return + with open(self.private_key_path, 'r') as f: + pem_data = f.read() + # Verify PEM Pre-Encapsulation Boundary + r = re.compile(r"\s*-----BEGIN (.*)-----\s+") + m = r.match(pem_data) + if not m: + raise ValueError("Not a valid PEM pre boundary") + pem_header = m.group(1) + if pem_header == 'RSA PRIVATE KEY': + self.private_key = RSA.importKey(pem_data, self.private_key_passphrase) + elif pem_header == 'EC PRIVATE KEY': + self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) + elif pem_header in {'PRIVATE KEY', 'ENCRYPTED PRIVATE KEY'}: + # Key is in PKCS8 format, which is capable of holding many different + # types of private keys, not just EC keys. + (key_binary, pem_header, is_encrypted) = \ + PEM.decode(pem_data, self.private_key_passphrase) + (oid, privkey, params) = \ + PKCS8.unwrap(key_binary, passphrase=self.private_key_passphrase) + if oid == '1.2.840.10045.2.1': + self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) + else: + raise Exception("Unsupported key: {0}. OID: {1}".format(pem_header, oid)) + else: + raise Exception("Unsupported key: {0}".format(pem_header)) + # Validate the specified signature algorithm is compatible with the private key. + if self.signing_algorithm is not None: + supported_algs = None + if isinstance(self.private_key, RSA.RsaKey): + supported_algs = {ALGORITHM_RSASSA_PSS, ALGORITHM_RSASSA_PKCS1v15} + elif isinstance(self.private_key, ECC.EccKey): + supported_algs = ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS + if supported_algs is not None and self.signing_algorithm not in supported_algs: + raise Exception( + "Signing algorithm {0} is not compatible with private key".format( + self.signing_algorithm)) + + def _get_signed_header_info(self, resource_path, method, headers, body, query_params): + """Build the HTTP headers (name, value) that need to be included in + the HTTP signature scheme. + + :param resource_path : A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method, e.g. GET, POST. + :param headers: A dict containing the HTTP request headers. + :param body: The object (e.g. a dict) representing the HTTP request body. + :param query_params: A string representing the HTTP request query parameters. + :return: A tuple containing two dict objects: + The first dict contains the HTTP headers that are used to calculate + the HTTP signature. + The second dict contains the HTTP headers that must be added to + the outbound HTTP request. + """ + + if body is None: + body = '' + else: + body = json.dumps(body) + + # Build the '(request-target)' HTTP signature parameter. + target_host = urlparse(self.host).netloc + target_path = urlparse(self.host).path + request_target = method.lower() + " " + target_path + resource_path + if query_params: + request_target += "?" + urlencode(query_params) + + # Get UNIX time, e.g. seconds since epoch, not including leap seconds. + now = time() + # Format date per RFC 7231 section-7.1.1.2. An example is: + # Date: Wed, 21 Oct 2015 07:28:00 GMT + cdate = formatdate(timeval=now, localtime=False, usegmt=True) + # The '(created)' value MUST be a Unix timestamp integer value. + # Subsecond precision is not supported. + created = int(now) + if self.signature_max_validity is not None: + expires = now + self.signature_max_validity.total_seconds() + + signed_headers_list = [] + request_headers_dict = {} + for hdr_key in self.signed_headers: + hdr_key = hdr_key.lower() + if hdr_key == HEADER_REQUEST_TARGET: + value = request_target + elif hdr_key == HEADER_CREATED: + value = '{0}'.format(created) + elif hdr_key == HEADER_EXPIRES: + value = '{0}'.format(expires) + elif hdr_key == HEADER_DATE.lower(): + value = cdate + request_headers_dict[HEADER_DATE] = '{0}'.format(cdate) + elif hdr_key == HEADER_DIGEST.lower(): + request_body = body.encode() + body_digest, digest_prefix = self._get_message_digest(request_body) + b64_body_digest = b64encode(body_digest.digest()) + value = digest_prefix + b64_body_digest.decode('ascii') + request_headers_dict[HEADER_DIGEST] = '{0}{1}'.format( + digest_prefix, b64_body_digest.decode('ascii')) + elif hdr_key == HEADER_HOST.lower(): + value = target_host + request_headers_dict[HEADER_HOST] = '{0}'.format(target_host) + else: + value = next((v for k, v in headers.items() if k.lower() == hdr_key), None) + if value is None: + raise Exception( + "Cannot sign HTTP request. " + "Request does not contain the '{0}' header".format(hdr_key)) + signed_headers_list.append((hdr_key, value)) + + return signed_headers_list, request_headers_dict + + def _get_message_digest(self, data): + """Calculates and returns a cryptographic digest of a specified HTTP request. + + :param data: The string representation of the date to be hashed with a cryptographic hash. + :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 + to generate the 'Digest' header as specified in RFC 3230. + """ + if self.hash_algorithm == HASH_SHA512: + digest = SHA512.new() + prefix = 'SHA-512=' + elif self.hash_algorithm == HASH_SHA256: + digest = SHA256.new() + prefix = 'SHA-256=' + else: + raise Exception("Unsupported hash algorithm: {0}".format(self.hash_algorithm)) + digest.update(data) + return digest, prefix + + def _sign_digest(self, digest): + """Signs a message digest with a private key specified in the signing_info. + + :param digest: A hashing object that contains the cryptographic digest of the HTTP request. + :return: A base-64 string representing the cryptographic signature of the input digest. + """ + sig_alg = self.signing_algorithm + if isinstance(self.private_key, RSA.RsaKey): + if sig_alg is None or sig_alg == ALGORITHM_RSASSA_PSS: + # RSASSA-PSS in Section 8.1 of RFC8017. + signature = pss.new(self.private_key).sign(digest) + elif sig_alg == ALGORITHM_RSASSA_PKCS1v15: + # RSASSA-PKCS1-v1_5 in Section 8.2 of RFC8017. + signature = PKCS1_v1_5.new(self.private_key).sign(digest) + else: + raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) + elif isinstance(self.private_key, ECC.EccKey): + if sig_alg is None: + sig_alg = ALGORITHM_ECDSA_MODE_FIPS_186_3 + if sig_alg in ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS: + # draft-ietf-httpbis-message-signatures-00 does not specify the ECDSA encoding. + # Issue: https://github.com/w3c-ccg/http-signatures/issues/107 + signature = DSS.new(key=self.private_key, mode=sig_alg, + encoding='der').sign(digest) + else: + raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) + else: + raise Exception("Unsupported private key: {0}".format(type(self.private_key))) + return b64encode(signature) + + def _get_authorization_header(self, signed_headers, signed_msg): + """Calculates and returns the value of the 'Authorization' header when signing HTTP requests. + + :param signed_headers : A list of tuples. Each value is the name of a HTTP header that + must be included in the HTTP signature calculation. + :param signed_msg: A base-64 encoded string representation of the signature. + :return: The string value of the 'Authorization' header, representing the signature + of the HTTP request. + """ + created_ts = None + expires_ts = None + for k, v in signed_headers: + if k == HEADER_CREATED: + created_ts = v + elif k == HEADER_EXPIRES: + expires_ts = v + lower_keys = [k.lower() for k, v in signed_headers] + headers_value = " ".join(lower_keys) + + auth_str = "Signature keyId=\"{0}\",algorithm=\"{1}\",".format( + self.key_id, self.signing_scheme) + if created_ts is not None: + auth_str = auth_str + "created={0},".format(created_ts) + if expires_ts is not None: + auth_str = auth_str + "expires={0},".format(expires_ts) + auth_str = auth_str + "headers=\"{0}\",signature=\"{1}\"".format( + headers_value, signed_msg.decode('ascii')) + + return auth_str diff --git a/modules/openapi-generator/src/main/resources/python-experimental/test-requirements.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/test-requirements.handlebars new file mode 100644 index 000000000000..3529726b16d4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/test-requirements.handlebars @@ -0,0 +1,15 @@ +{{#if useNose}} +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 +{{/if}} +{{#unless useNose}} +pytest~=4.6.7 # needed for python 3.4 +pytest-cov>=2.8.1 +pytest-randomly==1.2.3 # needed for python 3.4 +{{/unless}} +{{#if hasHttpSignatureMethods}} +pycryptodome>=3.9.0 +{{/if}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-experimental/tox.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/tox.handlebars new file mode 100644 index 000000000000..5af8eb6f8315 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/tox.handlebars @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + {{#unless useNose}}pytest --cov={{{packageName}}}{{/unless}}{{#if useNose}}nosetests{{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/travis.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/travis.handlebars new file mode 100644 index 000000000000..5e4e1f0cc097 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-experimental/travis.handlebars @@ -0,0 +1,18 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "3.5" + - "3.6" + - "3.7" + - "3.8" +# command to install dependencies +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" +# command to run tests +{{#if useNose}} +script: nosetests +{{/if}} +{{#unless useNose}} +script: pytest --cov={{{packageName}}} +{{/unless}} diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml new file mode 100644 index 000000000000..f149e72a898d --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -0,0 +1,2655 @@ +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 + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /foo: + get: + responses: + default: + description: response + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + /pet: + servers: + - url: 'http://petstore.swagger.io/v2' + - url: 'http://path-server-test.petstore.local/v2' + post: + tags: + - pet + summary: Add a new pet to the store + description: Add a new pet to the store + operationId: addPet + responses: + '200': + description: Ok + '405': + description: Invalid input + security: + - http_signature_test: [] + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + responses: + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - http_signature_test: [] + - 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 + 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: + - http_signature_test: [] + - 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 + 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: + - http_signature_test: [] + - 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 + 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: uploadImage + 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/{order_id}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generated exceptions + operationId: getOrderById + parameters: + - name: order_id + 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: order_id + 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 + 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 + 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 + 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 + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + 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 + '/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 + 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 + /fake_classname_test: + patch: + tags: + - 'fake_classname_tags 123#$%^' + summary: To test class name in snake case + description: To test class name in snake case + operationId: Classname + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + security: + - api_key_query: [] + requestBody: + $ref: '#/components/requestBodies/Client' + /fake: + patch: + tags: + - fake + summary: To test "client" model + description: To test "client" model + operationId: ClientModel + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + get: + tags: + - fake + summary: To test enum parameters + description: To test enum parameters + operationId: EnumParameters + parameters: + - name: enum_header_string_array + in: header + description: Header parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_header_string + in: header + description: Header parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_string_array + in: query + description: Query parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_query_string + in: query + description: Query parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_integer + in: query + description: Query parameter enum test (double) + schema: + type: integer + format: int32 + enum: + - 1 + - -2 + - name: enum_query_double + in: query + description: Query parameter enum test (double) + schema: + type: number + format: double + enum: + - 1.1 + - -1.2 + responses: + '400': + description: Invalid request + '404': + description: Not found + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + enum_form_string: + description: Form parameter enum test (string) + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + post: + tags: + - fake + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + description: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: EndpointParameters + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - http_basic_test: [] + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + integer: + description: None + type: integer + minimum: 10 + maximum: 100 + int32: + description: None + type: integer + format: int32 + minimum: 20 + maximum: 200 + int64: + description: None + type: integer + format: int64 + number: + description: None + type: number + minimum: 32.1 + maximum: 543.2 + float: + description: None + type: number + format: float + maximum: 987.6 + double: + description: None + type: number + format: double + minimum: 67.8 + maximum: 123.4 + string: + description: None + type: string + pattern: '/[a-z]/i' + pattern_without_delimiter: + description: None + type: string + pattern: '^[A-Z].*' + byte: + description: None + type: string + format: byte + binary: + description: None + type: string + format: binary + date: + description: None + type: string + format: date + dateTime: + description: None + type: string + format: date-time + default: '2010-02-01T10:20:10.11111+01:00' + example: '2020-02-02T20:20:20.22222Z' + password: + description: None + type: string + format: password + minLength: 10 + maxLength: 64 + callback: + description: None + type: string + required: + - number + - double + - pattern_without_delimiter + - byte + delete: + tags: + - fake + security: + - bearer_test: [] + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: GroupParameters + x-group-parameters: true + parameters: + - name: required_string_group + in: query + description: Required String in group parameters + required: true + schema: + type: integer + - name: required_boolean_group + in: header + description: Required Boolean in group parameters + required: true + schema: + type: boolean + - name: required_int64_group + in: query + description: Required Integer in group parameters + required: true + schema: + type: integer + format: int64 + - name: string_group + in: query + description: String in group parameters + schema: + type: integer + - name: boolean_group + in: header + description: Boolean in group parameters + schema: + type: boolean + - name: int64_group + in: query + description: Integer in group parameters + schema: + type: integer + format: int64 + responses: + '400': + description: Someting wrong + /fake/refs/number: + post: + tags: + - fake + description: Test serialization of outer number types + operationId: NumberWithValidations + requestBody: + description: Input number as post body + content: + application/json: + schema: + $ref: '#/components/schemas/NumberWithValidations' + required: false + responses: + '200': + description: Output number + content: + application/json: + schema: + $ref: '#/components/schemas/NumberWithValidations' + /fake/refs/mammal: + post: + tags: + - fake + description: Test serialization of mammals + operationId: Mammal + requestBody: + description: Input mammal + content: + application/json: + schema: + $ref: '#/components/schemas/mammal' + required: true + responses: + '200': + description: Output mammal + content: + application/json: + schema: + $ref: '#/components/schemas/mammal' + /fake/refs/string: + post: + tags: + - fake + description: Test serialization of outer string types + operationId: String + requestBody: + description: Input string as post body + content: + application/json: + schema: + $ref: '#/components/schemas/String' + required: false + responses: + '200': + description: Output string + content: + application/json: + schema: + $ref: '#/components/schemas/String' + x-codegen-request-body-name: body + /fake/refs/boolean: + post: + tags: + - fake + description: Test serialization of outer boolean types + operationId: Boolean + requestBody: + description: Input boolean as post body + content: + application/json: + schema: + $ref: '#/components/schemas/Boolean' + required: false + responses: + '200': + description: Output boolean + content: + application/json: + schema: + $ref: '#/components/schemas/Boolean' + x-codegen-request-body-name: body + /fake/refs/arraymodel: + post: + tags: + - fake + description: Test serialization of ArrayModel + operationId: ArrayModel + requestBody: + description: Input model + content: + application/json: + schema: + $ref: '#/components/schemas/AnimalFarm' + required: false + responses: + '200': + description: Output model + content: + application/json: + schema: + $ref: '#/components/schemas/AnimalFarm' + x-codegen-request-body-name: body + /fake/refs/composed_one_of_number_with_validations: + post: + tags: + - fake + description: Test serialization of object with $refed properties + operationId: ComposedOneOfDifferentTypes + requestBody: + description: Input model + content: + application/json: + schema: + $ref: '#/components/schemas/ComposedOneOfDifferentTypes' + required: false + responses: + '200': + description: Output model + content: + application/json: + schema: + $ref: '#/components/schemas/ComposedOneOfDifferentTypes' + /fake/refs/object_model_with_ref_props: + post: + tags: + - fake + description: Test serialization of object with $refed properties + operationId: ObjectModelWithRefProps + requestBody: + description: Input model + content: + application/json: + schema: + $ref: '#/components/schemas/ObjectModelWithRefProps' + required: false + responses: + '200': + description: Output model + content: + application/json: + schema: + $ref: '#/components/schemas/ObjectModelWithRefProps' + x-codegen-request-body-name: body + /fake/refs/enum: + post: + tags: + - fake + description: Test serialization of outer enum + operationId: StringEnum + requestBody: + description: Input enum + content: + application/json: + schema: + $ref: '#/components/schemas/StringEnum' + required: false + responses: + '200': + description: Output enum + content: + application/json: + schema: + $ref: '#/components/schemas/StringEnum' + x-codegen-request-body-name: body + /fake/refs/array-of-enums: + post: + tags: + - fake + summary: Array of Enums + operationId: ArrayOfEnums + requestBody: + description: Input enum + content: + application/json: + schema: + $ref: '#/components/schemas/ArrayOfEnums' + required: false + responses: + 200: + description: Got named array of enums + content: + application/json: + schema: + $ref: '#/components/schemas/ArrayOfEnums' + /fake/additional-properties-with-array-of-enums: + get: + tags: + - fake + summary: Additional Properties with Array of Enums + operationId: AdditionalPropertiesWithArrayOfEnums + requestBody: + description: Input enum + content: + application/json: + schema: + $ref: '#/components/schemas/AdditionalPropertiesWithArrayOfEnums' + required: false + responses: + 200: + description: Got object with additional properties with array of enums + content: + application/json: + schema: + $ref: '#/components/schemas/AdditionalPropertiesWithArrayOfEnums' + /fake/jsonFormData: + get: + tags: + - fake + summary: test json serialization of form data + description: '' + operationId: JsonFormData + responses: + '200': + description: successful operation + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + /fake/inline-additionalProperties: + post: + tags: + - fake + summary: test inline additionalProperties + description: '' + operationId: InlineAdditionalProperties + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: request body + required: true + /fake/body-with-query-params: + put: + tags: + - fake + operationId: BodyWithQueryParams + parameters: + - name: query + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + /another-fake/dummy: + patch: + tags: + - $another-fake? + summary: To test special tags + description: To test special tags and operation ID starting with number + operationId: '123_test_@#$%_special_tags' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + /fake/body-with-file-schema: + put: + tags: + - fake + description: >- + For this test, the body for this request much reference a schema named + `File`. + operationId: BodyWithFileSchema + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + /fake/case-sensitive-params: + put: + tags: + - fake + description: Ensures that original naming is used in endpoint params, that way we on't have collisions + operationId: CaseSensitiveParams + parameters: + - name: someVar + in: query + required: true + schema: + type: string + - name: SomeVar + in: query + required: true + schema: + type: string + - name: some_var + in: query + required: true + schema: + type: string + responses: + "200": + description: Success + /fake/test-query-paramters: + put: + tags: + - fake + description: To test the collection format in query parameters + operationId: QueryParameterCollectionFormat + parameters: + - name: pipe + in: query + required: true + schema: + type: array + items: + type: string + - name: ioutil + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: http + in: query + required: true + style: spaceDelimited + schema: + type: array + items: + type: string + - name: url + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: context + in: query + required: true + explode: true + schema: + type: array + items: + type: string + - name: refParam + in: query + required: true + schema: + $ref: '#/components/schemas/StringWithValidation' + responses: + "200": + description: Success + '/fake/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image (required) + description: '' + operationId: uploadFileWithRequiredFile + 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 + requiredFile: + description: file to upload + type: string + format: binary + required: + - requiredFile + /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/: + post: + tags: + - fake + summary: parameter collision case + operationId: parameterCollisions + parameters: + - name: 1 + in: query + schema: + type: string + - name: aB + in: query + schema: + type: string + - name: Ab + in: query + schema: + type: string + - name: self + in: query + schema: + type: string + - name: A-B + in: query + schema: + type: string + - name: 1 + in: header + schema: + type: string + - name: aB + in: header + schema: + type: string + - name: self + in: header + schema: + type: string + - name: A-B + in: header + schema: + type: string + - name: 1 + in: path + required: true + schema: + type: string + - name: aB + in: path + required: true + schema: + type: string + - name: Ab + in: path + required: true + schema: + type: string + - name: self + in: path + required: true + schema: + type: string + - name: A-B + in: path + required: true + schema: + type: string + - name: 1 + in: cookie + schema: + type: string + - name: aB + in: cookie + schema: + type: string + - name: Ab + in: cookie + schema: + type: string + - name: self + in: cookie + schema: + type: string + - name: A-B + in: cookie + schema: + type: string + requestBody: + content: + application/json: + schema: {} + responses: + 200: + description: success + content: + application/json: + schema: {} + /fake/uploadFile: + post: + tags: + - fake + summary: uploads a file using multipart/form-data + description: '' + operationId: uploadFile + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + 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 + required: + - file + /fake/uploadFiles: + post: + tags: + - fake + summary: uploads files using multipart/form-data + description: '' + operationId: uploadFiles + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + files: + type: array + items: + type: string + format: binary + /fake/uploadDownloadFile: + post: + tags: + - fake + summary: uploads a file and downloads a file using application/octet-stream + description: '' + operationId: uploadDownloadFile + responses: + '200': + description: successful operation + content: + application/octet-stream: + schema: + type: string + format: binary + description: file to download + requestBody: + required: true + content: + application/octet-stream: + schema: + type: string + format: binary + description: file to upload + /fake/health: + get: + tags: + - fake + summary: Health check endpoint + responses: + 200: + description: The instance started successfully + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' +servers: + - url: 'http://{server}.swagger.io:{port}/v2' + description: petstore server + variables: + server: + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + - url: https://localhost:8080/{version} + description: The local server + variables: + version: + enum: + - 'v1' + - 'v2' + default: 'v2' +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + 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 + 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 + api_key_query: + type: apiKey + name: api_key_query + in: query + http_basic_test: + type: http + scheme: basic + bearer_test: + type: http + scheme: bearer + bearerFormat: JWT + http_signature_test: + # Test the 'HTTP signature' security scheme. + # Each HTTP request is cryptographically signed as specified + # in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + type: http + scheme: signature + schemas: + Foo: + type: object + properties: + bar: + $ref: '#/components/schemas/Bar' + Bar: + type: string + default: bar + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + example: '2020-02-02T20:20:20.000222Z' + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + default: default-name + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + x-is-unique: true + 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 + objectWithNoDeclaredProps: + type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + description: test code generation for objects + Value must be a map of strings to values. It cannot be the 'null' value. + objectWithNoDeclaredPropsNullable: + type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + description: test code generation for nullable objects. + Value must be a map of strings to values or the 'null' value. + nullable: true + anyTypeProp: + description: 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 + # TODO: this should be supported, currently there are some issues in the code generation. + #anyTypeExceptNullProp: + # description: any type except 'null' + # Here the 'type' attribute is not specified, which means the value can be anything, + # including the null value, string, number, boolean, array or object. + # not: + # type: 'null' + anyTypePropNullable: + description: 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. + nullable: true + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + type: object + description: Pet object that needs to be added to the store + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + x-is-unique: true + 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 + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Return: + description: Model for testing reserved words + properties: + return: + description: this is a reserved python keyword + type: integer + format: int32 + xml: + name: Return + Name: + description: Model for testing model name same as property name + required: + - name + properties: + name: + type: integer + format: int32 + snake_case: + readOnly: true + type: integer + format: int32 + property: + description: this is a reserved python keyword + type: string + xml: + name: Name + 200_response: + description: model with an invalid class name for python, starts with a number + properties: + name: + type: integer + format: int32 + class: + description: this is a reserved python keyword + type: string + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + declawed: + type: boolean + Address: + type: object + additionalProperties: + type: integer + Animal: + type: object + discriminator: + propertyName: className + required: + - className + properties: + className: + type: string + color: + type: string + default: red + AnimalFarm: + type: array + items: + $ref: '#/components/schemas/Animal' + FormatTest: + type: object + required: + - number + - byte + - date + - password + properties: + integer: + type: integer + maximum: 100 + minimum: 10 + multipleOf: 2 + int32: + type: integer + format: int32 + int32withValidations: + type: integer + format: int32 + maximum: 200 + minimum: 20 + int64: + type: integer + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + multipleOf: 32.5 + float: + description: this is a reserved python keyword + type: number + format: float + maximum: 987.6 + minimum: 54.3 + float32: + type: number + format: float + double: + type: number + format: double + maximum: 123.4 + minimum: 67.8 + float64: + type: number + format: double + arrayWithUniqueItems: + type: array + items: + type: number + uniqueItems: true + string: + type: string + pattern: '/[a-z]/i' + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + example: '2020-02-02' + dateTime: + type: string + format: date-time + example: '2007-12-03T10:15:30+01:00' + uuid: + type: string + format: uuid + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + uuidNoExample: + type: string + format: uuid + password: + type: string + format: password + maxLength: 64 + minLength: 10 + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + type: string + pattern: '^\d{10}$' + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + type: string + pattern: '/^image_\d{1,3}$/i' + noneProp: + type: 'null' + EnumClass: + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + Enum_Test: + type: object + required: + - enum_string_required + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - '' + enum_string_required: + type: string + enum: + - UPPER + - lower + - '' + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + stringEnum: + $ref: '#/components/schemas/StringEnum' + IntegerEnum: + $ref: '#/components/schemas/IntegerEnum' + StringEnumWithDefaultValue: + $ref: '#/components/schemas/StringEnumWithDefaultValue' + IntegerEnumWithDefaultValue: + $ref: '#/components/schemas/IntegerEnumWithDefaultValue' + IntegerEnumOneValue: + $ref: '#/components/schemas/IntegerEnumOneValue' + AdditionalPropertiesClass: + type: object + properties: + map_property: + type: object + additionalProperties: + type: string + map_of_map_property: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + anytype_1: {} + map_with_undeclared_properties_anytype_1: + type: object + map_with_undeclared_properties_anytype_2: + type: object + properties: {} + map_with_undeclared_properties_anytype_3: + type: object + additionalProperties: true + empty_map: + type: object + description: an object with no declared properties and no undeclared + properties, hence it's an empty map. + additionalProperties: false + map_with_undeclared_properties_string: + type: object + additionalProperties: + type: string + MixedPropertiesAndAdditionalPropertiesClass: + type: object + properties: + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/components/schemas/Animal' + Client: + type: object + properties: + client: + type: string + ReadOnlyFirst: + type: object + properties: + bar: + type: string + readOnly: true + baz: + type: string + hasOnlyReadOnly: + type: object + properties: + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: + type: object + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower + direct_map: + type: object + additionalProperties: + type: boolean + indirect_map: + $ref: '#/components/schemas/StringBooleanMap' + ArrayTest: + type: object + properties: + array_of_string: + type: array + items: + type: string + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/components/schemas/ReadOnlyFirst' + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: + type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: + type: object + properties: + just_symbol: + type: string + enum: + - '>=' + - $ + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + StringEnum: + nullable: true + type: string + enum: + - "placed" + - "approved" + - "delivered" + - 'single quoted' + - |- + multiple + lines + - "double quote \n with newline" + IntegerEnum: + type: integer + enum: + - 0 + - 1 + - 2 + IntegerEnumBig: + type: integer + enum: + - 10 + - 11 + - 12 + StringEnumWithDefaultValue: + type: string + enum: + - placed + - approved + - delivered + default: placed + IntegerEnumWithDefaultValue: + type: integer + enum: + - 0 + - 1 + - 2 + default: 0 + IntegerEnumOneValue: + type: integer + enum: + - 0 + NullableString: + nullable: true + type: string + ObjectModelWithRefProps: + description: a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations + type: object + properties: + myNumber: + $ref: '#/definitions/NumberWithValidations' + myString: + $ref: '#/definitions/String' + myBoolean: + $ref: '#/definitions/Boolean' + NumberWithValidations: + type: number + minimum: 10 + maximum: 20 + ComposedAnyOfDifferentTypesNoValidations: + anyOf: + - type: object + - type: string + format: date + - type: string + format: date-time + - type: string + format: binary + - type: string + format: byte + - type: string + - type: object + - type: boolean + - type: 'null' + - type: array + items: {} + - type: number + - type: number + format: float + - type: number + format: double + - type: integer + - type: integer + format: int32 + - type: integer + format: int64 + ComposedOneOfDifferentTypes: + description: this is a model that allows payloads of type object or number + oneOf: + - $ref: '#/components/schemas/NumberWithValidations' + - $ref: '#/components/schemas/Animal' + - type: 'null' + - type: string + format: date + - type: object + minProperties: 4 + maxProperties: 4 + - type: array + maxItems: 4 + minItems: 4 + items: {} + - type: string + format: date-time + pattern: '^2020.*' + Number: + type: number + String: + type: string + Boolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + FileSchemaTestClass: + type: object + properties: + file: + $ref: '#/components/schemas/File' + files: + type: array + items: + $ref: '#/components/schemas/File' + File: + type: object + description: Must be named `File` for test. + properties: + sourceURI: + description: Test capitalization + type: string + ObjectWithDifficultlyNamedProps: + type: object + description: model with properties that have invalid names for python + properties: + '$special[property.name]': + type: integer + format: int64 + 123-list: + type: string + 123Number: + type: integer + readOnly: true + required: + - 123-list + _special_model.name_: + type: object + description: model with an invalid class name for python + properties: + a: + type: string + HealthCheckResult: + type: object + properties: + NullableMessage: + nullable: true + type: string + description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + NullableClass: + type: object + properties: + integer_prop: + type: integer + nullable: true + number_prop: + type: number + nullable: true + boolean_prop: + type: boolean + nullable: true + string_prop: + type: string + nullable: true + date_prop: + type: string + format: date + nullable: true + datetime_prop: + type: string + format: date-time + nullable: true + array_nullable_prop: + type: array + nullable: true + items: + type: object + array_and_items_nullable_prop: + type: array + nullable: true + items: + type: object + nullable: true + array_items_nullable: + type: array + items: + type: object + nullable: true + object_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + object_and_items_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + object_items_nullable: + type: object + additionalProperties: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + fruit: + properties: + color: + type: string + oneOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + apple: + type: object + properties: + cultivar: + type: string + pattern: ^[a-zA-Z\s]*$ + origin: + type: string + pattern: /^[A-Z\s]*$/i + required: + - cultivar + nullable: true + banana: + type: object + properties: + lengthCm: + type: number + required: + - lengthCm + mammal: + oneOf: + - $ref: '#/components/schemas/whale' + - $ref: '#/components/schemas/zebra' + - $ref: '#/components/schemas/Pig' + discriminator: + propertyName: className + whale: + type: object + properties: + hasBaleen: + type: boolean + hasTeeth: + type: boolean + className: + type: string + enum: + - whale + required: + - className + zebra: + type: object + properties: + type: + type: string + enum: + - plains + - mountain + - grevys + className: + type: string + enum: + - zebra + required: + - className + additionalProperties: true + Pig: + oneOf: + - $ref: '#/components/schemas/BasquePig' + - $ref: '#/components/schemas/DanishPig' + discriminator: + propertyName: className + BasquePig: + type: object + properties: + className: + type: string + enum: + - BasquePig + required: + - className + DanishPig: + type: object + properties: + className: + type: string + enum: + - DanishPig + required: + - className + gmFruit: + properties: + color: + type: string + anyOf: + - $ref: '#/components/schemas/apple' + - $ref: '#/components/schemas/banana' + fruitReq: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/appleReq' + - $ref: '#/components/schemas/bananaReq' + appleReq: + type: object + properties: + cultivar: + type: string + mealy: + type: boolean + required: + - cultivar + additionalProperties: false + bananaReq: + type: object + properties: + lengthCm: + type: number + sweet: + type: boolean + required: + - lengthCm + additionalProperties: false + # go-experimental is unable to make Triangle and Quadrilateral models + # correctly https://github.com/OpenAPITools/openapi-generator/issues/6149 + Drawing: + type: object + properties: + mainShape: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value cannot be null. + $ref: '#/components/schemas/Shape' + shapeOrNull: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value may be null because ShapeOrNull has 'null' + # type as a child schema of 'oneOf'. + $ref: '#/components/schemas/ShapeOrNull' + nullableShape: + # A property whose value is a 'oneOf' type, and the type is referenced instead + # of being defined inline. The value may be null because NullableShape has the + # 'nullable: true' attribute. For this specific scenario this is exactly the + # same thing as 'shapeOrNull'. + $ref: '#/components/schemas/NullableShape' + shapes: + type: array + items: + $ref: '#/components/schemas/Shape' + additionalProperties: + # Here the additional properties are specified using a referenced schema. + # This is just to validate the generated code works when using $ref + # under 'additionalProperties'. + $ref: '#/components/schemas/fruit' + Shape: + oneOf: + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + discriminator: + propertyName: shapeType + ShapeOrNull: + description: The value may be a shape or the 'null' value. + This is introduced in OAS schema >= 3.1. + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + discriminator: + propertyName: shapeType + NullableShape: + description: 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. + For a nullable composed schema to work, one of its chosen oneOf schemas must be type null + oneOf: + - $ref: '#/components/schemas/Triangle' + - $ref: '#/components/schemas/Quadrilateral' + - type: null + discriminator: + propertyName: shapeType + nullable: true + TriangleInterface: + properties: + shapeType: + type: string + enum: + - 'Triangle' + triangleType: + type: string + required: + - shapeType + - triangleType + Triangle: + oneOf: + - $ref: '#/components/schemas/EquilateralTriangle' + - $ref: '#/components/schemas/IsoscelesTriangle' + - $ref: '#/components/schemas/ScaleneTriangle' + discriminator: + propertyName: triangleType + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. + EquilateralTriangle: + allOf: + - $ref: '#/components/schemas/TriangleInterface' + - type: object + properties: + triangleType: + type: string + enum: + - 'EquilateralTriangle' + IsoscelesTriangle: + allOf: + - $ref: '#/components/schemas/TriangleInterface' + - type: object + properties: + triangleType: + type: string + enum: + - 'IsoscelesTriangle' + ScaleneTriangle: + allOf: + - $ref: '#/components/schemas/TriangleInterface' + - type: object + properties: + triangleType: + type: string + enum: + - 'ScaleneTriangle' + QuadrilateralInterface: + properties: + shapeType: + type: string + enum: + - 'Quadrilateral' + quadrilateralType: + type: string + required: + - shapeType + - quadrilateralType + Quadrilateral: + oneOf: + - $ref: '#/components/schemas/SimpleQuadrilateral' + - $ref: '#/components/schemas/ComplexQuadrilateral' + discriminator: + propertyName: quadrilateralType + SimpleQuadrilateral: + allOf: + - $ref: '#/components/schemas/QuadrilateralInterface' + - type: object + properties: + quadrilateralType: + type: string + enum: + - 'SimpleQuadrilateral' + ComplexQuadrilateral: + allOf: + - $ref: '#/components/schemas/QuadrilateralInterface' + - type: object + properties: + quadrilateralType: + type: string + enum: + - 'ComplexQuadrilateral' + GrandparentAnimal: + type: object + required: + - pet_type + properties: + pet_type: + type: string + discriminator: + propertyName: pet_type + ParentPet: + type: object + allOf: + - $ref: '#/components/schemas/GrandparentAnimal' + ChildCat: + allOf: + - $ref: '#/components/schemas/ParentPet' + - type: object + properties: + name: + type: string + ArrayOfEnums: + type: array + items: + $ref: '#/components/schemas/StringEnum' + AdditionalPropertiesWithArrayOfEnums: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/EnumClass' + DateTimeTest: + type: string + default: '2010-01-01T10:10:10.000111+01:00' + example: '2010-01-01T10:10:10.000111+01:00' + format: date-time + ObjectInterface: + type: object + ObjectWithValidations: + type: object + minProperties: 2 + SomeObject: + allOf: + - $ref: '#/components/schemas/ObjectInterface' +# TODO turn this back on later +# AnyType: +# description: this should allow any type because type was not specified + ArrayWithValidationsInItems: + type: array + maxItems: 2 + items: + type: integer + format: int64 + maximum: 7 + ArrayHoldingAnyType: + type: array + items: + description: any type can be stored here + DateWithValidations: + type: string + format: date + pattern: '^2020.*' + DateTimeWithValidations: + type: string + format: date-time + pattern: '^2020.*' + NoAdditionalProperties: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + required: + - id + additionalProperties: false + IntegerMax10: + type: integer + format: int64 + maximum: 10 + IntegerMin15: + type: integer + format: int64 + minimum: 15 + StringWithValidation: + type: string + minLength: 7 + Player: + type: object + description: a model that includes a self reference this forces properties and additionalProperties + to be lazy loaded in python models because the Player class has not fully loaded when defining + properties + properties: + name: + type: string + enemyPlayer: + $ref: '#/components/schemas/Player' + BooleanEnum: + type: boolean + enum: + - true + ComposedObject: + type: object + allOf: + - {} + ComposedNumber: + type: number + allOf: + - {} + ComposedString: + type: string + allOf: + - {} + ComposedBool: + type: boolean + allOf: + - {} + ComposedArray: + type: array + items: {} + allOf: + - {} + ComposedNone: + type: 'null' + allOf: + - {} diff --git a/samples/openapi3/client/petstore/python-experimental/.gitignore b/samples/openapi3/client/petstore/python-experimental/.gitignore new file mode 100644 index 000000000000..a62e8aba43f8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/.gitignore @@ -0,0 +1,67 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt +dev-requirements.txt.log + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/samples/openapi3/client/petstore/python-experimental/.gitlab-ci.yml b/samples/openapi3/client/petstore/python-experimental/.gitlab-ci.yml new file mode 100644 index 000000000000..611e425676ee --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/.gitlab-ci.yml @@ -0,0 +1,24 @@ +# ref: https://docs.gitlab.com/ee/ci/README.html + +stages: + - test + +.tests: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=petstore_api + +test-3.5: + extends: .tests + image: python:3.5-alpine +test-3.6: + extends: .tests + image: python:3.6-alpine +test-3.7: + extends: .tests + image: python:3.7-alpine +test-3.8: + extends: .tests + image: python:3.8-alpine diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator-ignore b/samples/openapi3/client/petstore/python-experimental/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/.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/openapi3/client/petstore/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES new file mode 100644 index 000000000000..ad8d63e86a68 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES @@ -0,0 +1,262 @@ +.gitignore +.gitlab-ci.yml +.travis.yml +README.md +docs/AdditionalPropertiesClass.md +docs/AdditionalPropertiesWithArrayOfEnums.md +docs/Address.md +docs/Animal.md +docs/AnimalFarm.md +docs/AnotherFakeApi.md +docs/ApiResponse.md +docs/Apple.md +docs/AppleReq.md +docs/ArrayHoldingAnyType.md +docs/ArrayOfArrayOfNumberOnly.md +docs/ArrayOfEnums.md +docs/ArrayOfNumberOnly.md +docs/ArrayTest.md +docs/ArrayWithValidationsInItems.md +docs/Banana.md +docs/BananaReq.md +docs/Bar.md +docs/BasquePig.md +docs/Boolean.md +docs/BooleanEnum.md +docs/Capitalization.md +docs/Cat.md +docs/CatAllOf.md +docs/Category.md +docs/ChildCat.md +docs/ChildCatAllOf.md +docs/ClassModel.md +docs/Client.md +docs/ComplexQuadrilateral.md +docs/ComplexQuadrilateralAllOf.md +docs/ComposedAnyOfDifferentTypesNoValidations.md +docs/ComposedArray.md +docs/ComposedBool.md +docs/ComposedNone.md +docs/ComposedNumber.md +docs/ComposedObject.md +docs/ComposedOneOfDifferentTypes.md +docs/ComposedString.md +docs/DanishPig.md +docs/DateTimeTest.md +docs/DateTimeWithValidations.md +docs/DateWithValidations.md +docs/DefaultApi.md +docs/Dog.md +docs/DogAllOf.md +docs/Drawing.md +docs/EnumArrays.md +docs/EnumClass.md +docs/EnumTest.md +docs/EquilateralTriangle.md +docs/EquilateralTriangleAllOf.md +docs/FakeApi.md +docs/FakeClassnameTags123Api.md +docs/File.md +docs/FileSchemaTestClass.md +docs/Foo.md +docs/FormatTest.md +docs/Fruit.md +docs/FruitReq.md +docs/GmFruit.md +docs/GrandparentAnimal.md +docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md +docs/InlineResponseDefault.md +docs/IntegerEnum.md +docs/IntegerEnumBig.md +docs/IntegerEnumOneValue.md +docs/IntegerEnumWithDefaultValue.md +docs/IntegerMax10.md +docs/IntegerMin15.md +docs/IsoscelesTriangle.md +docs/IsoscelesTriangleAllOf.md +docs/Mammal.md +docs/MapTest.md +docs/MixedPropertiesAndAdditionalPropertiesClass.md +docs/Model200Response.md +docs/ModelReturn.md +docs/Name.md +docs/NoAdditionalProperties.md +docs/NullableClass.md +docs/NullableShape.md +docs/NullableString.md +docs/Number.md +docs/NumberOnly.md +docs/NumberWithValidations.md +docs/ObjectInterface.md +docs/ObjectModelWithRefProps.md +docs/ObjectWithDifficultlyNamedProps.md +docs/ObjectWithValidations.md +docs/Order.md +docs/ParentPet.md +docs/Pet.md +docs/PetApi.md +docs/Pig.md +docs/Player.md +docs/Quadrilateral.md +docs/QuadrilateralInterface.md +docs/ReadOnlyFirst.md +docs/ScaleneTriangle.md +docs/ScaleneTriangleAllOf.md +docs/Shape.md +docs/ShapeOrNull.md +docs/SimpleQuadrilateral.md +docs/SimpleQuadrilateralAllOf.md +docs/SomeObject.md +docs/SpecialModelName.md +docs/StoreApi.md +docs/String.md +docs/StringBooleanMap.md +docs/StringEnum.md +docs/StringEnumWithDefaultValue.md +docs/StringWithValidation.md +docs/Tag.md +docs/Triangle.md +docs/TriangleInterface.md +docs/User.md +docs/UserApi.md +docs/Whale.md +docs/Zebra.md +git_push.sh +petstore_api/__init__.py +petstore_api/api/__init__.py +petstore_api/api/another_fake_api.py +petstore_api/api/default_api.py +petstore_api/api/fake_api.py +petstore_api/api/fake_classname_tags_123_api.py +petstore_api/api/pet_api.py +petstore_api/api/store_api.py +petstore_api/api/user_api.py +petstore_api/api_client.py +petstore_api/apis/__init__.py +petstore_api/configuration.py +petstore_api/exceptions.py +petstore_api/model/__init__.py +petstore_api/model/additional_properties_class.py +petstore_api/model/additional_properties_with_array_of_enums.py +petstore_api/model/address.py +petstore_api/model/animal.py +petstore_api/model/animal_farm.py +petstore_api/model/api_response.py +petstore_api/model/apple.py +petstore_api/model/apple_req.py +petstore_api/model/array_holding_any_type.py +petstore_api/model/array_of_array_of_number_only.py +petstore_api/model/array_of_enums.py +petstore_api/model/array_of_number_only.py +petstore_api/model/array_test.py +petstore_api/model/array_with_validations_in_items.py +petstore_api/model/banana.py +petstore_api/model/banana_req.py +petstore_api/model/bar.py +petstore_api/model/basque_pig.py +petstore_api/model/boolean.py +petstore_api/model/boolean_enum.py +petstore_api/model/capitalization.py +petstore_api/model/cat.py +petstore_api/model/cat_all_of.py +petstore_api/model/category.py +petstore_api/model/child_cat.py +petstore_api/model/child_cat_all_of.py +petstore_api/model/class_model.py +petstore_api/model/client.py +petstore_api/model/complex_quadrilateral.py +petstore_api/model/complex_quadrilateral_all_of.py +petstore_api/model/composed_any_of_different_types_no_validations.py +petstore_api/model/composed_array.py +petstore_api/model/composed_bool.py +petstore_api/model/composed_none.py +petstore_api/model/composed_number.py +petstore_api/model/composed_object.py +petstore_api/model/composed_one_of_different_types.py +petstore_api/model/composed_string.py +petstore_api/model/danish_pig.py +petstore_api/model/date_time_test.py +petstore_api/model/date_time_with_validations.py +petstore_api/model/date_with_validations.py +petstore_api/model/dog.py +petstore_api/model/dog_all_of.py +petstore_api/model/drawing.py +petstore_api/model/enum_arrays.py +petstore_api/model/enum_class.py +petstore_api/model/enum_test.py +petstore_api/model/equilateral_triangle.py +petstore_api/model/equilateral_triangle_all_of.py +petstore_api/model/file.py +petstore_api/model/file_schema_test_class.py +petstore_api/model/foo.py +petstore_api/model/format_test.py +petstore_api/model/fruit.py +petstore_api/model/fruit_req.py +petstore_api/model/gm_fruit.py +petstore_api/model/grandparent_animal.py +petstore_api/model/has_only_read_only.py +petstore_api/model/health_check_result.py +petstore_api/model/inline_response_default.py +petstore_api/model/integer_enum.py +petstore_api/model/integer_enum_big.py +petstore_api/model/integer_enum_one_value.py +petstore_api/model/integer_enum_with_default_value.py +petstore_api/model/integer_max10.py +petstore_api/model/integer_min15.py +petstore_api/model/isosceles_triangle.py +petstore_api/model/isosceles_triangle_all_of.py +petstore_api/model/mammal.py +petstore_api/model/map_test.py +petstore_api/model/mixed_properties_and_additional_properties_class.py +petstore_api/model/model200_response.py +petstore_api/model/model_return.py +petstore_api/model/name.py +petstore_api/model/no_additional_properties.py +petstore_api/model/nullable_class.py +petstore_api/model/nullable_shape.py +petstore_api/model/nullable_string.py +petstore_api/model/number.py +petstore_api/model/number_only.py +petstore_api/model/number_with_validations.py +petstore_api/model/object_interface.py +petstore_api/model/object_model_with_ref_props.py +petstore_api/model/object_with_difficultly_named_props.py +petstore_api/model/object_with_validations.py +petstore_api/model/order.py +petstore_api/model/parent_pet.py +petstore_api/model/pet.py +petstore_api/model/pig.py +petstore_api/model/player.py +petstore_api/model/quadrilateral.py +petstore_api/model/quadrilateral_interface.py +petstore_api/model/read_only_first.py +petstore_api/model/scalene_triangle.py +petstore_api/model/scalene_triangle_all_of.py +petstore_api/model/shape.py +petstore_api/model/shape_or_null.py +petstore_api/model/simple_quadrilateral.py +petstore_api/model/simple_quadrilateral_all_of.py +petstore_api/model/some_object.py +petstore_api/model/special_model_name.py +petstore_api/model/string.py +petstore_api/model/string_boolean_map.py +petstore_api/model/string_enum.py +petstore_api/model/string_enum_with_default_value.py +petstore_api/model/string_with_validation.py +petstore_api/model/tag.py +petstore_api/model/triangle.py +petstore_api/model/triangle_interface.py +petstore_api/model/user.py +petstore_api/model/whale.py +petstore_api/model/zebra.py +petstore_api/models/__init__.py +petstore_api/rest.py +petstore_api/schemas.py +petstore_api/signing.py +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +tox.ini diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/.travis.yml b/samples/openapi3/client/petstore/python-experimental/.travis.yml new file mode 100644 index 000000000000..f931f0f74b96 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/.travis.yml @@ -0,0 +1,13 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "3.5" + - "3.6" + - "3.7" + - "3.8" +# command to install dependencies +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" +# command to run tests +script: pytest --cov=petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/Makefile b/samples/openapi3/client/petstore/python-experimental/Makefile new file mode 100644 index 000000000000..863c380ebef9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/Makefile @@ -0,0 +1,16 @@ +REQUIREMENTS_FILE=dev-requirements.txt +REQUIREMENTS_OUT=dev-requirements.txt.log +SETUP_OUT=*.egg-info +VENV=venv + +clean: + rm -rf $(REQUIREMENTS_OUT) + rm -rf $(SETUP_OUT) + rm -rf $(VENV) + rm -rf .tox + rm -rf .coverage + find . -name "*.py[oc]" -delete + find . -name "__pycache__" -delete + +test: clean + bash ./test_python.sh \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/README.md b/samples/openapi3/client/petstore/python-experimental/README.md new file mode 100644 index 000000000000..5798de014b75 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/README.md @@ -0,0 +1,320 @@ +# petstore-api +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.PythonExperimentalClientCodegen + +## Requirements. + +Python >= 3.9 +v3.9 is needed so one can combine classmethod and property decorators to define +object schema properties as classes + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import petstore_api +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import petstore_api +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +import datetimeimport datetimeimport datetimeimport datetimeimport datetimeimport datetimeimport datetime +import time +import petstore_api +from pprint import pprint +from petstore_api.api import another_fake_api +from petstore_api.model.client import Client +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# 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 + api_instance = another_fake_api.AnotherFakeApi(api_client) + client = Client( + client="client_example", + ) # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(client) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags +*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo | +*FakeApi* | [**additional_properties_with_array_of_enums**](docs/FakeApi.md#additional_properties_with_array_of_enums) | **GET** /fake/additional-properties-with-array-of-enums | Additional Properties with Array of Enums +*FakeApi* | [**array_model**](docs/FakeApi.md#array_model) | **POST** /fake/refs/arraymodel | +*FakeApi* | [**array_of_enums**](docs/FakeApi.md#array_of_enums) | **POST** /fake/refs/array-of-enums | Array of Enums +*FakeApi* | [**body_with_file_schema**](docs/FakeApi.md#body_with_file_schema) | **PUT** /fake/body-with-file-schema | +*FakeApi* | [**body_with_query_params**](docs/FakeApi.md#body_with_query_params) | **PUT** /fake/body-with-query-params | +*FakeApi* | [**boolean**](docs/FakeApi.md#boolean) | **POST** /fake/refs/boolean | +*FakeApi* | [**case_sensitive_params**](docs/FakeApi.md#case_sensitive_params) | **PUT** /fake/case-sensitive-params | +*FakeApi* | [**client_model**](docs/FakeApi.md#client_model) | **PATCH** /fake | To test \"client\" model +*FakeApi* | [**composed_one_of_different_types**](docs/FakeApi.md#composed_one_of_different_types) | **POST** /fake/refs/composed_one_of_number_with_validations | +*FakeApi* | [**endpoint_parameters**](docs/FakeApi.md#endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**enum_parameters**](docs/FakeApi.md#enum_parameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**group_parameters**](docs/FakeApi.md#group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeApi* | [**inline_additional_properties**](docs/FakeApi.md#inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**json_form_data**](docs/FakeApi.md#json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**mammal**](docs/FakeApi.md#mammal) | **POST** /fake/refs/mammal | +*FakeApi* | [**number_with_validations**](docs/FakeApi.md#number_with_validations) | **POST** /fake/refs/number | +*FakeApi* | [**object_model_with_ref_props**](docs/FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props | +*FakeApi* | [**parameter_collisions**](docs/FakeApi.md#parameter_collisions) | **POST** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case +*FakeApi* | [**query_parameter_collection_format**](docs/FakeApi.md#query_parameter_collection_format) | **PUT** /fake/test-query-paramters | +*FakeApi* | [**string**](docs/FakeApi.md#string) | **POST** /fake/refs/string | +*FakeApi* | [**string_enum**](docs/FakeApi.md#string_enum) | **POST** /fake/refs/enum | +*FakeApi* | [**upload_download_file**](docs/FakeApi.md#upload_download_file) | **POST** /fake/uploadDownloadFile | uploads a file and downloads a file using application/octet-stream +*FakeApi* | [**upload_file**](docs/FakeApi.md#upload_file) | **POST** /fake/uploadFile | uploads a file using multipart/form-data +*FakeApi* | [**upload_files**](docs/FakeApi.md#upload_files) | **POST** /fake/uploadFiles | uploads files using multipart/form-data +*FakeClassnameTags123Api* | [**classname**](docs/FakeClassnameTags123Api.md#classname) | **PATCH** /fake_classname_test | To test class name in snake case +*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_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*PetApi* | [**upload_image**](docs/PetApi.md#upload_image) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | 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/{order_id} | Find purchase order by ID +*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet +*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user +*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user +*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name +*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system +*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [AdditionalPropertiesWithArrayOfEnums](docs/AdditionalPropertiesWithArrayOfEnums.md) + - [Address](docs/Address.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [Apple](docs/Apple.md) + - [AppleReq](docs/AppleReq.md) + - [ArrayHoldingAnyType](docs/ArrayHoldingAnyType.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfEnums](docs/ArrayOfEnums.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [ArrayWithValidationsInItems](docs/ArrayWithValidationsInItems.md) + - [Banana](docs/Banana.md) + - [BananaReq](docs/BananaReq.md) + - [Bar](docs/Bar.md) + - [BasquePig](docs/BasquePig.md) + - [Boolean](docs/Boolean.md) + - [BooleanEnum](docs/BooleanEnum.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ChildCat](docs/ChildCat.md) + - [ChildCatAllOf](docs/ChildCatAllOf.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [ComplexQuadrilateral](docs/ComplexQuadrilateral.md) + - [ComplexQuadrilateralAllOf](docs/ComplexQuadrilateralAllOf.md) + - [ComposedAnyOfDifferentTypesNoValidations](docs/ComposedAnyOfDifferentTypesNoValidations.md) + - [ComposedArray](docs/ComposedArray.md) + - [ComposedBool](docs/ComposedBool.md) + - [ComposedNone](docs/ComposedNone.md) + - [ComposedNumber](docs/ComposedNumber.md) + - [ComposedObject](docs/ComposedObject.md) + - [ComposedOneOfDifferentTypes](docs/ComposedOneOfDifferentTypes.md) + - [ComposedString](docs/ComposedString.md) + - [DanishPig](docs/DanishPig.md) + - [DateTimeTest](docs/DateTimeTest.md) + - [DateTimeWithValidations](docs/DateTimeWithValidations.md) + - [DateWithValidations](docs/DateWithValidations.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [Drawing](docs/Drawing.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [EquilateralTriangle](docs/EquilateralTriangle.md) + - [EquilateralTriangleAllOf](docs/EquilateralTriangleAllOf.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FormatTest](docs/FormatTest.md) + - [Fruit](docs/Fruit.md) + - [FruitReq](docs/FruitReq.md) + - [GmFruit](docs/GmFruit.md) + - [GrandparentAnimal](docs/GrandparentAnimal.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) + - [InlineResponseDefault](docs/InlineResponseDefault.md) + - [IntegerEnum](docs/IntegerEnum.md) + - [IntegerEnumBig](docs/IntegerEnumBig.md) + - [IntegerEnumOneValue](docs/IntegerEnumOneValue.md) + - [IntegerEnumWithDefaultValue](docs/IntegerEnumWithDefaultValue.md) + - [IntegerMax10](docs/IntegerMax10.md) + - [IntegerMin15](docs/IntegerMin15.md) + - [IsoscelesTriangle](docs/IsoscelesTriangle.md) + - [IsoscelesTriangleAllOf](docs/IsoscelesTriangleAllOf.md) + - [Mammal](docs/Mammal.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [ModelReturn](docs/ModelReturn.md) + - [Name](docs/Name.md) + - [NoAdditionalProperties](docs/NoAdditionalProperties.md) + - [NullableClass](docs/NullableClass.md) + - [NullableShape](docs/NullableShape.md) + - [NullableString](docs/NullableString.md) + - [Number](docs/Number.md) + - [NumberOnly](docs/NumberOnly.md) + - [NumberWithValidations](docs/NumberWithValidations.md) + - [ObjectInterface](docs/ObjectInterface.md) + - [ObjectModelWithRefProps](docs/ObjectModelWithRefProps.md) + - [ObjectWithDifficultlyNamedProps](docs/ObjectWithDifficultlyNamedProps.md) + - [ObjectWithValidations](docs/ObjectWithValidations.md) + - [Order](docs/Order.md) + - [ParentPet](docs/ParentPet.md) + - [Pet](docs/Pet.md) + - [Pig](docs/Pig.md) + - [Player](docs/Player.md) + - [Quadrilateral](docs/Quadrilateral.md) + - [QuadrilateralInterface](docs/QuadrilateralInterface.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [ScaleneTriangle](docs/ScaleneTriangle.md) + - [ScaleneTriangleAllOf](docs/ScaleneTriangleAllOf.md) + - [Shape](docs/Shape.md) + - [ShapeOrNull](docs/ShapeOrNull.md) + - [SimpleQuadrilateral](docs/SimpleQuadrilateral.md) + - [SimpleQuadrilateralAllOf](docs/SimpleQuadrilateralAllOf.md) + - [SomeObject](docs/SomeObject.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [String](docs/String.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [StringEnum](docs/StringEnum.md) + - [StringEnumWithDefaultValue](docs/StringEnumWithDefaultValue.md) + - [StringWithValidation](docs/StringWithValidation.md) + - [Tag](docs/Tag.md) + - [Triangle](docs/Triangle.md) + - [TriangleInterface](docs/TriangleInterface.md) + - [User](docs/User.md) + - [Whale](docs/Whale.md) + - [Zebra](docs/Zebra.md) + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + + +## bearer_test + +- **Type**: Bearer authentication (JWT) + + +## http_basic_test + +- **Type**: HTTP basic authentication + + +## http_signature_test + +- **Type**: HTTP signature authentication + + Authentication schemes defined for the API: +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + + + + + + + +## Notes for Large OpenAPI documents +If the OpenAPI document is large, imports in petstore_api.apis and petstore_api.models may fail with a +RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: + +Solution 1: +Use specific imports for apis and models like: +- `from petstore_api.api.default_api import DefaultApi` +- `from petstore_api.model.pet import Pet` + +Solution 1: +Before importing the package, adjust the maximum recursion limit as shown below: +``` +import sys +sys.setrecursionlimit(1500) +import petstore_api +from petstore_api.apis import * +from petstore_api.models import * +``` diff --git a/samples/openapi3/client/petstore/python-experimental/dev-requirements.txt b/samples/openapi3/client/petstore/python-experimental/dev-requirements.txt new file mode 100644 index 000000000000..ccdfca629494 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/dev-requirements.txt @@ -0,0 +1,2 @@ +tox +flake8 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md new file mode 100644 index 000000000000..cf88f5b25d9f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -0,0 +1,17 @@ +# AdditionalPropertiesClass + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**map_property** | **{str: (str,)}** | | [optional] +**map_of_map_property** | **{str: ({str: (str,)},)}** | | [optional] +**anytype_1** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**map_with_undeclared_properties_anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_with_undeclared_properties_anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_with_undeclared_properties_anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**empty_map** | **bool, date, datetime, dict, float, int, list, str** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] +**map_with_undeclared_properties_string** | **{str: (str,)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesWithArrayOfEnums.md b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesWithArrayOfEnums.md new file mode 100644 index 000000000000..81d4ee554017 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesWithArrayOfEnums.md @@ -0,0 +1,9 @@ +# AdditionalPropertiesWithArrayOfEnums + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **[EnumClass]** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Address.md b/samples/openapi3/client/petstore/python-experimental/docs/Address.md new file mode 100644 index 000000000000..a6060817c8c4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Address.md @@ -0,0 +1,9 @@ +# Address + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **int** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Animal.md b/samples/openapi3/client/petstore/python-experimental/docs/Animal.md new file mode 100644 index 000000000000..8d43981dc829 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **str** | | +**color** | **str** | | [optional] if omitted the server will use the default value of "red" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AnimalFarm.md b/samples/openapi3/client/petstore/python-experimental/docs/AnimalFarm.md new file mode 100644 index 000000000000..04db36a075cf --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/AnimalFarm.md @@ -0,0 +1,8 @@ +# AnimalFarm + +Type | Description | Notes +------------- | ------------- | ------------- +**[Animal]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md new file mode 100644 index 000000000000..6ec2e771f866 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md @@ -0,0 +1,94 @@ +# petstore_api.AnotherFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call_123_test_special_tags**](AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags + +# **call_123_test_special_tags** +> Client call_123_test_special_tags(client) + +To test special tags + +To test special tags and operation ID starting with number + +### Example + +```python +import petstore_api +from petstore_api.api import another_fake_api +from petstore_api.model.client import Client +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = another_fake_api.AnotherFakeApi(api_client) + + # example passing only required values which don't have defaults set + body = Client( + client="client_example", + ) + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Client**](Client.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Client**](Client.md) | | + + + +[**Client**](Client.md) + +### Authorization + +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) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ApiResponse.md b/samples/openapi3/client/petstore/python-experimental/docs/ApiResponse.md new file mode 100644 index 000000000000..6206bcbe6116 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**type** | **str** | | [optional] +**message** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Apple.md b/samples/openapi3/client/petstore/python-experimental/docs/Apple.md new file mode 100644 index 000000000000..93f59b3a2e19 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Apple.md @@ -0,0 +1,11 @@ +# Apple + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cultivar** | **str** | | +**origin** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md b/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md new file mode 100644 index 000000000000..1dde25261bcf --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md @@ -0,0 +1,10 @@ +# AppleReq + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cultivar** | **str** | | +**mealy** | **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/openapi3/client/petstore/python-experimental/docs/ArrayHoldingAnyType.md b/samples/openapi3/client/petstore/python-experimental/docs/ArrayHoldingAnyType.md new file mode 100644 index 000000000000..db0bfa793a6b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ArrayHoldingAnyType.md @@ -0,0 +1,8 @@ +# ArrayHoldingAnyType + +Type | Description | Notes +------------- | ------------- | ------------- +**[bool, date, datetime, dict, float, int, list, str, none_type]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 000000000000..5b5c89bfd669 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayArrayNumber** | **[[int, float]]** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfEnums.md b/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfEnums.md new file mode 100644 index 000000000000..ce8778c78f69 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfEnums.md @@ -0,0 +1,8 @@ +# ArrayOfEnums + +Type | Description | Notes +------------- | ------------- | ------------- +**[StringEnum]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfNumberOnly.md new file mode 100644 index 000000000000..2fa514a78659 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayNumber** | **[int, float]** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ArrayTest.md b/samples/openapi3/client/petstore/python-experimental/docs/ArrayTest.md new file mode 100644 index 000000000000..b84215f20ac4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**array_of_string** | **[str]** | | [optional] +**array_array_of_integer** | **[[int]]** | | [optional] +**array_array_of_model** | **[[ReadOnlyFirst]]** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ArrayWithValidationsInItems.md b/samples/openapi3/client/petstore/python-experimental/docs/ArrayWithValidationsInItems.md new file mode 100644 index 000000000000..d19d241bfeda --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ArrayWithValidationsInItems.md @@ -0,0 +1,8 @@ +# ArrayWithValidationsInItems + +Type | Description | Notes +------------- | ------------- | ------------- +**[int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Banana.md b/samples/openapi3/client/petstore/python-experimental/docs/Banana.md new file mode 100644 index 000000000000..11b9e97a5c86 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Banana.md @@ -0,0 +1,10 @@ +# Banana + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lengthCm** | **int, float** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BananaReq.md b/samples/openapi3/client/petstore/python-experimental/docs/BananaReq.md new file mode 100644 index 000000000000..68959cfbd6f8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/BananaReq.md @@ -0,0 +1,10 @@ +# BananaReq + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lengthCm** | **int, float** | | +**sweet** | **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/openapi3/client/petstore/python-experimental/docs/Bar.md b/samples/openapi3/client/petstore/python-experimental/docs/Bar.md new file mode 100644 index 000000000000..f6e0141c5fc0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Bar.md @@ -0,0 +1,8 @@ +# Bar + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | defaults to "bar" + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md b/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md new file mode 100644 index 000000000000..76fa224a3773 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md @@ -0,0 +1,10 @@ +# BasquePig + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Boolean.md b/samples/openapi3/client/petstore/python-experimental/docs/Boolean.md new file mode 100644 index 000000000000..9e64a63c8ee6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Boolean.md @@ -0,0 +1,8 @@ +# Boolean + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BooleanEnum.md b/samples/openapi3/client/petstore/python-experimental/docs/BooleanEnum.md new file mode 100644 index 000000000000..1235414f1e3d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/BooleanEnum.md @@ -0,0 +1,8 @@ +# BooleanEnum + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | must be one of [True, ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Capitalization.md b/samples/openapi3/client/petstore/python-experimental/docs/Capitalization.md new file mode 100644 index 000000000000..a9f4f6ecdae9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **str** | | [optional] +**CapitalCamel** | **str** | | [optional] +**small_Snake** | **str** | | [optional] +**Capital_Snake** | **str** | | [optional] +**SCA_ETH_Flow_Points** | **str** | | [optional] +**ATT_NAME** | **str** | Name of the pet | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Cat.md b/samples/openapi3/client/petstore/python-experimental/docs/Cat.md new file mode 100644 index 000000000000..a6d67ac80190 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Cat.md @@ -0,0 +1,9 @@ +# Cat + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/CatAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/CatAllOf.md new file mode 100644 index 000000000000..f2a9f7d35b7f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Category.md b/samples/openapi3/client/petstore/python-experimental/docs/Category.md new file mode 100644 index 000000000000..a847da44a13f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | if omitted the server will use the default value of "default-name" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md b/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md new file mode 100644 index 000000000000..08b6b3c1cbde --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md @@ -0,0 +1,9 @@ +# ChildCat + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md new file mode 100644 index 000000000000..1e0f07a36283 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md @@ -0,0 +1,10 @@ +# ChildCatAllOf + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ClassModel.md b/samples/openapi3/client/petstore/python-experimental/docs/ClassModel.md new file mode 100644 index 000000000000..97d387878b39 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ClassModel.md @@ -0,0 +1,12 @@ +# ClassModel + +Model for testing model with \"_class\" property + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Client.md b/samples/openapi3/client/petstore/python-experimental/docs/Client.md new file mode 100644 index 000000000000..7c0ad6e9734b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md new file mode 100644 index 000000000000..0c647b168957 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md @@ -0,0 +1,9 @@ +# ComplexQuadrilateral + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateralAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateralAllOf.md new file mode 100644 index 000000000000..d2cb47a3c42d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateralAllOf.md @@ -0,0 +1,10 @@ +# ComplexQuadrilateralAllOf + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quadrilateralType** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComposedAnyOfDifferentTypesNoValidations.md b/samples/openapi3/client/petstore/python-experimental/docs/ComposedAnyOfDifferentTypesNoValidations.md new file mode 100644 index 000000000000..3dad57b962a7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComposedAnyOfDifferentTypesNoValidations.md @@ -0,0 +1,9 @@ +# ComposedAnyOfDifferentTypesNoValidations + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComposedArray.md b/samples/openapi3/client/petstore/python-experimental/docs/ComposedArray.md new file mode 100644 index 000000000000..6f0ebdc39e09 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComposedArray.md @@ -0,0 +1,8 @@ +# ComposedArray + +Type | Description | Notes +------------- | ------------- | ------------- +**[bool, date, datetime, dict, float, int, list, str, none_type]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComposedBool.md b/samples/openapi3/client/petstore/python-experimental/docs/ComposedBool.md new file mode 100644 index 000000000000..64ba095ebe41 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComposedBool.md @@ -0,0 +1,8 @@ +# ComposedBool + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComposedNone.md b/samples/openapi3/client/petstore/python-experimental/docs/ComposedNone.md new file mode 100644 index 000000000000..f295563e7041 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComposedNone.md @@ -0,0 +1,8 @@ +# ComposedNone + +Type | Description | Notes +------------- | ------------- | ------------- +**none_type** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComposedNumber.md b/samples/openapi3/client/petstore/python-experimental/docs/ComposedNumber.md new file mode 100644 index 000000000000..4c52af546f70 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComposedNumber.md @@ -0,0 +1,8 @@ +# ComposedNumber + +Type | Description | Notes +------------- | ------------- | ------------- +**float** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComposedObject.md b/samples/openapi3/client/petstore/python-experimental/docs/ComposedObject.md new file mode 100644 index 000000000000..3939050270d5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComposedObject.md @@ -0,0 +1,9 @@ +# ComposedObject + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComposedOneOfDifferentTypes.md b/samples/openapi3/client/petstore/python-experimental/docs/ComposedOneOfDifferentTypes.md new file mode 100644 index 000000000000..59ed1efabc69 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComposedOneOfDifferentTypes.md @@ -0,0 +1,11 @@ +# ComposedOneOfDifferentTypes + +this is a model that allows payloads of type object or number + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComposedString.md b/samples/openapi3/client/petstore/python-experimental/docs/ComposedString.md new file mode 100644 index 000000000000..37b16f50b4f6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComposedString.md @@ -0,0 +1,8 @@ +# ComposedString + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md b/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md new file mode 100644 index 000000000000..f239dc97318d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md @@ -0,0 +1,10 @@ +# DanishPig + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DateTimeTest.md b/samples/openapi3/client/petstore/python-experimental/docs/DateTimeTest.md new file mode 100644 index 000000000000..408c95d0f9ae --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/DateTimeTest.md @@ -0,0 +1,8 @@ +# DateTimeTest + +Type | Description | Notes +------------- | ------------- | ------------- +**datetime** | | defaults to isoparse('2010-01-01T10:10:10.000111+01:00') + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DateTimeWithValidations.md b/samples/openapi3/client/petstore/python-experimental/docs/DateTimeWithValidations.md new file mode 100644 index 000000000000..bb2e7e17e71b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/DateTimeWithValidations.md @@ -0,0 +1,8 @@ +# DateTimeWithValidations + +Type | Description | Notes +------------- | ------------- | ------------- +**datetime** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DateWithValidations.md b/samples/openapi3/client/petstore/python-experimental/docs/DateWithValidations.md new file mode 100644 index 000000000000..bce951bc5b5a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/DateWithValidations.md @@ -0,0 +1,8 @@ +# DateWithValidations + +Type | Description | Notes +------------- | ------------- | ------------- +**date** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md new file mode 100644 index 000000000000..768fca5bd474 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md @@ -0,0 +1,70 @@ +# petstore_api.DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**foo_get**](DefaultApi.md#foo_get) | **GET** /foo | + +# **foo_get** +> InlineResponseDefault foo_get() + + + +### Example + +```python +import petstore_api +from petstore_api.api import default_api +from petstore_api.model.inline_response_default import InlineResponseDefault +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = default_api.DefaultApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.foo_get() + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling DefaultApi->foo_get: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +default | ApiResponseForDefault | response + +#### ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**InlineResponseDefault**](InlineResponseDefault.md) | | + + + +[**InlineResponseDefault**](InlineResponseDefault.md) + +### Authorization + +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) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Dog.md b/samples/openapi3/client/petstore/python-experimental/docs/Dog.md new file mode 100644 index 000000000000..851567bc58ad --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Dog.md @@ -0,0 +1,9 @@ +# Dog + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md new file mode 100644 index 000000000000..8dfd16400b64 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md new file mode 100644 index 000000000000..e535601a731c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md @@ -0,0 +1,13 @@ +# Drawing + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mainShape** | [**Shape**](Shape.md) | | [optional] +**shapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] +**nullableShape** | [**NullableShape**](NullableShape.md) | | [optional] +**shapes** | **[Shape]** | | [optional] +**any string name** | **Fruit** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/EnumArrays.md b/samples/openapi3/client/petstore/python-experimental/docs/EnumArrays.md new file mode 100644 index 000000000000..78ecdb677e41 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**just_symbol** | **str** | | [optional] +**array_enum** | **[str]** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/EnumClass.md b/samples/openapi3/client/petstore/python-experimental/docs/EnumClass.md new file mode 100644 index 000000000000..1399e59181db --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/EnumClass.md @@ -0,0 +1,8 @@ +# EnumClass + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/EnumTest.md b/samples/openapi3/client/petstore/python-experimental/docs/EnumTest.md new file mode 100644 index 000000000000..e720f3bf92d3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/EnumTest.md @@ -0,0 +1,18 @@ +# EnumTest + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enum_string** | **str** | | [optional] +**enum_string_required** | **str** | | +**enum_integer** | **int** | | [optional] +**enum_number** | **int, float** | | [optional] +**stringEnum** | [**StringEnum**](StringEnum.md) | | [optional] +**IntegerEnum** | [**IntegerEnum**](IntegerEnum.md) | | [optional] +**StringEnumWithDefaultValue** | [**StringEnumWithDefaultValue**](StringEnumWithDefaultValue.md) | | [optional] +**IntegerEnumWithDefaultValue** | [**IntegerEnumWithDefaultValue**](IntegerEnumWithDefaultValue.md) | | [optional] +**IntegerEnumOneValue** | [**IntegerEnumOneValue**](IntegerEnumOneValue.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md new file mode 100644 index 000000000000..834bcb30fd6c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md @@ -0,0 +1,9 @@ +# EquilateralTriangle + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md new file mode 100644 index 000000000000..8e151789e012 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md @@ -0,0 +1,10 @@ +# EquilateralTriangleAllOf + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**triangleType** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md new file mode 100644 index 000000000000..45fdc4a5c1c3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -0,0 +1,2604 @@ +# petstore_api.FakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**additional_properties_with_array_of_enums**](FakeApi.md#additional_properties_with_array_of_enums) | **GET** /fake/additional-properties-with-array-of-enums | Additional Properties with Array of Enums +[**array_model**](FakeApi.md#array_model) | **POST** /fake/refs/arraymodel | +[**array_of_enums**](FakeApi.md#array_of_enums) | **POST** /fake/refs/array-of-enums | Array of Enums +[**body_with_file_schema**](FakeApi.md#body_with_file_schema) | **PUT** /fake/body-with-file-schema | +[**body_with_query_params**](FakeApi.md#body_with_query_params) | **PUT** /fake/body-with-query-params | +[**boolean**](FakeApi.md#boolean) | **POST** /fake/refs/boolean | +[**case_sensitive_params**](FakeApi.md#case_sensitive_params) | **PUT** /fake/case-sensitive-params | +[**client_model**](FakeApi.md#client_model) | **PATCH** /fake | To test \"client\" model +[**composed_one_of_different_types**](FakeApi.md#composed_one_of_different_types) | **POST** /fake/refs/composed_one_of_number_with_validations | +[**endpoint_parameters**](FakeApi.md#endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**enum_parameters**](FakeApi.md#enum_parameters) | **GET** /fake | To test enum parameters +[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint +[**group_parameters**](FakeApi.md#group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**inline_additional_properties**](FakeApi.md#inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**json_form_data**](FakeApi.md#json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data +[**mammal**](FakeApi.md#mammal) | **POST** /fake/refs/mammal | +[**number_with_validations**](FakeApi.md#number_with_validations) | **POST** /fake/refs/number | +[**object_model_with_ref_props**](FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props | +[**parameter_collisions**](FakeApi.md#parameter_collisions) | **POST** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case +[**query_parameter_collection_format**](FakeApi.md#query_parameter_collection_format) | **PUT** /fake/test-query-paramters | +[**string**](FakeApi.md#string) | **POST** /fake/refs/string | +[**string_enum**](FakeApi.md#string_enum) | **POST** /fake/refs/enum | +[**upload_download_file**](FakeApi.md#upload_download_file) | **POST** /fake/uploadDownloadFile | uploads a file and downloads a file using application/octet-stream +[**upload_file**](FakeApi.md#upload_file) | **POST** /fake/uploadFile | uploads a file using multipart/form-data +[**upload_files**](FakeApi.md#upload_files) | **POST** /fake/uploadFiles | uploads files using multipart/form-data + +# **additional_properties_with_array_of_enums** +> AdditionalPropertiesWithArrayOfEnums additional_properties_with_array_of_enums() + +Additional Properties with Array of Enums + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = AdditionalPropertiesWithArrayOfEnums( + key=[ + EnumClass("-efg"), + ], + ) + try: + # Additional Properties with Array of Enums + api_response = api_instance.additional_properties_with_array_of_enums( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->additional_properties_with_array_of_enums: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalPropertiesWithArrayOfEnums**](AdditionalPropertiesWithArrayOfEnums.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Got object with additional properties with array of enums + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AdditionalPropertiesWithArrayOfEnums**](AdditionalPropertiesWithArrayOfEnums.md) | | + + + +[**AdditionalPropertiesWithArrayOfEnums**](AdditionalPropertiesWithArrayOfEnums.md) + +### Authorization + +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) + +# **array_model** +> AnimalFarm array_model() + + + +Test serialization of ArrayModel + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.animal_farm import AnimalFarm +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = AnimalFarm([ + Animal(), + ]) + try: + api_response = api_instance.array_model( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->array_model: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnimalFarm**](AnimalFarm.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Output model + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AnimalFarm**](AnimalFarm.md) | | + + + +[**AnimalFarm**](AnimalFarm.md) + +### Authorization + +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) + +# **array_of_enums** +> ArrayOfEnums array_of_enums() + +Array of Enums + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.array_of_enums import ArrayOfEnums +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = ArrayOfEnums([ + StringEnum("placed"), + ]) + try: + # Array of Enums + api_response = api_instance.array_of_enums( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->array_of_enums: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArrayOfEnums**](ArrayOfEnums.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Got named array of enums + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArrayOfEnums**](ArrayOfEnums.md) | | + + + +[**ArrayOfEnums**](ArrayOfEnums.md) + +### Authorization + +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) + +# **body_with_file_schema** +> body_with_file_schema(file_schema_test_class) + + + +For this test, the body for this request much reference a schema named `File`. + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.file_schema_test_class import FileSchemaTestClass +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + body = FileSchemaTestClass( + file=File( + source_uri="source_uri_example", + ), + files=[ + File( + source_uri="source_uri_example", + ), + ], + ) + try: + api_response = api_instance.body_with_file_schema( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->body_with_file_schema: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FileSchemaTestClass**](FileSchemaTestClass.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **body_with_query_params** +> body_with_query_params(queryuser) + + + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.user import User +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'query': "query_example", + } + body = User( + id=1, + username="username_example", + first_name="first_name_example", + last_name="last_name_example", + email="email_example", + password="password_example", + phone="phone_example", + user_status=1, + object_with_no_declared_props=dict(), + object_with_no_declared_props_nullable=dict(), + any_type_prop=None, + any_type_prop_nullable=None, + ) + try: + api_response = api_instance.body_with_query_params( + query_params=query_params, + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->body_with_query_params: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**User**](User.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query | QuerySchema | | + + +#### QuerySchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **boolean** +> bool boolean() + + + +Test serialization of outer boolean types + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = True + try: + api_response = api_instance.boolean( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->boolean: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Output boolean + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + + +**bool** + +### Authorization + +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) + +# **case_sensitive_params** +> case_sensitive_params(some_varsome_var2some_var3) + + + +Ensures that original naming is used in endpoint params, that way we on't have collisions + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'someVar': "someVar_example", + 'SomeVar': "SomeVar_example", + 'some_var': "some_var_example", + } + try: + api_response = api_instance.case_sensitive_params( + query_params=query_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->case_sensitive_params: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +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 + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +someVar | SomeVarSchema | | +SomeVar | SomeVarSchema | | +some_var | SomeVarSchema | | + + +#### SomeVarSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### SomeVarSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### SomeVarSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **client_model** +> Client client_model(client) + +To test \"client\" model + +To test \"client\" model + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.client import Client +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + body = Client( + client="client_example", + ) + try: + # To test \"client\" model + api_response = api_instance.client_model( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->client_model: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Client**](Client.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Client**](Client.md) | | + + + +[**Client**](Client.md) + +### Authorization + +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) + +# **composed_one_of_different_types** +> ComposedOneOfDifferentTypes composed_one_of_different_types() + + + +Test serialization of object with $refed properties + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = ComposedOneOfDifferentTypes() + try: + api_response = api_instance.composed_one_of_different_types( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->composed_one_of_different_types: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ComposedOneOfDifferentTypes**](ComposedOneOfDifferentTypes.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Output model + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ComposedOneOfDifferentTypes**](ComposedOneOfDifferentTypes.md) | | + + + +[**ComposedOneOfDifferentTypes**](ComposedOneOfDifferentTypes.md) + +### Authorization + +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) + +# **endpoint_parameters** +> endpoint_parameters() + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example + +* Basic Authentication (http_basic_test): +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: http_basic_test +configuration = petstore_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = dict( + integer=10, + int32=20, + int64=1, + number=32.1, + _float=3.14, + double=67.8, + string="a", + pattern_without_delimiter="AUR,rZ#UM/?R,Fp^l6$ARjbhJk C", + byte='YQ==', + binary=open('/path/to/file', 'rb'), + date=isoparse('1970-01-01').date(), + date_time=isoparse('2020-02-02T20:20:20.22222Z'), + password="password_example", + callback="callback_example", + ) + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_response = api_instance.endpoint_parameters( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->endpoint_parameters: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/x-www-form-urlencoded' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationXWwwFormUrlencoded + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **int** | None | [optional] +**int32** | **int** | None | [optional] +**int64** | **int** | None | [optional] +**number** | **int, float** | None | +**float** | **int, float** | None | [optional] +**double** | **int, float** | None | +**string** | **str** | None | [optional] +**pattern_without_delimiter** | **str** | None | +**byte** | **str** | None | +**binary** | **file_type** | None | [optional] +**date** | **date** | None | [optional] +**dateTime** | **datetime** | None | [optional] if omitted the server will use the default value of isoparse('2010-02-01T10:20:10.11111+01:00') +**password** | **str** | None | [optional] +**callback** | **str** | None | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +400 | ApiResponseFor400 | Invalid username supplied +404 | ApiResponseFor404 | User not found + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **enum_parameters** +> enum_parameters() + +To test enum parameters + +To test enum parameters + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + query_params = { + 'enum_query_string_array': [ + "$", + ], + 'enum_query_string': "-efg", + 'enum_query_integer': 1, + 'enum_query_double': 1.1, + } + header_params = { + 'enum_header_string_array': [ + "$", + ], + 'enum_header_string': "-efg", + } + body = dict( + enum_form_string_array=[ + "$", + ], + enum_form_string="-efg", + ) + try: + # To test enum parameters + api_response = api_instance.enum_parameters( + query_params=query_params, + header_params=header_params, + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->enum_parameters: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is 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 +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 + +### body + +#### SchemaForRequestBodyApplicationXWwwFormUrlencoded + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enum_form_string_array** | **[str]** | Form parameter enum test (string array) | [optional] +**enum_form_string** | **str** | Form parameter enum test (string) | [optional] if omitted the server will use the default value of "-efg" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +enum_query_string_array | EnumQueryStringArraySchema | | optional +enum_query_string | EnumQueryStringSchema | | optional +enum_query_integer | EnumQueryIntegerSchema | | optional +enum_query_double | EnumQueryDoubleSchema | | optional + + +#### EnumQueryStringArraySchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +#### EnumQueryStringSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ] + +#### EnumQueryIntegerSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | must be one of [1, -2, ] + +#### EnumQueryDoubleSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int, float** | | must be one of [1.1, -1.2, ] + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +enum_header_string_array | EnumHeaderStringArraySchema | | optional +enum_header_string | EnumHeaderStringSchema | | optional + +#### EnumHeaderStringArraySchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +#### EnumHeaderStringSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +400 | ApiResponseFor400 | Invalid request +404 | ApiResponseFor404 | Not found + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **fake_health_get** +> HealthCheckResult fake_health_get() + +Health check endpoint + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.health_check_result import HealthCheckResult +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Health check endpoint + api_response = api_instance.fake_health_get() + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_health_get: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | The instance started successfully + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**HealthCheckResult**](HealthCheckResult.md) | | + + + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +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) + +# **group_parameters** +> group_parameters(required_string_grouprequired_boolean_grouprequired_int64_group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example + +* Bearer (JWT) Authentication (bearer_test): +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer_test +configuration = petstore_api.Configuration( + access_token = 'YOUR_BEARER_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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'required_string_group': 1, + 'required_int64_group': 1, + } + header_params = { + 'required_boolean_group': True, + } + try: + # Fake endpoint to test group parameters (optional) + api_response = api_instance.group_parameters( + query_params=query_params, + header_params=header_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->group_parameters: %s\n" % e) + + # example passing only optional values + query_params = { + 'required_string_group': 1, + 'required_int64_group': 1, + 'string_group': 1, + 'int64_group': 1, + } + header_params = { + 'required_boolean_group': True, + 'boolean_group': True, + } + try: + # Fake endpoint to test group parameters (optional) + api_response = api_instance.group_parameters( + query_params=query_params, + header_params=header_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->group_parameters: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +header_params | RequestHeaderParams | | +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 + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +required_string_group | RequiredStringGroupSchema | | +required_int64_group | RequiredInt64GroupSchema | | +string_group | StringGroupSchema | | optional +int64_group | Int64GroupSchema | | optional + + +#### RequiredStringGroupSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +#### RequiredInt64GroupSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +#### StringGroupSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +#### Int64GroupSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +required_boolean_group | RequiredBooleanGroupSchema | | +boolean_group | BooleanGroupSchema | | optional + +#### RequiredBooleanGroupSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + +#### BooleanGroupSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**bool** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +400 | ApiResponseFor400 | Someting wrong + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +[bearer_test](../README.md#bearer_test) + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **inline_additional_properties** +> inline_additional_properties(request_body) + +test inline additionalProperties + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + body = dict( + "key": "key_example", + ) + try: + # test inline additionalProperties + api_response = api_instance.inline_additional_properties( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->inline_additional_properties: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **str** | any string name can be used but the value must be the correct type | [optional] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **json_form_data** +> json_form_data() + +test json serialization of form data + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = dict( + param="param_example", + param2="param2_example", + ) + try: + # test json serialization of form data + api_response = api_instance.json_form_data( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->json_form_data: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/x-www-form-urlencoded' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationXWwwFormUrlencoded + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**param** | **str** | field1 | +**param2** | **str** | field2 | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **mammal** +> Mammal mammal(mammal) + + + +Test serialization of mammals + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.mammal import Mammal +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + body = Mammal( + has_baleen=True, + has_teeth=True, + class_name="whale", + ) + try: + api_response = api_instance.mammal( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->mammal: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Mammal**](Mammal.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Output mammal + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Mammal**](Mammal.md) | | + + + +[**Mammal**](Mammal.md) + +### Authorization + +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) + +# **number_with_validations** +> NumberWithValidations number_with_validations() + + + +Test serialization of outer number types + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.number_with_validations import NumberWithValidations +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = NumberWithValidations(10) + try: + api_response = api_instance.number_with_validations( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->number_with_validations: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberWithValidations**](NumberWithValidations.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Output number + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NumberWithValidations**](NumberWithValidations.md) | | + + + +[**NumberWithValidations**](NumberWithValidations.md) + +### Authorization + +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) + +# **object_model_with_ref_props** +> ObjectModelWithRefProps object_model_with_ref_props() + + + +Test serialization of object with $refed properties + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = ObjectModelWithRefProps( + my_number=NumberWithValidations(10), + my_string="my_string_example", + my_boolean=True, + ) + try: + api_response = api_instance.object_model_with_ref_props( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->object_model_with_ref_props: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectModelWithRefProps**](ObjectModelWithRefProps.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Output model + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ObjectModelWithRefProps**](ObjectModelWithRefProps.md) | | + + + +[**ObjectModelWithRefProps**](ObjectModelWithRefProps.md) + +### Authorization + +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) + +# **parameter_collisions** +> bool, date, datetime, dict, float, int, list, str, none_type parameter_collisions(_3a_b5ab2_self3a_b6) + +parameter collision case + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + '1': "1_example", + 'aB': "aB_example", + 'Ab': "Ab_example", + 'self': "self_example", + 'A-B': "A-B_example", + } + query_params = { + } + cookie_params = { + } + header_params = { + } + try: + # parameter collision case + api_response = api_instance.parameter_collisions( + path_params=path_params, + query_params=query_params, + header_params=header_params, + cookie_params=cookie_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->parameter_collisions: %s\n" % e) + + # example passing only optional values + path_params = { + '1': "1_example", + 'aB': "aB_example", + 'Ab': "Ab_example", + 'self': "self_example", + 'A-B': "A-B_example", + } + query_params = { + '1': "1_example", + 'aB': "aB_example", + 'Ab': "Ab_example", + 'self': "self_example", + 'A-B': "A-B_example", + } + cookie_params = { + '1': "1_example", + 'aB': "aB_example", + 'Ab': "Ab_example", + 'self': "self_example", + 'A-B': "A-B_example", + } + header_params = { + '1': "1_example", + 'aB': "aB_example", + 'self': "self_example", + 'A-B': "A-B_example", + } + body = None + try: + # parameter collision case + api_response = api_instance.parameter_collisions( + path_params=path_params, + query_params=query_params, + header_params=header_params, + cookie_params=cookie_params, + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->parameter_collisions: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +query_params | RequestQueryParams | | +header_params | RequestHeaderParams | | +path_params | RequestPathParams | | +cookie_params | RequestCookieParams | | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +typing.Union[dict, frozendict, str, date, datetime, int, float, bool, Decimal, None, list, tuple, bytes] | | + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +1 | Model1Schema | | optional +aB | ABSchema | | optional +Ab | AbSchema | | optional +self | ModelSelfSchema | | optional +A-B | ABSchema | | optional + + +#### Model1Schema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ABSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### AbSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ModelSelfSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ABSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +1 | Model1Schema | | optional +aB | ABSchema | | optional +self | ModelSelfSchema | | optional +A-B | ABSchema | | optional + +#### Model1Schema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ABSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ModelSelfSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ABSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +1 | Model1Schema | | +aB | ABSchema | | +Ab | AbSchema | | +self | ModelSelfSchema | | +A-B | ABSchema | | + +#### Model1Schema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ABSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### AbSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ModelSelfSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ABSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### cookie_params +#### RequestCookieParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +1 | Model1Schema | | optional +aB | ABSchema | | optional +Ab | AbSchema | | optional +self | ModelSelfSchema | | optional +A-B | ABSchema | | optional + +#### Model1Schema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ABSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### AbSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ModelSelfSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### ABSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +typing.Union[dict, frozendict, str, date, datetime, int, float, bool, Decimal, None, list, tuple, bytes] | | + + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +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) + +# **query_parameter_collection_format** +> query_parameter_collection_format(pipeioutilhttpurlcontextref_param) + + + +To test the collection format in query parameters + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.string_with_validation import StringWithValidation +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'pipe': [ + "pipe_example", + ], + 'ioutil': [ + "ioutil_example", + ], + 'http': [ + "http_example", + ], + 'url': [ + "url_example", + ], + 'context': [ + "context_example", + ], + 'refParam': StringWithValidation("refParam_example"), + } + try: + api_response = api_instance.query_parameter_collection_format( + query_params=query_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->query_parameter_collection_format: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +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 + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +pipe | PipeSchema | | +ioutil | IoutilSchema | | +http | HttpSchema | | +url | UrlSchema | | +context | ContextSchema | | +refParam | RefParamSchema | | + + +#### PipeSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +#### IoutilSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +#### HttpSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +#### UrlSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +#### ContextSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +#### RefParamSchema +Type | Description | Notes +------------- | ------------- | ------------- +[**StringWithValidation**](StringWithValidation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Success + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **string** +> str string() + + + +Test serialization of outer string types + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = "body_example" + try: + api_response = api_instance.string( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->string: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Output string + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + + +**str** + +### Authorization + +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) + +# **string_enum** +> StringEnum string_enum() + + + +Test serialization of outer enum + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.string_enum import StringEnum +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = StringEnum("placed") + try: + api_response = api_instance.string_enum( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->string_enum: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**StringEnum**](StringEnum.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Output enum + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**StringEnum**](StringEnum.md) | | + + + +[**StringEnum**](StringEnum.md) + +### Authorization + +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) + +# **upload_download_file** +> file_type upload_download_file(body) + +uploads a file and downloads a file using application/octet-stream + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + body = open('/path/to/file', 'rb') + try: + # uploads a file and downloads a file using application/octet-stream + api_response = api_instance.upload_download_file( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->upload_download_file: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationOctetStream] | required | +content_type | str | optional, default is 'application/octet-stream' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/octet-stream', ) | 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 + +### body + +#### SchemaForRequestBodyApplicationOctetStream + +file to upload + +Type | Description | Notes +------------- | ------------- | ------------- +**file_type** | file to upload | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationOctetStream, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationOctetStream + +file to download + +Type | Description | Notes +------------- | ------------- | ------------- +**file_type** | file to download | + + +**file_type** + +### Authorization + +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) + +# **upload_file** +> ApiResponse upload_file() + +uploads a file using multipart/form-data + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.api_response import ApiResponse +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = dict( + additional_metadata="additional_metadata_example", + file=open('/path/to/file', 'rb'), + ) + try: + # uploads a file using multipart/form-data + api_response = api_instance.upload_file( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->upload_file: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +content_type | str | optional, default is 'multipart/form-data' | 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 + +### body + +#### SchemaForRequestBodyMultipartFormData + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **str** | Additional data to pass to server | [optional] +**file** | **file_type** | file to upload | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ApiResponse**](ApiResponse.md) | | + + + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +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) + +# **upload_files** +> ApiResponse upload_files() + +uploads files using multipart/form-data + +### Example + +```python +import petstore_api +from petstore_api.api import fake_api +from petstore_api.model.api_response import ApiResponse +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = fake_api.FakeApi(api_client) + + # example passing only optional values + body = dict( + files=[ + open('/path/to/file', 'rb'), + ], + ) + try: + # uploads files using multipart/form-data + api_response = api_instance.upload_files( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->upload_files: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +content_type | str | optional, default is 'multipart/form-data' | 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 + +### body + +#### SchemaForRequestBodyMultipartFormData + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**files** | **[file_type]** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ApiResponse**](ApiResponse.md) | | + + + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +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) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md new file mode 100644 index 000000000000..6d5c732f70e0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md @@ -0,0 +1,105 @@ +# petstore_api.FakeClassnameTags123Api + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**classname**](FakeClassnameTags123Api.md#classname) | **PATCH** /fake_classname_test | To test class name in snake case + +# **classname** +> Client classname(client) + +To test class name in snake case + +To test class name in snake case + +### Example + +* Api Key Authentication (api_key_query): +```python +import petstore_api +from petstore_api.api import fake_classname_tags_123_api +from petstore_api.model.client import Client +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key_query +configuration.api_key['api_key_query'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key_query'] = 'Bearer' +# 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 + api_instance = fake_classname_tags_123_api.FakeClassnameTags123Api(api_client) + + # example passing only required values which don't have defaults set + body = Client( + client="client_example", + ) + try: + # To test class name in snake case + api_response = api_instance.classname( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeClassnameTags123Api->classname: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | 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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Client**](Client.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Client**](Client.md) | | + + + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +[[Back to top]](#) [[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-experimental/docs/File.md b/samples/openapi3/client/petstore/python-experimental/docs/File.md new file mode 100644 index 000000000000..d541f9f0ab4e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/File.md @@ -0,0 +1,12 @@ +# File + +Must be named `File` for test. + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **str** | Test capitalization | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/python-experimental/docs/FileSchemaTestClass.md new file mode 100644 index 000000000000..e7bdc36bfd51 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | **[File]** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Foo.md b/samples/openapi3/client/petstore/python-experimental/docs/Foo.md new file mode 100644 index 000000000000..e948b10caef8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Foo.md @@ -0,0 +1,10 @@ +# Foo + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **str** | | [optional] if omitted the server will use the default value of "bar" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FormatTest.md b/samples/openapi3/client/petstore/python-experimental/docs/FormatTest.md new file mode 100644 index 000000000000..472216aa457b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/FormatTest.md @@ -0,0 +1,30 @@ +# FormatTest + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **int** | | [optional] +**int32** | **int** | | [optional] +**int32withValidations** | **int** | | [optional] +**int64** | **int** | | [optional] +**number** | **int, float** | | +**float** | **int, float** | this is a reserved python keyword | [optional] +**float32** | **int, float** | | [optional] +**double** | **int, float** | | [optional] +**float64** | **int, float** | | [optional] +**arrayWithUniqueItems** | **[int, float]** | | [optional] +**string** | **str** | | [optional] +**byte** | **str** | | +**binary** | **file_type** | | [optional] +**date** | **date** | | +**dateTime** | **datetime** | | [optional] +**uuid** | **str** | | [optional] +**uuidNoExample** | **str** | | [optional] +**password** | **str** | | +**pattern_with_digits** | **str** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**pattern_with_digits_and_delimiter** | **str** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] +**noneProp** | **none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md b/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md new file mode 100644 index 000000000000..42684ab7a152 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md @@ -0,0 +1,10 @@ +# Fruit + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md b/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md new file mode 100644 index 000000000000..eceb328ee611 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md @@ -0,0 +1,9 @@ +# FruitReq + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md b/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md new file mode 100644 index 000000000000..13879f263219 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md @@ -0,0 +1,10 @@ +# GmFruit + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/GrandparentAnimal.md b/samples/openapi3/client/petstore/python-experimental/docs/GrandparentAnimal.md new file mode 100644 index 000000000000..ed51b572862a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/GrandparentAnimal.md @@ -0,0 +1,10 @@ +# GrandparentAnimal + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pet_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python-experimental/docs/HasOnlyReadOnly.md new file mode 100644 index 000000000000..14ac98c0769a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **str** | | [optional] [readonly] +**foo** | **str** | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/python-experimental/docs/HealthCheckResult.md new file mode 100644 index 000000000000..8ce835f39a4e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/HealthCheckResult.md @@ -0,0 +1,12 @@ +# 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** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md new file mode 100644 index 000000000000..d28a65a74d9f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md @@ -0,0 +1,10 @@ +# InlineResponseDefault + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | [**Foo**](Foo.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnum.md b/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnum.md new file mode 100644 index 000000000000..32d665414464 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnum.md @@ -0,0 +1,8 @@ +# IntegerEnum + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | must be one of [0, 1, 2, ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumBig.md b/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumBig.md new file mode 100644 index 000000000000..58d94b3102b0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumBig.md @@ -0,0 +1,8 @@ +# IntegerEnumBig + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | must be one of [10, 11, 12, ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumOneValue.md b/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumOneValue.md new file mode 100644 index 000000000000..6fea6c1d4419 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumOneValue.md @@ -0,0 +1,8 @@ +# IntegerEnumOneValue + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | must be one of [0, ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumWithDefaultValue.md b/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumWithDefaultValue.md new file mode 100644 index 000000000000..b95a839f9bfc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/IntegerEnumWithDefaultValue.md @@ -0,0 +1,8 @@ +# IntegerEnumWithDefaultValue + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | defaults to 0, must be one of [0, 1, 2, ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IntegerMax10.md b/samples/openapi3/client/petstore/python-experimental/docs/IntegerMax10.md new file mode 100644 index 000000000000..768902e0aca2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/IntegerMax10.md @@ -0,0 +1,8 @@ +# IntegerMax10 + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IntegerMin15.md b/samples/openapi3/client/petstore/python-experimental/docs/IntegerMin15.md new file mode 100644 index 000000000000..35043be2fadb --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/IntegerMin15.md @@ -0,0 +1,8 @@ +# IntegerMin15 + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md new file mode 100644 index 000000000000..7891fd5aa745 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md @@ -0,0 +1,9 @@ +# IsoscelesTriangle + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md new file mode 100644 index 000000000000..12881c0177ab --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md @@ -0,0 +1,10 @@ +# IsoscelesTriangleAllOf + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**triangleType** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md b/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md new file mode 100644 index 000000000000..6ecc91576e74 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md @@ -0,0 +1,9 @@ +# Mammal + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/MapTest.md b/samples/openapi3/client/petstore/python-experimental/docs/MapTest.md new file mode 100644 index 000000000000..b842ca9985c5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**map_map_of_string** | **{str: ({str: (str,)},)}** | | [optional] +**map_of_enum_string** | **{str: (str,)}** | | [optional] +**direct_map** | **{str: (bool,)}** | | [optional] +**indirect_map** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-experimental/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 000000000000..f8406a0af426 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | [optional] +**dateTime** | **datetime** | | [optional] +**map** | **{str: (Animal,)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Model200Response.md b/samples/openapi3/client/petstore/python-experimental/docs/Model200Response.md new file mode 100644 index 000000000000..71af8e104479 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Model200Response.md @@ -0,0 +1,13 @@ +# Model200Response + +model with an invalid class name for python, starts with a number + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**class** | **str** | this is a reserved python keyword | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ModelReturn.md b/samples/openapi3/client/petstore/python-experimental/docs/ModelReturn.md new file mode 100644 index 000000000000..35abb51e239c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ModelReturn.md @@ -0,0 +1,12 @@ +# ModelReturn + +Model for testing reserved words + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**return** | **int** | this is a reserved python keyword | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Name.md b/samples/openapi3/client/petstore/python-experimental/docs/Name.md new file mode 100644 index 000000000000..446d314fbd15 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Name.md @@ -0,0 +1,14 @@ +# Name + +Model for testing model name same as property name + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | +**snake_case** | **int** | | [optional] [readonly] +**property** | **str** | this is a reserved python keyword | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/NoAdditionalProperties.md b/samples/openapi3/client/petstore/python-experimental/docs/NoAdditionalProperties.md new file mode 100644 index 000000000000..e5bf9b9be8c9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/NoAdditionalProperties.md @@ -0,0 +1,10 @@ +# NoAdditionalProperties + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**petId** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md b/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md new file mode 100644 index 000000000000..5f2a1280eb2c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md @@ -0,0 +1,21 @@ +# NullableClass + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer_prop** | **int, none_type** | | [optional] +**number_prop** | **int, float, none_type** | | [optional] +**boolean_prop** | **bool, none_type** | | [optional] +**string_prop** | **str, none_type** | | [optional] +**date_prop** | **date, none_type** | | [optional] +**datetime_prop** | **datetime, none_type** | | [optional] +**array_nullable_prop** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type** | | [optional] +**array_and_items_nullable_prop** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type** | | [optional] +**array_items_nullable** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type]** | | [optional] +**object_nullable_prop** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}, none_type** | | [optional] +**object_and_items_nullable_prop** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}, none_type** | | [optional] +**object_items_nullable** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}** | | [optional] +**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md b/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md new file mode 100644 index 000000000000..1419c735f3c2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md @@ -0,0 +1,11 @@ +# NullableShape + +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. For a nullable composed schema to work, one of its chosen oneOf schemas must be type null + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/NullableString.md b/samples/openapi3/client/petstore/python-experimental/docs/NullableString.md new file mode 100644 index 000000000000..c01cb8067835 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/NullableString.md @@ -0,0 +1,8 @@ +# NullableString + +Type | Description | Notes +------------- | ------------- | ------------- +typing.Union[str, 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/openapi3/client/petstore/python-experimental/docs/Number.md b/samples/openapi3/client/petstore/python-experimental/docs/Number.md new file mode 100644 index 000000000000..63e3c42fdbd1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Number.md @@ -0,0 +1,8 @@ +# Number + +Type | Description | Notes +------------- | ------------- | ------------- +**float** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/NumberOnly.md b/samples/openapi3/client/petstore/python-experimental/docs/NumberOnly.md new file mode 100644 index 000000000000..699674314e09 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustNumber** | **int, float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/NumberWithValidations.md b/samples/openapi3/client/petstore/python-experimental/docs/NumberWithValidations.md new file mode 100644 index 000000000000..9fe4c99f8d8e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/NumberWithValidations.md @@ -0,0 +1,8 @@ +# NumberWithValidations + +Type | Description | Notes +------------- | ------------- | ------------- +**float** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ObjectInterface.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectInterface.md new file mode 100644 index 000000000000..1ce1b34d41d8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectInterface.md @@ -0,0 +1,9 @@ +# ObjectInterface + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ObjectModelWithRefProps.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectModelWithRefProps.md new file mode 100644 index 000000000000..637175bc2f4e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectModelWithRefProps.md @@ -0,0 +1,14 @@ +# ObjectModelWithRefProps + +a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | [**NumberWithValidations**](NumberWithValidations.md) | | [optional] +**myString** | **str** | | [optional] +**myBoolean** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDifficultlyNamedProps.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDifficultlyNamedProps.md new file mode 100644 index 000000000000..cb45c6b10efc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDifficultlyNamedProps.md @@ -0,0 +1,14 @@ +# ObjectWithDifficultlyNamedProps + +model with properties that have invalid names for python + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**$special[property.name]** | **int** | | [optional] +**123-list** | **str** | | +**123Number** | **int** | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithValidations.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithValidations.md new file mode 100644 index 000000000000..3950d2ab95ec --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithValidations.md @@ -0,0 +1,9 @@ +# ObjectWithValidations + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Order.md b/samples/openapi3/client/petstore/python-experimental/docs/Order.md new file mode 100644 index 000000000000..374172ad32ca --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**petId** | **int** | | [optional] +**quantity** | **int** | | [optional] +**shipDate** | **datetime** | | [optional] +**status** | **str** | Order Status | [optional] +**complete** | **bool** | | [optional] if omitted the server will use the default value of False +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md b/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md new file mode 100644 index 000000000000..28a57b84feaa --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md @@ -0,0 +1,9 @@ +# ParentPet + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Pet.md b/samples/openapi3/client/petstore/python-experimental/docs/Pet.md new file mode 100644 index 000000000000..8eec44141d5d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Pet.md @@ -0,0 +1,17 @@ +# Pet + +Pet object that needs to be added to the store + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **str** | | +**photoUrls** | **[str]** | | +**tags** | **[Tag]** | | [optional] +**status** | **str** | pet status in the store | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md new file mode 100644 index 000000000000..9bcb83080704 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md @@ -0,0 +1,1362 @@ +# petstore_api.PetApi + +All URIs are relative to *http://petstore.swagger.io:80/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_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +[**upload_image**](PetApi.md#upload_image) | **POST** /pet/{petId}/uploadImage | uploads an image + +# **add_pet** +> add_pet(pet) + +Add a new pet to the store + +Add a new pet to the store + +### Example + +* OAuth Authentication (petstore_auth): +```python +import petstore_api +from petstore_api.api import pet_api +from petstore_api.model.pet import Pet +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP message signature: http_signature_test +# The HTTP Signature Header mechanism that can be used by a client to +# authenticate the sender of a message and ensure that particular headers +# have not been modified in transit. +# +# You can specify the signing key-id, private key path, signing scheme, +# signing algorithm, list of signed headers and signature max validity. +# The 'key_id' parameter is an opaque string that the API server can use +# to lookup the client and validate the signature. +# The 'private_key_path' parameter should be the path to a file that +# contains a DER or base-64 encoded private key. +# The 'private_key_passphrase' parameter is optional. Set the passphrase +# if the private key is encrypted. +# The 'signed_headers' parameter is used to specify the list of +# HTTP headers included when generating the signature for the message. +# You can specify HTTP headers that you want to protect with a cryptographic +# signature. Note that proxies may add, modify or remove HTTP headers +# for legitimate reasons, so you should only add headers that you know +# will not be modified. For example, if you want to protect the HTTP request +# body, you can specify the Digest header. In that case, the client calculates +# the digest of the HTTP request body and includes the digest in the message +# signature. +# The 'signature_max_validity' parameter is optional. It is configured as a +# duration to express when the signature ceases to be valid. The client calculates +# the expiration date every time it generates the cryptographic signature +# of an HTTP request. The API server may have its own security policy +# that controls the maximum validity of the signature. The client max validity +# must be lower than the server max validity. +# The time on the client and server must be synchronized, otherwise the +# server may reject the client signature. +# +# The client must use a combination of private key, signing scheme, +# signing algorithm and hash algorithm that matches the security policy of +# the API server. +# +# See petstore_api.signing for a list of all supported parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2", + signing_info = petstore_api.signing.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'private_key.pem', + private_key_passphrase = 'YOUR_PASSPHRASE', + signing_scheme = petstore_api.signing.SCHEME_HS2019, + signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, + hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, + signed_headers = [ + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, + 'Content-Type', + 'Content-Length', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) +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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + body = Pet( + id=1, + category=Category( + id=1, + name="default-name", + ), + name="doggie", + photo_urls=[ + "photo_urls_example", + ], + tags=[ + Tag( + id=1, + name="name_example", + ), + ], + status="available", + ) + try: + # Add a new pet to the store + api_response = api_instance.add_pet( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->add_pet: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +host_index | typing.Optional[int] | default is None | Allows one to select a different host +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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Pet**](Pet.md) | | + + +#### SchemaForRequestBodyApplicationXml +Type | Description | Notes +------------- | ------------- | ------------- +[**Pet**](Pet.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | Ok +405 | ApiResponseFor405 | Invalid input + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor405 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) + +[[Back to top]](#) [[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) + +Deletes a pet + +### Example + +* OAuth Authentication (petstore_auth): +```python +import petstore_api +from petstore_api.api import pet_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) +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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'petId': 1, + } + header_params = { + } + try: + # Deletes a pet + api_response = api_instance.delete_pet( + path_params=path_params, + header_params=header_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) + + # example passing only optional values + path_params = { + 'petId': 1, + } + header_params = { + 'api_key': "api_key_example", + } + try: + # Deletes a pet + api_response = api_instance.delete_pet( + path_params=path_params, + header_params=header_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +header_params | RequestHeaderParams | | +path_params | RequestPathParams | | +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 + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +api_key | ApiKeySchema | | optional + +#### ApiKeySchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +petId | PetIdSchema | | + +#### PetIdSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +400 | ApiResponseFor400 | Invalid pet value + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +[[Back to top]](#) [[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** +> [Pet] find_pets_by_status(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example + +* OAuth Authentication (petstore_auth): +```python +import petstore_api +from petstore_api.api import pet_api +from petstore_api.model.pet import Pet +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP message signature: http_signature_test +# The HTTP Signature Header mechanism that can be used by a client to +# authenticate the sender of a message and ensure that particular headers +# have not been modified in transit. +# +# You can specify the signing key-id, private key path, signing scheme, +# signing algorithm, list of signed headers and signature max validity. +# The 'key_id' parameter is an opaque string that the API server can use +# to lookup the client and validate the signature. +# The 'private_key_path' parameter should be the path to a file that +# contains a DER or base-64 encoded private key. +# The 'private_key_passphrase' parameter is optional. Set the passphrase +# if the private key is encrypted. +# The 'signed_headers' parameter is used to specify the list of +# HTTP headers included when generating the signature for the message. +# You can specify HTTP headers that you want to protect with a cryptographic +# signature. Note that proxies may add, modify or remove HTTP headers +# for legitimate reasons, so you should only add headers that you know +# will not be modified. For example, if you want to protect the HTTP request +# body, you can specify the Digest header. In that case, the client calculates +# the digest of the HTTP request body and includes the digest in the message +# signature. +# The 'signature_max_validity' parameter is optional. It is configured as a +# duration to express when the signature ceases to be valid. The client calculates +# the expiration date every time it generates the cryptographic signature +# of an HTTP request. The API server may have its own security policy +# that controls the maximum validity of the signature. The client max validity +# must be lower than the server max validity. +# The time on the client and server must be synchronized, otherwise the +# server may reject the client signature. +# +# The client must use a combination of private key, signing scheme, +# signing algorithm and hash algorithm that matches the security policy of +# the API server. +# +# See petstore_api.signing for a list of all supported parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2", + signing_info = petstore_api.signing.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'private_key.pem', + private_key_passphrase = 'YOUR_PASSPHRASE', + signing_scheme = petstore_api.signing.SCHEME_HS2019, + signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, + hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, + signed_headers = [ + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, + 'Content-Type', + 'Content-Length', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) +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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'status': [ + "available", + ], + } + try: + # Finds Pets by status + api_response = api_instance.find_pets_by_status( + query_params=query_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/xml', '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 + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +status | StatusSchema | | + + +#### StatusSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid status value + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationXml + +Type | Description | Notes +------------- | ------------- | ------------- +**[Pet]** | | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**[Pet]** | | + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +[**[Pet]**](Pet.md) + +### Authorization + +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) + +[[Back to top]](#) [[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** +> [Pet] find_pets_by_tags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example + +* OAuth Authentication (petstore_auth): +```python +import petstore_api +from petstore_api.api import pet_api +from petstore_api.model.pet import Pet +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP message signature: http_signature_test +# The HTTP Signature Header mechanism that can be used by a client to +# authenticate the sender of a message and ensure that particular headers +# have not been modified in transit. +# +# You can specify the signing key-id, private key path, signing scheme, +# signing algorithm, list of signed headers and signature max validity. +# The 'key_id' parameter is an opaque string that the API server can use +# to lookup the client and validate the signature. +# The 'private_key_path' parameter should be the path to a file that +# contains a DER or base-64 encoded private key. +# The 'private_key_passphrase' parameter is optional. Set the passphrase +# if the private key is encrypted. +# The 'signed_headers' parameter is used to specify the list of +# HTTP headers included when generating the signature for the message. +# You can specify HTTP headers that you want to protect with a cryptographic +# signature. Note that proxies may add, modify or remove HTTP headers +# for legitimate reasons, so you should only add headers that you know +# will not be modified. For example, if you want to protect the HTTP request +# body, you can specify the Digest header. In that case, the client calculates +# the digest of the HTTP request body and includes the digest in the message +# signature. +# The 'signature_max_validity' parameter is optional. It is configured as a +# duration to express when the signature ceases to be valid. The client calculates +# the expiration date every time it generates the cryptographic signature +# of an HTTP request. The API server may have its own security policy +# that controls the maximum validity of the signature. The client max validity +# must be lower than the server max validity. +# The time on the client and server must be synchronized, otherwise the +# server may reject the client signature. +# +# The client must use a combination of private key, signing scheme, +# signing algorithm and hash algorithm that matches the security policy of +# the API server. +# +# See petstore_api.signing for a list of all supported parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2", + signing_info = petstore_api.signing.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'private_key.pem', + private_key_passphrase = 'YOUR_PASSPHRASE', + signing_scheme = petstore_api.signing.SCHEME_HS2019, + signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, + hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, + signed_headers = [ + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, + 'Content-Type', + 'Content-Length', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) +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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'tags': [ + "tags_example", + ], + } + try: + # Finds Pets by tags + api_response = api_instance.find_pets_by_tags( + query_params=query_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/xml', '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 + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +tags | TagsSchema | | + + +#### TagsSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**[str]** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid tag value + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationXml + +Type | Description | Notes +------------- | ------------- | ------------- +**[Pet]** | | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**[Pet]** | | + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +[**[Pet]**](Pet.md) + +### Authorization + +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) + +[[Back to top]](#) [[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** +> Pet get_pet_by_id(pet_id) + +Find pet by ID + +Returns a single pet + +### Example + +* Api Key Authentication (api_key): +```python +import petstore_api +from petstore_api.api import pet_api +from petstore_api.model.pet import Pet +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key +configuration.api_key['api_key'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key'] = 'Bearer' +# 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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'petId': 1, + } + try: + # Find pet by ID + api_response = api_instance.get_pet_by_id( + path_params=path_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/xml', '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 + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +petId | PetIdSchema | | + +#### PetIdSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid ID supplied +404 | ApiResponseFor404 | Pet not found + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationXml +Type | Description | Notes +------------- | ------------- | ------------- +[**Pet**](Pet.md) | | + + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Pet**](Pet.md) | | + + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_pet** +> update_pet(pet) + +Update an existing pet + +### Example + +* OAuth Authentication (petstore_auth): +```python +import petstore_api +from petstore_api.api import pet_api +from petstore_api.model.pet import Pet +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP message signature: http_signature_test +# The HTTP Signature Header mechanism that can be used by a client to +# authenticate the sender of a message and ensure that particular headers +# have not been modified in transit. +# +# You can specify the signing key-id, private key path, signing scheme, +# signing algorithm, list of signed headers and signature max validity. +# The 'key_id' parameter is an opaque string that the API server can use +# to lookup the client and validate the signature. +# The 'private_key_path' parameter should be the path to a file that +# contains a DER or base-64 encoded private key. +# The 'private_key_passphrase' parameter is optional. Set the passphrase +# if the private key is encrypted. +# The 'signed_headers' parameter is used to specify the list of +# HTTP headers included when generating the signature for the message. +# You can specify HTTP headers that you want to protect with a cryptographic +# signature. Note that proxies may add, modify or remove HTTP headers +# for legitimate reasons, so you should only add headers that you know +# will not be modified. For example, if you want to protect the HTTP request +# body, you can specify the Digest header. In that case, the client calculates +# the digest of the HTTP request body and includes the digest in the message +# signature. +# The 'signature_max_validity' parameter is optional. It is configured as a +# duration to express when the signature ceases to be valid. The client calculates +# the expiration date every time it generates the cryptographic signature +# of an HTTP request. The API server may have its own security policy +# that controls the maximum validity of the signature. The client max validity +# must be lower than the server max validity. +# The time on the client and server must be synchronized, otherwise the +# server may reject the client signature. +# +# The client must use a combination of private key, signing scheme, +# signing algorithm and hash algorithm that matches the security policy of +# the API server. +# +# See petstore_api.signing for a list of all supported parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2", + signing_info = petstore_api.signing.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'private_key.pem', + private_key_passphrase = 'YOUR_PASSPHRASE', + signing_scheme = petstore_api.signing.SCHEME_HS2019, + signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, + hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, + signed_headers = [ + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, + 'Content-Type', + 'Content-Length', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) +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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + body = Pet( + id=1, + category=Category( + id=1, + name="default-name", + ), + name="doggie", + photo_urls=[ + "photo_urls_example", + ], + tags=[ + Tag( + id=1, + name="name_example", + ), + ], + status="available", + ) + try: + # Update an existing pet + api_response = api_instance.update_pet( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +host_index | typing.Optional[int] | default is None | Allows one to select a different host +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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Pet**](Pet.md) | | + + +#### SchemaForRequestBodyApplicationXml +Type | Description | Notes +------------- | ------------- | ------------- +[**Pet**](Pet.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +400 | ApiResponseFor400 | Invalid ID supplied +404 | ApiResponseFor404 | Pet not found +405 | ApiResponseFor405 | Validation exception + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor405 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) + +[[Back to top]](#) [[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) + +Updates a pet in the store with form data + +### Example + +* OAuth Authentication (petstore_auth): +```python +import petstore_api +from petstore_api.api import pet_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) +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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'petId': 1, + } + try: + # Updates a pet in the store with form data + api_response = api_instance.update_pet_with_form( + path_params=path_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + + # example passing only optional values + path_params = { + 'petId': 1, + } + body = dict( + name="name_example", + status="status_example", + ) + try: + # Updates a pet in the store with form data + api_response = api_instance.update_pet_with_form( + path_params=path_params, + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/x-www-form-urlencoded' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationXWwwFormUrlencoded + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Updated name of the pet | [optional] +**status** | **str** | Updated status of the pet | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +petId | PetIdSchema | | + +#### PetIdSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +405 | ApiResponseFor405 | Invalid input + +#### ApiResponseFor405 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +[[Back to top]](#) [[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_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id) + +uploads an image (required) + +### Example + +* OAuth Authentication (petstore_auth): +```python +import petstore_api +from petstore_api.api import pet_api +from petstore_api.model.api_response import ApiResponse +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) +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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'petId': 1, + } + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file( + path_params=path_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) + + # example passing only optional values + path_params = { + 'petId': 1, + } + body = dict( + additional_metadata="additional_metadata_example", + required_file=open('/path/to/file', 'rb'), + ) + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file( + path_params=path_params, + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'multipart/form-data' | 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 + +### body + +#### SchemaForRequestBodyMultipartFormData + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **str** | Additional data to pass to server | [optional] +**requiredFile** | **file_type** | file to upload | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +petId | PetIdSchema | | + +#### PetIdSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ApiResponse**](ApiResponse.md) | | + + + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +[[Back to top]](#) [[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_image** +> ApiResponse upload_image(pet_id) + +uploads an image + +### Example + +* OAuth Authentication (petstore_auth): +```python +import petstore_api +from petstore_api.api import pet_api +from petstore_api.model.api_response import ApiResponse +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) +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 + api_instance = pet_api.PetApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'petId': 1, + } + try: + # uploads an image + api_response = api_instance.upload_image( + path_params=path_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_image: %s\n" % e) + + # example passing only optional values + path_params = { + 'petId': 1, + } + body = dict( + additional_metadata="additional_metadata_example", + file=open('/path/to/file', 'rb'), + ) + try: + # uploads an image + api_response = api_instance.upload_image( + path_params=path_params, + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_image: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'multipart/form-data' | 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 + +### body + +#### SchemaForRequestBodyMultipartFormData + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **str** | Additional data to pass to server | [optional] +**file** | **file_type** | file to upload | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +petId | PetIdSchema | | + +#### PetIdSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ApiResponse**](ApiResponse.md) | | + + + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +[[Back to top]](#) [[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-experimental/docs/Pig.md b/samples/openapi3/client/petstore/python-experimental/docs/Pig.md new file mode 100644 index 000000000000..97259b026f98 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Pig.md @@ -0,0 +1,9 @@ +# Pig + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Player.md b/samples/openapi3/client/petstore/python-experimental/docs/Player.md new file mode 100644 index 000000000000..2daf47240c75 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Player.md @@ -0,0 +1,13 @@ +# Player + +a model that includes a self reference this forces properties and additionalProperties to be lazy loaded in python models because the Player class has not fully loaded when defining properties + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**enemyPlayer** | [**Player**](Player.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md new file mode 100644 index 000000000000..e840c9b8fd0d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md @@ -0,0 +1,9 @@ +# Quadrilateral + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/QuadrilateralInterface.md b/samples/openapi3/client/petstore/python-experimental/docs/QuadrilateralInterface.md new file mode 100644 index 000000000000..ee7c4db4ba4c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/QuadrilateralInterface.md @@ -0,0 +1,11 @@ +# QuadrilateralInterface + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shapeType** | **str** | | +**quadrilateralType** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python-experimental/docs/ReadOnlyFirst.md new file mode 100644 index 000000000000..a6c2e4524b7f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **str** | | [optional] [readonly] +**baz** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md new file mode 100644 index 000000000000..941e9e63117f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md @@ -0,0 +1,9 @@ +# ScaleneTriangle + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md new file mode 100644 index 000000000000..3ac4ed161258 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md @@ -0,0 +1,10 @@ +# ScaleneTriangleAllOf + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**triangleType** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Shape.md b/samples/openapi3/client/petstore/python-experimental/docs/Shape.md new file mode 100644 index 000000000000..798438fbd2ba --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Shape.md @@ -0,0 +1,9 @@ +# Shape + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md b/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md new file mode 100644 index 000000000000..17fa7c50577c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md @@ -0,0 +1,11 @@ +# ShapeOrNull + +The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md new file mode 100644 index 000000000000..d9ce2f02b010 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md @@ -0,0 +1,9 @@ +# SimpleQuadrilateral + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md new file mode 100644 index 000000000000..e8bf2861915a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md @@ -0,0 +1,10 @@ +# SimpleQuadrilateralAllOf + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quadrilateralType** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/SomeObject.md b/samples/openapi3/client/petstore/python-experimental/docs/SomeObject.md new file mode 100644 index 000000000000..55a308e4f863 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/SomeObject.md @@ -0,0 +1,9 @@ +# SomeObject + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/SpecialModelName.md b/samples/openapi3/client/petstore/python-experimental/docs/SpecialModelName.md new file mode 100644 index 000000000000..8c02dca9ab3a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/SpecialModelName.md @@ -0,0 +1,12 @@ +# SpecialModelName + +model with an invalid class name for python + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**a** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md new file mode 100644 index 000000000000..80f9a368f5fd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md @@ -0,0 +1,391 @@ +# petstore_api.StoreApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | 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/{order_id} | 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 + +### Example + +```python +import petstore_api +from petstore_api.api import store_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = store_api.StoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'order_id': "order_id_example", + } + try: + # Delete purchase order by ID + api_response = api_instance.delete_order( + path_params=path_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->delete_order: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +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 + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +order_id | OrderIdSchema | | + +#### OrderIdSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +400 | ApiResponseFor400 | Invalid ID supplied +404 | ApiResponseFor404 | Order not found + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **get_inventory** +> {str: (int,)} get_inventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example + +* Api Key Authentication (api_key): +```python +import petstore_api +from petstore_api.api import store_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key +configuration.api_key['api_key'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key'] = 'Bearer' +# 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 + api_instance = store_api.StoreApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Returns pet inventories by status + api_response = api_instance.get_inventory() + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->get_inventory: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationJson + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **int** | any string name can be used but the value must be the correct type | [optional] + + +**{str: (int,)}** + +### Authorization + +[api_key](../README.md#api_key) + +[[Back to top]](#) [[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** +> 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 + +### Example + +```python +import petstore_api +from petstore_api.api import store_api +from petstore_api.model.order import Order +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = store_api.StoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'order_id': 1, + } + try: + # Find purchase order by ID + api_response = api_instance.get_order_by_id( + path_params=path_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/xml', '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 + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +order_id | OrderIdSchema | | + +#### OrderIdSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid ID supplied +404 | ApiResponseFor404 | Order not found + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationXml +Type | Description | Notes +------------- | ------------- | ------------- +[**Order**](Order.md) | | + + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Order**](Order.md) | | + + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +[**Order**](Order.md) + +### Authorization + +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) + +# **place_order** +> Order place_order(order) + +Place an order for a pet + +### Example + +```python +import petstore_api +from petstore_api.api import store_api +from petstore_api.model.order import Order +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = store_api.StoreApi(api_client) + + # example passing only required values which don't have defaults set + body = Order( + id=1, + pet_id=1, + quantity=1, + ship_date=isoparse('2020-02-02T20:20:20.000222Z'), + status="placed", + complete=False, + ) + try: + # Place an order for a pet + api_response = api_instance.place_order( + body=body, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->place_order: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/xml', '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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Order**](Order.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid Order + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationXml +Type | Description | Notes +------------- | ------------- | ------------- +[**Order**](Order.md) | | + + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Order**](Order.md) | | + + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +[**Order**](Order.md) + +### Authorization + +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) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/String.md b/samples/openapi3/client/petstore/python-experimental/docs/String.md new file mode 100644 index 000000000000..ca058fd710b8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/String.md @@ -0,0 +1,8 @@ +# String + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StringBooleanMap.md b/samples/openapi3/client/petstore/python-experimental/docs/StringBooleanMap.md new file mode 100644 index 000000000000..89b85004e978 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StringEnum.md b/samples/openapi3/client/petstore/python-experimental/docs/StringEnum.md new file mode 100644 index 000000000000..bf610d102850 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/StringEnum.md @@ -0,0 +1,10 @@ +# StringEnum + +Type | Description | Notes +------------- | ------------- | ------------- +typing.Union[str, None, ] | | must be one of ["placed", "approved", "delivered", "single quoted", '''multiple +lines''', '''double quote + with newline''', ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StringEnumWithDefaultValue.md b/samples/openapi3/client/petstore/python-experimental/docs/StringEnumWithDefaultValue.md new file mode 100644 index 000000000000..08a337a52642 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/StringEnumWithDefaultValue.md @@ -0,0 +1,8 @@ +# StringEnumWithDefaultValue + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | defaults to "placed", must be one of ["placed", "approved", "delivered", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StringWithValidation.md b/samples/openapi3/client/petstore/python-experimental/docs/StringWithValidation.md new file mode 100644 index 000000000000..870752b1df8e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/StringWithValidation.md @@ -0,0 +1,8 @@ +# StringWithValidation + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Tag.md b/samples/openapi3/client/petstore/python-experimental/docs/Tag.md new file mode 100644 index 000000000000..42cf6ecbc853 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md b/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md new file mode 100644 index 000000000000..0820ec390f06 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md @@ -0,0 +1,9 @@ +# Triangle + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/TriangleInterface.md b/samples/openapi3/client/petstore/python-experimental/docs/TriangleInterface.md new file mode 100644 index 000000000000..11c7c8e45413 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/TriangleInterface.md @@ -0,0 +1,11 @@ +# TriangleInterface + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shapeType** | **str** | | +**triangleType** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/User.md b/samples/openapi3/client/petstore/python-experimental/docs/User.md new file mode 100644 index 000000000000..cfff38a62691 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/User.md @@ -0,0 +1,21 @@ +# User + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**username** | **str** | | [optional] +**firstName** | **str** | | [optional] +**lastName** | **str** | | [optional] +**email** | **str** | | [optional] +**password** | **str** | | [optional] +**phone** | **str** | | [optional] +**userStatus** | **int** | User Status | [optional] +**objectWithNoDeclaredProps** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] +**objectWithNoDeclaredPropsNullable** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**anyTypeProp** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] +**anyTypePropNullable** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md new file mode 100644 index 000000000000..0e77fad4125c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md @@ -0,0 +1,784 @@ +# petstore_api.UserApi + +All URIs are relative to *http://petstore.swagger.io:80/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. + +### Example + +```python +import petstore_api +from petstore_api.api import user_api +from petstore_api.model.user import User +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + body = User( + id=1, + username="username_example", + first_name="first_name_example", + last_name="last_name_example", + email="email_example", + password="password_example", + phone="phone_example", + user_status=1, + object_with_no_declared_props=dict(), + object_with_no_declared_props_nullable=dict(), + any_type_prop=None, + any_type_prop_nullable=None, + ) + try: + # Create user + api_response = api_instance.create_user( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**User**](User.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +default | ApiResponseForDefault | successful operation + +#### ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **create_users_with_array_input** +> create_users_with_array_input(user) + +Creates list of users with given input array + +### Example + +```python +import petstore_api +from petstore_api.api import user_api +from petstore_api.model.user import User +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + body = [ + User( + id=1, + username="username_example", + first_name="first_name_example", + last_name="last_name_example", + email="email_example", + password="password_example", + phone="phone_example", + user_status=1, + object_with_no_declared_props=dict(), + object_with_no_declared_props_nullable=dict(), + any_type_prop=None, + any_type_prop_nullable=None, + ), + ] + try: + # Creates list of users with given input array + api_response = api_instance.create_users_with_array_input( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**[User]** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +default | ApiResponseForDefault | successful operation + +#### ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **create_users_with_list_input** +> create_users_with_list_input(user) + +Creates list of users with given input array + +### Example + +```python +import petstore_api +from petstore_api.api import user_api +from petstore_api.model.user import User +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + body = [ + User( + id=1, + username="username_example", + first_name="first_name_example", + last_name="last_name_example", + email="email_example", + password="password_example", + phone="phone_example", + user_status=1, + object_with_no_declared_props=dict(), + object_with_no_declared_props_nullable=dict(), + any_type_prop=None, + any_type_prop_nullable=None, + ), + ] + try: + # Creates list of users with given input array + api_response = api_instance.create_users_with_list_input( + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**[User]** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +default | ApiResponseForDefault | successful operation + +#### ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **delete_user** +> delete_user(username) + +Delete user + +This can only be done by the logged in user. + +### Example + +```python +import petstore_api +from petstore_api.api import user_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'username': "username_example", + } + try: + # Delete user + api_response = api_instance.delete_user( + path_params=path_params, + ) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->delete_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +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 + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +username | UsernameSchema | | + +#### UsernameSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +400 | ApiResponseFor400 | Invalid username supplied +404 | ApiResponseFor404 | User not found + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **get_user_by_name** +> User get_user_by_name(username) + +Get user by user name + +### Example + +```python +import petstore_api +from petstore_api.api import user_api +from petstore_api.model.user import User +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'username': "username_example", + } + try: + # Get user by user name + api_response = api_instance.get_user_by_name( + path_params=path_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->get_user_by_name: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/xml', '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 + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +username | UsernameSchema | | + +#### UsernameSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid username supplied +404 | ApiResponseFor404 | User not found + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +#### SchemaFor200ResponseBodyApplicationXml +Type | Description | Notes +------------- | ------------- | ------------- +[**User**](User.md) | | + + +#### SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**User**](User.md) | | + + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +[**User**](User.md) + +### Authorization + +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) + +# **login_user** +> str login_user(usernamepassword) + +Logs user into the system + +### Example + +```python +import petstore_api +from petstore_api.api import user_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'username': "username_example", + 'password': "password_example", + } + try: + # Logs user into the system + api_response = api_instance.login_user( + query_params=query_params, + ) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->login_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/xml', '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 + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +username | UsernameSchema | | +password | PasswordSchema | | + + +#### UsernameSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### PasswordSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | ApiResponseFor200 | successful operation +400 | ApiResponseFor400 | Invalid username/password supplied + +#### ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | +headers | ResponseHeadersFor200 | | + +#### SchemaFor200ResponseBodyApplicationXml + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +#### SchemaFor200ResponseBodyApplicationJson + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | +#### ResponseHeadersFor200 + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Rate-Limit | XRateLimitSchema | | optional +X-Expires-After | XExpiresAfterSchema | | optional + +#### XRateLimitSchema + +calls per hour allowed by the user + +Type | Description | Notes +------------- | ------------- | ------------- +**int** | calls per hour allowed by the user | + +#### XExpiresAfterSchema + +date in UTC when token expires + +Type | Description | Notes +------------- | ------------- | ------------- +**datetime** | date in UTC when token expires | + + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +**str** + +### Authorization + +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) + +# **logout_user** +> logout_user() + +Logs out current logged in user session + +### Example + +```python +import petstore_api +from petstore_api.api import user_api +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = user_api.UserApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Logs out current logged in user session + api_response = api_instance.logout_user() + except petstore_api.ApiException as e: + print("Exception when calling UserApi->logout_user: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +default | ApiResponseForDefault | successful operation + +#### ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + +# **update_user** +> update_user(usernameuser) + +Updated user + +This can only be done by the logged in user. + +### Example + +```python +import petstore_api +from petstore_api.api import user_api +from petstore_api.model.user import User +from pprint import pprint +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + +# 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 + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'username': "username_example", + } + body = User( + id=1, + username="username_example", + first_name="first_name_example", + last_name="last_name_example", + email="email_example", + password="password_example", + phone="phone_example", + user_status=1, + object_with_no_declared_props=dict(), + object_with_no_declared_props_nullable=dict(), + any_type_prop=None, + any_type_prop_nullable=None, + ) + try: + # Updated user + api_response = api_instance.update_user( + path_params=path_params, + body=body, + ) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->update_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +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 + +### body + +#### SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**User**](User.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +username | UsernameSchema | | + +#### UsernameSchema + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +400 | ApiResponseFor400 | Invalid user supplied +404 | ApiResponseFor404 | User not found + +#### ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + + +void (empty response body) + +### Authorization + +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) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Whale.md b/samples/openapi3/client/petstore/python-experimental/docs/Whale.md new file mode 100644 index 000000000000..f0b2dbc51ef8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Whale.md @@ -0,0 +1,12 @@ +# Whale + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hasBaleen** | **bool** | | [optional] +**hasTeeth** | **bool** | | [optional] +**className** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md b/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md new file mode 100644 index 000000000000..ae12668a3a17 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md @@ -0,0 +1,11 @@ +# Zebra + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] +**className** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/git_push.sh b/samples/openapi3/client/petstore/python-experimental/git_push.sh new file mode 100644 index 000000000000..ced3be2b0c7b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py new file mode 100644 index 000000000000..26b0467759de --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +# flake8: noqa + +""" + OpenAPI Petstore + + 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 +""" + +__version__ = "1.0.0" + +# import ApiClient +from petstore_api.api_client import ApiClient + +# import Configuration +from petstore_api.configuration import Configuration +from petstore_api.signing import HttpSigningConfiguration + +# import exceptions +from petstore_api.exceptions import OpenApiException +from petstore_api.exceptions import ApiAttributeError +from petstore_api.exceptions import ApiTypeError +from petstore_api.exceptions import ApiValueError +from petstore_api.exceptions import ApiKeyError +from petstore_api.exceptions import ApiException + +__import__('sys').setrecursionlimit(1234) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/__init__.py new file mode 100644 index 000000000000..840e9f0cd908 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/__init__.py @@ -0,0 +1,3 @@ +# do not import all apis into this module because that uses a lot of memory and stack frames +# if you need the ability to import all apis from one package, import them with +# from petstore_api.apis import AnotherFakeApi diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api.py new file mode 100644 index 000000000000..a6e0483cf682 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api.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 +""" + +from petstore_api.api_client import ApiClient +from petstore_api.api.another_fake_api_endpoints.call_123_test_special_tags import Call123TestSpecialTags + + +class AnotherFakeApi( + Call123TestSpecialTags, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py new file mode 100644 index 000000000000..b97333110467 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.client import Client + +# body param +SchemaForRequestBodyApplicationJson = Client + + +request_body_client = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/another-fake/dummy' +_method = 'PATCH' +SchemaFor200ResponseBodyApplicationJson = Client + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class Call123TestSpecialTags(api_client.Api): + + def call_123_test_special_tags( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + To test special tags + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_client.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api.py new file mode 100644 index 000000000000..28b822701b69 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api.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 +""" + +from petstore_api.api_client import ApiClient +from petstore_api.api.default_api_endpoints.foo_get import FooGet + + +class DefaultApi( + FooGet, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py new file mode 100644 index 000000000000..b704f12197a0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.inline_response_default import InlineResponseDefault + +_path = '/foo' +_method = 'GET' +SchemaFor0ResponseBodyApplicationJson = InlineResponseDefault + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class FooGet(api_client.Api): + + def foo_get( + self: api_client.Api, + 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, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py new file mode 100644 index 000000000000..7a81465ef0f9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py @@ -0,0 +1,73 @@ +# 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 petstore_api.api_client import ApiClient +from petstore_api.api.fake_api_endpoints.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums +from petstore_api.api.fake_api_endpoints.array_model import ArrayModel +from petstore_api.api.fake_api_endpoints.array_of_enums import ArrayOfEnums +from petstore_api.api.fake_api_endpoints.body_with_file_schema import BodyWithFileSchema +from petstore_api.api.fake_api_endpoints.body_with_query_params import BodyWithQueryParams +from petstore_api.api.fake_api_endpoints.boolean import Boolean +from petstore_api.api.fake_api_endpoints.case_sensitive_params import CaseSensitiveParams +from petstore_api.api.fake_api_endpoints.client_model import ClientModel +from petstore_api.api.fake_api_endpoints.composed_one_of_different_types import ComposedOneOfDifferentTypes +from petstore_api.api.fake_api_endpoints.endpoint_parameters import EndpointParameters +from petstore_api.api.fake_api_endpoints.enum_parameters import EnumParameters +from petstore_api.api.fake_api_endpoints.fake_health_get import FakeHealthGet +from petstore_api.api.fake_api_endpoints.group_parameters import GroupParameters +from petstore_api.api.fake_api_endpoints.inline_additional_properties import InlineAdditionalProperties +from petstore_api.api.fake_api_endpoints.json_form_data import JsonFormData +from petstore_api.api.fake_api_endpoints.mammal import Mammal +from petstore_api.api.fake_api_endpoints.number_with_validations import NumberWithValidations +from petstore_api.api.fake_api_endpoints.object_model_with_ref_props import ObjectModelWithRefProps +from petstore_api.api.fake_api_endpoints.parameter_collisions import ParameterCollisions +from petstore_api.api.fake_api_endpoints.query_parameter_collection_format import QueryParameterCollectionFormat +from petstore_api.api.fake_api_endpoints.string import String +from petstore_api.api.fake_api_endpoints.string_enum import StringEnum +from petstore_api.api.fake_api_endpoints.upload_download_file import UploadDownloadFile +from petstore_api.api.fake_api_endpoints.upload_file import UploadFile +from petstore_api.api.fake_api_endpoints.upload_files import UploadFiles + + +class FakeApi( + AdditionalPropertiesWithArrayOfEnums, + ArrayModel, + ArrayOfEnums, + BodyWithFileSchema, + BodyWithQueryParams, + Boolean, + CaseSensitiveParams, + ClientModel, + ComposedOneOfDifferentTypes, + EndpointParameters, + EnumParameters, + FakeHealthGet, + GroupParameters, + InlineAdditionalProperties, + JsonFormData, + Mammal, + NumberWithValidations, + ObjectModelWithRefProps, + ParameterCollisions, + QueryParameterCollectionFormat, + String, + StringEnum, + UploadDownloadFile, + UploadFile, + UploadFiles, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py new file mode 100644 index 000000000000..f0d07f512051 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums + +# body param +SchemaForRequestBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums + + +request_body_additional_properties_with_array_of_enums = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/additional-properties-with-array-of-enums' +_method = 'GET' +SchemaFor200ResponseBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class AdditionalPropertiesWithArrayOfEnums(api_client.Api): + + def additional_properties_with_array_of_enums( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Additional Properties with Array of Enums + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_additional_properties_with_array_of_enums.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py new file mode 100644 index 000000000000..9c44cbce5077 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.animal_farm import AnimalFarm + +# body param +SchemaForRequestBodyApplicationJson = AnimalFarm + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/refs/arraymodel' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnimalFarm + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class ArrayModel(api_client.Api): + + def array_model( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py new file mode 100644 index 000000000000..83af2ce00ca8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.array_of_enums import ArrayOfEnums + +# body param +SchemaForRequestBodyApplicationJson = ArrayOfEnums + + +request_body_array_of_enums = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/refs/array-of-enums' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ArrayOfEnums + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class ArrayOfEnums(api_client.Api): + + def array_of_enums( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Array of Enums + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_array_of_enums.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py new file mode 100644 index 000000000000..c46e584ab427 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.file_schema_test_class import FileSchemaTestClass + +# body param +SchemaForRequestBodyApplicationJson = FileSchemaTestClass + + +request_body_file_schema_test_class = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/fake/body-with-file-schema' +_method = 'PUT' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class BodyWithFileSchema(api_client.Api): + + def body_with_file_schema( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_file_schema_test_class.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py new file mode 100644 index 000000000000..a99f338d61b7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.user import User + +# query params +QuerySchema = StrSchema +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + 'query': QuerySchema, + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_query = api_client.QueryParameter( + name="query", + style=api_client.ParameterStyle.FORM, + schema=QuerySchema, + required=True, + explode=True, +) +# body param +SchemaForRequestBodyApplicationJson = User + + +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/fake/body-with-query-params' +_method = 'PUT' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class BodyWithQueryParams(api_client.Api): + + def body_with_query_params( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + query_params: RequestQueryParams = frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + + _query_params = [] + for parameter in ( + request_query_query, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_user.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py new file mode 100644 index 000000000000..49566ef541d6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# body param +SchemaForRequestBodyApplicationJson = BoolSchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/refs/boolean' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = BoolSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class Boolean(api_client.Api): + + def boolean( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py new file mode 100644 index 000000000000..ac4d37279ebf --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# query params +SomeVarSchema = StrSchema +SomeVarSchema = StrSchema +SomeVarSchema = StrSchema +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + 'someVar': SomeVarSchema, + 'SomeVar': SomeVarSchema, + 'some_var': SomeVarSchema, + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_some_var = api_client.QueryParameter( + name="someVar", + style=api_client.ParameterStyle.FORM, + schema=SomeVarSchema, + required=True, + explode=True, +) +request_query_some_var2 = api_client.QueryParameter( + name="SomeVar", + style=api_client.ParameterStyle.FORM, + schema=SomeVarSchema, + required=True, + explode=True, +) +request_query_some_var3 = api_client.QueryParameter( + name="some_var", + style=api_client.ParameterStyle.FORM, + schema=SomeVarSchema, + required=True, + explode=True, +) +_path = '/fake/case-sensitive-params' +_method = 'PUT' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class CaseSensitiveParams(api_client.Api): + + def case_sensitive_params( + self: api_client.Api, + query_params: RequestQueryParams = frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + + _query_params = [] + for parameter in ( + request_query_some_var, + request_query_some_var2, + request_query_some_var3, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py new file mode 100644 index 000000000000..d1812acdfb65 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.client import Client + +# body param +SchemaForRequestBodyApplicationJson = Client + + +request_body_client = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/fake' +_method = 'PATCH' +SchemaFor200ResponseBodyApplicationJson = Client + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class ClientModel(api_client.Api): + + def client_model( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + To test \"client\" model + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_client.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py new file mode 100644 index 000000000000..7f3ecf420450 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes + +# body param +SchemaForRequestBodyApplicationJson = ComposedOneOfDifferentTypes + + +request_body_composed_one_of_different_types = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/refs/composed_one_of_number_with_validations' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ComposedOneOfDifferentTypes + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class ComposedOneOfDifferentTypes(api_client.Api): + + def composed_one_of_different_types( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_composed_one_of_different_types.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py new file mode 100644 index 000000000000..63faaf2db9a6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py @@ -0,0 +1,288 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# body param + + +class SchemaForRequestBodyApplicationXWwwFormUrlencoded( + DictSchema +): + _required_property_names = set(( + )) + + + class integer( + _SchemaValidator( + inclusive_maximum=100, + inclusive_minimum=10, + ), + IntSchema + ): + pass + + + class int32( + _SchemaValidator( + inclusive_maximum=200, + inclusive_minimum=20, + ), + Int32Schema + ): + pass + int64 = Int64Schema + + + class number( + _SchemaValidator( + inclusive_maximum=543.2, + inclusive_minimum=32.1, + ), + NumberSchema + ): + pass + + + class _float( + _SchemaValidator( + inclusive_maximum=987.6, + ), + Float32Schema + ): + pass + locals()['float'] = _float + del locals()['_float'] + + + class double( + _SchemaValidator( + inclusive_maximum=123.4, + inclusive_minimum=67.8, + ), + Float64Schema + ): + pass + + + class string( + _SchemaValidator( + regex=[{ + 'pattern': r'[a-z]', # noqa: E501 + 'flags': ( + re.IGNORECASE + ) + }], + ), + StrSchema + ): + pass + + + class pattern_without_delimiter( + _SchemaValidator( + regex=[{ + 'pattern': r'^[A-Z].*', # noqa: E501 + }], + ), + StrSchema + ): + pass + byte = StrSchema + binary = BinarySchema + date = DateSchema + dateTime = DateTimeSchema + + + class password( + _SchemaValidator( + max_length=64, + min_length=10, + ), + StrSchema + ): + pass + callback = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + integer: typing.Union[integer, Unset] = unset, + int32: typing.Union[int32, Unset] = unset, + int64: typing.Union[int64, Unset] = unset, + string: typing.Union[string, Unset] = unset, + binary: typing.Union[binary, Unset] = unset, + date: typing.Union[date, Unset] = unset, + dateTime: typing.Union[dateTime, Unset] = unset, + password: typing.Union[password, Unset] = unset, + callback: typing.Union[callback, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + integer=integer, + int32=int32, + int64=int64, + string=string, + binary=binary, + date=date, + dateTime=dateTime, + password=password, + callback=callback, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, +) +_path = '/fake' +_method = 'POST' +_auth = [ + 'http_basic_test', +] + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +_status_code_to_response = { + '400': _response_for_400, + '404': _response_for_404, +} + + +class EndpointParameters(api_client.Api): + + def endpoint_parameters( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] = unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + _fields = None + _body = None + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py new file mode 100644 index 000000000000..7d8e080429d0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py @@ -0,0 +1,480 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# query params + + +class EnumQueryStringArraySchema( + ListSchema +): + + + class _items( + _SchemaEnumMaker( + enum_value_to_name={ + ">": "GREATER_THAN", + "$": "DOLLAR", + } + ), + StrSchema + ): + + @classmethod + @property + def GREATER_THAN(cls): + return cls._enum_by_value[">"](">") + + @classmethod + @property + def DOLLAR(cls): + return cls._enum_by_value["$"]("$") + + +class EnumQueryStringSchema( + _SchemaEnumMaker( + enum_value_to_name={ + "_abc": "_ABC", + "-efg": "EFG", + "(xyz)": "XYZ", + } + ), + StrSchema +): + + @classmethod + @property + def _ABC(cls): + return cls._enum_by_value["_abc"]("_abc") + + @classmethod + @property + def EFG(cls): + return cls._enum_by_value["-efg"]("-efg") + + @classmethod + @property + def XYZ(cls): + return cls._enum_by_value["(xyz)"]("(xyz)") + + +class EnumQueryIntegerSchema( + _SchemaEnumMaker( + enum_value_to_name={ + 1: "POSITIVE_1", + -2: "NEGATIVE_2", + } + ), + Int32Schema +): + + @classmethod + @property + def POSITIVE_1(cls): + return cls._enum_by_value[1](1) + + @classmethod + @property + def NEGATIVE_2(cls): + return cls._enum_by_value[-2](-2) + + +class EnumQueryDoubleSchema( + _SchemaEnumMaker( + enum_value_to_name={ + 1.1: "POSITIVE_1_PT_1", + -1.2: "NEGATIVE_1_PT_2", + } + ), + Float64Schema +): + + @classmethod + @property + def POSITIVE_1_PT_1(cls): + return cls._enum_by_value[1.1](1.1) + + @classmethod + @property + def NEGATIVE_1_PT_2(cls): + return cls._enum_by_value[-1.2](-1.2) +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + 'enum_query_string_array': EnumQueryStringArraySchema, + 'enum_query_string': EnumQueryStringSchema, + 'enum_query_integer': EnumQueryIntegerSchema, + 'enum_query_double': EnumQueryDoubleSchema, + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_enum_query_string_array = api_client.QueryParameter( + name="enum_query_string_array", + style=api_client.ParameterStyle.FORM, + schema=EnumQueryStringArraySchema, + explode=True, +) +request_query_enum_query_string = api_client.QueryParameter( + name="enum_query_string", + style=api_client.ParameterStyle.FORM, + schema=EnumQueryStringSchema, + explode=True, +) +request_query_enum_query_integer = api_client.QueryParameter( + name="enum_query_integer", + style=api_client.ParameterStyle.FORM, + schema=EnumQueryIntegerSchema, + explode=True, +) +request_query_enum_query_double = api_client.QueryParameter( + name="enum_query_double", + style=api_client.ParameterStyle.FORM, + schema=EnumQueryDoubleSchema, + explode=True, +) +# header params + + +class EnumHeaderStringArraySchema( + ListSchema +): + + + class _items( + _SchemaEnumMaker( + enum_value_to_name={ + ">": "GREATER_THAN", + "$": "DOLLAR", + } + ), + StrSchema + ): + + @classmethod + @property + def GREATER_THAN(cls): + return cls._enum_by_value[">"](">") + + @classmethod + @property + def DOLLAR(cls): + return cls._enum_by_value["$"]("$") + + +class EnumHeaderStringSchema( + _SchemaEnumMaker( + enum_value_to_name={ + "_abc": "_ABC", + "-efg": "EFG", + "(xyz)": "XYZ", + } + ), + StrSchema +): + + @classmethod + @property + def _ABC(cls): + return cls._enum_by_value["_abc"]("_abc") + + @classmethod + @property + def EFG(cls): + return cls._enum_by_value["-efg"]("-efg") + + @classmethod + @property + def XYZ(cls): + return cls._enum_by_value["(xyz)"]("(xyz)") +RequestRequiredHeaderParams = typing.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing.TypedDict( + 'RequestOptionalHeaderParams', + { + 'enum_header_string_array': EnumHeaderStringArraySchema, + 'enum_header_string': EnumHeaderStringSchema, + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_enum_header_string_array = api_client.HeaderParameter( + name="enum_header_string_array", + style=api_client.ParameterStyle.SIMPLE, + schema=EnumHeaderStringArraySchema, +) +request_header_enum_header_string = api_client.HeaderParameter( + name="enum_header_string", + style=api_client.ParameterStyle.SIMPLE, + schema=EnumHeaderStringSchema, +) +# body param + + +class SchemaForRequestBodyApplicationXWwwFormUrlencoded( + DictSchema +): + + + class enum_form_string_array( + ListSchema + ): + + + class _items( + _SchemaEnumMaker( + enum_value_to_name={ + ">": "GREATER_THAN", + "$": "DOLLAR", + } + ), + StrSchema + ): + + @classmethod + @property + def GREATER_THAN(cls): + return cls._enum_by_value[">"](">") + + @classmethod + @property + def DOLLAR(cls): + return cls._enum_by_value["$"]("$") + + + class enum_form_string( + _SchemaEnumMaker( + enum_value_to_name={ + "_abc": "_ABC", + "-efg": "EFG", + "(xyz)": "XYZ", + } + ), + StrSchema + ): + + @classmethod + @property + def _ABC(cls): + return cls._enum_by_value["_abc"]("_abc") + + @classmethod + @property + def EFG(cls): + return cls._enum_by_value["-efg"]("-efg") + + @classmethod + @property + def XYZ(cls): + return cls._enum_by_value["(xyz)"]("(xyz)") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + enum_form_string_array: typing.Union[enum_form_string_array, Unset] = unset, + enum_form_string: typing.Union[enum_form_string, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + enum_form_string_array=enum_form_string_array, + enum_form_string=enum_form_string, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, +) +_path = '/fake' +_method = 'GET' + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +_status_code_to_response = { + '400': _response_for_400, + '404': _response_for_404, +} + + +class EnumParameters(api_client.Api): + + def enum_parameters( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] = unset, + query_params: RequestQueryParams = frozendict(), + header_params: RequestHeaderParams = frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + To test enum parameters + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + self._verify_typed_dict_inputs(RequestHeaderParams, header_params) + + _query_params = [] + for parameter in ( + request_query_enum_query_string_array, + request_query_enum_query_string, + request_query_enum_query_integer, + request_query_enum_query_double, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_enum_header_string_array, + request_header_enum_header_string, + ): + parameter_data = header_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + + _fields = None + _body = None + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py new file mode 100644 index 000000000000..831241cba68d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.health_check_result import HealthCheckResult + +_path = '/fake/health' +_method = 'GET' +SchemaFor200ResponseBodyApplicationJson = HealthCheckResult + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class FakeHealthGet(api_client.Api): + + def fake_health_get( + self: api_client.Api, + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Health check endpoint + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py new file mode 100644 index 000000000000..dc590cb91372 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py @@ -0,0 +1,234 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# query params +RequiredStringGroupSchema = IntSchema +RequiredInt64GroupSchema = Int64Schema +StringGroupSchema = IntSchema +Int64GroupSchema = Int64Schema +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + 'required_string_group': RequiredStringGroupSchema, + 'required_int64_group': RequiredInt64GroupSchema, + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + 'string_group': StringGroupSchema, + 'int64_group': Int64GroupSchema, + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_required_string_group = api_client.QueryParameter( + name="required_string_group", + style=api_client.ParameterStyle.FORM, + schema=RequiredStringGroupSchema, + required=True, + explode=True, +) +request_query_required_int64_group = api_client.QueryParameter( + name="required_int64_group", + style=api_client.ParameterStyle.FORM, + schema=RequiredInt64GroupSchema, + required=True, + explode=True, +) +request_query_string_group = api_client.QueryParameter( + name="string_group", + style=api_client.ParameterStyle.FORM, + schema=StringGroupSchema, + explode=True, +) +request_query_int64_group = api_client.QueryParameter( + name="int64_group", + style=api_client.ParameterStyle.FORM, + schema=Int64GroupSchema, + explode=True, +) +# header params +RequiredBooleanGroupSchema = BoolSchema +BooleanGroupSchema = BoolSchema +RequestRequiredHeaderParams = typing.TypedDict( + 'RequestRequiredHeaderParams', + { + 'required_boolean_group': RequiredBooleanGroupSchema, + } +) +RequestOptionalHeaderParams = typing.TypedDict( + 'RequestOptionalHeaderParams', + { + 'boolean_group': BooleanGroupSchema, + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_required_boolean_group = api_client.HeaderParameter( + name="required_boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=RequiredBooleanGroupSchema, + required=True, +) +request_header_boolean_group = api_client.HeaderParameter( + name="boolean_group", + style=api_client.ParameterStyle.SIMPLE, + schema=BooleanGroupSchema, +) +_path = '/fake' +_method = 'DELETE' +_auth = [ + 'bearer_test', +] + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) +_status_code_to_response = { + '400': _response_for_400, +} + + +class GroupParameters(api_client.Api): + + def group_parameters( + self: api_client.Api, + query_params: RequestQueryParams = frozendict(), + header_params: RequestHeaderParams = frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + Fake endpoint to test group parameters (optional) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + self._verify_typed_dict_inputs(RequestHeaderParams, header_params) + + _query_params = [] + for parameter in ( + request_query_required_string_group, + request_query_required_int64_group, + request_query_string_group, + request_query_int64_group, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_required_boolean_group, + request_header_boolean_group, + ): + parameter_data = header_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py new file mode 100644 index 000000000000..0acc3f4491e1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# body param + + +class SchemaForRequestBodyApplicationJson( + DictSchema +): + _additional_properties = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_request_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/fake/inline-additionalProperties' +_method = 'POST' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class InlineAdditionalProperties(api_client.Api): + + def inline_additional_properties( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + test inline additionalProperties + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_request_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py new file mode 100644 index 000000000000..591f9417e3b5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# body param + + +class SchemaForRequestBodyApplicationXWwwFormUrlencoded( + DictSchema +): + _required_property_names = set(( + )) + param = StrSchema + param2 = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, +) +_path = '/fake/jsonFormData' +_method = 'GET' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class JsonFormData(api_client.Api): + + def json_form_data( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] = unset, + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + test json serialization of form data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + _fields = None + _body = None + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py new file mode 100644 index 000000000000..4b402d4e9614 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.mammal import Mammal + +# body param +SchemaForRequestBodyApplicationJson = Mammal + + +request_body_mammal = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/fake/refs/mammal' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = Mammal + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class Mammal(api_client.Api): + + def mammal( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_mammal.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py new file mode 100644 index 000000000000..ac82ec1bca53 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.number_with_validations import NumberWithValidations + +# body param +SchemaForRequestBodyApplicationJson = NumberWithValidations + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/refs/number' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = NumberWithValidations + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class NumberWithValidations(api_client.Api): + + def number_with_validations( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py new file mode 100644 index 000000000000..aaa919ec758e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps + +# body param +SchemaForRequestBodyApplicationJson = ObjectModelWithRefProps + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/refs/object_model_with_ref_props' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ObjectModelWithRefProps + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class ObjectModelWithRefProps(api_client.Api): + + def object_model_with_ref_props( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py new file mode 100644 index 000000000000..c355d0e1183c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py @@ -0,0 +1,425 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# query params +Model1Schema = StrSchema +ABSchema = StrSchema +AbSchema = StrSchema +ModelSelfSchema = StrSchema +ABSchema = StrSchema +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + '1': Model1Schema, + 'aB': ABSchema, + 'Ab': AbSchema, + 'self': ModelSelfSchema, + 'A-B': ABSchema, + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query__1 = api_client.QueryParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=Model1Schema, + explode=True, +) +request_query_a_b = api_client.QueryParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=ABSchema, + explode=True, +) +request_query_ab = api_client.QueryParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=AbSchema, + explode=True, +) +request_query__self = api_client.QueryParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=ModelSelfSchema, + explode=True, +) +request_query_a_b2 = api_client.QueryParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=ABSchema, + explode=True, +) +# header params +Model1Schema = StrSchema +ABSchema = StrSchema +ModelSelfSchema = StrSchema +ABSchema = StrSchema +RequestRequiredHeaderParams = typing.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing.TypedDict( + 'RequestOptionalHeaderParams', + { + '1': Model1Schema, + 'aB': ABSchema, + 'self': ModelSelfSchema, + 'A-B': ABSchema, + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header__2 = api_client.HeaderParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=Model1Schema, +) +request_header_a_b3 = api_client.HeaderParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=ABSchema, +) +request_header__self2 = api_client.HeaderParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelSelfSchema, +) +request_header_a_b4 = api_client.HeaderParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=ABSchema, +) +# path params +Model1Schema = StrSchema +ABSchema = StrSchema +AbSchema = StrSchema +ModelSelfSchema = StrSchema +ABSchema = StrSchema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + '1': Model1Schema, + 'aB': ABSchema, + 'Ab': AbSchema, + 'self': ModelSelfSchema, + 'A-B': ABSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__3 = api_client.PathParameter( + name="1", + style=api_client.ParameterStyle.SIMPLE, + schema=Model1Schema, + required=True, +) +request_path_a_b5 = api_client.PathParameter( + name="aB", + style=api_client.ParameterStyle.SIMPLE, + schema=ABSchema, + required=True, +) +request_path_ab2 = api_client.PathParameter( + name="Ab", + style=api_client.ParameterStyle.SIMPLE, + schema=AbSchema, + required=True, +) +request_path__self3 = api_client.PathParameter( + name="self", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelSelfSchema, + required=True, +) +request_path_a_b6 = api_client.PathParameter( + name="A-B", + style=api_client.ParameterStyle.SIMPLE, + schema=ABSchema, + required=True, +) +# cookie params +Model1Schema = StrSchema +ABSchema = StrSchema +AbSchema = StrSchema +ModelSelfSchema = StrSchema +ABSchema = StrSchema +RequestRequiredCookieParams = typing.TypedDict( + 'RequestRequiredCookieParams', + { + } +) +RequestOptionalCookieParams = typing.TypedDict( + 'RequestOptionalCookieParams', + { + '1': Model1Schema, + 'aB': ABSchema, + 'Ab': AbSchema, + 'self': ModelSelfSchema, + 'A-B': ABSchema, + }, + total=False +) + + +class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookieParams): + pass + + +request_cookie__4 = api_client.CookieParameter( + name="1", + style=api_client.ParameterStyle.FORM, + schema=Model1Schema, + explode=True, +) +request_cookie_a_b7 = api_client.CookieParameter( + name="aB", + style=api_client.ParameterStyle.FORM, + schema=ABSchema, + explode=True, +) +request_cookie_ab3 = api_client.CookieParameter( + name="Ab", + style=api_client.ParameterStyle.FORM, + schema=AbSchema, + explode=True, +) +request_cookie__self4 = api_client.CookieParameter( + name="self", + style=api_client.ParameterStyle.FORM, + schema=ModelSelfSchema, + explode=True, +) +request_cookie_a_b8 = api_client.CookieParameter( + name="A-B", + style=api_client.ParameterStyle.FORM, + schema=ABSchema, + explode=True, +) +# body param +SchemaForRequestBodyApplicationJson = AnyTypeSchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = AnyTypeSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class ParameterCollisions(api_client.Api): + + def parameter_collisions( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + query_params: RequestQueryParams = frozendict(), + header_params: RequestHeaderParams = frozendict(), + path_params: RequestPathParams = frozendict(), + cookie_params: RequestCookieParams = frozendict(), + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + parameter collision case + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + self._verify_typed_dict_inputs(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs(RequestPathParams, path_params) + self._verify_typed_dict_inputs(RequestCookieParams, cookie_params) + + _path_params = {} + for parameter in ( + request_path__3, + request_path_a_b5, + request_path_ab2, + request_path__self3, + request_path_a_b6, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _query_params = [] + for parameter in ( + request_query__1, + request_query_a_b, + request_query_ab, + request_query__self, + request_query_a_b2, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header__2, + request_header_a_b3, + request_header__self2, + request_header_a_b4, + ): + parameter_data = header_params.get(parameter.name, unset) + if parameter_data is unset: + continue + 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + query_params=tuple(_query_params), + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py new file mode 100644 index 000000000000..14076fea22ba --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.string_with_validation import StringWithValidation + +# query params + + +class PipeSchema( + ListSchema +): + _items = StrSchema + + +class IoutilSchema( + ListSchema +): + _items = StrSchema + + +class HttpSchema( + ListSchema +): + _items = StrSchema + + +class UrlSchema( + ListSchema +): + _items = StrSchema + + +class ContextSchema( + ListSchema +): + _items = StrSchema +RefParamSchema = StringWithValidation +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + 'pipe': PipeSchema, + 'ioutil': IoutilSchema, + 'http': HttpSchema, + 'url': UrlSchema, + 'context': ContextSchema, + 'refParam': RefParamSchema, + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_pipe = api_client.QueryParameter( + name="pipe", + style=api_client.ParameterStyle.FORM, + schema=PipeSchema, + required=True, + explode=True, +) +request_query_ioutil = api_client.QueryParameter( + name="ioutil", + style=api_client.ParameterStyle.FORM, + schema=IoutilSchema, + required=True, +) +request_query_http = api_client.QueryParameter( + name="http", + style=api_client.ParameterStyle.SPACE_DELIMITED, + schema=HttpSchema, + required=True, +) +request_query_url = api_client.QueryParameter( + name="url", + style=api_client.ParameterStyle.FORM, + schema=UrlSchema, + required=True, +) +request_query_context = api_client.QueryParameter( + name="context", + style=api_client.ParameterStyle.FORM, + schema=ContextSchema, + required=True, + explode=True, +) +request_query_ref_param = api_client.QueryParameter( + name="refParam", + style=api_client.ParameterStyle.FORM, + schema=RefParamSchema, + required=True, + explode=True, +) +_path = '/fake/test-query-paramters' +_method = 'PUT' + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class QueryParameterCollectionFormat(api_client.Api): + + def query_parameter_collection_format( + self: api_client.Api, + query_params: RequestQueryParams = frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + + _query_params = [] + for parameter in ( + request_query_pipe, + request_query_ioutil, + request_query_http, + request_query_url, + request_query_context, + request_query_ref_param, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py new file mode 100644 index 000000000000..000d30c64ef1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# body param +SchemaForRequestBodyApplicationJson = StrSchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/refs/string' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = StrSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class String(api_client.Api): + + def string( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py new file mode 100644 index 000000000000..51c9bd862e86 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.string_enum import StringEnum + +# body param +SchemaForRequestBodyApplicationJson = StringEnum + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_path = '/fake/refs/enum' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = StringEnum + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class StringEnum(api_client.Api): + + def string_enum( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, Unset] = unset, + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py new file mode 100644 index 000000000000..87fa4f8dbcc7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# body param +SchemaForRequestBodyApplicationOctetStream = BinarySchema + + +request_body_body = api_client.RequestBody( + content={ + 'application/octet-stream': api_client.MediaType( + schema=SchemaForRequestBodyApplicationOctetStream), + }, + required=True, +) +_path = '/fake/uploadDownloadFile' +_method = 'POST' +SchemaFor200ResponseBodyApplicationOctetStream = BinarySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationOctetStream, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/octet-stream': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationOctetStream), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/octet-stream', +) + + +class UploadDownloadFile(api_client.Api): + + def upload_download_file( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationOctetStream], + content_type: str = 'application/octet-stream', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + uploads a file and downloads a file using application/octet-stream + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py new file mode 100644 index 000000000000..8fbdf9bbdb89 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.api_response import ApiResponse + +# body param + + +class SchemaForRequestBodyMultipartFormData( + DictSchema +): + _required_property_names = set(( + )) + additionalMetadata = StrSchema + file = BinarySchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + additionalMetadata=additionalMetadata, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) +_path = '/fake/uploadFile' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class UploadFile(api_client.Api): + + def upload_file( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyMultipartFormData, Unset] = unset, + content_type: str = 'multipart/form-data', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + uploads a file using multipart/form-data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py new file mode 100644 index 000000000000..19c7745793ae --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.api_response import ApiResponse + +# body param + + +class SchemaForRequestBodyMultipartFormData( + DictSchema +): + + + class files( + ListSchema + ): + _items = BinarySchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + files: typing.Union[files, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + files=files, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) +_path = '/fake/uploadFiles' +_method = 'POST' +SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class UploadFiles(api_client.Api): + + def upload_files( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyMultipartFormData, Unset] = unset, + content_type: str = 'multipart/form-data', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + uploads files using multipart/form-data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py new file mode 100644 index 000000000000..cda926e1d0a7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.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 +""" + +from petstore_api.api_client import ApiClient +from petstore_api.api.fake_classname_tags_123_api_endpoints.classname import Classname + + +class FakeClassnameTags123Api( + Classname, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py new file mode 100644 index 000000000000..d8157f7f4cfd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.client import Client + +# body param +SchemaForRequestBodyApplicationJson = Client + + +request_body_client = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/fake_classname_test' +_method = 'PATCH' +_auth = [ + 'api_key_query', +] +SchemaFor200ResponseBodyApplicationJson = Client + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class Classname(api_client.Api): + + def classname( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + To test class name in snake case + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_client.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api.py new file mode 100644 index 000000000000..83efafb3ec37 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api.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 +""" + +from petstore_api.api_client import ApiClient +from petstore_api.api.pet_api_endpoints.add_pet import AddPet +from petstore_api.api.pet_api_endpoints.delete_pet import DeletePet +from petstore_api.api.pet_api_endpoints.find_pets_by_status import FindPetsByStatus +from petstore_api.api.pet_api_endpoints.find_pets_by_tags import FindPetsByTags +from petstore_api.api.pet_api_endpoints.get_pet_by_id import GetPetById +from petstore_api.api.pet_api_endpoints.update_pet import UpdatePet +from petstore_api.api.pet_api_endpoints.update_pet_with_form import UpdatePetWithForm +from petstore_api.api.pet_api_endpoints.upload_file_with_required_file import UploadFileWithRequiredFile +from petstore_api.api.pet_api_endpoints.upload_image import UploadImage + + +class PetApi( + AddPet, + DeletePet, + FindPetsByStatus, + FindPetsByTags, + GetPetById, + UpdatePet, + UpdatePetWithForm, + UploadFileWithRequiredFile, + UploadImage, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py new file mode 100644 index 000000000000..7f04e4cc3c8d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.pet import Pet + +# body param +SchemaForRequestBodyApplicationJson = Pet +SchemaForRequestBodyApplicationXml = Pet + + +request_body_pet = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'application/xml': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXml), + }, + required=True, +) +_path = '/pet' +_method = 'POST' +_auth = [ + 'http_signature_test', + 'petstore_auth', +] +_servers = ( + { + 'url': "http://petstore.swagger.io/v2", + 'description': "No description provided", + }, + { + 'url': "http://path-server-test.petstore.local/v2", + 'description': "No description provided", + }, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + +@dataclass +class ApiResponseFor405(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_405 = api_client.OpenApiResponse( + response_cls=ApiResponseFor405, +) +_status_code_to_response = { + '200': _response_for_200, + '405': _response_for_405, +} + + +class AddPet(api_client.Api): + + def add_pet( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Add a new pet to the store + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_pet.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + host = self.get_host('add_pet', _servers, host_index) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py new file mode 100644 index 000000000000..de6d86ed2128 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# header params +ApiKeySchema = StrSchema +RequestRequiredHeaderParams = typing.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing.TypedDict( + 'RequestOptionalHeaderParams', + { + 'api_key': ApiKeySchema, + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_api_key = api_client.HeaderParameter( + name="api_key", + style=api_client.ParameterStyle.SIMPLE, + schema=ApiKeySchema, +) +# path params +PetIdSchema = Int64Schema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': PetIdSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) +_path = '/pet/{petId}' +_method = 'DELETE' +_auth = [ + 'petstore_auth', +] + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) +_status_code_to_response = { + '400': _response_for_400, +} + + +class DeletePet(api_client.Api): + + def delete_pet( + self: api_client.Api, + header_params: RequestHeaderParams = frozendict(), + path_params: RequestPathParams = frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + Deletes a pet + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_pet_id, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_api_key, + ): + parameter_data = header_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py new file mode 100644 index 000000000000..d6b31e361f56 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py @@ -0,0 +1,246 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.pet import Pet + +# query params + + +class StatusSchema( + ListSchema +): + + + class _items( + _SchemaEnumMaker( + enum_value_to_name={ + "available": "AVAILABLE", + "pending": "PENDING", + "sold": "SOLD", + } + ), + StrSchema + ): + + @classmethod + @property + def AVAILABLE(cls): + return cls._enum_by_value["available"]("available") + + @classmethod + @property + def PENDING(cls): + return cls._enum_by_value["pending"]("pending") + + @classmethod + @property + def SOLD(cls): + return cls._enum_by_value["sold"]("sold") +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + 'status': StatusSchema, + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_status = api_client.QueryParameter( + name="status", + style=api_client.ParameterStyle.FORM, + schema=StatusSchema, + required=True, +) +_path = '/pet/findByStatus' +_method = 'GET' +_auth = [ + 'http_signature_test', + 'petstore_auth', +] + + +class SchemaFor200ResponseBodyApplicationXml( + ListSchema +): + + @classmethod + @property + def _items(cls) -> typing.Type['Pet']: + return Pet + + +class SchemaFor200ResponseBodyApplicationJson( + ListSchema +): + + @classmethod + @property + def _items(cls) -> typing.Type['Pet']: + return Pet + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class FindPetsByStatus(api_client.Api): + + def find_pets_by_status( + self: api_client.Api, + query_params: RequestQueryParams = 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Finds Pets by status + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + + _query_params = [] + for parameter in ( + request_query_status, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py new file mode 100644 index 000000000000..a4c39c6ae347 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py @@ -0,0 +1,220 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.pet import Pet + +# query params + + +class TagsSchema( + ListSchema +): + _items = StrSchema +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + 'tags': TagsSchema, + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_tags = api_client.QueryParameter( + name="tags", + style=api_client.ParameterStyle.FORM, + schema=TagsSchema, + required=True, +) +_path = '/pet/findByTags' +_method = 'GET' +_auth = [ + 'http_signature_test', + 'petstore_auth', +] + + +class SchemaFor200ResponseBodyApplicationXml( + ListSchema +): + + @classmethod + @property + def _items(cls) -> typing.Type['Pet']: + return Pet + + +class SchemaFor200ResponseBodyApplicationJson( + ListSchema +): + + @classmethod + @property + def _items(cls) -> typing.Type['Pet']: + return Pet + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class FindPetsByTags(api_client.Api): + + def find_pets_by_tags( + self: api_client.Api, + query_params: RequestQueryParams = 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Finds Pets by tags + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + + _query_params = [] + for parameter in ( + request_query_tags, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py new file mode 100644 index 000000000000..533b2ae23cfa --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.pet import Pet + +# path params +PetIdSchema = Int64Schema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': PetIdSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) +_path = '/pet/{petId}' +_method = 'GET' +_auth = [ + 'api_key', +] +SchemaFor200ResponseBodyApplicationXml = Pet +SchemaFor200ResponseBodyApplicationJson = Pet + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class GetPetById(api_client.Api): + + def get_pet_by_id( + self: api_client.Api, + path_params: RequestPathParams = 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Find pet by ID + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_pet_id, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py new file mode 100644 index 000000000000..71bdf386bc91 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.pet import Pet + +# body param +SchemaForRequestBodyApplicationJson = Pet +SchemaForRequestBodyApplicationXml = Pet + + +request_body_pet = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'application/xml': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXml), + }, + required=True, +) +_path = '/pet' +_method = 'PUT' +_auth = [ + 'http_signature_test', + 'petstore_auth', +] +_servers = ( + { + 'url': "http://petstore.swagger.io/v2", + 'description': "No description provided", + }, + { + 'url': "http://path-server-test.petstore.local/v2", + 'description': "No description provided", + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) + + +@dataclass +class ApiResponseFor405(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_405 = api_client.OpenApiResponse( + response_cls=ApiResponseFor405, +) +_status_code_to_response = { + '400': _response_for_400, + '404': _response_for_404, + '405': _response_for_405, +} + + +class UpdatePet(api_client.Api): + + def update_pet( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml], + content_type: str = 'application/json', + host_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + Update an existing pet + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_pet.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + host = self.get_host('update_pet', _servers, host_index) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py new file mode 100644 index 000000000000..6535b584ac8e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# path params +PetIdSchema = Int64Schema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': PetIdSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) +# body param + + +class SchemaForRequestBodyApplicationXWwwFormUrlencoded( + DictSchema +): + name = StrSchema + status = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + name: typing.Union[name, Unset] = unset, + status: typing.Union[status, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + name=name, + status=status, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, +) +_path = '/pet/{petId}' +_method = 'POST' +_auth = [ + 'petstore_auth', +] + + +@dataclass +class ApiResponseFor405(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_405 = api_client.OpenApiResponse( + response_cls=ApiResponseFor405, +) +_status_code_to_response = { + '405': _response_for_405, +} + + +class UpdatePetWithForm(api_client.Api): + + def update_pet_with_form( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] = unset, + path_params: RequestPathParams = frozendict(), + content_type: str = 'application/x-www-form-urlencoded', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + Updates a pet in the store with form data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_pet_id, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + _fields = None + _body = None + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file.py new file mode 100644 index 000000000000..faa353d8d30e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + FileSchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + FileBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.api_response import ApiResponse + +# path params +PetIdSchema = Int64Schema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': PetIdSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) +# body param + + +class SchemaForRequestBodyMultipartFormData( + DictSchema +): + additionalMetadata = StrSchema + file = FileSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, + file: typing.Union[file, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + additionalMetadata=additionalMetadata, + file=file, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) +_path = '/pet/{petId}/uploadImage' +_method = 'POST' +_auth = [ + 'petstore_auth', +] +SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class UploadFile(api_client.Api): + + def upload_file( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyMultipartFormData, Unset] = unset, + path_params: RequestPathParams = frozendict(), + content_type: str = 'multipart/form-data', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + uploads an image + Parameters use leading underscores to prevent collisions with user defined + parameters from the source openapi spec + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_pet_id, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + ) + + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py new file mode 100644 index 000000000000..214bf7a41b2e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py @@ -0,0 +1,225 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.api_response import ApiResponse + +# path params +PetIdSchema = Int64Schema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': PetIdSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) +# body param + + +class SchemaForRequestBodyMultipartFormData( + DictSchema +): + _required_property_names = set(( + )) + additionalMetadata = StrSchema + requiredFile = BinarySchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + additionalMetadata=additionalMetadata, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) +_path = '/fake/{petId}/uploadImageWithRequiredFile' +_method = 'POST' +_auth = [ + 'petstore_auth', +] +SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class UploadFileWithRequiredFile(api_client.Api): + + def upload_file_with_required_file( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyMultipartFormData, Unset] = unset, + path_params: RequestPathParams = frozendict(), + content_type: str = 'multipart/form-data', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + uploads an image (required) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_pet_id, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py new file mode 100644 index 000000000000..d4f494e25be9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.api_response import ApiResponse + +# path params +PetIdSchema = Int64Schema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'petId': PetIdSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_pet_id = api_client.PathParameter( + name="petId", + style=api_client.ParameterStyle.SIMPLE, + schema=PetIdSchema, + required=True, +) +# body param + + +class SchemaForRequestBodyMultipartFormData( + DictSchema +): + additionalMetadata = StrSchema + file = BinarySchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + additionalMetadata=additionalMetadata, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +request_body_body = api_client.RequestBody( + content={ + 'multipart/form-data': api_client.MediaType( + schema=SchemaForRequestBodyMultipartFormData), + }, +) +_path = '/pet/{petId}/uploadImage' +_method = 'POST' +_auth = [ + 'petstore_auth', +] +SchemaFor200ResponseBodyApplicationJson = ApiResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class UploadImage(api_client.Api): + + def upload_image( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyMultipartFormData, Unset] = unset, + path_params: RequestPathParams = frozendict(), + content_type: str = 'multipart/form-data', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + uploads an image + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_pet_id, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + # 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 + if body is not unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api.py new file mode 100644 index 000000000000..3685a1728049 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api.py @@ -0,0 +1,31 @@ +# 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 petstore_api.api_client import ApiClient +from petstore_api.api.store_api_endpoints.delete_order import DeleteOrder +from petstore_api.api.store_api_endpoints.get_inventory import GetInventory +from petstore_api.api.store_api_endpoints.get_order_by_id import GetOrderById +from petstore_api.api.store_api_endpoints.place_order import PlaceOrder + + +class StoreApi( + DeleteOrder, + GetInventory, + GetOrderById, + PlaceOrder, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py new file mode 100644 index 000000000000..9dbbf03607f9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# path params +OrderIdSchema = StrSchema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'order_id': OrderIdSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_order_id = api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=OrderIdSchema, + required=True, +) +_path = '/store/order/{order_id}' +_method = 'DELETE' + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +_status_code_to_response = { + '400': _response_for_400, + '404': _response_for_404, +} + + +class DeleteOrder(api_client.Api): + + def delete_order( + self: api_client.Api, + path_params: RequestPathParams = frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + Delete purchase order by ID + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_order_id, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py new file mode 100644 index 000000000000..e5e5aca7eb05 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/store/inventory' +_method = 'GET' +_auth = [ + 'api_key', +] + + +class SchemaFor200ResponseBodyApplicationJson( + DictSchema +): + _additional_properties = Int32Schema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class GetInventory(api_client.Api): + + def get_inventory( + self: api_client.Api, + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Returns pet inventories by status + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py new file mode 100644 index 000000000000..11f819f27b32 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.order import Order + +# path params + + +class OrderIdSchema( + _SchemaValidator( + inclusive_maximum=5, + inclusive_minimum=1, + ), + Int64Schema +): + pass +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'order_id': OrderIdSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_order_id = api_client.PathParameter( + name="order_id", + style=api_client.ParameterStyle.SIMPLE, + schema=OrderIdSchema, + required=True, +) +_path = '/store/order/{order_id}' +_method = 'GET' +SchemaFor200ResponseBodyApplicationXml = Order +SchemaFor200ResponseBodyApplicationJson = Order + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class GetOrderById(api_client.Api): + + def get_order_by_id( + self: api_client.Api, + path_params: RequestPathParams = 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Find purchase order by ID + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_order_id, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py new file mode 100644 index 000000000000..ef9f9c3ba631 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.order import Order + +# body param +SchemaForRequestBodyApplicationJson = Order + + +request_body_order = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/store/order' +_method = 'POST' +SchemaFor200ResponseBodyApplicationXml = Order +SchemaFor200ResponseBodyApplicationJson = Order + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class PlaceOrder(api_client.Api): + + def place_order( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Place an order for a pet + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_order.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api.py new file mode 100644 index 000000000000..1975100b9e69 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from petstore_api.api_client import ApiClient +from petstore_api.api.user_api_endpoints.create_user import CreateUser +from petstore_api.api.user_api_endpoints.create_users_with_array_input import CreateUsersWithArrayInput +from petstore_api.api.user_api_endpoints.create_users_with_list_input import CreateUsersWithListInput +from petstore_api.api.user_api_endpoints.delete_user import DeleteUser +from petstore_api.api.user_api_endpoints.get_user_by_name import GetUserByName +from petstore_api.api.user_api_endpoints.login_user import LoginUser +from petstore_api.api.user_api_endpoints.logout_user import LogoutUser +from petstore_api.api.user_api_endpoints.update_user import UpdateUser + + +class UserApi( + CreateUser, + CreateUsersWithArrayInput, + CreateUsersWithListInput, + DeleteUser, + GetUserByName, + LoginUser, + LogoutUser, + UpdateUser, + ApiClient, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py new file mode 100644 index 000000000000..8627997a2fb5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.user import User + +# body param +SchemaForRequestBodyApplicationJson = User + + +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/user' +_method = 'POST' + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) +_status_code_to_response = { + 'default': _response_for_default, +} + + +class CreateUser(api_client.Api): + + def create_user( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Create user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_user.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py new file mode 100644 index 000000000000..8694e9582ffd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.user import User + +# body param + + +class SchemaForRequestBodyApplicationJson( + ListSchema +): + + @classmethod + @property + def _items(cls) -> typing.Type['User']: + return User + + +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/user/createWithArray' +_method = 'POST' + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) +_status_code_to_response = { + 'default': _response_for_default, +} + + +class CreateUsersWithArrayInput(api_client.Api): + + def create_users_with_array_input( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Creates list of users with given input array + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_user.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py new file mode 100644 index 000000000000..d1c0a1e0e875 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.user import User + +# body param + + +class SchemaForRequestBodyApplicationJson( + ListSchema +): + + @classmethod + @property + def _items(cls) -> typing.Type['User']: + return User + + +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/user/createWithList' +_method = 'POST' + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) +_status_code_to_response = { + 'default': _response_for_default, +} + + +class CreateUsersWithListInput(api_client.Api): + + def create_users_with_list_input( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Creates list of users with given input array + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_user.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py new file mode 100644 index 000000000000..1d3b65308201 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# path params +UsernameSchema = StrSchema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'username': UsernameSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_username = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=UsernameSchema, + required=True, +) +_path = '/user/{username}' +_method = 'DELETE' + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +_status_code_to_response = { + '400': _response_for_400, + '404': _response_for_404, +} + + +class DeleteUser(api_client.Api): + + def delete_user( + self: api_client.Api, + path_params: RequestPathParams = frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + Delete user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_username, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py new file mode 100644 index 000000000000..2a2af60d64bd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.user import User + +# path params +UsernameSchema = StrSchema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'username': UsernameSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_username = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=UsernameSchema, + required=True, +) +_path = '/user/{username}' +_method = 'GET' +SchemaFor200ResponseBodyApplicationXml = User +SchemaFor200ResponseBodyApplicationJson = User + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: Unset = unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class GetUserByName(api_client.Api): + + def get_user_by_name( + self: api_client.Api, + path_params: RequestPathParams = 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Get user by user name + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_username, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py new file mode 100644 index 000000000000..c63a4e482d14 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py @@ -0,0 +1,224 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +# query params +UsernameSchema = StrSchema +PasswordSchema = StrSchema +RequestRequiredQueryParams = typing.TypedDict( + 'RequestRequiredQueryParams', + { + 'username': UsernameSchema, + 'password': PasswordSchema, + } +) +RequestOptionalQueryParams = typing.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_username = api_client.QueryParameter( + name="username", + style=api_client.ParameterStyle.FORM, + schema=UsernameSchema, + required=True, + explode=True, +) +request_query_password = api_client.QueryParameter( + name="password", + style=api_client.ParameterStyle.FORM, + schema=PasswordSchema, + required=True, + explode=True, +) +_path = '/user/login' +_method = 'GET' +XRateLimitSchema = Int32Schema +x_rate_limit_parameter = api_client.HeaderParameter( + name="X-Rate-Limit", + style=api_client.ParameterStyle.SIMPLE, + schema=XRateLimitSchema, +) +XExpiresAfterSchema = DateTimeSchema +x_expires_after_parameter = api_client.HeaderParameter( + name="X-Expires-After", + style=api_client.ParameterStyle.SIMPLE, + schema=XExpiresAfterSchema, +) +SchemaFor200ResponseBodyApplicationXml = StrSchema +SchemaFor200ResponseBodyApplicationJson = StrSchema +ResponseHeadersFor200 = typing.TypedDict( + 'ResponseHeadersFor200', + { + 'X-Rate-Limit': XRateLimitSchema, + 'X-Expires-After': XExpiresAfterSchema, + } +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationXml, + SchemaFor200ResponseBodyApplicationJson, + ] + headers: ResponseHeadersFor200 + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationXml), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, + headers=[ + x_rate_limit_parameter, + x_expires_after_parameter, + ] +) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, +} +_all_accept_content_types = ( + 'application/xml', + 'application/json', +) + + +class LoginUser(api_client.Api): + + def login_user( + self: api_client.Api, + query_params: RequestQueryParams = 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, + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Logs user into the system + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestQueryParams, query_params) + + _query_params = [] + for parameter in ( + request_query_username, + request_query_password, + ): + parameter_data = query_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _query_params.extend(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + query_params=tuple(_query_params), + headers=_headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py new file mode 100644 index 000000000000..1e6f9443fcec --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +_path = '/user/logout' +_method = 'GET' + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, +) +_status_code_to_response = { + 'default': _response_for_default, +} + + +class LogoutUser(api_client.Api): + + def logout_user( + self: api_client.Api, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization + ]: + """ + Logs out current logged in user session + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + # TODO add cookie handling + + response = self.api_client.call_api( + resource_path=_path, + method=_method, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py new file mode 100644 index 000000000000..fcd3f6dcde43 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import re # noqa: F401 +import sys # noqa: F401 +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api import api_client, exceptions +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + +from petstore_api.model.user import User + +# path params +UsernameSchema = StrSchema +RequestRequiredPathParams = typing.TypedDict( + 'RequestRequiredPathParams', + { + 'username': UsernameSchema, + } +) +RequestOptionalPathParams = typing.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_username = api_client.PathParameter( + name="username", + style=api_client.ParameterStyle.SIMPLE, + schema=UsernameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = User + + +request_body_user = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_path = '/user/{username}' +_method = 'PUT' + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: Unset = unset + headers: Unset = unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +_status_code_to_response = { + '400': _response_for_400, + '404': _response_for_404, +} + + +class UpdateUser(api_client.Api): + + def update_user( + self: api_client.Api, + body: typing.Union[SchemaForRequestBodyApplicationJson], + path_params: RequestPathParams = frozendict(), + content_type: str = 'application/json', + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ) -> typing.Union[ + api_client.ApiResponseWithoutDeserialization + ]: + """ + Updated user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs(RequestPathParams, path_params) + + _path_params = {} + for parameter in ( + request_path_username, + ): + parameter_data = path_params.get(parameter.name, unset) + if parameter_data is unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_user.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=_path, + method=_method, + path_params=_path_params, + headers=_headers, + fields=_fields, + body=_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(api_response=api_response) + + return api_response diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py new file mode 100644 index 000000000000..38220b88f5dc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py @@ -0,0 +1,1379 @@ +# 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 dataclasses import dataclass +from decimal import Decimal +import enum +import json +import os +import io +import atexit +from multiprocessing.pool import ThreadPool +import re +import tempfile +import typing +import urllib3 +from urllib3._collections import HTTPHeaderDict +from urllib.parse import quote +from urllib3.fields import RequestField as RequestFieldBase + + +from petstore_api import rest +from petstore_api.configuration import Configuration +from petstore_api.exceptions import ApiTypeError, ApiValueError +from petstore_api.schemas import ( + Decimal, + NoneClass, + BoolClass, + Schema, + FileIO, + BinarySchema, + InstantiationMetadata, + date, + datetime, + none_type, + frozendict, + Unset, + unset, +) + + +class RequestField(RequestFieldBase): + def __eq__(self, other): + if not isinstance(other, RequestField): + return False + return self.__dict__ == other.__dict__ + + +class JSONEncoder(json.JSONEncoder): + def default(self, obj): + if isinstance(obj, (str, int, float)): + # instances based on primitive classes + return obj + elif isinstance(obj, Decimal): + if obj.as_tuple().exponent >= 0: + return int(obj) + return float(obj) + elif isinstance(obj, NoneClass): + return None + elif isinstance(obj, BoolClass): + return bool(obj) + elif isinstance(obj, (dict, frozendict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +class ParameterSerializerBase: + @staticmethod + def __serialize_number( + in_data: typing.Union[int, float], name: str, prefix='' + ) -> typing.Tuple[typing.Tuple[str, str]]: + return tuple([(name, prefix + str(in_data))]) + + @staticmethod + def __serialize_str( + in_data: str, name: str, prefix='' + ) -> typing.Tuple[typing.Tuple[str, str]]: + return tuple([(name, prefix + quote(in_data))]) + + @staticmethod + def __serialize_bool(in_data: bool, name: str, prefix='') -> typing.Tuple[typing.Tuple[str, str]]: + if in_data: + return tuple([(name, prefix + 'true')]) + return tuple([(name, prefix + 'false')]) + + @staticmethod + def __urlencode(in_data: typing.Any) -> str: + return quote(str(in_data)) + + def __serialize_list( + self, + in_data: typing.List[typing.Any], + style: ParameterStyle, + name: str, + explode: bool, + empty_val: typing.Union[typing.Tuple[str, str], typing.Tuple] = tuple(), + prefix: str = '', + separator: str = ',', + ) -> typing.Tuple[typing.Union[typing.Tuple[str, str], typing.Tuple], ...]: + if not in_data: + return empty_val + if explode and style in { + ParameterStyle.FORM, + ParameterStyle.MATRIX, + ParameterStyle.SPACE_DELIMITED, + ParameterStyle.PIPE_DELIMITED + }: + if style is ParameterStyle.FORM: + return tuple((name, prefix + self.__urlencode(val)) for val in in_data) + else: + joined_vals = prefix + separator.join(name + '=' + self.__urlencode(val) for val in in_data) + else: + joined_vals = prefix + separator.join(map(self.__urlencode, in_data)) + return tuple([(name, joined_vals)]) + + def __form_item_representation(self, in_data: typing.Any) -> typing.Optional[str]: + if isinstance(in_data, none_type): + return None + elif isinstance(in_data, list): + if not in_data: + return None + raise ApiValueError('Unable to generate a form representation of {}'.format(in_data)) + elif isinstance(in_data, dict): + if not in_data: + return None + raise ApiValueError('Unable to generate a form representation of {}'.format(in_data)) + elif isinstance(in_data, (bool, bytes)): + raise ApiValueError('Unable to generate a form representation of {}'.format(in_data)) + # str, float, int + return self.__urlencode(in_data) + + def __serialize_dict( + self, + in_data: typing.Dict[str, typing.Any], + style: ParameterStyle, + name: str, + explode: bool, + empty_val: typing.Union[typing.Tuple[str, str], typing.Tuple] = tuple(), + prefix: str = '', + separator: str = ',', + ) -> typing.Tuple[typing.Tuple[str, str]]: + if not in_data: + return empty_val + if all(val is None for val in in_data.values()): + return empty_val + + form_items = {} + if style is ParameterStyle.FORM: + for key, val in in_data.items(): + new_val = self.__form_item_representation(val) + if new_val is None: + continue + form_items[key] = new_val + + if explode: + if style is ParameterStyle.FORM: + return tuple((key, prefix + val) for key, val in form_items.items()) + elif style in { + ParameterStyle.SIMPLE, + ParameterStyle.LABEL, + ParameterStyle.MATRIX, + ParameterStyle.SPACE_DELIMITED, + ParameterStyle.PIPE_DELIMITED + }: + joined_vals = prefix + separator.join(key + '=' + self.__urlencode(val) for key, val in in_data.items()) + else: + raise ApiValueError(f'Invalid style {style} for dict serialization with explode=True') + elif style is ParameterStyle.FORM: + joined_vals = prefix + separator.join(key + separator + val for key, val in form_items.items()) + else: + joined_vals = prefix + separator.join( + key + separator + self.__urlencode(val) for key, val in in_data.items()) + return tuple([(name, joined_vals)]) + + def _serialize_x( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + style: ParameterStyle, + name: str, + explode: bool, + empty_val: typing.Union[typing.Tuple[str, str], typing.Tuple] = (), + prefix: str = '', + separator: str = ',', + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + if isinstance(in_data, none_type): + return empty_val + elif isinstance(in_data, bool): + # must be before int check + return self.__serialize_bool(in_data, name=name, prefix=prefix) + elif isinstance(in_data, (int, float)): + return self.__serialize_number(in_data, name=name, prefix=prefix) + elif isinstance(in_data, str): + return self.__serialize_str(in_data, name=name, prefix=prefix) + elif isinstance(in_data, list): + return self.__serialize_list( + in_data, + style=style, + name=name, + explode=explode, + empty_val=empty_val, + prefix=prefix, + separator=separator + ) + elif isinstance(in_data, dict): + return self.__serialize_dict( + in_data, + style=style, + name=name, + explode=explode, + empty_val=empty_val, + prefix=prefix, + separator=separator + ) + + +class StyleFormSerializer(ParameterSerializerBase): + + def _serialize_form( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + return self._serialize_x(in_data, style=ParameterStyle.FORM, name=name, explode=explode) + + +class StyleSimpleSerializer(ParameterSerializerBase): + + def _serialize_simple_tuple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + in_type: ParameterInType, + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + if in_type is ParameterInType.HEADER: + empty_val = () + else: + empty_val = ((name, ''),) + return self._serialize_x(in_data, style=ParameterStyle.SIMPLE, name=name, explode=explode, empty_val=empty_val) + + +@dataclass +class ParameterBase: + name: str + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] + + __style_to_in_type = { + ParameterStyle.MATRIX: {ParameterInType.PATH}, + ParameterStyle.LABEL: {ParameterInType.PATH}, + ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, + ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, + ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, + ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, + ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, + } + __in_type_to_default_style = { + ParameterInType.QUERY: ParameterStyle.FORM, + ParameterInType.PATH: ParameterStyle.SIMPLE, + ParameterInType.HEADER: ParameterStyle.SIMPLE, + ParameterInType.COOKIE: ParameterStyle.FORM, + } + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + _json_encoder = JSONEncoder() + _json_content_type = 'application/json' + + @classmethod + def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): + if style is None: + return + in_type_set = cls.__style_to_in_type[style] + if in_type not in in_type_set: + raise ValueError( + 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( + style, in_type_set + ) + ) + + def __init__( + self, + name: str, + in_type: ParameterInType, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + if schema is None and content is None: + raise ValueError('Value missing; Pass in either schema or content') + if schema and content: + raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') + if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + self.__verify_style_to_in_type(style, in_type) + if content is None and style is None: + style = self.__in_type_to_default_style[in_type] + if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: + raise ValueError('Invalid content length, content length must equal 1') + self.in_type = in_type + self.name = name + self.required = required + self.style = style + self.explode = explode + self.allow_reserved = allow_reserved + self.schema = schema + self.content = content + + @staticmethod + def _remove_empty_and_cast( + in_data: typing.Tuple[typing.Tuple[str, str]], + ) -> typing.Dict[str, str]: + data = tuple(t for t in in_data if t) + if not data: + return dict() + return dict(data) + + def _serialize_json( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Tuple[typing.Tuple[str, str]]: + return tuple([(self.name, json.dumps(in_data))]) + + +class PathParameter(ParameterBase, StyleSimpleSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.PATH, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def __serialize_label( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + empty_val = ((self.name, ''),) + prefix = '.' + separator = '.' + return self._remove_empty_and_cast( + self._serialize_x( + in_data, + style=ParameterStyle.LABEL, + name=self.name, + explode=self.explode, + empty_val=empty_val, + prefix=prefix, + separator=separator + ) + ) + + def __serialize_matrix( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + separator = ',' + if in_data == '': + prefix = ';' + self.name + elif isinstance(in_data, (dict, list)) and self.explode: + prefix = ';' + separator = ';' + else: + prefix = ';' + self.name + '=' + empty_val = ((self.name, ''),) + return self._remove_empty_and_cast( + self._serialize_x( + in_data, + style=ParameterStyle.MATRIX, + name=self.name, + explode=self.explode, + prefix=prefix, + empty_val=empty_val, + separator=separator + ) + ) + + def _serialize_simple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + tuple_data = self._serialize_simple_tuple(in_data, self.name, self.explode, self.in_type) + return self._remove_empty_and_cast(tuple_data) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict] + ) -> typing.Dict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if self.style: + if self.style is ParameterStyle.SIMPLE: + return self._serialize_simple(cast_in_data) + elif self.style is ParameterStyle.LABEL: + return self.__serialize_label(cast_in_data) + elif self.style is ParameterStyle.MATRIX: + return self.__serialize_matrix(cast_in_data) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if content_type == self._json_content_type: + tuple_data = self._serialize_json(cast_in_data) + return self._remove_empty_and_cast(tuple_data) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class QueryParameter(ParameterBase, StyleFormSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.QUERY, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def __serialize_space_delimited( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + separator = '%20' + empty_val = () + return self._serialize_x( + in_data, + style=ParameterStyle.SPACE_DELIMITED, + name=self.name, + explode=self.explode, + separator=separator, + empty_val=empty_val + ) + + def __serialize_pipe_delimited( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Tuple[typing.Tuple[str, str], ...]: + separator = '|' + empty_val = () + return self._serialize_x( + in_data, + style=ParameterStyle.PIPE_DELIMITED, + name=self.name, + explode=self.explode, + separator=separator, + empty_val=empty_val + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict] + ) -> typing.Tuple[typing.Tuple[str, str]]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if self.style: + # TODO update query ones to omit setting values when [] {} or None is input + if self.style is ParameterStyle.FORM: + return self._serialize_form(cast_in_data, explode=self.explode, name=self.name) + elif self.style is ParameterStyle.SPACE_DELIMITED: + return self.__serialize_space_delimited(cast_in_data) + elif self.style is ParameterStyle.PIPE_DELIMITED: + return self.__serialize_pipe_delimited(cast_in_data) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if content_type == self._json_content_type: + return self._serialize_json(cast_in_data) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class CookieParameter(ParameterBase, StyleFormSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.COOKIE, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict] + ) -> typing.Tuple[typing.Tuple[str, str]]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if self.style: + return self._serialize_form(cast_in_data, explode=self.explode, name=self.name) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if content_type == self._json_content_type: + return self._serialize_json(cast_in_data) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class HeaderParameter(ParameterBase, StyleSimpleSerializer): + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.HEADER, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict[str, str]: + data = tuple(t for t in in_data if t) + headers = HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + def _serialize_simple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> HTTPHeaderDict[str, str]: + tuple_data = self._serialize_simple_tuple(in_data, self.name, self.explode, self.in_type) + return self.__to_headers(tuple_data) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict] + ) -> HTTPHeaderDict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if self.style: + return self._serialize_simple(cast_in_data) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if content_type == self._json_content_type: + tuple_data = self._serialize_json(cast_in_data) + return self.__to_headers(tuple_data) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class Encoding: + def __init__( + self, + content_type: str, + headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: bool = False, + ): + self.content_type = content_type + self.headers = headers + self.style = style + self.explode = explode + self.allow_reserved = allow_reserved + + +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + + def __init__( + self, + schema: typing.Type[Schema], + encoding: typing.Optional[typing.Dict[str, Encoding]] = None, + ): + self.schema = schema + self.encoding = encoding + + +@dataclass +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[Unset, typing.Type[Schema]] + headers: typing.Union[Unset, typing.List[HeaderParameter]] + + def __init__( + self, + response: urllib3.HTTPResponse, + body: typing.Union[Unset, typing.Type[Schema]], + headers: typing.Union[Unset, typing.List[HeaderParameter]] + ): + """ + pycharm needs this to prevent 'Unexpected argument' warnings + """ + self.response = response + self.body = body + self.headers = headers + + +@dataclass +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[Unset, typing.Type[Schema]] = unset + headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + + +class OpenApiResponse: + def __init__( + self, + response_cls: typing.Type[ApiResponse] = ApiResponse, + content: typing.Optional[typing.Dict[str, MediaType]] = None, + headers: typing.Optional[typing.List[HeaderParameter]] = None, + ): + self.headers = headers + if content is not None and len(content) == 0: + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + self.content = content + self.response_cls = response_cls + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + decoded_data = response.data.decode("utf-8") + return json.loads(decoded_data) + + @staticmethod + def __file_name_from_content_disposition(content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = re.search('filename="(.+?)"', content_disposition) + if not match: + return None + return match.group(1) + + def __deserialize_application_octet_stream( + self, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = self.__file_name_from_content_disposition(response.headers.get('content-disposition')) + + if file_name is None: + _fd, path = tempfile.mkstemp() + else: + path = os.path.join(tempfile.gettempdir(), file_name) + # TODO get file_name from the filename at the end of the url if it exists + with open(path, 'wb') as new_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + new_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file + else: + return response.data + + def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: + content_type = response.getheader('content-type') + deserialized_body = unset + streamed = response.supports_chunked_reads() + if self.content is not None: + if content_type == 'application/json': + body_data = self.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = self.__deserialize_application_octet_stream(response) + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + body_schema = self.content[content_type].schema + _instantiation_metadata = InstantiationMetadata(from_server=True, configuration=configuration) + deserialized_body = body_schema._from_openapi_data( + body_data, _instantiation_metadata=_instantiation_metadata) + elif streamed: + response.release_conn() + + deserialized_headers = unset + if self.headers is not None: + deserialized_headers = unset + + return self.response_cls( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) + + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + _pool = None + __json_encoder = JSONEncoder() + + def __init__( + self, + configuration: typing.Optional[Configuration] = None, + header_name: typing.Optional[str] = None, + header_value: typing.Optional[str] = None, + cookie: typing.Optional[str] = None, + pool_threads: int = 1 + ): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + headers: typing.Optional[HTTPHeaderDict] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + host: typing.Optional[str] = None, + ) -> urllib3.HTTPResponse: + + # header parameters + headers = headers or {} + headers.update(self.default_headers) + if self.cookie: + headers['Cookie'] = self.cookie + + # path parameters + if path_params: + for k, v in path_params.items(): + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=self.configuration.safe_chars_for_path_param) + ) + + # auth setting + self.update_params_for_auth(headers, query_params, + auth_settings, resource_path, method, body) + + # request url + if host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = host + resource_path + + # perform request and return response + response = self.request( + method, + url, + query_params=query_params, + headers=headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + headers: typing.Optional[HTTPHeaderDict] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + async_req: typing.Optional[bool] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + host: typing.Optional[str] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param headers: Header parameters to be + placed in the request header. + :param body: Request body. + :param fields: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings: Auth Settings names for the request. + :param async_req: execute request asynchronously + :type async_req: bool, optional TODO remove, unused + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystme file and the BinarySchema + instance will also inherit from FileSchema and FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param host: api endpoint host + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + + if not async_req: + return self.__call_api( + resource_path, + method, + path_params, + query_params, + headers, + body, + fields, + auth_settings, + stream, + timeout, + host, + ) + + return self.pool.apply_async( + self.__call_api, + ( + resource_path, + method, + path_params, + query_params, + headers, + body, + json, + fields, + auth_settings, + stream, + timeout, + host, + ) + ) + + def request( + self, + method: str, + url: str, + query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + stream=stream, + timeout=timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def update_params_for_auth(self, headers, querys, auth_settings, + resource_path, method, body): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if auth_setting['in'] == 'cookie': + headers.add('Cookie', auth_setting['value']) + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers.add(auth_setting['key'], auth_setting['value']) + else: + # The HTTP signature scheme requires multiple HTTP headers + # that are calculated dynamically. + signing_info = self.configuration.signing_info + auth_headers = signing_info.get_http_signature_headers( + resource_path, method, headers, body, querys) + for key, value in auth_headers.items(): + headers.add(key, value) + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + +class Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: typing.Optional[ApiClient] = None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + @staticmethod + def _verify_typed_dict_inputs(cls: typing.Type[typing.TypedDict], data: typing.Dict[str, typing.Any]): + """ + Ensures that: + - required keys are present + - additional properties are not input + - value stored under required keys do not have the value unset + Note: detailed value checking is done in schema classes + """ + missing_required_keys = [] + required_keys_with_unset_values = [] + for required_key in cls.__required_keys__: + if required_key not in data: + missing_required_keys.append(required_key) + continue + value = data[required_key] + if value is unset: + required_keys_with_unset_values.append(required_key) + if missing_required_keys: + raise ApiTypeError( + '{} missing {} required arguments: {}'.format( + cls.__name__, len(missing_required_keys), missing_required_keys + ) + ) + if required_keys_with_unset_values: + raise ApiValueError( + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + ) + ) + + disallowed_additional_keys = [] + for key in data: + if key in cls.__required_keys__ or key in cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) + if disallowed_additional_keys: + raise ApiTypeError( + '{} got {} unexpected keyword arguments: {}'.format( + cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys + ) + ) + + def get_host( + self, + operation_id: str, + servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), + host_index: typing.Optional[int] = None + ) -> typing.Optional[str]: + configuration = self.api_client.configuration + try: + if host_index is None: + index = configuration.server_operation_index.get( + operation_id, configuration.server_index + ) + else: + index = host_index + server_variables = configuration.server_operation_variables.get( + operation_id, configuration.server_variables + ) + host = configuration.get_host_from_settings( + index, variables=server_variables, servers=servers + ) + except IndexError: + if servers: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(servers) + ) + host = None + return host + + +class SerializedRequestBody(typing.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[typing.Union[RequestField, tuple[str, str]], ...] + + +class RequestBody(StyleFormSerializer): + """ + A request body parameter + content: content_type to MediaType Schema info + """ + __json_encoder = JSONEncoder() + + def __init__( + self, + content: typing.Dict[str, MediaType], + required: bool = False, + ): + self.required = required + if len(content) == 0: + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + self.content = content + + def __serialize_json( + self, + in_data: typing.Any + ) -> typing.Dict[str, bytes]: + in_data = self.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return dict(body=json_str) + + @staticmethod + def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: + if isinstance(in_data, frozendict): + raise ValueError('Unable to serialize type frozendict to text/plain') + elif isinstance(in_data, tuple): + raise ValueError('Unable to serialize type tuple to text/plain') + elif isinstance(in_data, NoneClass): + raise ValueError('Unable to serialize type NoneClass to text/plain') + elif isinstance(in_data, BoolClass): + raise ValueError('Unable to serialize type BoolClass to text/plain') + return dict(body=str(in_data)) + + def __multipart_json_item(self, key: str, value: Schema) -> RequestField: + json_value = self.__json_encoder.default(value) + return RequestField(name=key, data=json.dumps(json_value), headers={'Content-Type': 'application/json'}) + + def __multipart_form_item(self, key: str, value: Schema) -> RequestField: + if isinstance(value, str): + return RequestField(name=key, data=str(value), headers={'Content-Type': 'text/plain'}) + elif isinstance(value, bytes): + return RequestField(name=key, data=value, headers={'Content-Type': 'application/octet-stream'}) + elif isinstance(value, FileIO): + request_field = RequestField( + name=key, + data=value.read(), + filename=os.path.basename(value.name), + headers={'Content-Type': 'application/octet-stream'} + ) + value.close() + return request_field + else: + return self.__multipart_json_item(key=key, value=value) + + def __serialize_multipart_form_data( + self, in_data: Schema + ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: + if not isinstance(in_data, frozendict): + raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') + """ + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. + + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: + + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a RequestField for each item with name=key + for item in value: + request_field = self.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = self.__multipart_json_item(key=key, value=value) + fields.append(request_field) + else: + request_field = self.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return dict(fields=tuple(fields)) + + def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: + if isinstance(in_data, bytes): + return dict(body=in_data) + # FileIO type + result = dict(body=in_data.read()) + in_data.close() + return result + + def __serialize_application_x_www_form_data( + self, in_data: typing.Any + ) -> typing.Dict[str, tuple[tuple[str, str], ...]]: + if not isinstance(in_data, frozendict): + raise ValueError( + f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') + cast_in_data = self.__json_encoder.default(in_data) + fields = self._serialize_form(cast_in_data, explode=True, name='') + if not fields: + return {} + return {'fields': fields} + + def serialize( + self, in_data: typing.Any, content_type: str + ) -> SerializedRequestBody: + """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of + + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = self.content[content_type] + if isinstance(in_data, media_type.schema): + cast_in_data = in_data + elif isinstance(in_data, (dict, frozendict)) and in_data: + cast_in_data = media_type.schema(**in_data) + else: + cast_in_data = media_type.schema(in_data) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if content_type == 'application/json': + return self.__serialize_json(cast_in_data) + elif content_type == 'text/plain': + return self.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + return self.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + return self.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + return self.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/apis/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/apis/__init__.py new file mode 100644 index 000000000000..5a98862bba09 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/apis/__init__.py @@ -0,0 +1,24 @@ +# coding: utf-8 + +# flake8: noqa + +# Import all APIs into this package. +# If you have many APIs here with many many models used in each API this may +# raise a `RecursionError`. +# In order to avoid this, import only the API that you directly need like: +# +# from .api.another_fake_api import AnotherFakeApi +# +# or import this package, but before doing it, use: +# +# import sys +# sys.setrecursionlimit(n) + +# Import APIs into API package: +from petstore_api.api.another_fake_api import AnotherFakeApi +from petstore_api.api.default_api import DefaultApi +from petstore_api.api.fake_api import FakeApi +from petstore_api.api.fake_classname_tags_123_api import FakeClassnameTags123Api +from petstore_api.api.pet_api import PetApi +from petstore_api.api.store_api import StoreApi +from petstore_api.api.user_api import UserApi diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/configuration.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/configuration.py new file mode 100644 index 000000000000..f7c2a3ff91eb --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/configuration.py @@ -0,0 +1,610 @@ +# 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 copy +import logging +import multiprocessing +import sys +import urllib3 + +from http import client as http_client +from petstore_api.exceptions import ApiValueError + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems', + 'uniqueItems', 'maxProperties', 'minProperties', +} + +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param signing_info: Configuration parameters for the HTTP signature security scheme. + Must be an instance of petstore_api.signing.HttpSigningConfiguration + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = petstore_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + + HTTP Basic Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: basic + + Configure API client with HTTP basic authentication: + +conf = petstore_api.Configuration( + username='the-user', + password='the-password', +) + + + HTTP Signature Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: signature + + Configure API client with HTTP signature authentication. Use the 'hs2019' signature scheme, + sign the HTTP requests with the RSA-SSA-PSS signature algorithm, and set the expiration time + of the signature to 5 minutes after the signature has been created. + Note you can use the constants defined in the petstore_api.signing module, and you can + also specify arbitrary HTTP headers to be included in the HTTP signature, except for the + '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 + load balancers may add/modify/remove headers. Include the HTTP headers that you know + are not going to be modified in transit. + +conf = petstore_api.Configuration( + signing_info = petstore_api.signing.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'rsa.pem', + signing_scheme = petstore_api.signing.SCHEME_HS2019, + signing_algorithm = petstore_api.signing.ALGORITHM_RSASSA_PSS, + signed_headers = [petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, + 'Content-Type', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) + """ + + _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, + ): + """Constructor + """ + self._base_path = "http://petstore.swagger.io:80/v2" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """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 + if signing_info is not None: + signing_info.host = host + self.signing_info = signing_info + """The HTTP signing configuration + """ + self.access_token = None + """access token for OAuth/Bearer + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("petstore_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "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 + # Configuration.host. + value.host = self.host + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if 'api_key' in self.api_key: + auth['api_key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'api_key', + 'value': self.get_api_key_with_prefix( + 'api_key', + ), + } + if 'api_key_query' in self.api_key: + auth['api_key_query'] = { + 'type': 'api_key', + 'in': 'query', + 'key': 'api_key_query', + 'value': self.get_api_key_with_prefix( + 'api_key_query', + ), + } + if self.access_token is not None: + auth['bearer_test'] = { + 'type': 'bearer', + 'in': 'header', + 'format': 'JWT', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + if self.username is not None and self.password is not None: + auth['http_basic_test'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } + if self.signing_info is not None: + auth['http_signature_test'] = { + 'type': 'http-signature', + 'in': 'header', + 'key': 'Authorization', + 'value': None # Signature headers are calculated for every HTTP request + } + if self.access_token is not None: + auth['petstore_auth'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "http://{server}.swagger.io:{port}/v2", + 'description': "petstore server", + 'variables': { + 'server': { + 'description': "No description provided", + 'default_value': "petstore", + 'enum_values': [ + "petstore", + "qa-petstore", + "dev-petstore" + ] + }, + 'port': { + 'description': "No description provided", + 'default_value': "80", + 'enum_values': [ + "80", + "8080" + ] + } + } + }, + { + 'url': "https://localhost:8080/{version}", + 'description': "The local server", + 'variables': { + 'version': { + 'description': "No description provided", + 'default_value': "v2", + 'enum_values': [ + "v1", + "v2" + ] + } + } + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/exceptions.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/exceptions.py new file mode 100644 index 000000000000..ed422fd2d0e2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/exceptions.py @@ -0,0 +1,136 @@ +# 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 +""" + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + 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 + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/__init__.py new file mode 100644 index 000000000000..027452f37a87 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from petstore_api.models import ModelA, ModelB diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py new file mode 100644 index 000000000000..a5e4f0a45d9b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py @@ -0,0 +1,211 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class AdditionalPropertiesClass( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + map_property (dict,): + map_of_map_property (dict,): + anytype_1 (): + map_with_undeclared_properties_anytype_1 (dict,): + map_with_undeclared_properties_anytype_2 (dict,): + map_with_undeclared_properties_anytype_3 (dict,): + empty_map (dict,): an object with no declared properties and no undeclared properties, hence it's an empty map. + map_with_undeclared_properties_string (dict,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class map_property( + DictSchema + ): + _additional_properties = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + class map_of_map_property( + DictSchema + ): + + + class _additional_properties( + DictSchema + ): + _additional_properties = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + anytype_1 = AnyTypeSchema + map_with_undeclared_properties_anytype_1 = DictSchema + map_with_undeclared_properties_anytype_2 = DictSchema + map_with_undeclared_properties_anytype_3 = DictSchema + + + class empty_map( + DictSchema + ): + _additional_properties = None + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class map_with_undeclared_properties_string( + DictSchema + ): + _additional_properties = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + map_property: typing.Union[map_property, Unset] = unset, + map_of_map_property: typing.Union[map_of_map_property, Unset] = unset, + anytype_1: typing.Union[anytype_1, Unset] = unset, + map_with_undeclared_properties_anytype_1: typing.Union[map_with_undeclared_properties_anytype_1, Unset] = unset, + map_with_undeclared_properties_anytype_2: typing.Union[map_with_undeclared_properties_anytype_2, Unset] = unset, + map_with_undeclared_properties_anytype_3: typing.Union[map_with_undeclared_properties_anytype_3, Unset] = unset, + empty_map: typing.Union[empty_map, Unset] = unset, + map_with_undeclared_properties_string: typing.Union[map_with_undeclared_properties_string, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + map_property=map_property, + map_of_map_property=map_of_map_property, + anytype_1=anytype_1, + map_with_undeclared_properties_anytype_1=map_with_undeclared_properties_anytype_1, + map_with_undeclared_properties_anytype_2=map_with_undeclared_properties_anytype_2, + map_with_undeclared_properties_anytype_3=map_with_undeclared_properties_anytype_3, + empty_map=empty_map, + map_with_undeclared_properties_string=map_with_undeclared_properties_string, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py new file mode 100644 index 000000000000..db4d01003d30 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py @@ -0,0 +1,98 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class AdditionalPropertiesWithArrayOfEnums( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class _additional_properties( + ListSchema + ): + + @classmethod + @property + def _items(cls) -> typing.Type['EnumClass']: + return EnumClass + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.enum_class import EnumClass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py new file mode 100644 index 000000000000..d088fe451588 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py @@ -0,0 +1,87 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Address( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _additional_properties = IntSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py new file mode 100644 index 000000000000..783f9026bd5a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py @@ -0,0 +1,112 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Animal( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + className (str,): + color (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + _required_property_names = set(( + 'className', + )) + className = StrSchema + color = StrSchema + + @classmethod + @property + def _discriminator(cls): + return { + 'className': { + 'Cat': Cat, + 'Dog': Dog, + } + } + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + className: className, + color: typing.Union[color, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + className=className, + color=color, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.cat import Cat +from petstore_api.model.dog import Dog diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py new file mode 100644 index 000000000000..1868ee5ee69d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py @@ -0,0 +1,78 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class AnimalFarm( + ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _items (Schema): the schema definition of the array items + """ + + @classmethod + @property + def _items(cls) -> typing.Type['Animal']: + return Animal + +from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py new file mode 100644 index 000000000000..505d16f177a1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py @@ -0,0 +1,98 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ApiResponse( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + code (int,): + type (str,): + message (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + code = Int32Schema + type = StrSchema + message = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + code: typing.Union[code, Unset] = unset, + type: typing.Union[type, Unset] = unset, + message: typing.Union[message, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + code=code, + type=type, + message=message, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py new file mode 100644 index 000000000000..07991225ef50 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py @@ -0,0 +1,120 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Apple( + _SchemaTypeChecker(typing.Union[frozendict, none_type, ]), + DictBase, + NoneBase, + Schema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + cultivar (str,): + origin (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'cultivar', + )) + + + class cultivar( + _SchemaValidator( + regex=[{ + 'pattern': r'^[a-zA-Z\s]*$', # noqa: E501 + }], + ), + StrSchema + ): + pass + + + class origin( + _SchemaValidator( + regex=[{ + 'pattern': r'^[A-Z\s]*$', # noqa: E501 + 'flags': ( + re.IGNORECASE + ) + }], + ), + StrSchema + ): + pass + + def __new__( + cls, + *args: typing.Union[dict, frozendict, None, ], + origin: typing.Union[origin, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + origin=origin, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py new file mode 100644 index 000000000000..c94a177b0ac9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py @@ -0,0 +1,94 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class AppleReq( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + cultivar (str,): + mealy (bool,): + """ + _required_property_names = set(( + 'cultivar', + )) + cultivar = StrSchema + mealy = BoolSchema + _additional_properties = None + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + cultivar: cultivar, + mealy: typing.Union[mealy, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + cultivar=cultivar, + mealy=mealy, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py new file mode 100644 index 000000000000..90f05d5eb124 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py @@ -0,0 +1,72 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ArrayHoldingAnyType( + ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _items (Schema): the schema definition of the array items + """ + _items = AnyTypeSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py new file mode 100644 index 000000000000..6f9cd63088ba --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py @@ -0,0 +1,100 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ArrayOfArrayOfNumberOnly( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + ArrayArrayNumber (tuple,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class ArrayArrayNumber( + ListSchema + ): + + + class _items( + ListSchema + ): + _items = NumberSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + ArrayArrayNumber: typing.Union[ArrayArrayNumber, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + ArrayArrayNumber=ArrayArrayNumber, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py new file mode 100644 index 000000000000..ddb90807d27d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py @@ -0,0 +1,78 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ArrayOfEnums( + ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _items (Schema): the schema definition of the array items + """ + + @classmethod + @property + def _items(cls) -> typing.Type['StringEnum']: + return StringEnum + +from petstore_api.model.string_enum import StringEnum diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py new file mode 100644 index 000000000000..1ee632533c37 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.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 +""" + +import re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ArrayOfNumberOnly( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + ArrayNumber (tuple,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class ArrayNumber( + ListSchema + ): + _items = NumberSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + ArrayNumber: typing.Union[ArrayNumber, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + ArrayNumber=ArrayNumber, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py new file mode 100644 index 000000000000..f69faad445ef --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py @@ -0,0 +1,129 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ArrayTest( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + array_of_string (tuple,): + array_array_of_integer (tuple,): + array_array_of_model (tuple,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class array_of_string( + ListSchema + ): + _items = StrSchema + + + class array_array_of_integer( + ListSchema + ): + + + class _items( + ListSchema + ): + _items = Int64Schema + + + class array_array_of_model( + ListSchema + ): + + + class _items( + ListSchema + ): + + @classmethod + @property + def _items(cls) -> typing.Type['ReadOnlyFirst']: + return ReadOnlyFirst + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + array_of_string: typing.Union[array_of_string, Unset] = unset, + array_array_of_integer: typing.Union[array_array_of_integer, Unset] = unset, + array_array_of_model: typing.Union[array_array_of_model, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + array_of_string=array_of_string, + array_array_of_integer=array_array_of_integer, + array_array_of_model=array_array_of_model, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.read_only_first import ReadOnlyFirst diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py new file mode 100644 index 000000000000..b34bcf6c27f5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py @@ -0,0 +1,87 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ArrayWithValidationsInItems( + _SchemaValidator( + max_items=2, + ), + ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _items (Schema): the schema definition of the array items + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + """ + + + class _items( + _SchemaValidator( + inclusive_maximum=7, + ), + Int64Schema + ): + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py new file mode 100644 index 000000000000..9cdf3cd55c6b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py @@ -0,0 +1,93 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Banana( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + lengthCm (int, float,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'lengthCm', + )) + lengthCm = NumberSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + lengthCm: lengthCm, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + lengthCm=lengthCm, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py new file mode 100644 index 000000000000..1cf74f05e3e6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py @@ -0,0 +1,94 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class BananaReq( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + lengthCm (int, float,): + sweet (bool,): + """ + _required_property_names = set(( + 'lengthCm', + )) + lengthCm = NumberSchema + sweet = BoolSchema + _additional_properties = None + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + lengthCm: lengthCm, + sweet: typing.Union[sweet, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + lengthCm=lengthCm, + sweet=sweet, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py new file mode 100644 index 000000000000..afbf24b8a222 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py @@ -0,0 +1,59 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) +Bar = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py new file mode 100644 index 000000000000..c11f9ab4bf93 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py @@ -0,0 +1,107 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class BasquePig( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + className (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'className', + )) + + + class className( + _SchemaEnumMaker( + enum_value_to_name={ + "BasquePig": "BASQUEPIG", + } + ), + StrSchema + ): + + @classmethod + @property + def BASQUEPIG(cls): + return cls._enum_by_value["BasquePig"]("BasquePig") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + className: className, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + className=className, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py new file mode 100644 index 000000000000..e9f974616fcb --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py @@ -0,0 +1,59 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) +Boolean = BoolSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py new file mode 100644 index 000000000000..50b7181cc7e5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py @@ -0,0 +1,80 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class BooleanEnum( + _SchemaEnumMaker( + enum_value_to_name={ + True: "TRUE", + } + ), + BoolSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def TRUE(cls): + return cls._enum_by_value[True](True) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py new file mode 100644 index 000000000000..8b508242ff2f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py @@ -0,0 +1,110 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Capitalization( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + smallCamel (str,): + CapitalCamel (str,): + small_Snake (str,): + Capital_Snake (str,): + SCA_ETH_Flow_Points (str,): + ATT_NAME (str,): Name of the pet + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + smallCamel = StrSchema + CapitalCamel = StrSchema + small_Snake = StrSchema + Capital_Snake = StrSchema + SCA_ETH_Flow_Points = StrSchema + ATT_NAME = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + smallCamel: typing.Union[smallCamel, Unset] = unset, + CapitalCamel: typing.Union[CapitalCamel, Unset] = unset, + small_Snake: typing.Union[small_Snake, Unset] = unset, + Capital_Snake: typing.Union[Capital_Snake, Unset] = unset, + SCA_ETH_Flow_Points: typing.Union[SCA_ETH_Flow_Points, Unset] = unset, + ATT_NAME: typing.Union[ATT_NAME, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + smallCamel=smallCamel, + CapitalCamel=CapitalCamel, + small_Snake=small_Snake, + Capital_Snake=Capital_Snake, + SCA_ETH_Flow_Points=SCA_ETH_Flow_Points, + ATT_NAME=ATT_NAME, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py new file mode 100644 index 000000000000..080d2bde5b8c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Cat( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + Animal, + CatAllOf, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.animal import Animal +from petstore_api.model.cat_all_of import CatAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py new file mode 100644 index 000000000000..b08ff9b66f0b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py @@ -0,0 +1,90 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class CatAllOf( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + declawed (bool,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + declawed = BoolSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + declawed: typing.Union[declawed, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + declawed=declawed, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py new file mode 100644 index 000000000000..abc7c3fc95ac --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py @@ -0,0 +1,97 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Category( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + id (int,): + name (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'name', + )) + id = Int64Schema + name = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + name: name, + id: typing.Union[id, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + name=name, + id=id, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py new file mode 100644 index 000000000000..e33b977dea1a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ChildCat( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ParentPet, + ChildCatAllOf, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.child_cat_all_of import ChildCatAllOf +from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py new file mode 100644 index 000000000000..aadedf154812 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py @@ -0,0 +1,90 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ChildCatAllOf( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + name (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + name = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + name: typing.Union[name, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + name=name, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py new file mode 100644 index 000000000000..54118dfb5d64 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py @@ -0,0 +1,91 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ClassModel( + AnyTypeSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Model for testing model with "_class" property + + Attributes: + _class (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _class = StrSchema + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _class: typing.Union[_class, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _class=_class, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py new file mode 100644 index 000000000000..713b3156872c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py @@ -0,0 +1,90 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Client( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + client (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + client = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + client: typing.Union[client, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + client=client, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py new file mode 100644 index 000000000000..8a7f81af7539 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComplexQuadrilateral( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + QuadrilateralInterface, + ComplexQuadrilateralAllOf, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf +from petstore_api.model.quadrilateral_interface import QuadrilateralInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py new file mode 100644 index 000000000000..095c96095ac0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py @@ -0,0 +1,104 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComplexQuadrilateralAllOf( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + quadrilateralType (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class quadrilateralType( + _SchemaEnumMaker( + enum_value_to_name={ + "ComplexQuadrilateral": "COMPLEXQUADRILATERAL", + } + ), + StrSchema + ): + + @classmethod + @property + def COMPLEXQUADRILATERAL(cls): + return cls._enum_by_value["ComplexQuadrilateral"]("ComplexQuadrilateral") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + quadrilateralType=quadrilateralType, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py new file mode 100644 index 000000000000..fb200660c6e2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py @@ -0,0 +1,141 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComposedAnyOfDifferentTypesNoValidations( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + anyOf_0 = DictSchema + anyOf_1 = DateSchema + anyOf_2 = DateTimeSchema + anyOf_3 = BinarySchema + anyOf_4 = StrSchema + anyOf_5 = StrSchema + anyOf_6 = DictSchema + anyOf_7 = BoolSchema + anyOf_8 = NoneSchema + + + class anyOf_9( + ListSchema + ): + _items = AnyTypeSchema + anyOf_10 = NumberSchema + anyOf_11 = Float32Schema + anyOf_12 = Float64Schema + anyOf_13 = IntSchema + anyOf_14 = Int32Schema + anyOf_15 = Int64Schema + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + anyOf_0, + anyOf_1, + anyOf_2, + anyOf_3, + anyOf_4, + anyOf_5, + anyOf_6, + anyOf_7, + anyOf_8, + anyOf_9, + anyOf_10, + anyOf_11, + anyOf_12, + anyOf_13, + anyOf_14, + anyOf_15, + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py new file mode 100644 index 000000000000..6a9d0e19c3f9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py @@ -0,0 +1,72 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComposedArray( + ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _items (Schema): the schema definition of the array items + """ + _items = AnyTypeSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py new file mode 100644 index 000000000000..b74990ba87a5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py @@ -0,0 +1,103 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComposedBool( + ComposedBase, + BoolSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + allOf_0 = AnyTypeSchema + return { + 'allOf': [ + allOf_0, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[bool, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py new file mode 100644 index 000000000000..ac6f516344f4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py @@ -0,0 +1,103 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComposedNone( + ComposedBase, + NoneSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + allOf_0 = AnyTypeSchema + return { + 'allOf': [ + allOf_0, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py new file mode 100644 index 000000000000..e932e138bcc3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py @@ -0,0 +1,103 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComposedNumber( + ComposedBase, + NumberSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + allOf_0 = AnyTypeSchema + return { + 'allOf': [ + allOf_0, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[float, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py new file mode 100644 index 000000000000..92942e256c40 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py @@ -0,0 +1,107 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComposedObject( + ComposedBase, + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + allOf_0 = AnyTypeSchema + return { + 'allOf': [ + allOf_0, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py new file mode 100644 index 000000000000..0a454dbceede --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py @@ -0,0 +1,162 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComposedOneOfDifferentTypes( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + this is a model that allows payloads of type object or number + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + oneOf_2 = NoneSchema + oneOf_3 = DateSchema + + + class oneOf_4( + _SchemaValidator( + max_properties=4, + min_properties=4, + ), + DictSchema + ): + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + class oneOf_5( + _SchemaValidator( + max_items=4, + min_items=4, + ), + ListSchema + ): + _items = AnyTypeSchema + + + class oneOf_6( + _SchemaValidator( + regex=[{ + 'pattern': r'^2020.*', # noqa: E501 + }], + ), + DateTimeSchema + ): + pass + return { + 'allOf': [ + ], + 'oneOf': [ + NumberWithValidations, + Animal, + oneOf_2, + oneOf_3, + oneOf_4, + oneOf_5, + oneOf_6, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.animal import Animal +from petstore_api.model.number_with_validations import NumberWithValidations diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py new file mode 100644 index 000000000000..dec60c328efe --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py @@ -0,0 +1,103 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ComposedString( + ComposedBase, + StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + allOf_0 = AnyTypeSchema + return { + 'allOf': [ + allOf_0, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[str, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py new file mode 100644 index 000000000000..d269be73d17d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py @@ -0,0 +1,107 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class DanishPig( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + className (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'className', + )) + + + class className( + _SchemaEnumMaker( + enum_value_to_name={ + "DanishPig": "DANISHPIG", + } + ), + StrSchema + ): + + @classmethod + @property + def DANISHPIG(cls): + return cls._enum_by_value["DanishPig"]("DanishPig") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + className: className, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + className=className, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py new file mode 100644 index 000000000000..837edc52f030 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py @@ -0,0 +1,59 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) +DateTimeTest = DateTimeSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py new file mode 100644 index 000000000000..d7bc79a11f95 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py @@ -0,0 +1,80 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class DateTimeWithValidations( + _SchemaValidator( + regex=[{ + 'pattern': r'^2020.*', # noqa: E501 + }], + ), + DateTimeSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py new file mode 100644 index 000000000000..a61d8da1b01f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py @@ -0,0 +1,80 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class DateWithValidations( + _SchemaValidator( + regex=[{ + 'pattern': r'^2020.*', # noqa: E501 + }], + ), + DateSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py new file mode 100644 index 000000000000..dbfc2b137707 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Dog( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + Animal, + DogAllOf, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.animal import Animal +from petstore_api.model.dog_all_of import DogAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py new file mode 100644 index 000000000000..1767fc983aef --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py @@ -0,0 +1,90 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class DogAllOf( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + breed (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + breed = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + breed: typing.Union[breed, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + breed=breed, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py new file mode 100644 index 000000000000..5196bd01cce1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py @@ -0,0 +1,133 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Drawing( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + mainShape (): + shapeOrNull (): + nullableShape (): + shapes (tuple,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def mainShape(cls) -> typing.Type['Shape']: + return Shape + + @classmethod + @property + def shapeOrNull(cls) -> typing.Type['ShapeOrNull']: + return ShapeOrNull + + @classmethod + @property + def nullableShape(cls) -> typing.Type['NullableShape']: + return NullableShape + + + class shapes( + ListSchema + ): + + @classmethod + @property + def _items(cls) -> typing.Type['Shape']: + return Shape + + @classmethod + @property + def _additional_properties(cls) -> typing.Type['Fruit']: + return Fruit + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + mainShape: typing.Union['Shape', Unset] = unset, + shapeOrNull: typing.Union['ShapeOrNull', Unset] = unset, + nullableShape: typing.Union['NullableShape', Unset] = unset, + shapes: typing.Union[shapes, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + mainShape=mainShape, + shapeOrNull=shapeOrNull, + nullableShape=nullableShape, + shapes=shapes, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.fruit import Fruit +from petstore_api.model.nullable_shape import NullableShape +from petstore_api.model.shape import Shape +from petstore_api.model.shape_or_null import ShapeOrNull diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py new file mode 100644 index 000000000000..54d293edd166 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py @@ -0,0 +1,139 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class EnumArrays( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + just_symbol (str,): + array_enum (tuple,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class just_symbol( + _SchemaEnumMaker( + enum_value_to_name={ + ">=": "GREATER_THAN_EQUALS", + "$": "DOLLAR", + } + ), + StrSchema + ): + + @classmethod + @property + def GREATER_THAN_EQUALS(cls): + return cls._enum_by_value[">="](">=") + + @classmethod + @property + def DOLLAR(cls): + return cls._enum_by_value["$"]("$") + + + class array_enum( + ListSchema + ): + + + class _items( + _SchemaEnumMaker( + enum_value_to_name={ + "fish": "FISH", + "crab": "CRAB", + } + ), + StrSchema + ): + + @classmethod + @property + def FISH(cls): + return cls._enum_by_value["fish"]("fish") + + @classmethod + @property + def CRAB(cls): + return cls._enum_by_value["crab"]("crab") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + just_symbol: typing.Union[just_symbol, Unset] = unset, + array_enum: typing.Union[array_enum, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + just_symbol=just_symbol, + array_enum=array_enum, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py new file mode 100644 index 000000000000..475c1dd6ca26 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py @@ -0,0 +1,92 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class EnumClass( + _SchemaEnumMaker( + enum_value_to_name={ + "_abc": "_ABC", + "-efg": "EFG", + "(xyz)": "XYZ", + } + ), + StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def _ABC(cls): + return cls._enum_by_value["_abc"]("_abc") + + @classmethod + @property + def EFG(cls): + return cls._enum_by_value["-efg"]("-efg") + + @classmethod + @property + def XYZ(cls): + return cls._enum_by_value["(xyz)"]("(xyz)") diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py new file mode 100644 index 000000000000..77769e3cd748 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py @@ -0,0 +1,243 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class EnumTest( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + enum_string (str,): + enum_string_required (str,): + enum_integer (int,): + enum_number (float,): + stringEnum (): + IntegerEnum (): + StringEnumWithDefaultValue (): + IntegerEnumWithDefaultValue (): + IntegerEnumOneValue (): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'enum_string_required', + )) + + + class enum_string( + _SchemaEnumMaker( + enum_value_to_name={ + "UPPER": "UPPER", + "lower": "LOWER", + "": "EMPTY", + } + ), + StrSchema + ): + + @classmethod + @property + def UPPER(cls): + return cls._enum_by_value["UPPER"]("UPPER") + + @classmethod + @property + def LOWER(cls): + return cls._enum_by_value["lower"]("lower") + + @classmethod + @property + def EMPTY(cls): + return cls._enum_by_value[""]("") + + + class enum_string_required( + _SchemaEnumMaker( + enum_value_to_name={ + "UPPER": "UPPER", + "lower": "LOWER", + "": "EMPTY", + } + ), + StrSchema + ): + + @classmethod + @property + def UPPER(cls): + return cls._enum_by_value["UPPER"]("UPPER") + + @classmethod + @property + def LOWER(cls): + return cls._enum_by_value["lower"]("lower") + + @classmethod + @property + def EMPTY(cls): + return cls._enum_by_value[""]("") + + + class enum_integer( + _SchemaEnumMaker( + enum_value_to_name={ + 1: "POSITIVE_1", + -1: "NEGATIVE_1", + } + ), + Int32Schema + ): + + @classmethod + @property + def POSITIVE_1(cls): + return cls._enum_by_value[1](1) + + @classmethod + @property + def NEGATIVE_1(cls): + return cls._enum_by_value[-1](-1) + + + class enum_number( + _SchemaEnumMaker( + enum_value_to_name={ + 1.1: "POSITIVE_1_PT_1", + -1.2: "NEGATIVE_1_PT_2", + } + ), + Float64Schema + ): + + @classmethod + @property + def POSITIVE_1_PT_1(cls): + return cls._enum_by_value[1.1](1.1) + + @classmethod + @property + def NEGATIVE_1_PT_2(cls): + return cls._enum_by_value[-1.2](-1.2) + + @classmethod + @property + def stringEnum(cls) -> typing.Type['StringEnum']: + return StringEnum + + @classmethod + @property + def IntegerEnum(cls) -> typing.Type['IntegerEnum']: + return IntegerEnum + + @classmethod + @property + def StringEnumWithDefaultValue(cls) -> typing.Type['StringEnumWithDefaultValue']: + return StringEnumWithDefaultValue + + @classmethod + @property + def IntegerEnumWithDefaultValue(cls) -> typing.Type['IntegerEnumWithDefaultValue']: + return IntegerEnumWithDefaultValue + + @classmethod + @property + def IntegerEnumOneValue(cls) -> typing.Type['IntegerEnumOneValue']: + return IntegerEnumOneValue + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + enum_string_required: enum_string_required, + enum_string: typing.Union[enum_string, Unset] = unset, + enum_integer: typing.Union[enum_integer, Unset] = unset, + enum_number: typing.Union[enum_number, Unset] = unset, + stringEnum: typing.Union['StringEnum', Unset] = unset, + IntegerEnum: typing.Union['IntegerEnum', Unset] = unset, + StringEnumWithDefaultValue: typing.Union['StringEnumWithDefaultValue', Unset] = unset, + IntegerEnumWithDefaultValue: typing.Union['IntegerEnumWithDefaultValue', Unset] = unset, + IntegerEnumOneValue: typing.Union['IntegerEnumOneValue', Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + enum_string_required=enum_string_required, + enum_string=enum_string, + enum_integer=enum_integer, + enum_number=enum_number, + stringEnum=stringEnum, + IntegerEnum=IntegerEnum, + StringEnumWithDefaultValue=StringEnumWithDefaultValue, + IntegerEnumWithDefaultValue=IntegerEnumWithDefaultValue, + IntegerEnumOneValue=IntegerEnumOneValue, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.integer_enum import IntegerEnum +from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue +from petstore_api.model.integer_enum_with_default_value import IntegerEnumWithDefaultValue +from petstore_api.model.string_enum import StringEnum +from petstore_api.model.string_enum_with_default_value import StringEnumWithDefaultValue diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py new file mode 100644 index 000000000000..69bf6944cf7a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class EquilateralTriangle( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + TriangleInterface, + EquilateralTriangleAllOf, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf +from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py new file mode 100644 index 000000000000..fb6edf7c7490 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py @@ -0,0 +1,104 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class EquilateralTriangleAllOf( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + triangleType (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "EquilateralTriangle": "EQUILATERALTRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def EQUILATERALTRIANGLE(cls): + return cls._enum_by_value["EquilateralTriangle"]("EquilateralTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + triangleType=triangleType, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py new file mode 100644 index 000000000000..30ccd52a5f56 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py @@ -0,0 +1,92 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class File( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Must be named `File` for test. + + Attributes: + sourceURI (str,): Test capitalization + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + sourceURI = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + sourceURI: typing.Union[sourceURI, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + sourceURI=sourceURI, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py new file mode 100644 index 000000000000..f0f6f4d9d83a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class FileSchemaTestClass( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + file (): + files (tuple,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def file(cls) -> typing.Type['File']: + return File + + + class files( + ListSchema + ): + + @classmethod + @property + def _items(cls) -> typing.Type['File']: + return File + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + file: typing.Union['File', Unset] = unset, + files: typing.Union[files, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + file=file, + files=files, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.file import File diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py new file mode 100644 index 000000000000..2160642188d6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py @@ -0,0 +1,90 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Foo( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + bar (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + bar = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + bar: typing.Union[bar, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + bar=bar, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py new file mode 100644 index 000000000000..913a2a90d1b3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py @@ -0,0 +1,276 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class FormatTest( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + integer (int,): + int32 (int,): + int32withValidations (int,): + int64 (int,): + number (int, float,): + float (float,): this is a reserved python keyword + float32 (float,): + double (float,): + float64 (float,): + arrayWithUniqueItems (tuple,): + string (str,): + byte (str,): + binary (): + date (date,): + dateTime (datetime,): + uuid (str,): + uuidNoExample (str,): + password (str,): + pattern_with_digits (str,): A string that is a 10 digit number. Can have leading zeros. + pattern_with_digits_and_delimiter (str,): A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + noneProp ( none_type,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'number', + 'byte', + 'date', + 'password', + )) + + + class integer( + _SchemaValidator( + inclusive_maximum=100, + inclusive_minimum=10, + multiple_of=[2], + ), + IntSchema + ): + pass + int32 = Int32Schema + + + class int32withValidations( + _SchemaValidator( + inclusive_maximum=200, + inclusive_minimum=20, + ), + Int32Schema + ): + pass + int64 = Int64Schema + + + class number( + _SchemaValidator( + inclusive_maximum=543.2, + inclusive_minimum=32.1, + multiple_of=[32.5], + ), + NumberSchema + ): + pass + + + class _float( + _SchemaValidator( + inclusive_maximum=987.6, + inclusive_minimum=54.3, + ), + Float32Schema + ): + pass + locals()['float'] = _float + del locals()['_float'] + float32 = Float32Schema + + + class double( + _SchemaValidator( + inclusive_maximum=123.4, + inclusive_minimum=67.8, + ), + Float64Schema + ): + pass + float64 = Float64Schema + + + class arrayWithUniqueItems( + _SchemaValidator( + unique_items=True, + ), + ListSchema + ): + _items = NumberSchema + + + class string( + _SchemaValidator( + regex=[{ + 'pattern': r'[a-z]', # noqa: E501 + 'flags': ( + re.IGNORECASE + ) + }], + ), + StrSchema + ): + pass + byte = StrSchema + binary = BinarySchema + date = DateSchema + dateTime = DateTimeSchema + uuid = StrSchema + uuidNoExample = StrSchema + + + class password( + _SchemaValidator( + max_length=64, + min_length=10, + ), + StrSchema + ): + pass + + + class pattern_with_digits( + _SchemaValidator( + regex=[{ + 'pattern': r'^\d{10}$', # noqa: E501 + }], + ), + StrSchema + ): + pass + + + class pattern_with_digits_and_delimiter( + _SchemaValidator( + regex=[{ + 'pattern': r'^image_\d{1,3}$', # noqa: E501 + 'flags': ( + re.IGNORECASE + ) + }], + ), + StrSchema + ): + pass + noneProp = NoneSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + number: number, + byte: byte, + date: date, + password: password, + integer: typing.Union[integer, Unset] = unset, + int32: typing.Union[int32, Unset] = unset, + int32withValidations: typing.Union[int32withValidations, Unset] = unset, + int64: typing.Union[int64, Unset] = unset, + float32: typing.Union[float32, Unset] = unset, + double: typing.Union[double, Unset] = unset, + float64: typing.Union[float64, Unset] = unset, + arrayWithUniqueItems: typing.Union[arrayWithUniqueItems, Unset] = unset, + string: typing.Union[string, Unset] = unset, + binary: typing.Union[binary, Unset] = unset, + dateTime: typing.Union[dateTime, Unset] = unset, + uuid: typing.Union[uuid, Unset] = unset, + uuidNoExample: typing.Union[uuidNoExample, Unset] = unset, + pattern_with_digits: typing.Union[pattern_with_digits, Unset] = unset, + pattern_with_digits_and_delimiter: typing.Union[pattern_with_digits_and_delimiter, Unset] = unset, + noneProp: typing.Union[noneProp, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + number=number, + byte=byte, + date=date, + password=password, + integer=integer, + int32=int32, + int32withValidations=int32withValidations, + int64=int64, + float32=float32, + double=double, + float64=float64, + arrayWithUniqueItems=arrayWithUniqueItems, + string=string, + binary=binary, + dateTime=dateTime, + uuid=uuid, + uuidNoExample=uuidNoExample, + pattern_with_digits=pattern_with_digits, + pattern_with_digits_and_delimiter=pattern_with_digits_and_delimiter, + noneProp=noneProp, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py new file mode 100644 index 000000000000..77d38d632d42 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py @@ -0,0 +1,113 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Fruit( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + color (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + color = StrSchema + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ], + 'oneOf': [ + Apple, + Banana, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + color: typing.Union[color, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + color=color, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.apple import Apple +from petstore_api.model.banana import Banana diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py new file mode 100644 index 000000000000..37fcf71a44b4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py @@ -0,0 +1,111 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class FruitReq( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + oneOf_0 = NoneSchema + return { + 'allOf': [ + ], + 'oneOf': [ + oneOf_0, + AppleReq, + BananaReq, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.apple_req import AppleReq +from petstore_api.model.banana_req import BananaReq diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py new file mode 100644 index 000000000000..ab342907147c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py @@ -0,0 +1,113 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class GmFruit( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + color (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + color = StrSchema + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ], + 'oneOf': [ + ], + 'anyOf': [ + Apple, + Banana, + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + color: typing.Union[color, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + color=color, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.apple import Apple +from petstore_api.model.banana import Banana diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py new file mode 100644 index 000000000000..f5625407bc7b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py @@ -0,0 +1,108 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class GrandparentAnimal( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + pet_type (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + _required_property_names = set(( + 'pet_type', + )) + pet_type = StrSchema + + @classmethod + @property + def _discriminator(cls): + return { + 'pet_type': { + 'ChildCat': ChildCat, + 'ParentPet': ParentPet, + } + } + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + pet_type: pet_type, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + pet_type=pet_type, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.child_cat import ChildCat +from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py new file mode 100644 index 000000000000..3a84082bd471 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py @@ -0,0 +1,94 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class HasOnlyReadOnly( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + bar (str,): + foo (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + bar = StrSchema + foo = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + bar: typing.Union[bar, Unset] = unset, + foo: typing.Union[foo, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + bar=bar, + foo=foo, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py new file mode 100644 index 000000000000..9cf48be2b363 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py @@ -0,0 +1,110 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class HealthCheckResult( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + + Attributes: + NullableMessage (str, none_type,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class NullableMessage( + _SchemaTypeChecker(typing.Union[none_type, str, ]), + StrBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[str, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + NullableMessage: typing.Union[NullableMessage, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + NullableMessage=NullableMessage, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py new file mode 100644 index 000000000000..6b0f32db72ac --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py @@ -0,0 +1,96 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class InlineResponseDefault( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + string (): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def string(cls) -> typing.Type['Foo']: + return Foo + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + string: typing.Union['Foo', Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + string=string, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.foo import Foo diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py new file mode 100644 index 000000000000..02a228957b69 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py @@ -0,0 +1,92 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class IntegerEnum( + _SchemaEnumMaker( + enum_value_to_name={ + 0: "POSITIVE_0", + 1: "POSITIVE_1", + 2: "POSITIVE_2", + } + ), + IntSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def POSITIVE_0(cls): + return cls._enum_by_value[0](0) + + @classmethod + @property + def POSITIVE_1(cls): + return cls._enum_by_value[1](1) + + @classmethod + @property + def POSITIVE_2(cls): + return cls._enum_by_value[2](2) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py new file mode 100644 index 000000000000..babc39df7d43 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py @@ -0,0 +1,92 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class IntegerEnumBig( + _SchemaEnumMaker( + enum_value_to_name={ + 10: "POSITIVE_10", + 11: "POSITIVE_11", + 12: "POSITIVE_12", + } + ), + IntSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def POSITIVE_10(cls): + return cls._enum_by_value[10](10) + + @classmethod + @property + def POSITIVE_11(cls): + return cls._enum_by_value[11](11) + + @classmethod + @property + def POSITIVE_12(cls): + return cls._enum_by_value[12](12) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py new file mode 100644 index 000000000000..fa7e4258cbbb --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py @@ -0,0 +1,80 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class IntegerEnumOneValue( + _SchemaEnumMaker( + enum_value_to_name={ + 0: "POSITIVE_0", + } + ), + IntSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def POSITIVE_0(cls): + return cls._enum_by_value[0](0) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py new file mode 100644 index 000000000000..cb5860a0bdbe --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py @@ -0,0 +1,92 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class IntegerEnumWithDefaultValue( + _SchemaEnumMaker( + enum_value_to_name={ + 0: "POSITIVE_0", + 1: "POSITIVE_1", + 2: "POSITIVE_2", + } + ), + IntSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def POSITIVE_0(cls): + return cls._enum_by_value[0](0) + + @classmethod + @property + def POSITIVE_1(cls): + return cls._enum_by_value[1](1) + + @classmethod + @property + def POSITIVE_2(cls): + return cls._enum_by_value[2](2) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py new file mode 100644 index 000000000000..affe4283ac61 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py @@ -0,0 +1,78 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class IntegerMax10( + _SchemaValidator( + inclusive_maximum=10, + ), + Int64Schema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py new file mode 100644 index 000000000000..6a6488136d16 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py @@ -0,0 +1,78 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class IntegerMin15( + _SchemaValidator( + inclusive_minimum=15, + ), + Int64Schema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py new file mode 100644 index 000000000000..b8527d08df55 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class IsoscelesTriangle( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + TriangleInterface, + IsoscelesTriangleAllOf, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf +from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py new file mode 100644 index 000000000000..8d9bc65556f3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py @@ -0,0 +1,104 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class IsoscelesTriangleAllOf( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + triangleType (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "IsoscelesTriangle": "ISOSCELESTRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def ISOSCELESTRIANGLE(cls): + return cls._enum_by_value["IsoscelesTriangle"]("IsoscelesTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + triangleType=triangleType, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py new file mode 100644 index 000000000000..fd1784636b2b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py @@ -0,0 +1,124 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Mammal( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + + @classmethod + @property + def _discriminator(cls): + return { + 'className': { + 'Pig': Pig, + 'whale': Whale, + 'zebra': Zebra, + } + } + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ], + 'oneOf': [ + Whale, + Zebra, + Pig, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.pig import Pig +from petstore_api.model.whale import Whale +from petstore_api.model.zebra import Zebra diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py new file mode 100644 index 000000000000..90e2f053e683 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py @@ -0,0 +1,204 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class MapTest( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + map_map_of_string (dict,): + map_of_enum_string (dict,): + direct_map (dict,): + indirect_map (): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class map_map_of_string( + DictSchema + ): + + + class _additional_properties( + DictSchema + ): + _additional_properties = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + class map_of_enum_string( + DictSchema + ): + + + class _additional_properties( + _SchemaEnumMaker( + enum_value_to_name={ + "UPPER": "UPPER", + "lower": "LOWER", + } + ), + StrSchema + ): + + @classmethod + @property + def UPPER(cls): + return cls._enum_by_value["UPPER"]("UPPER") + + @classmethod + @property + def LOWER(cls): + return cls._enum_by_value["lower"]("lower") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + class direct_map( + DictSchema + ): + _additional_properties = BoolSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + @classmethod + @property + def indirect_map(cls) -> typing.Type['StringBooleanMap']: + return StringBooleanMap + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + map_map_of_string: typing.Union[map_map_of_string, Unset] = unset, + map_of_enum_string: typing.Union[map_of_enum_string, Unset] = unset, + direct_map: typing.Union[direct_map, Unset] = unset, + indirect_map: typing.Union['StringBooleanMap', Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + map_map_of_string=map_map_of_string, + map_of_enum_string=map_of_enum_string, + direct_map=direct_map, + indirect_map=indirect_map, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.string_boolean_map import StringBooleanMap diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py new file mode 100644 index 000000000000..e3a39533757c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -0,0 +1,121 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class MixedPropertiesAndAdditionalPropertiesClass( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + uuid (str,): + dateTime (datetime,): + map (dict,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + uuid = StrSchema + dateTime = DateTimeSchema + + + class map( + DictSchema + ): + + @classmethod + @property + def _additional_properties(cls) -> typing.Type['Animal']: + return Animal + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + uuid: typing.Union[uuid, Unset] = unset, + dateTime: typing.Union[dateTime, Unset] = unset, + map: typing.Union[map, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + uuid=uuid, + dateTime=dateTime, + map=map, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py new file mode 100644 index 000000000000..c47980d5a7f4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.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 +""" + +import re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Model200Response( + AnyTypeSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + model with an invalid class name for python, starts with a number + + Attributes: + name (int,): + class (str,): this is a reserved python keyword + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + name = Int32Schema + _class = StrSchema + locals()['class'] = _class + del locals()['_class'] + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + name: typing.Union[name, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + name=name, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py new file mode 100644 index 000000000000..81116280224e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py @@ -0,0 +1,91 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ModelReturn( + AnyTypeSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Model for testing reserved words + + Attributes: + return (int,): this is a reserved python keyword + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _return = Int32Schema + locals()['return'] = _return + del locals()['_return'] + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py new file mode 100644 index 000000000000..7343223c4d21 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py @@ -0,0 +1,102 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Name( + AnyTypeSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Model for testing model name same as property name + + Attributes: + name (int,): + snake_case (int,): + property (str,): this is a reserved python keyword + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'name', + )) + name = Int32Schema + snake_case = Int32Schema + _property = StrSchema + locals()['property'] = _property + del locals()['_property'] + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + name: name, + snake_case: typing.Union[snake_case, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + name=name, + snake_case=snake_case, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py new file mode 100644 index 000000000000..910b8bc1f117 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py @@ -0,0 +1,94 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class NoAdditionalProperties( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + id (int,): + petId (int,): + """ + _required_property_names = set(( + 'id', + )) + id = Int64Schema + petId = Int64Schema + _additional_properties = None + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + id: id, + petId: typing.Union[petId, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + id=id, + petId=petId, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py new file mode 100644 index 000000000000..45743da43945 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py @@ -0,0 +1,425 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class NullableClass( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + integer_prop (int, none_type,): + number_prop (int, float, none_type,): + boolean_prop (bool, none_type,): + string_prop (str, none_type,): + date_prop (date, none_type,): + datetime_prop (datetime, none_type,): + array_nullable_prop (tuple, none_type,): + array_and_items_nullable_prop (tuple, none_type,): + array_items_nullable (tuple,): + object_nullable_prop (dict, none_type,): + object_and_items_nullable_prop (dict, none_type,): + object_items_nullable (dict,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class integer_prop( + _SchemaTypeChecker(typing.Union[none_type, Decimal, ]), + IntBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[int, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class number_prop( + _SchemaTypeChecker(typing.Union[none_type, Decimal, ]), + NumberBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[float, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class boolean_prop( + _SchemaTypeChecker(typing.Union[none_type, bool, ]), + BoolBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[bool, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class string_prop( + _SchemaTypeChecker(typing.Union[none_type, str, ]), + StrBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[str, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class date_prop( + _SchemaTypeChecker(typing.Union[none_type, str, ]), + DateBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class datetime_prop( + _SchemaTypeChecker(typing.Union[none_type, str, ]), + DateTimeBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class array_nullable_prop( + _SchemaTypeChecker(typing.Union[tuple, none_type, ]), + ListBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[list, tuple, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class array_and_items_nullable_prop( + _SchemaTypeChecker(typing.Union[tuple, none_type, ]), + ListBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[list, tuple, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) + + + class array_items_nullable( + ListSchema + ): + + + class _items( + _SchemaTypeChecker(typing.Union[frozendict, none_type, ]), + DictBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[dict, frozendict, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + class object_nullable_prop( + _SchemaTypeChecker(typing.Union[frozendict, none_type, ]), + DictBase, + NoneBase, + Schema + ): + _additional_properties = DictSchema + + def __new__( + cls, + *args: typing.Union[dict, frozendict, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + class object_and_items_nullable_prop( + _SchemaTypeChecker(typing.Union[frozendict, none_type, ]), + DictBase, + NoneBase, + Schema + ): + + + class _additional_properties( + _SchemaTypeChecker(typing.Union[frozendict, none_type, ]), + DictBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[dict, frozendict, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + def __new__( + cls, + *args: typing.Union[dict, frozendict, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + class object_items_nullable( + DictSchema + ): + + + class _additional_properties( + _SchemaTypeChecker(typing.Union[frozendict, none_type, ]), + DictBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[dict, frozendict, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + class _additional_properties( + _SchemaTypeChecker(typing.Union[frozendict, none_type, ]), + DictBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[dict, frozendict, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + integer_prop: typing.Union[integer_prop, Unset] = unset, + number_prop: typing.Union[number_prop, Unset] = unset, + boolean_prop: typing.Union[boolean_prop, Unset] = unset, + string_prop: typing.Union[string_prop, Unset] = unset, + date_prop: typing.Union[date_prop, Unset] = unset, + datetime_prop: typing.Union[datetime_prop, Unset] = unset, + array_nullable_prop: typing.Union[array_nullable_prop, Unset] = unset, + array_and_items_nullable_prop: typing.Union[array_and_items_nullable_prop, Unset] = unset, + array_items_nullable: typing.Union[array_items_nullable, Unset] = unset, + object_nullable_prop: typing.Union[object_nullable_prop, Unset] = unset, + object_and_items_nullable_prop: typing.Union[object_and_items_nullable_prop, Unset] = unset, + object_items_nullable: typing.Union[object_items_nullable, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + integer_prop=integer_prop, + number_prop=number_prop, + boolean_prop=boolean_prop, + string_prop=string_prop, + date_prop=date_prop, + datetime_prop=datetime_prop, + array_nullable_prop=array_nullable_prop, + array_and_items_nullable_prop=array_and_items_nullable_prop, + array_items_nullable=array_items_nullable, + object_nullable_prop=object_nullable_prop, + object_and_items_nullable_prop=object_and_items_nullable_prop, + object_items_nullable=object_items_nullable, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py new file mode 100644 index 000000000000..7c4e30792344 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py @@ -0,0 +1,125 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class NullableShape( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + 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. For a nullable composed schema to work, one of its chosen oneOf schemas must be type null + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + + @classmethod + @property + def _discriminator(cls): + return { + 'shapeType': { + 'Quadrilateral': Quadrilateral, + 'Triangle': Triangle, + } + } + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + oneOf_2 = NoneSchema + return { + 'allOf': [ + ], + 'oneOf': [ + Triangle, + Quadrilateral, + oneOf_2, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.quadrilateral import Quadrilateral +from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py new file mode 100644 index 000000000000..2386522587dc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py @@ -0,0 +1,84 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class NullableString( + _SchemaTypeChecker(typing.Union[none_type, str, ]), + StrBase, + NoneBase, + Schema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + def __new__( + cls, + *args: typing.Union[str, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py new file mode 100644 index 000000000000..c4c4695e8be8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py @@ -0,0 +1,59 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) +Number = NumberSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py new file mode 100644 index 000000000000..ff476caf0321 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py @@ -0,0 +1,90 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class NumberOnly( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + JustNumber (int, float,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + JustNumber = NumberSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + JustNumber: typing.Union[JustNumber, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + JustNumber=JustNumber, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py new file mode 100644 index 000000000000..25ec9cdf00fc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py @@ -0,0 +1,79 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class NumberWithValidations( + _SchemaValidator( + inclusive_maximum=20, + inclusive_minimum=10, + ), + NumberSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py new file mode 100644 index 000000000000..a5e32358a317 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py @@ -0,0 +1,59 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) +ObjectInterface = DictSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py new file mode 100644 index 000000000000..99ca8288ee81 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py @@ -0,0 +1,106 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ObjectModelWithRefProps( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations + + Attributes: + myNumber (): + myString (str,): + myBoolean (bool,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def myNumber(cls) -> typing.Type['NumberWithValidations']: + return NumberWithValidations + myString = StrSchema + myBoolean = BoolSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + myNumber: typing.Union['NumberWithValidations', Unset] = unset, + myString: typing.Union[myString, Unset] = unset, + myBoolean: typing.Union[myBoolean, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + myNumber=myNumber, + myString=myString, + myBoolean=myBoolean, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.number_with_validations import NumberWithValidations diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py new file mode 100644 index 000000000000..11c22fd99f75 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py @@ -0,0 +1,103 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ObjectWithDifficultlyNamedProps( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + model with properties that have invalid names for python + + Attributes: + $special[property.name] (int,): + 123-list (str,): + 123Number (int,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + '123-list', + )) + special_property_name = Int64Schema + locals()['$special[property.name]'] = special_property_name + del locals()['special_property_name'] + _123_list = StrSchema + locals()['123-list'] = _123_list + del locals()['_123_list'] + _123_number = IntSchema + locals()['123Number'] = _123_number + del locals()['_123_number'] + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py new file mode 100644 index 000000000000..c55d028c3744 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py @@ -0,0 +1,93 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ObjectWithValidations( + _SchemaValidator( + min_properties=2, + ), + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py new file mode 100644 index 000000000000..b00c227a86c7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py @@ -0,0 +1,136 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Order( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + id (int,): + petId (int,): + quantity (int,): + shipDate (datetime,): + status (str,): Order Status + complete (bool,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + id = Int64Schema + petId = Int64Schema + quantity = Int32Schema + shipDate = DateTimeSchema + + + class status( + _SchemaEnumMaker( + enum_value_to_name={ + "placed": "PLACED", + "approved": "APPROVED", + "delivered": "DELIVERED", + } + ), + StrSchema + ): + + @classmethod + @property + def PLACED(cls): + return cls._enum_by_value["placed"]("placed") + + @classmethod + @property + def APPROVED(cls): + return cls._enum_by_value["approved"]("approved") + + @classmethod + @property + def DELIVERED(cls): + return cls._enum_by_value["delivered"]("delivered") + complete = BoolSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + id: typing.Union[id, Unset] = unset, + petId: typing.Union[petId, Unset] = unset, + quantity: typing.Union[quantity, Unset] = unset, + shipDate: typing.Union[shipDate, Unset] = unset, + status: typing.Union[status, Unset] = unset, + complete: typing.Union[complete, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + id=id, + petId=petId, + quantity=quantity, + shipDate=shipDate, + status=status, + complete=complete, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py new file mode 100644 index 000000000000..b9066defb501 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py @@ -0,0 +1,120 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ParentPet( + ComposedBase, + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + + @classmethod + @property + def _discriminator(cls): + return { + 'pet_type': { + 'ChildCat': ChildCat, + } + } + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + GrandparentAnimal, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.child_cat import ChildCat +from petstore_api.model.grandparent_animal import GrandparentAnimal diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py new file mode 100644 index 000000000000..f602e6e722d6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py @@ -0,0 +1,163 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Pet( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Pet object that needs to be added to the store + + Attributes: + id (int,): + category (): + name (str,): + photoUrls (tuple,): + tags (tuple,): + status (str,): pet status in the store + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'name', + 'photoUrls', + )) + id = Int64Schema + + @classmethod + @property + def category(cls) -> typing.Type['Category']: + return Category + name = StrSchema + + + class photoUrls( + ListSchema + ): + _items = StrSchema + + + class tags( + ListSchema + ): + + @classmethod + @property + def _items(cls) -> typing.Type['Tag']: + return Tag + + + class status( + _SchemaEnumMaker( + enum_value_to_name={ + "available": "AVAILABLE", + "pending": "PENDING", + "sold": "SOLD", + } + ), + StrSchema + ): + + @classmethod + @property + def AVAILABLE(cls): + return cls._enum_by_value["available"]("available") + + @classmethod + @property + def PENDING(cls): + return cls._enum_by_value["pending"]("pending") + + @classmethod + @property + def SOLD(cls): + return cls._enum_by_value["sold"]("sold") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + name: name, + photoUrls: photoUrls, + id: typing.Union[id, Unset] = unset, + category: typing.Union['Category', Unset] = unset, + tags: typing.Union[tags, Unset] = unset, + status: typing.Union[status, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + name=name, + photoUrls=photoUrls, + id=id, + category=category, + tags=tags, + status=status, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.category import Category +from petstore_api.model.tag import Tag diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py new file mode 100644 index 000000000000..02ef6df613b5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py @@ -0,0 +1,121 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Pig( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + + @classmethod + @property + def _discriminator(cls): + return { + 'className': { + 'BasquePig': BasquePig, + 'DanishPig': DanishPig, + } + } + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ], + 'oneOf': [ + BasquePig, + DanishPig, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.basque_pig import BasquePig +from petstore_api.model.danish_pig import DanishPig diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py new file mode 100644 index 000000000000..b568eadf36e7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py @@ -0,0 +1,100 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Player( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + a model that includes a self reference this forces properties and additionalProperties to be lazy loaded in python models because the Player class has not fully loaded when defining properties + + Attributes: + name (str,): + enemyPlayer (): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + name = StrSchema + + @classmethod + @property + def enemyPlayer(cls) -> typing.Type['Player']: + return Player + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + name: typing.Union[name, Unset] = unset, + enemyPlayer: typing.Union['Player', Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + name=name, + enemyPlayer=enemyPlayer, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py new file mode 100644 index 000000000000..e5e8dd8788af --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py @@ -0,0 +1,121 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Quadrilateral( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + + @classmethod + @property + def _discriminator(cls): + return { + 'quadrilateralType': { + 'ComplexQuadrilateral': ComplexQuadrilateral, + 'SimpleQuadrilateral': SimpleQuadrilateral, + } + } + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ], + 'oneOf': [ + SimpleQuadrilateral, + ComplexQuadrilateral, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral +from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py new file mode 100644 index 000000000000..606805b40eee --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py @@ -0,0 +1,111 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class QuadrilateralInterface( + AnyTypeSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + shapeType (str,): + quadrilateralType (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'shapeType', + 'quadrilateralType', + )) + + + class shapeType( + _SchemaEnumMaker( + enum_value_to_name={ + "Quadrilateral": "QUADRILATERAL", + } + ), + StrSchema + ): + + @classmethod + @property + def QUADRILATERAL(cls): + return cls._enum_by_value["Quadrilateral"]("Quadrilateral") + quadrilateralType = StrSchema + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + shapeType: shapeType, + quadrilateralType: quadrilateralType, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + shapeType=shapeType, + quadrilateralType=quadrilateralType, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py new file mode 100644 index 000000000000..136a772cd00d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py @@ -0,0 +1,94 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ReadOnlyFirst( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + bar (str,): + baz (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + bar = StrSchema + baz = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + bar: typing.Union[bar, Unset] = unset, + baz: typing.Union[baz, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + bar=bar, + baz=baz, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py new file mode 100644 index 000000000000..0639b5aeb3c1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ScaleneTriangle( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + TriangleInterface, + ScaleneTriangleAllOf, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf +from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py new file mode 100644 index 000000000000..9e031ca5a74d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py @@ -0,0 +1,104 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ScaleneTriangleAllOf( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + triangleType (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "ScaleneTriangle": "SCALENETRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def SCALENETRIANGLE(cls): + return cls._enum_by_value["ScaleneTriangle"]("ScaleneTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + triangleType=triangleType, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py new file mode 100644 index 000000000000..6142062fbc7e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py @@ -0,0 +1,121 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Shape( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + + @classmethod + @property + def _discriminator(cls): + return { + 'shapeType': { + 'Quadrilateral': Quadrilateral, + 'Triangle': Triangle, + } + } + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ], + 'oneOf': [ + Triangle, + Quadrilateral, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.quadrilateral import Quadrilateral +from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py new file mode 100644 index 000000000000..b1a7ecd967d1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py @@ -0,0 +1,125 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ShapeOrNull( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + + @classmethod + @property + def _discriminator(cls): + return { + 'shapeType': { + 'Quadrilateral': Quadrilateral, + 'Triangle': Triangle, + } + } + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + oneOf_0 = NoneSchema + return { + 'allOf': [ + ], + 'oneOf': [ + oneOf_0, + Triangle, + Quadrilateral, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.quadrilateral import Quadrilateral +from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py new file mode 100644 index 000000000000..bc907bfb30b5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py @@ -0,0 +1,109 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class SimpleQuadrilateral( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + QuadrilateralInterface, + SimpleQuadrilateralAllOf, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.quadrilateral_interface import QuadrilateralInterface +from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py new file mode 100644 index 000000000000..b6b63fb9ff04 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py @@ -0,0 +1,104 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class SimpleQuadrilateralAllOf( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + quadrilateralType (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + + class quadrilateralType( + _SchemaEnumMaker( + enum_value_to_name={ + "SimpleQuadrilateral": "SIMPLEQUADRILATERAL", + } + ), + StrSchema + ): + + @classmethod + @property + def SIMPLEQUADRILATERAL(cls): + return cls._enum_by_value["SimpleQuadrilateral"]("SimpleQuadrilateral") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + quadrilateralType=quadrilateralType, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py new file mode 100644 index 000000000000..c4fa2a0cff63 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py @@ -0,0 +1,107 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class SomeObject( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ObjectInterface, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.object_interface import ObjectInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py new file mode 100644 index 000000000000..47c8e538244d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py @@ -0,0 +1,92 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class SpecialModelName( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + model with an invalid class name for python + + Attributes: + a (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + a = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + a: typing.Union[a, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + a=a, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py new file mode 100644 index 000000000000..9b51e661bfde --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py @@ -0,0 +1,59 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) +String = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py new file mode 100644 index 000000000000..8022c91ced12 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py @@ -0,0 +1,87 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class StringBooleanMap( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _additional_properties = BoolSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py new file mode 100644 index 000000000000..0f803ec7d242 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py @@ -0,0 +1,136 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class StringEnum( + _SchemaTypeChecker(typing.Union[none_type, str, ]), + _SchemaEnumMaker( + enum_value_to_name={ + None: "NONE", + "placed": "PLACED", + "approved": "APPROVED", + "delivered": "DELIVERED", + "single quoted": "SINGLE_QUOTED", + '''multiple +lines''': "MULTIPLE_LINES", + '''double quote + with newline''': "DOUBLE_QUOTE_WITH_NEWLINE", + } + ), + StrBase, + NoneBase, + Schema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def NONE(cls): + return cls._enum_by_value[None](None) + + @classmethod + @property + def PLACED(cls): + return cls._enum_by_value["placed"]("placed") + + @classmethod + @property + def APPROVED(cls): + return cls._enum_by_value["approved"]("approved") + + @classmethod + @property + def DELIVERED(cls): + return cls._enum_by_value["delivered"]("delivered") + + @classmethod + @property + def SINGLE_QUOTED(cls): + return cls._enum_by_value["single quoted"]("single quoted") + + @classmethod + @property + def MULTIPLE_LINES(cls): + return cls._enum_by_value['''multiple +lines''']('''multiple +lines''') + + @classmethod + @property + def DOUBLE_QUOTE_WITH_NEWLINE(cls): + return cls._enum_by_value['''double quote + with newline''']('''double quote + with newline''') + + def __new__( + cls, + *args: typing.Union[str, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py new file mode 100644 index 000000000000..7894c4093a43 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py @@ -0,0 +1,92 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class StringEnumWithDefaultValue( + _SchemaEnumMaker( + enum_value_to_name={ + "placed": "PLACED", + "approved": "APPROVED", + "delivered": "DELIVERED", + } + ), + StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + """ + + @classmethod + @property + def PLACED(cls): + return cls._enum_by_value["placed"]("placed") + + @classmethod + @property + def APPROVED(cls): + return cls._enum_by_value["approved"]("approved") + + @classmethod + @property + def DELIVERED(cls): + return cls._enum_by_value["delivered"]("delivered") diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py new file mode 100644 index 000000000000..135b181127db --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py @@ -0,0 +1,78 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class StringWithValidation( + _SchemaValidator( + min_length=7, + ), + StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _validations (dict): the validations which apply to the current Schema + The value is a dict that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + """ + pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py new file mode 100644 index 000000000000..275974b2ecf3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py @@ -0,0 +1,94 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Tag( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + id (int,): + name (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + id = Int64Schema + name = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + id: typing.Union[id, Unset] = unset, + name: typing.Union[name, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + id=id, + name=name, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py new file mode 100644 index 000000000000..a35af496f9c2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py @@ -0,0 +1,124 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Triangle( + ComposedSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + _discriminator(cls) -> dict: the key is the required discriminator propertyName + the value is a dict mapping from a string name to the corresponding Schema class + """ + + @classmethod + @property + def _discriminator(cls): + return { + 'triangleType': { + 'EquilateralTriangle': EquilateralTriangle, + 'IsoscelesTriangle': IsoscelesTriangle, + 'ScaleneTriangle': ScaleneTriangle, + } + } + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [ + ], + 'oneOf': [ + EquilateralTriangle, + IsoscelesTriangle, + ScaleneTriangle, + ], + 'anyOf': [ + ], + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.equilateral_triangle import EquilateralTriangle +from petstore_api.model.isosceles_triangle import IsoscelesTriangle +from petstore_api.model.scalene_triangle import ScaleneTriangle diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py new file mode 100644 index 000000000000..d21d93687c8e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py @@ -0,0 +1,111 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class TriangleInterface( + AnyTypeSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + shapeType (str,): + triangleType (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'shapeType', + 'triangleType', + )) + + + class shapeType( + _SchemaEnumMaker( + enum_value_to_name={ + "Triangle": "TRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def TRIANGLE(cls): + return cls._enum_by_value["Triangle"]("Triangle") + triangleType = StrSchema + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + shapeType: shapeType, + triangleType: triangleType, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + shapeType=shapeType, + triangleType=triangleType, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py new file mode 100644 index 000000000000..dccbf4d2040e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py @@ -0,0 +1,154 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class User( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + id (int,): + username (str,): + firstName (str,): + lastName (str,): + email (str,): + password (str,): + phone (str,): + userStatus (int,): User Status + objectWithNoDeclaredProps (dict,): test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + objectWithNoDeclaredPropsNullable (dict, none_type,): test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + anyTypeProp (): 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 + anyTypePropNullable (): 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. + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + id = Int64Schema + username = StrSchema + firstName = StrSchema + lastName = StrSchema + email = StrSchema + password = StrSchema + phone = StrSchema + userStatus = Int32Schema + objectWithNoDeclaredProps = DictSchema + + + class objectWithNoDeclaredPropsNullable( + _SchemaTypeChecker(typing.Union[frozendict, none_type, ]), + DictBase, + NoneBase, + Schema + ): + + def __new__( + cls, + *args: typing.Union[dict, frozendict, None, ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + anyTypeProp = AnyTypeSchema + anyTypePropNullable = AnyTypeSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + id: typing.Union[id, Unset] = unset, + username: typing.Union[username, Unset] = unset, + firstName: typing.Union[firstName, Unset] = unset, + lastName: typing.Union[lastName, Unset] = unset, + email: typing.Union[email, Unset] = unset, + password: typing.Union[password, Unset] = unset, + phone: typing.Union[phone, Unset] = unset, + userStatus: typing.Union[userStatus, Unset] = unset, + objectWithNoDeclaredProps: typing.Union[objectWithNoDeclaredProps, Unset] = unset, + objectWithNoDeclaredPropsNullable: typing.Union[objectWithNoDeclaredPropsNullable, Unset] = unset, + anyTypeProp: typing.Union[anyTypeProp, Unset] = unset, + anyTypePropNullable: typing.Union[anyTypePropNullable, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + id=id, + username=username, + firstName=firstName, + lastName=lastName, + email=email, + password=password, + phone=phone, + userStatus=userStatus, + objectWithNoDeclaredProps=objectWithNoDeclaredProps, + objectWithNoDeclaredPropsNullable=objectWithNoDeclaredPropsNullable, + anyTypeProp=anyTypeProp, + anyTypePropNullable=anyTypePropNullable, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py new file mode 100644 index 000000000000..2018c62eb3c2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py @@ -0,0 +1,115 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Whale( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + hasBaleen (bool,): + hasTeeth (bool,): + className (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'className', + )) + hasBaleen = BoolSchema + hasTeeth = BoolSchema + + + class className( + _SchemaEnumMaker( + enum_value_to_name={ + "whale": "WHALE", + } + ), + StrSchema + ): + + @classmethod + @property + def WHALE(cls): + return cls._enum_by_value["whale"]("whale") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + className: className, + hasBaleen: typing.Union[hasBaleen, Unset] = unset, + hasTeeth: typing.Union[hasTeeth, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + className=className, + hasBaleen=hasBaleen, + hasTeeth=hasTeeth, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py new file mode 100644 index 000000000000..8a5ef4550d78 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py @@ -0,0 +1,137 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +from decimal import Decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Zebra( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + type (str,): + className (str,): + _additional_properties (Schema): the definition used for additional properties + that are not defined in _properties + """ + _required_property_names = set(( + 'className', + )) + + + class type( + _SchemaEnumMaker( + enum_value_to_name={ + "plains": "PLAINS", + "mountain": "MOUNTAIN", + "grevys": "GREVYS", + } + ), + StrSchema + ): + + @classmethod + @property + def PLAINS(cls): + return cls._enum_by_value["plains"]("plains") + + @classmethod + @property + def MOUNTAIN(cls): + return cls._enum_by_value["mountain"]("mountain") + + @classmethod + @property + def GREVYS(cls): + return cls._enum_by_value["grevys"]("grevys") + + + class className( + _SchemaEnumMaker( + enum_value_to_name={ + "zebra": "ZEBRA", + } + ), + StrSchema + ): + + @classmethod + @property + def ZEBRA(cls): + return cls._enum_by_value["zebra"]("zebra") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + className: className, + type: typing.Union[type, Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ): + return super().__new__( + cls, + *args, + className=className, + type=type, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py new file mode 100644 index 000000000000..9d3b94558c88 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +# flake8: noqa + +# import all models into this package +# 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 +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from petstore_api.model.additional_properties_class import AdditionalPropertiesClass +from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums +from petstore_api.model.address import Address +from petstore_api.model.animal import Animal +from petstore_api.model.animal_farm import AnimalFarm +from petstore_api.model.api_response import ApiResponse +from petstore_api.model.apple import Apple +from petstore_api.model.apple_req import AppleReq +from petstore_api.model.array_holding_any_type import ArrayHoldingAnyType +from petstore_api.model.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly +from petstore_api.model.array_of_enums import ArrayOfEnums +from petstore_api.model.array_of_number_only import ArrayOfNumberOnly +from petstore_api.model.array_test import ArrayTest +from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems +from petstore_api.model.banana import Banana +from petstore_api.model.banana_req import BananaReq +from petstore_api.model.bar import Bar +from petstore_api.model.basque_pig import BasquePig +from petstore_api.model.boolean import Boolean +from petstore_api.model.boolean_enum import BooleanEnum +from petstore_api.model.capitalization import Capitalization +from petstore_api.model.cat import Cat +from petstore_api.model.cat_all_of import CatAllOf +from petstore_api.model.category import Category +from petstore_api.model.child_cat import ChildCat +from petstore_api.model.child_cat_all_of import ChildCatAllOf +from petstore_api.model.class_model import ClassModel +from petstore_api.model.client import Client +from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral +from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf +from petstore_api.model.composed_any_of_different_types_no_validations import ComposedAnyOfDifferentTypesNoValidations +from petstore_api.model.composed_array import ComposedArray +from petstore_api.model.composed_bool import ComposedBool +from petstore_api.model.composed_none import ComposedNone +from petstore_api.model.composed_number import ComposedNumber +from petstore_api.model.composed_object import ComposedObject +from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes +from petstore_api.model.composed_string import ComposedString +from petstore_api.model.danish_pig import DanishPig +from petstore_api.model.date_time_test import DateTimeTest +from petstore_api.model.date_time_with_validations import DateTimeWithValidations +from petstore_api.model.date_with_validations import DateWithValidations +from petstore_api.model.dog import Dog +from petstore_api.model.dog_all_of import DogAllOf +from petstore_api.model.drawing import Drawing +from petstore_api.model.enum_arrays import EnumArrays +from petstore_api.model.enum_class import EnumClass +from petstore_api.model.enum_test import EnumTest +from petstore_api.model.equilateral_triangle import EquilateralTriangle +from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf +from petstore_api.model.file import File +from petstore_api.model.file_schema_test_class import FileSchemaTestClass +from petstore_api.model.foo import Foo +from petstore_api.model.format_test import FormatTest +from petstore_api.model.fruit import Fruit +from petstore_api.model.fruit_req import FruitReq +from petstore_api.model.gm_fruit import GmFruit +from petstore_api.model.grandparent_animal import GrandparentAnimal +from petstore_api.model.has_only_read_only import HasOnlyReadOnly +from petstore_api.model.health_check_result import HealthCheckResult +from petstore_api.model.inline_response_default import InlineResponseDefault +from petstore_api.model.integer_enum import IntegerEnum +from petstore_api.model.integer_enum_big import IntegerEnumBig +from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue +from petstore_api.model.integer_enum_with_default_value import IntegerEnumWithDefaultValue +from petstore_api.model.integer_max10 import IntegerMax10 +from petstore_api.model.integer_min15 import IntegerMin15 +from petstore_api.model.isosceles_triangle import IsoscelesTriangle +from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf +from petstore_api.model.mammal import Mammal +from petstore_api.model.map_test import MapTest +from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass +from petstore_api.model.model200_response import Model200Response +from petstore_api.model.model_return import ModelReturn +from petstore_api.model.name import Name +from petstore_api.model.no_additional_properties import NoAdditionalProperties +from petstore_api.model.nullable_class import NullableClass +from petstore_api.model.nullable_shape import NullableShape +from petstore_api.model.nullable_string import NullableString +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_ref_props import ObjectModelWithRefProps +from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps +from petstore_api.model.object_with_validations import ObjectWithValidations +from petstore_api.model.order import Order +from petstore_api.model.parent_pet import ParentPet +from petstore_api.model.pet import Pet +from petstore_api.model.pig import Pig +from petstore_api.model.player import Player +from petstore_api.model.quadrilateral import Quadrilateral +from petstore_api.model.quadrilateral_interface import QuadrilateralInterface +from petstore_api.model.read_only_first import ReadOnlyFirst +from petstore_api.model.scalene_triangle import ScaleneTriangle +from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf +from petstore_api.model.shape import Shape +from petstore_api.model.shape_or_null import ShapeOrNull +from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral +from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf +from petstore_api.model.some_object import SomeObject +from petstore_api.model.special_model_name import SpecialModelName +from petstore_api.model.string import String +from petstore_api.model.string_boolean_map import StringBooleanMap +from petstore_api.model.string_enum import StringEnum +from petstore_api.model.string_enum_with_default_value import StringEnumWithDefaultValue +from petstore_api.model.string_with_validation import StringWithValidation +from petstore_api.model.tag import Tag +from petstore_api.model.triangle import Triangle +from petstore_api.model.triangle_interface import TriangleInterface +from petstore_api.model.user import User +from petstore_api.model.whale import Whale +from petstore_api.model.zebra import Zebra diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/rest.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/rest.py new file mode 100644 index 000000000000..7724b98a71c2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/rest.py @@ -0,0 +1,258 @@ +# 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 logging +import ssl +from urllib.parse import urlencode +import typing + +import certifi +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from petstore_api.exceptions import ApiException, ApiValueError + + +logger = logging.getLogger(__name__) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request( + self, + method: str, + url: str, + query_params: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if fields and body: + raise ApiValueError( + "body parameter cannot be used with fields parameter." + ) + + fields = fields or {} + headers = headers or {} + + if timeout: + if isinstance(timeout, (int, float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=False, + preload_content=not stream, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=True, + preload_content=not stream, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=not stream, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=not stream, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if not stream: + # log response body + logger.debug("response body: %s", r.data) + + return r + + def GET(self, url, headers=None, query_params=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + query_params=query_params, fields=fields) + + def HEAD(self, url, headers=None, query_params=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + query_params=query_params, fields=fields) + + def OPTIONS(self, url, headers=None, query_params=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def DELETE(self, url, headers=None, query_params=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def POST(self, url, headers=None, query_params=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PUT(self, url, headers=None, query_params=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PATCH(self, url, headers=None, query_params=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py new file mode 100644 index 000000000000..e230675efaa9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py @@ -0,0 +1,1994 @@ +# 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 collections import defaultdict +from datetime import date, datetime, timedelta # noqa: F401 +from dataclasses import dataclass +import functools +from decimal import Decimal +import io +import os +import re +import tempfile +import typing + +from dateutil.parser.isoparser import isoparser, _takes_ascii +from frozendict import frozendict + +from petstore_api.exceptions import ( + ApiTypeError, + ApiValueError, +) +from petstore_api.configuration import ( + Configuration, +) + + +class Unset(object): + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset = Unset() + +none_type = type(None) +file_type = io.IOBase + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + 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') + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is defaultdict(set) + """ + for k, v in u.items(): + d[k] = d[k].union(v) + return d + + +class InstantiationMetadata: + """ + A class to store metadata that is needed when instantiating OpenApi Schema subclasses + """ + def __init__( + self, + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), + from_server: bool = False, + configuration: typing.Optional[Configuration] = None, + base_classes: typing.FrozenSet[typing.Type] = frozenset(), + path_to_schemas: typing.Optional[typing.Dict[str, typing.Set[typing.Type]]] = None, + ): + """ + Args: + path_to_item: the path to the current data being instantiated. + For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) + from_server: whether or not this data came form the server + True when receiving server data + False when instantiating model with client side data not form the server + configuration: the Configuration instance to use + This is needed because in Configuration: + - one can disable validation checking + base_classes: when deserializing data that matches multiple schemas, this is used to store + the schemas that have been traversed. This is used to stop processing when a cycle is seen. + path_to_schemas: a dict that goes from path to a list of classes at each path location + """ + self.path_to_item = path_to_item + self.from_server = from_server + self.configuration = configuration + self.base_classes = base_classes + if path_to_schemas is None: + path_to_schemas = defaultdict(set) + self.path_to_schemas = path_to_schemas + + def __repr__(self): + return str(self.__dict__) + + def __eq__(self, other): + if not isinstance(other, InstantiationMetadata): + return False + return self.__dict__ == other.__dict__ + + +class ValidatorBase: + @staticmethod + def __is_json_validation_enabled(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + @staticmethod + def __raise_validation_error_message(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, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + @classmethod + def __check_str_validations(cls, + validations, input_values, + _instantiation_metadata: InstantiationMetadata): + + if (cls.__is_json_validation_enabled('maxLength', _instantiation_metadata.configuration) and + 'max_length' in validations and + len(input_values) > validations['max_length']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="length must be less than or equal to", + constraint_value=validations['max_length'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('minLength', _instantiation_metadata.configuration) and + 'min_length' in validations and + len(input_values) < validations['min_length']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="length must be greater than or equal to", + constraint_value=validations['min_length'], + path_to_item=_instantiation_metadata.path_to_item + ) + + checked_value = input_values + if (cls.__is_json_validation_enabled('pattern', _instantiation_metadata.configuration) and + 'regex' in validations): + for regex_dict in validations['regex']: + flags = regex_dict.get('flags', 0) + if not re.search(regex_dict['pattern'], checked_value, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must match regular expression", + constraint_value=regex_dict['pattern'], + path_to_item=_instantiation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must match regular expression", + constraint_value=regex_dict['pattern'], + path_to_item=_instantiation_metadata.path_to_item + ) + + @classmethod + def __check_tuple_validations( + cls, validations, input_values, + _instantiation_metadata: InstantiationMetadata): + + if (cls.__is_json_validation_enabled('maxItems', _instantiation_metadata.configuration) and + 'max_items' in validations and + len(input_values) > validations['max_items']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="number of items must be less than or equal to", + constraint_value=validations['max_items'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('minItems', _instantiation_metadata.configuration) and + 'min_items' in validations and + len(input_values) < validations['min_items']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="number of items must be greater than or equal to", + constraint_value=validations['min_items'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('uniqueItems', _instantiation_metadata.configuration) and + 'unique_items' in validations and validations['unique_items'] and input_values): + unique_items = [] + # print(validations) + for item in input_values: + if item not in unique_items: + unique_items.append(item) + if len(input_values) > len(unique_items): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=_instantiation_metadata.path_to_item + ) + + @classmethod + def __check_dict_validations( + cls, validations, input_values, + _instantiation_metadata: InstantiationMetadata): + + if (cls.__is_json_validation_enabled('maxProperties', _instantiation_metadata.configuration) and + 'max_properties' in validations and + len(input_values) > validations['max_properties']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="number of properties must be less than or equal to", + constraint_value=validations['max_properties'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('minProperties', _instantiation_metadata.configuration) and + 'min_properties' in validations and + len(input_values) < validations['min_properties']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=validations['min_properties'], + path_to_item=_instantiation_metadata.path_to_item + ) + + @classmethod + def __check_numeric_validations( + cls, validations, input_values, + _instantiation_metadata: InstantiationMetadata): + + if cls.__is_json_validation_enabled('multipleOf', + _instantiation_metadata.configuration) and 'multiple_of' in validations: + multiple_of_values = validations['multiple_of'] + for multiple_of_value in multiple_of_values: + if (isinstance(input_values, Decimal) and + not (float(input_values) / multiple_of_value).is_integer() + ): + # Note 'multipleOf' will be as good as the floating point arithmetic. + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of_value, + path_to_item=_instantiation_metadata.path_to_item + ) + + checking_max_or_min_values = {'exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum'}.isdisjoint(validations) is False + if not checking_max_or_min_values: + return + max_val = input_values + min_val = input_values + + if (cls.__is_json_validation_enabled('exclusiveMaximum', _instantiation_metadata.configuration) and + 'exclusive_maximum' in validations and + max_val >= validations['exclusive_maximum']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must be a value less than", + constraint_value=validations['exclusive_maximum'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('maximum', _instantiation_metadata.configuration) and + 'inclusive_maximum' in validations and + max_val > validations['inclusive_maximum']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must be a value less than or equal to", + constraint_value=validations['inclusive_maximum'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('exclusiveMinimum', _instantiation_metadata.configuration) and + 'exclusive_minimum' in validations and + min_val <= validations['exclusive_minimum']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must be a value greater than", + constraint_value=validations['exclusive_maximum'], + path_to_item=_instantiation_metadata.path_to_item + ) + + if (cls.__is_json_validation_enabled('minimum', _instantiation_metadata.configuration) and + 'inclusive_minimum' in validations and + min_val < validations['inclusive_minimum']): + cls.__raise_validation_error_message( + value=input_values, + constraint_msg="must be a value greater than or equal to", + constraint_value=validations['inclusive_minimum'], + path_to_item=_instantiation_metadata.path_to_item + ) + + @classmethod + def _check_validations_for_types( + cls, + validations, + input_values, + _instantiation_metadata: InstantiationMetadata + ): + if isinstance(input_values, str): + cls.__check_str_validations(validations, input_values, _instantiation_metadata) + elif isinstance(input_values, tuple): + cls.__check_tuple_validations(validations, input_values, _instantiation_metadata) + elif isinstance(input_values, frozendict): + cls.__check_dict_validations(validations, input_values, _instantiation_metadata) + elif isinstance(input_values, Decimal): + cls.__check_numeric_validations(validations, input_values, _instantiation_metadata) + try: + return super()._validate_validations_pass(input_values, _instantiation_metadata) + except AttributeError: + return True + + +class Validator(typing.Protocol): + def _validate_validations_pass( + cls, + input_values, + _instantiation_metadata: InstantiationMetadata + ): + pass + + +def _SchemaValidator(**validations: typing.Union[str, bool, None, int, float, list[dict[str, typing.Union[str, int, float]]]]) -> Validator: + class SchemaValidator(ValidatorBase): + @classmethod + def _validate_validations_pass( + cls, + input_values, + _instantiation_metadata: InstantiationMetadata + ): + cls._check_validations_for_types(validations, input_values, _instantiation_metadata) + try: + return super()._validate_validations_pass(input_values, _instantiation_metadata) + except AttributeError: + return True + + return SchemaValidator + + +class TypeChecker(typing.Protocol): + @classmethod + def _validate_type( + cls, arg_simple_class: type + ) -> typing.Tuple[type]: + pass + + +def _SchemaTypeChecker(union_type_cls: typing.Union[typing.Any]) -> TypeChecker: + if typing.get_origin(union_type_cls) is typing.Union: + union_classes = typing.get_args(union_type_cls) + else: + # note: when a union of a single class is passed in, the union disappears + union_classes = tuple([union_type_cls]) + """ + I want the type hint... union_type_cls + and to use it as a base class but when I do, I get + TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases + """ + class SchemaTypeChecker: + @classmethod + def _validate_type(cls, arg_simple_class: type): + if arg_simple_class not in union_classes: + return union_classes + try: + return super()._validate_type(arg_simple_class) + except AttributeError: + return tuple() + + return SchemaTypeChecker + + +class EnumMakerBase: + @classmethod + @property + def _enum_by_value( + cls + ) -> type: + enum_classes = {} + if not hasattr(cls, "_enum_value_to_name"): + return enum_classes + for enum_value, enum_name in cls._enum_value_to_name.items(): + base_class = type(enum_value) + if base_class is none_type: + enum_classes[enum_value] = get_new_class( + "Dynamic" + cls.__name__, (cls, NoneClass)) + log_cache_usage(get_new_class) + elif base_class is bool: + enum_classes[enum_value] = get_new_class( + "Dynamic" + cls.__name__, (cls, BoolClass)) + log_cache_usage(get_new_class) + else: + enum_classes[enum_value] = get_new_class( + "Dynamic" + cls.__name__, (cls, Singleton, base_class)) + log_cache_usage(get_new_class) + return enum_classes + + +class EnumMakerInterface(typing.Protocol): + @classmethod + @property + def _enum_value_to_name( + cls + ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]: + pass + + @classmethod + @property + def _enum_by_value( + cls + ) -> type: + pass + + +def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, Decimal, bool, none_type], str]) -> EnumMakerInterface: + class SchemaEnumMaker(EnumMakerBase): + @classmethod + @property + def _enum_value_to_name( + cls + ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]: + pass + try: + super_enum_value_to_name = super()._enum_value_to_name + except AttributeError: + return enum_value_to_name + intersection = dict(enum_value_to_name.items() & super_enum_value_to_name.items()) + return intersection + + return SchemaEnumMaker + + +class Singleton: + """ + Enums and singletons are the same + The same instance is returned for a given key of (cls, arg) + """ + # TODO use bidict to store this so boolean enums can move through it in reverse to get their own arg value? + _instances = {} + + def __new__(cls, *args, **kwargs): + if not args: + raise ValueError('arg must be passed') + arg = args[0] + key = (cls, arg) + if key not in cls._instances: + if arg in {None, True, False}: + inst = super().__new__(cls) + # inst._value = arg + cls._instances[key] = inst + else: + cls._instances[key] = super().__new__(cls, arg) + return cls._instances[key] + + def __repr__(self): + return '({}, {})'.format(self.__class__.__name__, self) + + +class NoneClass(Singleton): + @classmethod + @property + def NONE(cls): + return cls(None) + + def is_none(self) -> bool: + return True + + def __bool__(self) -> bool: + return False + + +class BoolClass(Singleton): + @classmethod + @property + def TRUE(cls): + return cls(True) + + @classmethod + @property + def FALSE(cls): + return cls(False) + + @functools.cache + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return key[1] + raise ValueError('Unable to find the boolean value of this instance') + + def is_true(self): + return bool(self) + + def is_false(self): + return bool(self) + + +class BoolBase: + pass + + +class NoneBase: + pass + + +class StrBase: + @property + def as_str(self) -> str: + return self + + @property + def as_date(self) -> date: + raise Exception('not implemented') + + @property + def as_datetime(self) -> datetime: + raise Exception('not implemented') + + +class CustomIsoparser(isoparser): + + @_takes_ascii + def parse_isodatetime(self, dt_str): + components, pos = self._parse_isodate(dt_str) + if len(dt_str) > pos: + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + components += self._parse_isotime(dt_str[pos + 1:]) + else: + raise ValueError('String contains unknown ISO components') + + if len(components) > 3 and components[3] == 24: + components[3] = 0 + return datetime(*components) + timedelta(days=1) + + if len(components) <= 3: + raise ValueError('Value is not a datetime') + + return datetime(*components) + + @_takes_ascii + def parse_isodate(self, datestr): + components, pos = self._parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return date(*components) + + +DEFAULT_ISOPARSER = CustomIsoparser() + + +class DateBase(StrBase): + @property + @functools.cache + def as_date(self) -> date: + return DEFAULT_ISOPARSER.parse_isodate(self) + + @classmethod + def _validate_format(cls, arg: typing.Optional[str], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, str): + try: + DEFAULT_ISOPARSER.parse_isodate(arg) + return True + except ValueError: + raise ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DateBase _validate + """ + cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata) + return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + +class DateTimeBase: + @property + @functools.cache + def as_datetime(self) -> datetime: + return DEFAULT_ISOPARSER.parse_isodatetime(self) + + @classmethod + def _validate_format(cls, arg: typing.Optional[str], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, str): + try: + DEFAULT_ISOPARSER.parse_isodatetime(arg) + return True + except ValueError: + raise ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DateTimeBase _validate + """ + cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata) + return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + +class NumberBase: + @property + def as_int(self) -> int: + try: + return self._as_int + except AttributeError: + """ + Note: for some numbers like 9.0 they could be represented as an + integer but our code chooses to store them as + >>> Decimal('9.0').as_tuple() + DecimalTuple(sign=0, digits=(9, 0), exponent=-1) + so we can tell that the value came from a float and convert it back to a float + during later serialization + """ + if self.as_tuple().exponent < 0: + # this could be represented as an integer but should be represented as a float + # because that's what it was serialized from + raise ApiValueError(f'{self} is not an integer') + self._as_int = int(self) + return self._as_int + + @property + def as_float(self) -> float: + try: + return self._as_float + except AttributeError: + if self.as_tuple().exponent >= 0: + raise ApiValueError(f'{self} is not an float') + self._as_float = float(self) + return self._as_float + + +class ListBase: + @classmethod + def _validate_items(cls, list_items, _instantiation_metadata: InstantiationMetadata): + """ + Ensures that: + - values passed in for items are valid + Exceptions will be raised if: + - invalid arguments were passed in + + Args: + list_items: the input list of items + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + + # if we have definitions for an items schema, use it + # otherwise accept anything + item_cls = getattr(cls, '_items', AnyTypeSchema) + path_to_schemas = defaultdict(set) + for i, value in enumerate(list_items): + if isinstance(value, item_cls): + continue + item_instantiation_metadata = InstantiationMetadata( + from_server=_instantiation_metadata.from_server, + configuration=_instantiation_metadata.configuration, + path_to_item=_instantiation_metadata.path_to_item+(i,) + ) + other_path_to_schemas = item_cls._validate( + value, _instantiation_metadata=item_instantiation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + ListBase _validate + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + arg = args[0] + _path_to_schemas = super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + if not isinstance(arg, tuple): + return _path_to_schemas + if cls in _instantiation_metadata.base_classes: + # we have already moved through this class so stop here + return _path_to_schemas + _instantiation_metadata.base_classes |= frozenset({cls}) + other_path_to_schemas = cls._validate_items(arg, _instantiation_metadata=_instantiation_metadata) + update(_path_to_schemas, other_path_to_schemas) + return _path_to_schemas + + @classmethod + def _get_items(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + ''' + ListBase _get_items + ''' + _instantiation_metadata = InstantiationMetadata() if _instantiation_metadata is None else _instantiation_metadata + + list_items = args[0] + cast_items = [] + # if we have definitions for an items schema, use it + # otherwise accept anything + + cls_item_cls = getattr(cls, '_items', AnyTypeSchema) + for i, value in enumerate(list_items): + item_path_to_item = _instantiation_metadata.path_to_item+(i,) + if item_path_to_item in _instantiation_metadata.path_to_schemas: + item_cls = _instantiation_metadata.path_to_schemas[item_path_to_item] + else: + item_cls = cls_item_cls + + if isinstance(value, item_cls): + cast_items.append(value) + continue + item_instantiation_metadata = InstantiationMetadata( + configuration=_instantiation_metadata.configuration, + from_server=_instantiation_metadata.from_server, + path_to_item=item_path_to_item, + path_to_schemas=_instantiation_metadata.path_to_schemas, + ) + + if _instantiation_metadata.from_server: + new_value = item_cls._from_openapi_data(value, _instantiation_metadata=item_instantiation_metadata) + else: + new_value = item_cls(value, _instantiation_metadata=item_instantiation_metadata) + cast_items.append(new_value) + + return cast_items + + +class Discriminable: + @classmethod + def _ensure_discriminator_value_present(cls, disc_property_name: str, _instantiation_metadata: InstantiationMetadata, *args): + if not args or args and disc_property_name not in args[0]: + # The input data does not contain the discriminator property + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + if not hasattr(cls, '_discriminator'): + return None + disc = cls._discriminator + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + elif not hasattr(cls, '_composed_schemas'): + return None + # TODO stop traveling if a cycle is hit + for allof_cls in cls._composed_schemas['allOf']: + discriminated_cls = allof_cls._get_discriminated_class( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + for oneof_cls in cls._composed_schemas['oneOf']: + discriminated_cls = oneof_cls._get_discriminated_class( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + for anyof_cls in cls._composed_schemas['anyOf']: + discriminated_cls = anyof_cls._get_discriminated_class( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + + +class DictBase(Discriminable): + # subclass properties + _required_property_names = set() + + @classmethod + def _validate_arg_presence(cls, arg): + """ + Ensures that: + - all required arguments are passed in + - the input variable names are valid + - present in properties or + - accepted because additionalProperties exists + Exceptions will be raised if: + - invalid arguments were passed in + - a var_name is invalid if additionProperties == None and var_name not in _properties + - required properties were not passed in + + Args: + arg: the input dict + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + seen_required_properties = set() + invalid_arguments = [] + for property_name in arg: + if property_name in cls._required_property_names: + seen_required_properties.add(property_name) + elif property_name in cls._property_names: + continue + elif cls._additional_properties: + continue + else: + invalid_arguments.append(property_name) + missing_required_arguments = list(cls._required_property_names - seen_required_properties) + if missing_required_arguments: + missing_required_arguments.sort() + raise ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + if invalid_arguments: + invalid_arguments.sort() + raise ApiTypeError( + "{} was passed {} invalid argument{}: {}".format( + cls.__name__, + len(invalid_arguments), + "s" if len(invalid_arguments) > 1 else "", + invalid_arguments + ) + ) + + @classmethod + def _validate_args(cls, arg, _instantiation_metadata: InstantiationMetadata): + """ + Ensures that: + - values passed in for properties are valid + Exceptions will be raised if: + - invalid arguments were passed in + + Args: + arg: the input dict + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + path_to_schemas = defaultdict(set) + for property_name, value in arg.items(): + if property_name in cls._required_property_names or property_name in cls._property_names: + schema = getattr(cls, property_name) + elif cls._additional_properties: + schema = cls._additional_properties + else: + raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( + value, cls, _instantiation_metadata.path_to_item+(property_name,) + )) + if isinstance(value, schema): + continue + arg_instantiation_metadata = InstantiationMetadata( + from_server=_instantiation_metadata.from_server, + configuration=_instantiation_metadata.configuration, + path_to_item=_instantiation_metadata.path_to_item+(property_name,) + ) + other_path_to_schemas = schema._validate(value, _instantiation_metadata=arg_instantiation_metadata) + update(path_to_schemas, other_path_to_schemas) + _instantiation_metadata.path_to_schemas.update(arg_instantiation_metadata.path_to_schemas) + return path_to_schemas + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DictBase _validate + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + if args and isinstance(args[0], cls): + # an instance of the correct type was passed in + return {} + arg = args[0] + _path_to_schemas = super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + if not isinstance(arg, frozendict): + return _path_to_schemas + cls._validate_arg_presence(args[0]) + other_path_to_schemas = cls._validate_args(args[0], _instantiation_metadata=_instantiation_metadata) + update(_path_to_schemas, other_path_to_schemas) + try: + _discriminator = cls._discriminator + except AttributeError: + return _path_to_schemas + # discriminator exists + disc_prop_name = list(_discriminator.keys())[0] + cls._ensure_discriminator_value_present(disc_prop_name, _instantiation_metadata, *args) + discriminated_cls = cls._get_discriminated_class( + disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) + if discriminated_cls is None: + raise ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(_discriminator[disc_prop_name].keys()), + _instantiation_metadata.path_to_item + (disc_prop_name,) + ) + ) + if discriminated_cls in _instantiation_metadata.base_classes: + # we have already moved through this class so stop here + return _path_to_schemas + _instantiation_metadata.base_classes |= frozenset({cls}) + other_path_to_schemas = discriminated_cls._validate(*args, _instantiation_metadata=_instantiation_metadata) + update(_path_to_schemas, other_path_to_schemas) + return _path_to_schemas + + @classmethod + @property + def _additional_properties(cls): + return AnyTypeSchema + + @classmethod + @property + @functools.cache + def _property_names(cls): + property_names = set() + for var_name, var_value in cls.__dict__.items(): + # referenced models are classmethods + is_classmethod = type(var_value) is classmethod + if is_classmethod: + property_names.add(var_name) + continue + is_class = type(var_value) is type + if not is_class: + continue + if not issubclass(var_value, Schema): + continue + if var_name == '_additional_properties': + continue + property_names.add(var_name) + property_names = list(property_names) + property_names.sort() + return tuple(property_names) + + @classmethod + def _get_properties(cls, arg: typing.Dict[str, typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DictBase _get_properties, this is how properties are set + These values already passed validation + """ + dict_items = {} + # if we have definitions for property schemas convert values using it + # otherwise accept anything + + _instantiation_metadata = InstantiationMetadata() if _instantiation_metadata is None else _instantiation_metadata + + for property_name_js, value in arg.items(): + property_cls = getattr(cls, property_name_js, cls._additional_properties) + property_path_to_item = _instantiation_metadata.path_to_item+(property_name_js,) + stored_property_cls = _instantiation_metadata.path_to_schemas.get(property_path_to_item) + if stored_property_cls: + property_cls = stored_property_cls + + if isinstance(value, property_cls): + dict_items[property_name_js] = value + continue + + prop_instantiation_metadata = InstantiationMetadata( + configuration=_instantiation_metadata.configuration, + from_server=_instantiation_metadata.from_server, + path_to_item=property_path_to_item, + path_to_schemas=_instantiation_metadata.path_to_schemas, + ) + if _instantiation_metadata.from_server: + new_value = property_cls._from_openapi_data(value, _instantiation_metadata=prop_instantiation_metadata) + else: + new_value = property_cls(value, _instantiation_metadata=prop_instantiation_metadata) + dict_items[property_name_js] = new_value + return dict_items + + def __setattr__(self, name, value): + if not isinstance(self, FileIO): + raise AttributeError('property setting not supported on immutable instances') + + def __getattr__(self, name): + if isinstance(self, frozendict): + # if an attribute does not exist + try: + return self[name] + except KeyError as ex: + raise AttributeError(str(ex)) + # print(('non-frozendict __getattr__', name)) + return super().__getattr__(self, name) + + def __getattribute__(self, name): + # print(('__getattribute__', name)) + # if an attribute does exist (for example as a class property but not as an instance method) + try: + return self[name] + except (KeyError, TypeError): + return super().__getattribute__(name) + + +inheritable_primitive_types_set = {Decimal, str, tuple, frozendict, FileIO, bytes} + + +class Schema: + """ + the base class of all swagger/openapi schemas/models + + ensures that: + - payload passes required validations + - payload is of allowed types + - payload value is an allowed enum value + """ + + @staticmethod + def __get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, frozendict): + return frozendict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, bytes): + return bytes + elif isinstance(input_value, (io.FileIO, io.BufferedReader)): + return FileIO + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + return int + elif isinstance(input_value, float): + return float + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif isinstance(input_value, str): + return str + return type(input_value) + + @staticmethod + def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + @classmethod + def __type_error_message( + cls, var_value=None, var_name=None, valid_classes=None, key_type=None + ): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + @classmethod + def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): + error_msg = cls.__type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + @classmethod + def _class_by_base_class(cls, base_cls: type) -> type: + cls_name = "Dynamic"+cls.__name__ + if base_cls is bool: + new_cls = get_new_class(cls_name, (cls, BoolBase, BoolClass)) + elif base_cls is str: + new_cls = get_new_class(cls_name, (cls, StrBase, str)) + elif base_cls is Decimal: + new_cls = get_new_class(cls_name, (cls, NumberBase, Decimal)) + elif base_cls is tuple: + new_cls = get_new_class(cls_name, (cls, ListBase, tuple)) + elif base_cls is frozendict: + new_cls = get_new_class(cls_name, (cls, DictBase, frozendict)) + elif base_cls is none_type: + new_cls = get_new_class(cls_name, (cls, NoneBase, NoneClass)) + log_cache_usage(get_new_class) + return new_cls + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + Schema _validate + Runs all schema validation logic and + returns a dynamic class of different bases depending upon the input + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Use cases: + 1. inheritable type: string/Decimal/frozendict/tuple + 2. enum value cases: 'hi', 1 -> no base_class set because the enum includes the base class + 3. uninheritable type: True/False/None -> no base_class because the base class is not inheritable + _enum_by_value will handle this use case + + Required Steps: + 1. verify type of input is valid vs the allowed _types + 2. check validations that are applicable for this type of input + 3. if enums exist, check that the value exists in the enum + + Returns: + path_to_schemas: a map of path to schemas + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + arg = args[0] + + base_class = cls.__get_simple_class(arg) + failed_type_check_classes = cls._validate_type(base_class) + if failed_type_check_classes: + raise cls.__get_type_error( + arg, + _instantiation_metadata.path_to_item, + failed_type_check_classes, + key_type=False, + ) + if hasattr(cls, '_validate_validations_pass'): + cls._validate_validations_pass(arg, _instantiation_metadata) + path_to_schemas = defaultdict(set) + path_to_schemas[_instantiation_metadata.path_to_item].add(cls) + + if hasattr(cls, "_enum_by_value"): + cls._validate_enum_value(arg) + return path_to_schemas + + if base_class is none_type or base_class is bool: + return path_to_schemas + + path_to_schemas[_instantiation_metadata.path_to_item].add(base_class) + return path_to_schemas + + @classmethod + def _validate_enum_value(cls, arg): + try: + cls._enum_by_value[arg] + except KeyError: + raise ApiValueError("Invalid value {} passed in to {}, {}".format(arg, cls, cls._enum_value_to_name)) + + @classmethod + def __get_new_cls(cls, arg, _instantiation_metadata: InstantiationMetadata): + """ + PATH 1 - make a new dynamic class and return an instance of that class + We are making an instance of cls, but instead of making cls + make a new class, new_cls + which includes dynamic bases including cls + return an instance of that new class + """ + if ( + _instantiation_metadata.path_to_schemas and + _instantiation_metadata.path_to_item in _instantiation_metadata.path_to_schemas): + chosen_new_cls = _instantiation_metadata.path_to_schemas[_instantiation_metadata.path_to_item] + # print('leaving __get_new_cls early for cls {} because path_to_schemas exists'.format(cls)) + # print(_instantiation_metadata.path_to_item) + # print(chosen_new_cls) + return chosen_new_cls + """ + Dict property + List Item Assignment Use cases: + 1. value is NOT an instance of the required schema class + the value is validated by _validate + _validate 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 + the value is NOT validated by _validate, _validate only checks that the instance is of the correct schema type + for this value, _validate does NOT return an entry for it in _path_to_schemas + and in list/dict _get_items,_get_properties the value will be directly assigned + because value is of the correct type, and validation was run earlier when the instance was created + """ + _path_to_schemas = cls._validate(arg, _instantiation_metadata=_instantiation_metadata) + from pprint import pprint + pprint(dict(_path_to_schemas)) + # loop through it make a new class for each entry + for path, schema_classes in _path_to_schemas.items(): + enum_schema = any( + hasattr(this_cls, '_enum_by_value') for this_cls in schema_classes) + inheritable_primitive_type = schema_classes.intersection(inheritable_primitive_types_set) + chosen_schema_classes = schema_classes + suffix = tuple() + if inheritable_primitive_type: + chosen_schema_classes = schema_classes - inheritable_primitive_types_set + if not enum_schema: + # include the inheritable_primitive_type + suffix = tuple(inheritable_primitive_type) + + if len(chosen_schema_classes) == 1 and not suffix: + mfg_cls = tuple(chosen_schema_classes)[0] + else: + x_schema = schema_descendents & chosen_schema_classes + if x_schema: + x_schema = x_schema.pop() + if any(c is not x_schema and issubclass(c, x_schema) for c in chosen_schema_classes): + # needed to not have a mro error in get_new_class + chosen_schema_classes.remove(x_schema) + used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix + mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) + + if inheritable_primitive_type and not enum_schema: + _instantiation_metadata.path_to_schemas[path] = mfg_cls + continue + + # Use case: value is None, True, False, or an enum value + # print('choosing enum class for path {} in arg {}'.format(path, arg)) + value = arg + for key in path[1:]: + value = value[key] + if hasattr(mfg_cls, '_enum_by_value'): + mfg_cls = mfg_cls._enum_by_value[value] + elif value in {True, False}: + mfg_cls = mfg_cls._class_by_base_class(bool) + elif value is None: + mfg_cls = mfg_cls._class_by_base_class(none_type) + else: + raise ApiValueError('Unhandled case value={} bases={}'.format(value, mfg_cls.__bases__)) + _instantiation_metadata.path_to_schemas[path] = mfg_cls + + return _instantiation_metadata.path_to_schemas[_instantiation_metadata.path_to_item] + + @classmethod + def __get_new_instance_without_conversion(cls, arg, _instantiation_metadata): + # PATH 2 - we have a Dynamic class and we are making an instance of it + if issubclass(cls, tuple): + items = cls._get_items(arg, _instantiation_metadata=_instantiation_metadata) + return super(Schema, cls).__new__(cls, items) + elif issubclass(cls, frozendict): + properties = cls._get_properties(arg, _instantiation_metadata=_instantiation_metadata) + return super(Schema, cls).__new__(cls, properties) + """ + str = openapi str, date, and datetime + Decimal = openapi int and float + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return super(Schema, cls).__new__(cls, arg) + + @classmethod + def _from_openapi_data( + cls, + arg: typing.Union[ + str, + date, + datetime, + int, + float, + Decimal, + bool, + None, + 'Schema', + dict, + frozendict, + tuple, + list, + io.FileIO, + io.BufferedReader, + bytes + ], + _instantiation_metadata: typing.Optional[InstantiationMetadata] + ): + arg = cast_to_allowed_types(arg, from_server=True) + _instantiation_metadata = InstantiationMetadata(from_server=True) if _instantiation_metadata is None else _instantiation_metadata + if not _instantiation_metadata.from_server: + raise ApiValueError( + 'from_server must be True in this code path, if you need it to be False, use cls()' + ) + new_cls = cls.__get_new_cls(arg, _instantiation_metadata) + new_inst = new_cls.__get_new_instance_without_conversion(arg, _instantiation_metadata) + return new_inst + + @staticmethod + def __get_input_dict(*args, **kwargs) -> frozendict: + input_dict = {} + if args and isinstance(args[0], (dict, frozendict)): + input_dict.update(args[0]) + if kwargs: + input_dict.update(kwargs) + return frozendict(input_dict) + + @staticmethod + 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, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + """ + Schema __new__ + + Args: + args (int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): the value + kwargs (str, int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): dict values + _instantiation_metadata: contains the needed from_server, configuration, path_to_item + """ + kwargs = cls.__remove_unsets(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] + else: + arg = cls.__get_input_dict(*args, **kwargs) + _instantiation_metadata = InstantiationMetadata() if _instantiation_metadata is None else _instantiation_metadata + if _instantiation_metadata.from_server: + raise ApiValueError( + 'from_server must be False in this code path, if you need it to be True, use cls._from_openapi_data()' + ) + arg = cast_to_allowed_types(arg, from_server=_instantiation_metadata.from_server) + new_cls = cls.__get_new_cls(arg, _instantiation_metadata) + return new_cls.__get_new_instance_without_conversion(arg, _instantiation_metadata) + + def __init__( + self, + *args: typing.Union[ + dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Union[ + dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset + ] + ): + """ + this is needed to fix 'Unexpected argument' warning in pycharm + this code does nothing because all Schema instances are immutable + this means that all input data is passed into and used in new, and after the new instance is made + no new attributes are assigned and init is not used + """ + pass + + +def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, int, float, None, frozendict, tuple, Schema]: + """ + from_server=False date, datetime -> str + int, float -> Decimal + StrSchema will convert that to bytes and remember the encoding when we pass in str input + """ + if isinstance(arg, (date, datetime)): + if not from_server: + return arg.isoformat() + # ApiTypeError will be thrown later by _validate_type + return arg + elif isinstance(arg, bool): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + return arg + elif isinstance(arg, Decimal): + return arg + elif isinstance(arg, int): + return Decimal(arg) + elif isinstance(arg, float): + decimal_from_float = Decimal(arg) + if decimal_from_float.as_integer_ratio()[1] == 1: + # 9.0 -> Decimal('9.0') + # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') + return Decimal(str(decimal_from_float)+'.0') + return decimal_from_float + elif isinstance(arg, str): + return arg + elif isinstance(arg, bytes): + return arg + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: + raise ApiValueError('Invalid file state; file is closed and must be open') + return arg + elif type(arg) is list or type(arg) is tuple: + return tuple([cast_to_allowed_types(item) for item in arg]) + elif type(arg) is dict or type(arg) is frozendict: + return frozendict({key: cast_to_allowed_types(val) for key, val in arg.items() if val is not unset}) + elif arg is None: + return arg + elif isinstance(arg, Schema): + return arg + raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class ComposedBase(Discriminable): + + @classmethod + def __get_allof_classes(cls, *args, _instantiation_metadata: InstantiationMetadata): + path_to_schemas = defaultdict(set) + for allof_cls in cls._composed_schemas['allOf']: + if allof_cls in _instantiation_metadata.base_classes: + continue + other_path_to_schemas = allof_cls._validate(*args, _instantiation_metadata=_instantiation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def __get_oneof_class( + cls, + *args, + discriminated_cls, + _instantiation_metadata: InstantiationMetadata, + path_to_schemas: typing.Dict[typing.Tuple, typing.Set[typing.Type[Schema]]] + ): + oneof_classes = [] + chosen_oneof_cls = None + original_base_classes = _instantiation_metadata.base_classes + new_base_classes = _instantiation_metadata.base_classes + path_to_schemas = defaultdict(set) + for oneof_cls in cls._composed_schemas['oneOf']: + if oneof_cls in path_to_schemas[_instantiation_metadata.path_to_item]: + oneof_classes.append(oneof_cls) + continue + if isinstance(args[0], oneof_cls): + # passed in instance is the correct type + chosen_oneof_cls = oneof_cls + oneof_classes.append(oneof_cls) + continue + _instantiation_metadata.base_classes = original_base_classes + try: + path_to_schemas = oneof_cls._validate(*args, _instantiation_metadata=_instantiation_metadata) + new_base_classes = _instantiation_metadata.base_classes + except (ApiValueError, ApiTypeError) as ex: + if discriminated_cls is not None and oneof_cls is discriminated_cls: + raise ex + continue + chosen_oneof_cls = oneof_cls + oneof_classes.append(oneof_cls) + if not oneof_classes: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the oneOf schemas matched the input data.".format(cls) + ) + elif len(oneof_classes) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. Multiple " + "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) + ) + _instantiation_metadata.base_classes = new_base_classes + return path_to_schemas + + @classmethod + def __get_anyof_classes( + cls, + *args, + discriminated_cls, + _instantiation_metadata: InstantiationMetadata + ): + anyof_classes = [] + chosen_anyof_cls = None + original_base_classes = _instantiation_metadata.base_classes + path_to_schemas = defaultdict(set) + for anyof_cls in cls._composed_schemas['anyOf']: + if anyof_cls in _instantiation_metadata.base_classes: + continue + if isinstance(args[0], anyof_cls): + # passed in instance is the correct type + chosen_anyof_cls = anyof_cls + anyof_classes.append(anyof_cls) + continue + + _instantiation_metadata.base_classes = original_base_classes + try: + other_path_to_schemas = anyof_cls._validate(*args, _instantiation_metadata=_instantiation_metadata) + except (ApiValueError, ApiTypeError) as ex: + if discriminated_cls is not None and anyof_cls is discriminated_cls: + raise ex + continue + original_base_classes = _instantiation_metadata.base_classes + chosen_anyof_cls = anyof_cls + anyof_classes.append(anyof_cls) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + ComposedBase _validate + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + if args and isinstance(args[0], Schema) and _instantiation_metadata.from_server is False: + if isinstance(args[0], cls): + # an instance of the correct type was passed in + return {} + raise ApiTypeError( + 'Incorrect type passed in, required type was {} and passed type was {} at {}'.format( + cls, + type(args[0]), + _instantiation_metadata.path_to_item + ) + ) + + # validation checking on types, validations, and enums + path_to_schemas = super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + _instantiation_metadata.base_classes |= frozenset({cls}) + + # process composed schema + _discriminator = getattr(cls, '_discriminator', None) + discriminated_cls = None + if _discriminator and args and isinstance(args[0], frozendict): + disc_property_name = list(_discriminator.keys())[0] + cls._ensure_discriminator_value_present(disc_property_name, _instantiation_metadata, *args) + # get discriminated_cls by looking at the dict in the current class + discriminated_cls = cls._get_discriminated_class( + disc_property_name=disc_property_name, disc_payload_value=args[0][disc_property_name]) + if discriminated_cls is None: + raise ApiValueError( + "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( + args[0][disc_property_name], + cls.__name__, + disc_property_name, + list(_discriminator[disc_property_name].keys()), + _instantiation_metadata.path_to_item + (disc_property_name,) + ) + ) + + if cls._composed_schemas['allOf']: + other_path_to_schemas = cls.__get_allof_classes(*args, _instantiation_metadata=_instantiation_metadata) + update(path_to_schemas, other_path_to_schemas) + if cls._composed_schemas['oneOf']: + other_path_to_schemas = cls.__get_oneof_class( + *args, + discriminated_cls=discriminated_cls, + _instantiation_metadata=_instantiation_metadata, + path_to_schemas=path_to_schemas + ) + update(path_to_schemas, other_path_to_schemas) + if cls._composed_schemas['anyOf']: + other_path_to_schemas = cls.__get_anyof_classes( + *args, + discriminated_cls=discriminated_cls, + _instantiation_metadata=_instantiation_metadata + ) + update(path_to_schemas, other_path_to_schemas) + + if discriminated_cls is not None: + # TODO use an exception from this package here + assert discriminated_cls in path_to_schemas[_instantiation_metadata.path_to_item] + return path_to_schemas + + +# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase +class ComposedSchema( + _SchemaTypeChecker(typing.Union[none_type, str, Decimal, bool, tuple, frozendict]), + ComposedBase, + DictBase, + ListBase, + NumberBase, + StrBase, + BoolBase, + NoneBase, + Schema +): + + # subclass properties + _composed_schemas = {} + + @classmethod + def _from_openapi_data(cls, *args: typing.Any, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs): + if not args: + if not kwargs: + raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) + args = (kwargs, ) + return super()._from_openapi_data(args[0], _instantiation_metadata=_instantiation_metadata) + + +class ListSchema( + _SchemaTypeChecker(typing.Union[tuple]), + ListBase, + Schema +): + + @classmethod + def _from_openapi_data(cls, arg: typing.List[typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: typing.Union[list, tuple], **kwargs: InstantiationMetadata): + return super().__new__(cls, arg, **kwargs) + + +class NoneSchema( + _SchemaTypeChecker(typing.Union[none_type]), + NoneBase, + Schema +): + + @classmethod + def _from_openapi_data(cls, arg: None, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: None, **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class NumberSchema( + _SchemaTypeChecker(typing.Union[Decimal]), + NumberBase, + Schema +): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + + @classmethod + def _from_openapi_data(cls, arg: typing.Union[int, float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: typing.Union[Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class IntBase(NumberBase): + @property + def as_int(self) -> int: + try: + return self._as_int + except AttributeError: + self._as_int = int(self) + return self._as_int + + @classmethod + def _validate_format(cls, arg: typing.Optional[Decimal], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, Decimal): + exponent = arg.as_tuple().exponent + if exponent != 0: + raise ApiValueError( + "Invalid value '{}' for type integer at {}".format(arg, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + IntBase _validate + TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only + """ + cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata) + return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + +class IntSchema(IntBase, NumberSchema): + + @classmethod + def _from_openapi_data(cls, arg: int, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: typing.Union[Decimal, int], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class Int32Schema( + _SchemaValidator( + inclusive_minimum=Decimal(-2147483648), + inclusive_maximum=Decimal(2147483647) + ), + IntSchema +): + pass + +class Int64Schema( + _SchemaValidator( + inclusive_minimum=Decimal(-9223372036854775808), + inclusive_maximum=Decimal(9223372036854775807) + ), + IntSchema +): + pass + + +class Float32Schema( + _SchemaValidator( + inclusive_minimum=Decimal(-3.4028234663852886e+38), + inclusive_maximum=Decimal(3.4028234663852886e+38) + ), + NumberSchema +): + + @classmethod + def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + # todo check format + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + +class Float64Schema( + _SchemaValidator( + inclusive_minimum=Decimal(-1.7976931348623157E+308), + inclusive_maximum=Decimal(1.7976931348623157E+308) + ), + NumberSchema +): + + @classmethod + def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + # todo check format + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + +class StrSchema( + _SchemaTypeChecker(typing.Union[str]), + StrBase, + Schema +): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + + @classmethod + def _from_openapi_data(cls, arg: typing.Union[str], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None) -> 'StrSchema': + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: typing.Union[str, date, datetime], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class DateSchema(DateBase, StrSchema): + + def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class DateTimeSchema(DateTimeBase, StrSchema): + + def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class BytesSchema( + _SchemaTypeChecker(typing.Union[bytes]), + Schema, +): + """ + this class will subclass bytes and is immutable + """ + def __new__(cls, arg: typing.Union[bytes], **kwargs: typing.Union[InstantiationMetadata]): + return super(Schema, cls).__new__(cls, arg) + + +class FileSchema( + _SchemaTypeChecker(typing.Union[FileIO]), + Schema, +): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: typing.Union[InstantiationMetadata]): + return super(Schema, cls).__new__(cls, arg) + + +class BinaryBase: + pass + + +class BinarySchema( + _SchemaTypeChecker(typing.Union[bytes, FileIO]), + ComposedBase, + BinaryBase, + Schema, +): + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return { + 'allOf': [], + 'oneOf': [ + BytesSchema, + FileSchema, + ], + 'anyOf': [ + ], + } + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg) + + +class BoolSchema( + _SchemaTypeChecker(typing.Union[bool]), + BoolBase, + Schema +): + + @classmethod + def _from_openapi_data(cls, arg: bool, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, arg: bool, **kwargs: typing.Union[InstantiationMetadata]): + return super().__new__(cls, arg, **kwargs) + + +class AnyTypeSchema( + _SchemaTypeChecker( + typing.Union[frozendict, tuple, Decimal, str, bool, none_type, bytes, FileIO] + ), + DictBase, + ListBase, + NumberBase, + StrBase, + BoolBase, + NoneBase, + Schema +): + pass + + +class DictSchema( + _SchemaTypeChecker(typing.Union[frozendict]), + DictBase, + Schema +): + + @classmethod + def _from_openapi_data(cls, arg: typing.Dict[str, typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) + + def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]): + return super().__new__(cls, *args, **kwargs) + + +schema_descendents = set([NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema]) + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +@functools.cache +def get_new_class( + class_name: str, + bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] +) -> typing.Type[Schema]: + """ + Returns a new class that is made with the subclass bases + """ + return type(class_name, bases, {}) + + +LOG_CACHE_USAGE = False + + +def log_cache_usage(cache_fn): + if LOG_CACHE_USAGE: + print(cache_fn.__name__, cache_fn.cache_info()) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py new file mode 100644 index 000000000000..22b3bf2bf1d4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py @@ -0,0 +1,416 @@ +# 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 base64 import b64encode +from Crypto.IO import PEM, PKCS8 +from Crypto.Hash import SHA256, SHA512 +from Crypto.PublicKey import RSA, ECC +from Crypto.Signature import PKCS1_v1_5, pss, DSS +from email.utils import formatdate +import json +import os +import re +from time import time +from urllib.parse import urlencode, urlparse + +# The constants below define a subset of HTTP headers that can be included in the +# HTTP signature scheme. Additional headers may be included in the signature. + +# The '(request-target)' header is a calculated field that includes the HTTP verb, +# the URL path and the URL query. +HEADER_REQUEST_TARGET = '(request-target)' +# The time when the HTTP signature was generated. +HEADER_CREATED = '(created)' +# The time when the HTTP signature expires. The API server should reject HTTP requests +# that have expired. +HEADER_EXPIRES = '(expires)' +# The 'Host' header. +HEADER_HOST = 'Host' +# The 'Date' header. +HEADER_DATE = 'Date' +# When the 'Digest' header is included in the HTTP signature, the client automatically +# computes the digest of the HTTP request body, per RFC 3230. +HEADER_DIGEST = 'Digest' +# The 'Authorization' header is automatically generated by the client. It includes +# the list of signed headers and a base64-encoded signature. +HEADER_AUTHORIZATION = 'Authorization' + +# The constants below define the cryptographic schemes for the HTTP signature scheme. +SCHEME_HS2019 = 'hs2019' +SCHEME_RSA_SHA256 = 'rsa-sha256' +SCHEME_RSA_SHA512 = 'rsa-sha512' + +# The constants below define the signature algorithms that can be used for the HTTP +# signature scheme. +ALGORITHM_RSASSA_PSS = 'RSASSA-PSS' +ALGORITHM_RSASSA_PKCS1v15 = 'RSASSA-PKCS1-v1_5' + +ALGORITHM_ECDSA_MODE_FIPS_186_3 = 'fips-186-3' +ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 = 'deterministic-rfc6979' +ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS = { + ALGORITHM_ECDSA_MODE_FIPS_186_3, + ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 +} + +# The cryptographic hash algorithm for the message signature. +HASH_SHA256 = 'sha256' +HASH_SHA512 = 'sha512' + + +class HttpSigningConfiguration(object): + """The configuration parameters for the HTTP signature security scheme. + The HTTP signature security scheme is used to sign HTTP requests with a private key + which is in possession of the API client. + An 'Authorization' header is calculated by creating a hash of select headers, + and optionally the body of the HTTP request, then signing the hash value using + a private key. The 'Authorization' header is added to outbound HTTP requests. + + NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param key_id: A string value specifying the identifier of the cryptographic key, + when signing HTTP requests. + :param signing_scheme: A string value specifying the signature scheme, when + signing HTTP requests. + Supported value are hs2019, rsa-sha256, rsa-sha512. + Avoid using rsa-sha256, rsa-sha512 as they are deprecated. These values are + available for server-side applications that only support the older + HTTP signature algorithms. + :param private_key_path: A string value specifying the path of the file containing + a private key. The private key is used to sign HTTP requests. + :param private_key_passphrase: A string value specifying the passphrase to decrypt + the private key. + :param signed_headers: A list of strings. Each value is the name of a HTTP header + that must be included in the HTTP signature calculation. + The two special signature headers '(request-target)' and '(created)' SHOULD be + included in SignedHeaders. + The '(created)' header expresses when the signature was created. + The '(request-target)' header is a concatenation of the lowercased :method, an + ASCII space, and the :path pseudo-headers. + When signed_headers is not specified, the client defaults to a single value, + '(created)', in the list of HTTP headers. + When SignedHeaders contains the 'Digest' value, the client performs the + following operations: + 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. + 2. Set the 'Digest' header in the request body. + 3. Include the 'Digest' header and value in the HTTP signature. + :param signing_algorithm: A string value specifying the signature algorithm, when + signing HTTP requests. + Supported values are: + 1. For RSA keys: RSASSA-PSS, RSASSA-PKCS1-v1_5. + 2. For ECDSA keys: fips-186-3, deterministic-rfc6979. + If None, the signing algorithm is inferred from the private key. + The default signing algorithm for RSA keys is RSASSA-PSS. + The default signing algorithm for ECDSA keys is fips-186-3. + :param hash_algorithm: The hash algorithm for the signature. Supported values are + sha256 and sha512. + If the signing_scheme is rsa-sha256, the hash algorithm must be set + to None or sha256. + If the signing_scheme is rsa-sha512, the hash algorithm must be set + to None or sha512. + :param signature_max_validity: The signature max validity, expressed as + a datetime.timedelta value. It must be a positive value. + """ + def __init__(self, key_id, signing_scheme, private_key_path, + private_key_passphrase=None, + signed_headers=None, + signing_algorithm=None, + hash_algorithm=None, + signature_max_validity=None): + self.key_id = key_id + if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}: + raise Exception("Unsupported security scheme: {0}".format(signing_scheme)) + self.signing_scheme = signing_scheme + if not os.path.exists(private_key_path): + raise Exception("Private key file does not exist") + self.private_key_path = private_key_path + self.private_key_passphrase = private_key_passphrase + self.signing_algorithm = signing_algorithm + self.hash_algorithm = hash_algorithm + if signing_scheme == SCHEME_RSA_SHA256: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA256 + elif self.hash_algorithm != HASH_SHA256: + raise Exception("Hash algorithm must be sha256 when security scheme is %s" % + SCHEME_RSA_SHA256) + elif signing_scheme == SCHEME_RSA_SHA512: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA512 + elif self.hash_algorithm != HASH_SHA512: + raise Exception("Hash algorithm must be sha512 when security scheme is %s" % + SCHEME_RSA_SHA512) + elif signing_scheme == SCHEME_HS2019: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA256 + elif self.hash_algorithm not in {HASH_SHA256, HASH_SHA512}: + raise Exception("Invalid hash algorithm") + if signature_max_validity is not None and signature_max_validity.total_seconds() < 0: + raise Exception("The signature max validity must be a positive value") + self.signature_max_validity = signature_max_validity + # If the user has not provided any signed_headers, the default must be set to '(created)', + # as specified in the 'HTTP signature' standard. + if signed_headers is None or len(signed_headers) == 0: + signed_headers = [HEADER_CREATED] + if self.signature_max_validity is None and HEADER_EXPIRES in signed_headers: + raise Exception( + "Signature max validity must be set when " + "'(expires)' signature parameter is specified") + if len(signed_headers) != len(set(signed_headers)): + raise Exception("Cannot have duplicates in the signed_headers parameter") + if HEADER_AUTHORIZATION in signed_headers: + raise Exception("'Authorization' header cannot be included in signed headers") + self.signed_headers = signed_headers + self.private_key = None + """The private key used to sign HTTP requests. + Initialized when the PEM-encoded private key is loaded from a file. + """ + self.host = None + """The host name, optionally followed by a colon and TCP port number. + """ + self._load_private_key() + + def get_http_signature_headers(self, resource_path, method, headers, body, query_params): + """Create a cryptographic message signature for the HTTP request and add the signed headers. + + :param resource_path : A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method, e.g. GET, POST. + :param headers: A dict containing the HTTP request headers. + :param body: The object representing the HTTP request body. + :param query_params: A string representing the HTTP request query parameters. + :return: A dict of HTTP headers that must be added to the outbound HTTP request. + """ + if method is None: + raise Exception("HTTP method must be set") + if resource_path is None: + raise Exception("Resource path must be set") + + signed_headers_list, request_headers_dict = self._get_signed_header_info( + resource_path, method, headers, body, query_params) + + header_items = [ + "{0}: {1}".format(key.lower(), value) for key, value in signed_headers_list] + string_to_sign = "\n".join(header_items) + + digest, digest_prefix = self._get_message_digest(string_to_sign.encode()) + b64_signed_msg = self._sign_digest(digest) + + request_headers_dict[HEADER_AUTHORIZATION] = self._get_authorization_header( + signed_headers_list, b64_signed_msg) + + return request_headers_dict + + def get_public_key(self): + """Returns the public key object associated with the private key. + """ + pubkey = None + if isinstance(self.private_key, RSA.RsaKey): + pubkey = self.private_key.publickey() + elif isinstance(self.private_key, ECC.EccKey): + pubkey = self.private_key.public_key() + return pubkey + + def _load_private_key(self): + """Load the private key used to sign HTTP requests. + The private key is used to sign HTTP requests as defined in + https://datatracker.ietf.org/doc/draft-cavage-http-signatures/. + """ + if self.private_key is not None: + return + with open(self.private_key_path, 'r') as f: + pem_data = f.read() + # Verify PEM Pre-Encapsulation Boundary + r = re.compile(r"\s*-----BEGIN (.*)-----\s+") + m = r.match(pem_data) + if not m: + raise ValueError("Not a valid PEM pre boundary") + pem_header = m.group(1) + if pem_header == 'RSA PRIVATE KEY': + self.private_key = RSA.importKey(pem_data, self.private_key_passphrase) + elif pem_header == 'EC PRIVATE KEY': + self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) + elif pem_header in {'PRIVATE KEY', 'ENCRYPTED PRIVATE KEY'}: + # Key is in PKCS8 format, which is capable of holding many different + # types of private keys, not just EC keys. + (key_binary, pem_header, is_encrypted) = \ + PEM.decode(pem_data, self.private_key_passphrase) + (oid, privkey, params) = \ + PKCS8.unwrap(key_binary, passphrase=self.private_key_passphrase) + if oid == '1.2.840.10045.2.1': + self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) + else: + raise Exception("Unsupported key: {0}. OID: {1}".format(pem_header, oid)) + else: + raise Exception("Unsupported key: {0}".format(pem_header)) + # Validate the specified signature algorithm is compatible with the private key. + if self.signing_algorithm is not None: + supported_algs = None + if isinstance(self.private_key, RSA.RsaKey): + supported_algs = {ALGORITHM_RSASSA_PSS, ALGORITHM_RSASSA_PKCS1v15} + elif isinstance(self.private_key, ECC.EccKey): + supported_algs = ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS + if supported_algs is not None and self.signing_algorithm not in supported_algs: + raise Exception( + "Signing algorithm {0} is not compatible with private key".format( + self.signing_algorithm)) + + def _get_signed_header_info(self, resource_path, method, headers, body, query_params): + """Build the HTTP headers (name, value) that need to be included in + the HTTP signature scheme. + + :param resource_path : A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method, e.g. GET, POST. + :param headers: A dict containing the HTTP request headers. + :param body: The object (e.g. a dict) representing the HTTP request body. + :param query_params: A string representing the HTTP request query parameters. + :return: A tuple containing two dict objects: + The first dict contains the HTTP headers that are used to calculate + the HTTP signature. + The second dict contains the HTTP headers that must be added to + the outbound HTTP request. + """ + + if body is None: + body = '' + else: + body = json.dumps(body) + + # Build the '(request-target)' HTTP signature parameter. + target_host = urlparse(self.host).netloc + target_path = urlparse(self.host).path + request_target = method.lower() + " " + target_path + resource_path + if query_params: + request_target += "?" + urlencode(query_params) + + # Get UNIX time, e.g. seconds since epoch, not including leap seconds. + now = time() + # Format date per RFC 7231 section-7.1.1.2. An example is: + # Date: Wed, 21 Oct 2015 07:28:00 GMT + cdate = formatdate(timeval=now, localtime=False, usegmt=True) + # The '(created)' value MUST be a Unix timestamp integer value. + # Subsecond precision is not supported. + created = int(now) + if self.signature_max_validity is not None: + expires = now + self.signature_max_validity.total_seconds() + + signed_headers_list = [] + request_headers_dict = {} + for hdr_key in self.signed_headers: + hdr_key = hdr_key.lower() + if hdr_key == HEADER_REQUEST_TARGET: + value = request_target + elif hdr_key == HEADER_CREATED: + value = '{0}'.format(created) + elif hdr_key == HEADER_EXPIRES: + value = '{0}'.format(expires) + elif hdr_key == HEADER_DATE.lower(): + value = cdate + request_headers_dict[HEADER_DATE] = '{0}'.format(cdate) + elif hdr_key == HEADER_DIGEST.lower(): + request_body = body.encode() + body_digest, digest_prefix = self._get_message_digest(request_body) + b64_body_digest = b64encode(body_digest.digest()) + value = digest_prefix + b64_body_digest.decode('ascii') + request_headers_dict[HEADER_DIGEST] = '{0}{1}'.format( + digest_prefix, b64_body_digest.decode('ascii')) + elif hdr_key == HEADER_HOST.lower(): + value = target_host + request_headers_dict[HEADER_HOST] = '{0}'.format(target_host) + else: + value = next((v for k, v in headers.items() if k.lower() == hdr_key), None) + if value is None: + raise Exception( + "Cannot sign HTTP request. " + "Request does not contain the '{0}' header".format(hdr_key)) + signed_headers_list.append((hdr_key, value)) + + return signed_headers_list, request_headers_dict + + def _get_message_digest(self, data): + """Calculates and returns a cryptographic digest of a specified HTTP request. + + :param data: The string representation of the date to be hashed with a cryptographic hash. + :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 + to generate the 'Digest' header as specified in RFC 3230. + """ + if self.hash_algorithm == HASH_SHA512: + digest = SHA512.new() + prefix = 'SHA-512=' + elif self.hash_algorithm == HASH_SHA256: + digest = SHA256.new() + prefix = 'SHA-256=' + else: + raise Exception("Unsupported hash algorithm: {0}".format(self.hash_algorithm)) + digest.update(data) + return digest, prefix + + def _sign_digest(self, digest): + """Signs a message digest with a private key specified in the signing_info. + + :param digest: A hashing object that contains the cryptographic digest of the HTTP request. + :return: A base-64 string representing the cryptographic signature of the input digest. + """ + sig_alg = self.signing_algorithm + if isinstance(self.private_key, RSA.RsaKey): + if sig_alg is None or sig_alg == ALGORITHM_RSASSA_PSS: + # RSASSA-PSS in Section 8.1 of RFC8017. + signature = pss.new(self.private_key).sign(digest) + elif sig_alg == ALGORITHM_RSASSA_PKCS1v15: + # RSASSA-PKCS1-v1_5 in Section 8.2 of RFC8017. + signature = PKCS1_v1_5.new(self.private_key).sign(digest) + else: + raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) + elif isinstance(self.private_key, ECC.EccKey): + if sig_alg is None: + sig_alg = ALGORITHM_ECDSA_MODE_FIPS_186_3 + if sig_alg in ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS: + # draft-ietf-httpbis-message-signatures-00 does not specify the ECDSA encoding. + # Issue: https://github.com/w3c-ccg/http-signatures/issues/107 + signature = DSS.new(key=self.private_key, mode=sig_alg, + encoding='der').sign(digest) + else: + raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) + else: + raise Exception("Unsupported private key: {0}".format(type(self.private_key))) + return b64encode(signature) + + def _get_authorization_header(self, signed_headers, signed_msg): + """Calculates and returns the value of the 'Authorization' header when signing HTTP requests. + + :param signed_headers : A list of tuples. Each value is the name of a HTTP header that + must be included in the HTTP signature calculation. + :param signed_msg: A base-64 encoded string representation of the signature. + :return: The string value of the 'Authorization' header, representing the signature + of the HTTP request. + """ + created_ts = None + expires_ts = None + for k, v in signed_headers: + if k == HEADER_CREATED: + created_ts = v + elif k == HEADER_EXPIRES: + expires_ts = v + lower_keys = [k.lower() for k, v in signed_headers] + headers_value = " ".join(lower_keys) + + auth_str = "Signature keyId=\"{0}\",algorithm=\"{1}\",".format( + self.key_id, self.signing_scheme) + if created_ts is not None: + auth_str = auth_str + "created={0},".format(created_ts) + if expires_ts is not None: + auth_str = auth_str + "expires={0},".format(expires_ts) + auth_str = auth_str + "headers=\"{0}\",signature=\"{1}\"".format( + headers_value, signed_msg.decode('ascii')) + + return auth_str diff --git a/samples/openapi3/client/petstore/python-experimental/requirements.txt b/samples/openapi3/client/petstore/python-experimental/requirements.txt new file mode 100644 index 000000000000..c9227e58a1be --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +frozendict >= 2.0.3 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/samples/openapi3/client/petstore/python-experimental/setup.cfg b/samples/openapi3/client/petstore/python-experimental/setup.cfg new file mode 100644 index 000000000000..11433ee875ab --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/samples/openapi3/client/petstore/python-experimental/setup.py b/samples/openapi3/client/petstore/python-experimental/setup.py new file mode 100644 index 000000000000..c0194e516366 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/setup.py @@ -0,0 +1,48 @@ +# 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 setuptools import setup, find_packages # noqa: H301 + +NAME = "petstore-api" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "urllib3 >= 1.15", + "certifi", + "python-dateutil", + "frozendict >= 2.0.3", + "pem>=19.3.0", + "pycryptodome>=3.9.0", +] + +setup( + name=NAME, + version=VERSION, + description="OpenAPI Petstore", + author="OpenAPI Generator community", + author_email="team@openapitools.org", + url="", + keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], + python_requires=">=3.9", + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + license="Apache-2.0", + long_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: \" \\ # noqa: E501 + """ +) diff --git a/samples/openapi3/client/petstore/python-experimental/test-requirements.txt b/samples/openapi3/client/petstore/python-experimental/test-requirements.txt new file mode 100644 index 000000000000..36d9b4fa7a8c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test-requirements.txt @@ -0,0 +1,4 @@ +pytest~=4.6.7 # needed for python 3.4 +pytest-cov>=2.8.1 +pytest-randomly==1.2.3 # needed for python 3.4 +pycryptodome>=3.9.0 diff --git a/samples/openapi3/client/petstore/python-experimental/test/__init__.py b/samples/openapi3/client/petstore/python-experimental/test/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py new file mode 100644 index 000000000000..442b5ed138a1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.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 sys +import unittest + +import petstore_api +from petstore_api.model.additional_properties_class import AdditionalPropertiesClass + + +class TestAdditionalPropertiesClass(unittest.TestCase): + """AdditionalPropertiesClass unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_AdditionalPropertiesClass(self): + """Test AdditionalPropertiesClass""" + # FIXME: construct object with mandatory attributes with example values + # model = AdditionalPropertiesClass() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py new file mode 100644 index 000000000000..076df41d63fc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.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 sys +import unittest + +import petstore_api +from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums + + +class TestAdditionalPropertiesWithArrayOfEnums(unittest.TestCase): + """AdditionalPropertiesWithArrayOfEnums unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_AdditionalPropertiesWithArrayOfEnums(self): + """Test AdditionalPropertiesWithArrayOfEnums""" + # FIXME: construct object with mandatory attributes with example values + # model = AdditionalPropertiesWithArrayOfEnums() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_address.py b/samples/openapi3/client/petstore/python-experimental/test/test_address.py new file mode 100644 index 000000000000..78d674007487 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_address.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 sys +import unittest + +import petstore_api +from petstore_api.model.address import Address + + +class TestAddress(unittest.TestCase): + """Address unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Address(self): + """Test Address""" + # FIXME: construct object with mandatory attributes with example values + # model = Address() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_animal.py b/samples/openapi3/client/petstore/python-experimental/test/test_animal.py new file mode 100644 index 000000000000..572450a9704b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_animal.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 sys +import unittest + +import petstore_api +from petstore_api.model.animal import Animal + + +class TestAnimal(unittest.TestCase): + """Animal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Animal(self): + """Test Animal""" + # FIXME: construct object with mandatory attributes with example values + # model = Animal() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py b/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py new file mode 100644 index 000000000000..3ee8615f57c8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.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 sys +import unittest + +import petstore_api +from petstore_api.model.animal_farm import AnimalFarm + + +class TestAnimalFarm(unittest.TestCase): + """AnimalFarm unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_AnimalFarm(self): + """Test AnimalFarm""" + # FIXME: construct object with mandatory attributes with example values + # model = AnimalFarm() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py new file mode 100644 index 000000000000..c58dfa6202bc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.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 unittest + +import petstore_api +from petstore_api.api.another_fake_api import AnotherFakeApi # noqa: E501 + + +class TestAnotherFakeApi(unittest.TestCase): + """AnotherFakeApi unit test stubs""" + + def setUp(self): + self.api = AnotherFakeApi() # noqa: E501 + + def tearDown(self): + pass + + def test_call_123_test_special_tags(self): + """Test case for call_123_test_special_tags + + To test special tags # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py new file mode 100644 index 000000000000..63dc0ede9b2b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_api_response.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 sys +import unittest + +import petstore_api +from petstore_api.model.api_response import ApiResponse + + +class TestApiResponse(unittest.TestCase): + """ApiResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ApiResponse(self): + """Test ApiResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ApiResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_apple.py b/samples/openapi3/client/petstore/python-experimental/test/test_apple.py new file mode 100644 index 000000000000..e8abc62ef046 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_apple.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 sys +import unittest + +import petstore_api +from petstore_api.model.apple import Apple + + +class TestApple(unittest.TestCase): + """Apple unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Apple(self): + """Test Apple""" + # FIXME: construct object with mandatory attributes with example values + # model = Apple() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py new file mode 100644 index 000000000000..38edc7a55daf --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.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 sys +import unittest + +import petstore_api +from petstore_api.model.apple_req import AppleReq + + +class TestAppleReq(unittest.TestCase): + """AppleReq unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_AppleReq(self): + """Test AppleReq""" + # FIXME: construct object with mandatory attributes with example values + # model = AppleReq() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py new file mode 100644 index 000000000000..cee2263dd67c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.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 sys +import unittest + +import petstore_api +from petstore_api.model.array_holding_any_type import ArrayHoldingAnyType + + +class TestArrayHoldingAnyType(unittest.TestCase): + """ArrayHoldingAnyType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ArrayHoldingAnyType(self): + """Test ArrayHoldingAnyType""" + # FIXME: construct object with mandatory attributes with example values + # model = ArrayHoldingAnyType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py new file mode 100644 index 000000000000..ebf1ad383672 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.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 sys +import unittest + +import petstore_api +from petstore_api.model.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly + + +class TestArrayOfArrayOfNumberOnly(unittest.TestCase): + """ArrayOfArrayOfNumberOnly unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ArrayOfArrayOfNumberOnly(self): + """Test ArrayOfArrayOfNumberOnly""" + # FIXME: construct object with mandatory attributes with example values + # model = ArrayOfArrayOfNumberOnly() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py new file mode 100644 index 000000000000..44a59bb5263f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.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 sys +import unittest + +import petstore_api +from petstore_api.model.array_of_enums import ArrayOfEnums + + +class TestArrayOfEnums(unittest.TestCase): + """ArrayOfEnums unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ArrayOfEnums(self): + """Test ArrayOfEnums""" + # FIXME: construct object with mandatory attributes with example values + # model = ArrayOfEnums() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py new file mode 100644 index 000000000000..21bffad3329d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.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 sys +import unittest + +import petstore_api +from petstore_api.model.array_of_number_only import ArrayOfNumberOnly + + +class TestArrayOfNumberOnly(unittest.TestCase): + """ArrayOfNumberOnly unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ArrayOfNumberOnly(self): + """Test ArrayOfNumberOnly""" + # FIXME: construct object with mandatory attributes with example values + # model = ArrayOfNumberOnly() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py new file mode 100644 index 000000000000..4528c568690b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_test.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 sys +import unittest + +import petstore_api +from petstore_api.model.array_test import ArrayTest + + +class TestArrayTest(unittest.TestCase): + """ArrayTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ArrayTest(self): + """Test ArrayTest""" + # FIXME: construct object with mandatory attributes with example values + # model = ArrayTest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py new file mode 100644 index 000000000000..95a19cba751e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.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 sys +import unittest + +import petstore_api +from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems + + +class TestArrayWithValidationsInItems(unittest.TestCase): + """ArrayWithValidationsInItems unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ArrayWithValidationsInItems(self): + """Test ArrayWithValidationsInItems""" + # FIXME: construct object with mandatory attributes with example values + # model = ArrayWithValidationsInItems() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_banana.py b/samples/openapi3/client/petstore/python-experimental/test/test_banana.py new file mode 100644 index 000000000000..77b1b2aaf304 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_banana.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 sys +import unittest + +import petstore_api +from petstore_api.model.banana import Banana + + +class TestBanana(unittest.TestCase): + """Banana unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Banana(self): + """Test Banana""" + # FIXME: construct object with mandatory attributes with example values + # model = Banana() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py new file mode 100644 index 000000000000..2bfbb9edb4c3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.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 sys +import unittest + +import petstore_api +from petstore_api.model.banana_req import BananaReq + + +class TestBananaReq(unittest.TestCase): + """BananaReq unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_BananaReq(self): + """Test BananaReq""" + # FIXME: construct object with mandatory attributes with example values + # model = BananaReq() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_bar.py b/samples/openapi3/client/petstore/python-experimental/test/test_bar.py new file mode 100644 index 000000000000..3d9429384675 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_bar.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 sys +import unittest + +import petstore_api +from petstore_api.model.bar import Bar + + +class TestBar(unittest.TestCase): + """Bar unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Bar(self): + """Test Bar""" + # FIXME: construct object with mandatory attributes with example values + # model = Bar() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py new file mode 100644 index 000000000000..4af8d8947cab --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.basque_pig import BasquePig + + +class TestBasquePig(unittest.TestCase): + """BasquePig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_BasquePig(self): + """Test BasquePig""" + # FIXME: construct object with mandatory attributes with example values + # model = BasquePig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py b/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py new file mode 100644 index 000000000000..c2e2faab188a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_boolean.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 sys +import unittest + +import petstore_api +from petstore_api.model.boolean import Boolean + + +class TestBoolean(unittest.TestCase): + """Boolean unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Boolean(self): + """Test Boolean""" + # FIXME: construct object with mandatory attributes with example values + # model = Boolean() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py new file mode 100644 index 000000000000..2d73bc707f55 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.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 sys +import unittest + +import petstore_api +from petstore_api.model.boolean_enum import BooleanEnum + + +class TestBooleanEnum(unittest.TestCase): + """BooleanEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_BooleanEnum(self): + """Test BooleanEnum""" + # FIXME: construct object with mandatory attributes with example values + # model = BooleanEnum() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py b/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py new file mode 100644 index 000000000000..8cb68360735a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.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 sys +import unittest + +import petstore_api +from petstore_api.model.capitalization import Capitalization + + +class TestCapitalization(unittest.TestCase): + """Capitalization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Capitalization(self): + """Test Capitalization""" + # FIXME: construct object with mandatory attributes with example values + # model = Capitalization() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_cat.py b/samples/openapi3/client/petstore/python-experimental/test/test_cat.py new file mode 100644 index 000000000000..7c2b75fe8af8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_cat.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 sys +import unittest + +import petstore_api +from petstore_api.model.cat import Cat + + +class TestCat(unittest.TestCase): + """Cat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Cat(self): + """Test Cat""" + # FIXME: construct object with mandatory attributes with example values + # model = Cat() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py new file mode 100644 index 000000000000..84ebd083410a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.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 sys +import unittest + +import petstore_api +from petstore_api.model.cat_all_of import CatAllOf + + +class TestCatAllOf(unittest.TestCase): + """CatAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_CatAllOf(self): + """Test CatAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = CatAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_category.py b/samples/openapi3/client/petstore/python-experimental/test/test_category.py new file mode 100644 index 000000000000..8f19639fb516 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_category.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 sys +import unittest + +import petstore_api +from petstore_api.model.category import Category + + +class TestCategory(unittest.TestCase): + """Category unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Category(self): + """Test Category""" + # FIXME: construct object with mandatory attributes with example values + # model = Category() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py new file mode 100644 index 000000000000..f4be6a52a8d4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.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 sys +import unittest + +import petstore_api +from petstore_api.model.child_cat import ChildCat + + +class TestChildCat(unittest.TestCase): + """ChildCat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ChildCat(self): + """Test ChildCat""" + # FIXME: construct object with mandatory attributes with example values + # model = ChildCat() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py new file mode 100644 index 000000000000..410ac2772ab7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.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 sys +import unittest + +import petstore_api +from petstore_api.model.child_cat_all_of import ChildCatAllOf + + +class TestChildCatAllOf(unittest.TestCase): + """ChildCatAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ChildCatAllOf(self): + """Test ChildCatAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = ChildCatAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py b/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py new file mode 100644 index 000000000000..6a472da41aeb --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_class_model.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 sys +import unittest + +import petstore_api +from petstore_api.model.class_model import ClassModel + + +class TestClassModel(unittest.TestCase): + """ClassModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ClassModel(self): + """Test ClassModel""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassModel() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_client.py b/samples/openapi3/client/petstore/python-experimental/test/test_client.py new file mode 100644 index 000000000000..70a26741f40f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_client.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 sys +import unittest + +import petstore_api +from petstore_api.model.client import Client + + +class TestClient(unittest.TestCase): + """Client unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Client(self): + """Test Client""" + # FIXME: construct object with mandatory attributes with example values + # model = Client() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py new file mode 100644 index 000000000000..95c686785215 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.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 sys +import unittest + +import petstore_api +from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral + + +class TestComplexQuadrilateral(unittest.TestCase): + """ComplexQuadrilateral unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComplexQuadrilateral(self): + """Test ComplexQuadrilateral""" + # FIXME: construct object with mandatory attributes with example values + # model = ComplexQuadrilateral() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py new file mode 100644 index 000000000000..96fdc5103f31 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.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 sys +import unittest + +import petstore_api +from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf + + +class TestComplexQuadrilateralAllOf(unittest.TestCase): + """ComplexQuadrilateralAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComplexQuadrilateralAllOf(self): + """Test ComplexQuadrilateralAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = ComplexQuadrilateralAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py new file mode 100644 index 000000000000..92263d139452 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_any_of_different_types_no_validations import ComposedAnyOfDifferentTypesNoValidations + + +class TestComposedAnyOfDifferentTypesNoValidations(unittest.TestCase): + """ComposedAnyOfDifferentTypesNoValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedAnyOfDifferentTypesNoValidations(self): + """Test ComposedAnyOfDifferentTypesNoValidations""" + # FIXME: construct object with mandatory attributes with example values + # model = ComposedAnyOfDifferentTypesNoValidations() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py new file mode 100644 index 000000000000..3e48ed79fe5a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_array import ComposedArray + + +class TestComposedArray(unittest.TestCase): + """ComposedArray unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedArray(self): + """Test ComposedArray""" + # FIXME: construct object with mandatory attributes with example values + # model = ComposedArray() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py new file mode 100644 index 000000000000..790edcc16d39 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_bool import ComposedBool + + +class TestComposedBool(unittest.TestCase): + """ComposedBool unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedBool(self): + """Test ComposedBool""" + # FIXME: construct object with mandatory attributes with example values + # model = ComposedBool() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py new file mode 100644 index 000000000000..65c7dd5adb91 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_none import ComposedNone + + +class TestComposedNone(unittest.TestCase): + """ComposedNone unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedNone(self): + """Test ComposedNone""" + # FIXME: construct object with mandatory attributes with example values + # model = ComposedNone() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py new file mode 100644 index 000000000000..66fdc3c591e0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_number import ComposedNumber + + +class TestComposedNumber(unittest.TestCase): + """ComposedNumber unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedNumber(self): + """Test ComposedNumber""" + # FIXME: construct object with mandatory attributes with example values + # model = ComposedNumber() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py new file mode 100644 index 000000000000..6212b89f9bc1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_object import ComposedObject + + +class TestComposedObject(unittest.TestCase): + """ComposedObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedObject(self): + """Test ComposedObject""" + # FIXME: construct object with mandatory attributes with example values + # model = ComposedObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py new file mode 100644 index 000000000000..b15712de301e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes + + +class TestComposedOneOfDifferentTypes(unittest.TestCase): + """ComposedOneOfDifferentTypes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedOneOfDifferentTypes(self): + """Test ComposedOneOfDifferentTypes""" + # FIXME: construct object with mandatory attributes with example values + # model = ComposedOneOfDifferentTypes() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py new file mode 100644 index 000000000000..2bfcf2f74d36 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_string import ComposedString + + +class TestComposedString(unittest.TestCase): + """ComposedString unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedString(self): + """Test ComposedString""" + # FIXME: construct object with mandatory attributes with example values + # model = ComposedString() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py new file mode 100644 index 000000000000..1a46253ed9f5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.danish_pig import DanishPig + + +class TestDanishPig(unittest.TestCase): + """DanishPig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_DanishPig(self): + """Test DanishPig""" + # FIXME: construct object with mandatory attributes with example values + # model = DanishPig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py new file mode 100644 index 000000000000..275b74c92a25 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.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 sys +import unittest + +import petstore_api +from petstore_api.model.date_time_test import DateTimeTest + + +class TestDateTimeTest(unittest.TestCase): + """DateTimeTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_DateTimeTest(self): + """Test DateTimeTest""" + # FIXME: construct object with mandatory attributes with example values + # model = DateTimeTest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py new file mode 100644 index 000000000000..0edf5c5e85be --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.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 sys +import unittest + +import petstore_api +from petstore_api.model.date_time_with_validations import DateTimeWithValidations + + +class TestDateTimeWithValidations(unittest.TestCase): + """DateTimeWithValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_DateTimeWithValidations(self): + """Test DateTimeWithValidations""" + # FIXME: construct object with mandatory attributes with example values + # model = DateTimeWithValidations() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py new file mode 100644 index 000000000000..866e5529225b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.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 sys +import unittest + +import petstore_api +from petstore_api.model.date_with_validations import DateWithValidations + + +class TestDateWithValidations(unittest.TestCase): + """DateWithValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_DateWithValidations(self): + """Test DateWithValidations""" + # FIXME: construct object with mandatory attributes with example values + # model = DateWithValidations() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py new file mode 100644 index 000000000000..caf174d6d4ba --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py @@ -0,0 +1,36 @@ +# 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.api.default_api import DefaultApi # noqa: E501 + + +class TestDefaultApi(unittest.TestCase): + """DefaultApi unit test stubs""" + + def setUp(self): + self.api = DefaultApi() # noqa: E501 + + def tearDown(self): + pass + + def test_foo_get(self): + """Test case for foo_get + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_dog.py b/samples/openapi3/client/petstore/python-experimental/test/test_dog.py new file mode 100644 index 000000000000..4643c7af8353 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_dog.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 sys +import unittest + +import petstore_api +from petstore_api.model.dog import Dog + + +class TestDog(unittest.TestCase): + """Dog unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Dog(self): + """Test Dog""" + # FIXME: construct object with mandatory attributes with example values + # model = Dog() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py new file mode 100644 index 000000000000..89526f7051f0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.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 sys +import unittest + +import petstore_api +from petstore_api.model.dog_all_of import DogAllOf + + +class TestDogAllOf(unittest.TestCase): + """DogAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_DogAllOf(self): + """Test DogAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = DogAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py b/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py new file mode 100644 index 000000000000..091d89c80e15 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_drawing.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 sys +import unittest + +import petstore_api +from petstore_api.model.drawing import Drawing + + +class TestDrawing(unittest.TestCase): + """Drawing unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Drawing(self): + """Test Drawing""" + # FIXME: construct object with mandatory attributes with example values + # model = Drawing() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py new file mode 100644 index 000000000000..0b7e553a7d16 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.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 sys +import unittest + +import petstore_api +from petstore_api.model.enum_arrays import EnumArrays + + +class TestEnumArrays(unittest.TestCase): + """EnumArrays unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_EnumArrays(self): + """Test EnumArrays""" + # FIXME: construct object with mandatory attributes with example values + # model = EnumArrays() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py new file mode 100644 index 000000000000..298c740defab --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.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 sys +import unittest + +import petstore_api +from petstore_api.model.enum_class import EnumClass + + +class TestEnumClass(unittest.TestCase): + """EnumClass unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_EnumClass(self): + """Test EnumClass""" + # FIXME: construct object with mandatory attributes with example values + # model = EnumClass() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py new file mode 100644 index 000000000000..2022b10d5d56 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.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 sys +import unittest + +import petstore_api +from petstore_api.model.enum_test import EnumTest + + +class TestEnumTest(unittest.TestCase): + """EnumTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_EnumTest(self): + """Test EnumTest""" + # FIXME: construct object with mandatory attributes with example values + # model = EnumTest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py new file mode 100644 index 000000000000..d85647271ce1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.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 sys +import unittest + +import petstore_api +from petstore_api.model.equilateral_triangle import EquilateralTriangle + + +class TestEquilateralTriangle(unittest.TestCase): + """EquilateralTriangle unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_EquilateralTriangle(self): + """Test EquilateralTriangle""" + # FIXME: construct object with mandatory attributes with example values + # model = EquilateralTriangle() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py new file mode 100644 index 000000000000..9651e4efd43f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.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 sys +import unittest + +import petstore_api +from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf + + +class TestEquilateralTriangleAllOf(unittest.TestCase): + """EquilateralTriangleAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_EquilateralTriangleAllOf(self): + """Test EquilateralTriangleAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = EquilateralTriangleAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py new file mode 100644 index 000000000000..abe26cc6c4da --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.api.fake_api import FakeApi # noqa: E501 + + +class TestFakeApi(unittest.TestCase): + """FakeApi unit test stubs""" + + def setUp(self): + self.api = FakeApi() # noqa: E501 + + def tearDown(self): + pass + + def test_additional_properties_with_array_of_enums(self): + """Test case for additional_properties_with_array_of_enums + + Additional Properties with Array of Enums # noqa: E501 + """ + pass + + def test_array_model(self): + """Test case for array_model + + """ + pass + + def test_array_of_enums(self): + """Test case for array_of_enums + + Array of Enums # noqa: E501 + """ + pass + + def test_body_with_file_schema(self): + """Test case for body_with_file_schema + + """ + pass + + def test_body_with_query_params(self): + """Test case for body_with_query_params + + """ + pass + + def test_boolean(self): + """Test case for boolean + + """ + pass + + def test_case_sensitive_params(self): + """Test case for case_sensitive_params + + """ + pass + + def test_client_model(self): + """Test case for client_model + + To test \"client\" model # noqa: E501 + """ + pass + + def test_composed_one_of_different_types(self): + """Test case for composed_one_of_different_types + + """ + pass + + def test_endpoint_parameters(self): + """Test case for endpoint_parameters + + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + """ + pass + + def test_enum_parameters(self): + """Test case for enum_parameters + + To test enum parameters # noqa: E501 + """ + pass + + def test_fake_health_get(self): + """Test case for fake_health_get + + Health check endpoint # noqa: E501 + """ + pass + + def test_group_parameters(self): + """Test case for group_parameters + + Fake endpoint to test group parameters (optional) # noqa: E501 + """ + pass + + def test_inline_additional_properties(self): + """Test case for inline_additional_properties + + test inline additionalProperties # noqa: E501 + """ + pass + + def test_json_form_data(self): + """Test case for json_form_data + + test json serialization of form data # noqa: E501 + """ + pass + + def test_mammal(self): + """Test case for mammal + + """ + pass + + def test_number_with_validations(self): + """Test case for number_with_validations + + """ + pass + + def test_object_model_with_ref_props(self): + """Test case for object_model_with_ref_props + + """ + pass + + def test_parameter_collisions(self): + """Test case for parameter_collisions + + parameter collision case # noqa: E501 + """ + pass + + def test_query_parameter_collection_format(self): + """Test case for query_parameter_collection_format + + """ + pass + + def test_string(self): + """Test case for string + + """ + pass + + def test_string_enum(self): + """Test case for string_enum + + """ + pass + + def test_upload_download_file(self): + """Test case for upload_download_file + + uploads a file and downloads a file using application/octet-stream # noqa: E501 + """ + pass + + def test_upload_file(self): + """Test case for upload_file + + uploads a file using multipart/form-data # noqa: E501 + """ + pass + + def test_upload_files(self): + """Test case for upload_files + + uploads files using multipart/form-data # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py new file mode 100644 index 000000000000..b7724aaed7d1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.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 unittest + +import petstore_api +from petstore_api.api.fake_classname_tags_123_api import FakeClassnameTags123Api # noqa: E501 + + +class TestFakeClassnameTags123Api(unittest.TestCase): + """FakeClassnameTags123Api unit test stubs""" + + def setUp(self): + self.api = FakeClassnameTags123Api() # noqa: E501 + + def tearDown(self): + pass + + def test_test_classname(self): + """Test case for test_classname + + To test class name in snake case # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_file.py b/samples/openapi3/client/petstore/python-experimental/test/test_file.py new file mode 100644 index 000000000000..7154338bc7a5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_file.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 sys +import unittest + +import petstore_api +from petstore_api.model.file import File + + +class TestFile(unittest.TestCase): + """File unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_File(self): + """Test File""" + # FIXME: construct object with mandatory attributes with example values + # model = File() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py new file mode 100644 index 000000000000..0b56063d59f6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.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 sys +import unittest + +import petstore_api +from petstore_api.model.file_schema_test_class import FileSchemaTestClass + + +class TestFileSchemaTestClass(unittest.TestCase): + """FileSchemaTestClass unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_FileSchemaTestClass(self): + """Test FileSchemaTestClass""" + # FIXME: construct object with mandatory attributes with example values + # model = FileSchemaTestClass() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_foo.py b/samples/openapi3/client/petstore/python-experimental/test/test_foo.py new file mode 100644 index 000000000000..69fbc69ba9e5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_foo.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 sys +import unittest + +import petstore_api +from petstore_api.model.foo import Foo + + +class TestFoo(unittest.TestCase): + """Foo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Foo(self): + """Test Foo""" + # FIXME: construct object with mandatory attributes with example values + # model = Foo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py new file mode 100644 index 000000000000..e5d081ceaa48 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_format_test.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 sys +import unittest + +import petstore_api +from petstore_api.model.format_test import FormatTest + + +class TestFormatTest(unittest.TestCase): + """FormatTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_FormatTest(self): + """Test FormatTest""" + # FIXME: construct object with mandatory attributes with example values + # model = FormatTest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py new file mode 100644 index 000000000000..43a58a870c30 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.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 sys +import unittest + +import petstore_api +from petstore_api.model.fruit import Fruit + + +class TestFruit(unittest.TestCase): + """Fruit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Fruit(self): + """Test Fruit""" + # FIXME: construct object with mandatory attributes with example values + # model = Fruit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py new file mode 100644 index 000000000000..3745b38f17ea --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.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 sys +import unittest + +import petstore_api +from petstore_api.model.fruit_req import FruitReq + + +class TestFruitReq(unittest.TestCase): + """FruitReq unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_FruitReq(self): + """Test FruitReq""" + # FIXME: construct object with mandatory attributes with example values + # model = FruitReq() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py new file mode 100644 index 000000000000..487e5275516e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.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 sys +import unittest + +import petstore_api +from petstore_api.model.gm_fruit import GmFruit + + +class TestGmFruit(unittest.TestCase): + """GmFruit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_GmFruit(self): + """Test GmFruit""" + # FIXME: construct object with mandatory attributes with example values + # model = GmFruit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py new file mode 100644 index 000000000000..8820ad5f253f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.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 sys +import unittest + +import petstore_api +from petstore_api.model.grandparent_animal import GrandparentAnimal + + +class TestGrandparentAnimal(unittest.TestCase): + """GrandparentAnimal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_GrandparentAnimal(self): + """Test GrandparentAnimal""" + # FIXME: construct object with mandatory attributes with example values + # model = GrandparentAnimal() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py new file mode 100644 index 000000000000..0019338c2bc7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.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 sys +import unittest + +import petstore_api +from petstore_api.model.has_only_read_only import HasOnlyReadOnly + + +class TestHasOnlyReadOnly(unittest.TestCase): + """HasOnlyReadOnly unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_HasOnlyReadOnly(self): + """Test HasOnlyReadOnly""" + # FIXME: construct object with mandatory attributes with example values + # model = HasOnlyReadOnly() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py b/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py new file mode 100644 index 000000000000..e654924727bc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.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 sys +import unittest + +import petstore_api +from petstore_api.model.health_check_result import HealthCheckResult + + +class TestHealthCheckResult(unittest.TestCase): + """HealthCheckResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_HealthCheckResult(self): + """Test HealthCheckResult""" + # FIXME: construct object with mandatory attributes with example values + # model = HealthCheckResult() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py new file mode 100644 index 000000000000..98b9b31821a7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.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 sys +import unittest + +import petstore_api +from petstore_api.model.inline_response_default import InlineResponseDefault + + +class TestInlineResponseDefault(unittest.TestCase): + """InlineResponseDefault unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_InlineResponseDefault(self): + """Test InlineResponseDefault""" + # FIXME: construct object with mandatory attributes with example values + # model = InlineResponseDefault() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py new file mode 100644 index 000000000000..b94fef7543a3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.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 sys +import unittest + +import petstore_api +from petstore_api.model.integer_enum import IntegerEnum + + +class TestIntegerEnum(unittest.TestCase): + """IntegerEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_IntegerEnum(self): + """Test IntegerEnum""" + # FIXME: construct object with mandatory attributes with example values + # model = IntegerEnum() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py new file mode 100644 index 000000000000..61052164aee9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.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 sys +import unittest + +import petstore_api +from petstore_api.model.integer_enum_big import IntegerEnumBig + + +class TestIntegerEnumBig(unittest.TestCase): + """IntegerEnumBig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_IntegerEnumBig(self): + """Test IntegerEnumBig""" + # FIXME: construct object with mandatory attributes with example values + # model = IntegerEnumBig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py new file mode 100644 index 000000000000..9c94769ef704 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.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 sys +import unittest + +import petstore_api +from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue + + +class TestIntegerEnumOneValue(unittest.TestCase): + """IntegerEnumOneValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_IntegerEnumOneValue(self): + """Test IntegerEnumOneValue""" + # FIXME: construct object with mandatory attributes with example values + # model = IntegerEnumOneValue() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py new file mode 100644 index 000000000000..bcdd005b2fb5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.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 sys +import unittest + +import petstore_api +from petstore_api.model.integer_enum_with_default_value import IntegerEnumWithDefaultValue + + +class TestIntegerEnumWithDefaultValue(unittest.TestCase): + """IntegerEnumWithDefaultValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_IntegerEnumWithDefaultValue(self): + """Test IntegerEnumWithDefaultValue""" + # FIXME: construct object with mandatory attributes with example values + # model = IntegerEnumWithDefaultValue() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py new file mode 100644 index 000000000000..9a982a0cb284 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.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 sys +import unittest + +import petstore_api +from petstore_api.model.integer_max10 import IntegerMax10 + + +class TestIntegerMax10(unittest.TestCase): + """IntegerMax10 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_IntegerMax10(self): + """Test IntegerMax10""" + # FIXME: construct object with mandatory attributes with example values + # model = IntegerMax10() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py new file mode 100644 index 000000000000..b54a5c3e1a1f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.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 sys +import unittest + +import petstore_api +from petstore_api.model.integer_min15 import IntegerMin15 + + +class TestIntegerMin15(unittest.TestCase): + """IntegerMin15 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_IntegerMin15(self): + """Test IntegerMin15""" + # FIXME: construct object with mandatory attributes with example values + # model = IntegerMin15() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py new file mode 100644 index 000000000000..00a236f55444 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.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 sys +import unittest + +import petstore_api +from petstore_api.model.isosceles_triangle import IsoscelesTriangle + + +class TestIsoscelesTriangle(unittest.TestCase): + """IsoscelesTriangle unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_IsoscelesTriangle(self): + """Test IsoscelesTriangle""" + # FIXME: construct object with mandatory attributes with example values + # model = IsoscelesTriangle() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py new file mode 100644 index 000000000000..ec2e16403f70 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.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 sys +import unittest + +import petstore_api +from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf + + +class TestIsoscelesTriangleAllOf(unittest.TestCase): + """IsoscelesTriangleAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_IsoscelesTriangleAllOf(self): + """Test IsoscelesTriangleAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = IsoscelesTriangleAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py b/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py new file mode 100644 index 000000000000..361f043de97d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_mammal.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 sys +import unittest + +import petstore_api +from petstore_api.model.mammal import Mammal + + +class TestMammal(unittest.TestCase): + """Mammal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Mammal(self): + """Test Mammal""" + # FIXME: construct object with mandatory attributes with example values + # model = Mammal() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py new file mode 100644 index 000000000000..7239da64e296 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_map_test.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 sys +import unittest + +import petstore_api +from petstore_api.model.map_test import MapTest + + +class TestMapTest(unittest.TestCase): + """MapTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_MapTest(self): + """Test MapTest""" + # FIXME: construct object with mandatory attributes with example values + # model = MapTest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py new file mode 100644 index 000000000000..8291a671896f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.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 sys +import unittest + +import petstore_api +from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass + + +class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase): + """MixedPropertiesAndAdditionalPropertiesClass unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_MixedPropertiesAndAdditionalPropertiesClass(self): + """Test MixedPropertiesAndAdditionalPropertiesClass""" + # FIXME: construct object with mandatory attributes with example values + # model = MixedPropertiesAndAdditionalPropertiesClass() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py new file mode 100644 index 000000000000..11caf2a0c0b5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.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 sys +import unittest + +import petstore_api +from petstore_api.model.model200_response import Model200Response + + +class TestModel200Response(unittest.TestCase): + """Model200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Model200Response(self): + """Test Model200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = Model200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py b/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py new file mode 100644 index 000000000000..61841ab2acb6 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_model_return.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 sys +import unittest + +import petstore_api +from petstore_api.model.model_return import ModelReturn + + +class TestModelReturn(unittest.TestCase): + """ModelReturn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ModelReturn(self): + """Test ModelReturn""" + # FIXME: construct object with mandatory attributes with example values + # model = ModelReturn() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_name.py b/samples/openapi3/client/petstore/python-experimental/test/test_name.py new file mode 100644 index 000000000000..67b92d6ef0d3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_name.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 sys +import unittest + +import petstore_api +from petstore_api.model.name import Name + + +class TestName(unittest.TestCase): + """Name unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Name(self): + """Test Name""" + # FIXME: construct object with mandatory attributes with example values + # model = Name() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py new file mode 100644 index 000000000000..a76654032454 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.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 sys +import unittest + +import petstore_api +from petstore_api.model.no_additional_properties import NoAdditionalProperties + + +class TestNoAdditionalProperties(unittest.TestCase): + """NoAdditionalProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_NoAdditionalProperties(self): + """Test NoAdditionalProperties""" + # FIXME: construct object with mandatory attributes with example values + # model = NoAdditionalProperties() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py new file mode 100644 index 000000000000..8eeb087512f4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.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 sys +import unittest + +import petstore_api +from petstore_api.model.nullable_class import NullableClass + + +class TestNullableClass(unittest.TestCase): + """NullableClass unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_NullableClass(self): + """Test NullableClass""" + # FIXME: construct object with mandatory attributes with example values + # model = NullableClass() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py new file mode 100644 index 000000000000..7126a23ed427 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.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 sys +import unittest + +import petstore_api +from petstore_api.model.nullable_shape import NullableShape + + +class TestNullableShape(unittest.TestCase): + """NullableShape unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_NullableShape(self): + """Test NullableShape""" + # FIXME: construct object with mandatory attributes with example values + # model = NullableShape() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py new file mode 100644 index 000000000000..fac8c8653bf2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.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 sys +import unittest + +import petstore_api +from petstore_api.model.nullable_string import NullableString + + +class TestNullableString(unittest.TestCase): + """NullableString unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_NullableString(self): + """Test NullableString""" + # FIXME: construct object with mandatory attributes with example values + # model = NullableString() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number.py b/samples/openapi3/client/petstore/python-experimental/test/test_number.py new file mode 100644 index 000000000000..9dff8542047a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_number.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 sys +import unittest + +import petstore_api +from petstore_api.model.number import Number + + +class TestNumber(unittest.TestCase): + """Number unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Number(self): + """Test Number""" + # FIXME: construct object with mandatory attributes with example values + # model = Number() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py new file mode 100644 index 000000000000..a1572ab7f9e5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_number_only.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 sys +import unittest + +import petstore_api +from petstore_api.model.number_only import NumberOnly + + +class TestNumberOnly(unittest.TestCase): + """NumberOnly unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_NumberOnly(self): + """Test NumberOnly""" + # FIXME: construct object with mandatory attributes with example values + # model = NumberOnly() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py new file mode 100644 index 000000000000..919d7c0d5a64 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.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 sys +import unittest + +import petstore_api +from petstore_api.model.number_with_validations import NumberWithValidations + + +class TestNumberWithValidations(unittest.TestCase): + """NumberWithValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_NumberWithValidations(self): + """Test NumberWithValidations""" + # FIXME: construct object with mandatory attributes with example values + # model = NumberWithValidations() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py new file mode 100644 index 000000000000..42994360b373 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.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 sys +import unittest + +import petstore_api +from petstore_api.model.object_interface import ObjectInterface + + +class TestObjectInterface(unittest.TestCase): + """ObjectInterface unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ObjectInterface(self): + """Test ObjectInterface""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectInterface() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py new file mode 100644 index 000000000000..6c8aaa4c9cf9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.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 sys +import unittest + +import petstore_api +from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps + + +class TestObjectModelWithRefProps(unittest.TestCase): + """ObjectModelWithRefProps unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ObjectModelWithRefProps(self): + """Test ObjectModelWithRefProps""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectModelWithRefProps() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py new file mode 100644 index 000000000000..6bd3ec317cd4 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py @@ -0,0 +1,55 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps + + +class TestObjectWithDifficultlyNamedProps(unittest.TestCase): + """ObjectWithDifficultlyNamedProps unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ObjectWithDifficultlyNamedProps(self): + """Test ObjectWithDifficultlyNamedProps""" + kwargs = { + '$special[property.name]': 1, + '123-list': '', + '123Number': 2, + } + model = ObjectWithDifficultlyNamedProps(**kwargs) + self.assertEqual(model['$special[property.name]'], 1) + self.assertEqual(model['123-list'], '') + self.assertEqual(model['123Number'], 2) + self.assertEqual(model, kwargs) + + # without the required argument, an exception is raised + optional_kwargs = { + '$special[property.name]': 1, + '123Number': 2, + } + with self.assertRaisesRegex( + petstore_api.ApiTypeError, + r"ObjectWithDifficultlyNamedProps is missing 1 required argument: ['123-list']" + ): + ObjectWithDifficultlyNamedProps(**optional_kwargs) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py new file mode 100644 index 000000000000..cfe0400fcee9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.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 sys +import unittest + +import petstore_api +from petstore_api.model.object_with_validations import ObjectWithValidations + + +class TestObjectWithValidations(unittest.TestCase): + """ObjectWithValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ObjectWithValidations(self): + """Test ObjectWithValidations""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectWithValidations() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_order.py b/samples/openapi3/client/petstore/python-experimental/test/test_order.py new file mode 100644 index 000000000000..9463845b34a2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_order.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 sys +import unittest + +import petstore_api +from petstore_api.model.order import Order + + +class TestOrder(unittest.TestCase): + """Order unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Order(self): + """Test Order""" + # FIXME: construct object with mandatory attributes with example values + # model = Order() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py b/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py new file mode 100644 index 000000000000..d1507e114f0c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_parent_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 sys +import unittest + +import petstore_api +from petstore_api.model.parent_pet import ParentPet + + +class TestParentPet(unittest.TestCase): + """ParentPet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ParentPet(self): + """Test ParentPet""" + # FIXME: construct object with mandatory attributes with example values + # model = ParentPet() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pet.py b/samples/openapi3/client/petstore/python-experimental/test/test_pet.py new file mode 100644 index 000000000000..dc34ae0012b9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/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 sys +import unittest + +import petstore_api +from petstore_api.model.pet import Pet + + +class TestPet(unittest.TestCase): + """Pet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Pet(self): + """Test Pet""" + # FIXME: construct object with mandatory attributes with example values + # model = Pet() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py new file mode 100644 index 000000000000..d545f497297a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py @@ -0,0 +1,93 @@ +# 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.api.pet_api import PetApi # noqa: E501 + + +class TestPetApi(unittest.TestCase): + """PetApi unit test stubs""" + + def setUp(self): + self.api = PetApi() # noqa: E501 + + def tearDown(self): + pass + + def test_add_pet(self): + """Test case for add_pet + + Add a new pet to the store # noqa: E501 + """ + pass + + def test_delete_pet(self): + """Test case for delete_pet + + Deletes a pet # noqa: E501 + """ + pass + + def test_find_pets_by_status(self): + """Test case for find_pets_by_status + + Finds Pets by status # noqa: E501 + """ + pass + + def test_find_pets_by_tags(self): + """Test case for find_pets_by_tags + + Finds Pets by tags # noqa: E501 + """ + pass + + def test_get_pet_by_id(self): + """Test case for get_pet_by_id + + Find pet by ID # noqa: E501 + """ + pass + + def test_update_pet(self): + """Test case for update_pet + + Update an existing pet # noqa: E501 + """ + pass + + def test_update_pet_with_form(self): + """Test case for update_pet_with_form + + Updates a pet in the store with form data # noqa: E501 + """ + pass + + def test_upload_file(self): + """Test case for upload_file + + uploads an image # noqa: E501 + """ + pass + + def test_upload_file_with_required_file(self): + """Test case for upload_file_with_required_file + + uploads an image (required) # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_pig.py new file mode 100644 index 000000000000..8c092a8465b1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_pig.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.pig import Pig + + +class TestPig(unittest.TestCase): + """Pig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Pig(self): + """Test Pig""" + # FIXME: construct object with mandatory attributes with example values + # model = Pig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_player.py b/samples/openapi3/client/petstore/python-experimental/test/test_player.py new file mode 100644 index 000000000000..ba15e0f576a0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_player.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 sys +import unittest + +import petstore_api +from petstore_api.model.player import Player + + +class TestPlayer(unittest.TestCase): + """Player unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Player(self): + """Test Player""" + # FIXME: construct object with mandatory attributes with example values + # model = Player() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py new file mode 100644 index 000000000000..cc0c203d2eaf --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.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 sys +import unittest + +import petstore_api +from petstore_api.model.quadrilateral import Quadrilateral + + +class TestQuadrilateral(unittest.TestCase): + """Quadrilateral unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Quadrilateral(self): + """Test Quadrilateral""" + # FIXME: construct object with mandatory attributes with example values + # model = Quadrilateral() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py new file mode 100644 index 000000000000..cec68e36cf53 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.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 sys +import unittest + +import petstore_api +from petstore_api.model.quadrilateral_interface import QuadrilateralInterface + + +class TestQuadrilateralInterface(unittest.TestCase): + """QuadrilateralInterface unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_QuadrilateralInterface(self): + """Test QuadrilateralInterface""" + # FIXME: construct object with mandatory attributes with example values + # model = QuadrilateralInterface() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py b/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py new file mode 100644 index 000000000000..d447437eb165 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.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 sys +import unittest + +import petstore_api +from petstore_api.model.read_only_first import ReadOnlyFirst + + +class TestReadOnlyFirst(unittest.TestCase): + """ReadOnlyFirst unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ReadOnlyFirst(self): + """Test ReadOnlyFirst""" + # FIXME: construct object with mandatory attributes with example values + # model = ReadOnlyFirst() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py new file mode 100644 index 000000000000..8df062169260 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.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 sys +import unittest + +import petstore_api +from petstore_api.model.scalene_triangle import ScaleneTriangle + + +class TestScaleneTriangle(unittest.TestCase): + """ScaleneTriangle unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ScaleneTriangle(self): + """Test ScaleneTriangle""" + # FIXME: construct object with mandatory attributes with example values + # model = ScaleneTriangle() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py new file mode 100644 index 000000000000..f81248b1517a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.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 sys +import unittest + +import petstore_api +from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf + + +class TestScaleneTriangleAllOf(unittest.TestCase): + """ScaleneTriangleAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ScaleneTriangleAllOf(self): + """Test ScaleneTriangleAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = ScaleneTriangleAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_shape.py b/samples/openapi3/client/petstore/python-experimental/test/test_shape.py new file mode 100644 index 000000000000..f34053a9bcb8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_shape.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 sys +import unittest + +import petstore_api +from petstore_api.model.shape import Shape + + +class TestShape(unittest.TestCase): + """Shape unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Shape(self): + """Test Shape""" + # FIXME: construct object with mandatory attributes with example values + # model = Shape() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py new file mode 100644 index 000000000000..ee182f6298cc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.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 sys +import unittest + +import petstore_api +from petstore_api.model.shape_or_null import ShapeOrNull + + +class TestShapeOrNull(unittest.TestCase): + """ShapeOrNull unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ShapeOrNull(self): + """Test ShapeOrNull""" + # FIXME: construct object with mandatory attributes with example values + # model = ShapeOrNull() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py new file mode 100644 index 000000000000..8a6ce429abf5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.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 sys +import unittest + +import petstore_api +from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral + + +class TestSimpleQuadrilateral(unittest.TestCase): + """SimpleQuadrilateral unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_SimpleQuadrilateral(self): + """Test SimpleQuadrilateral""" + # FIXME: construct object with mandatory attributes with example values + # model = SimpleQuadrilateral() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py new file mode 100644 index 000000000000..ad9d92251b40 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.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 sys +import unittest + +import petstore_api +from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf + + +class TestSimpleQuadrilateralAllOf(unittest.TestCase): + """SimpleQuadrilateralAllOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_SimpleQuadrilateralAllOf(self): + """Test SimpleQuadrilateralAllOf""" + # FIXME: construct object with mandatory attributes with example values + # model = SimpleQuadrilateralAllOf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py b/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py new file mode 100644 index 000000000000..f3b94113824d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_some_object.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 sys +import unittest + +import petstore_api +from petstore_api.model.some_object import SomeObject + + +class TestSomeObject(unittest.TestCase): + """SomeObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_SomeObject(self): + """Test SomeObject""" + # FIXME: construct object with mandatory attributes with example values + # model = SomeObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py b/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py new file mode 100644 index 000000000000..b74b45db1224 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.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 sys +import unittest + +import petstore_api +from petstore_api.model.special_model_name import SpecialModelName + + +class TestSpecialModelName(unittest.TestCase): + """SpecialModelName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_SpecialModelName(self): + """Test SpecialModelName""" + # FIXME: construct object with mandatory attributes with example values + # model = SpecialModelName() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py new file mode 100644 index 000000000000..3680a34b42a0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py @@ -0,0 +1,58 @@ +# 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.api.store_api import StoreApi # noqa: E501 + + +class TestStoreApi(unittest.TestCase): + """StoreApi unit test stubs""" + + def setUp(self): + self.api = StoreApi() # noqa: E501 + + def tearDown(self): + pass + + def test_delete_order(self): + """Test case for delete_order + + Delete purchase order by ID # noqa: E501 + """ + pass + + def test_get_inventory(self): + """Test case for get_inventory + + Returns pet inventories by status # noqa: E501 + """ + pass + + def test_get_order_by_id(self): + """Test case for get_order_by_id + + Find purchase order by ID # noqa: E501 + """ + pass + + def test_place_order(self): + """Test case for place_order + + Place an order for a pet # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_string.py new file mode 100644 index 000000000000..1c62f3606b8e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string.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 sys +import unittest + +import petstore_api +from petstore_api.model.string import String + + +class TestString(unittest.TestCase): + """String unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_String(self): + """Test String""" + # FIXME: construct object with mandatory attributes with example values + # model = String() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py new file mode 100644 index 000000000000..bf39e456cf0c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.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 sys +import unittest + +import petstore_api +from petstore_api.model.string_boolean_map import StringBooleanMap + + +class TestStringBooleanMap(unittest.TestCase): + """StringBooleanMap unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_StringBooleanMap(self): + """Test StringBooleanMap""" + # FIXME: construct object with mandatory attributes with example values + # model = StringBooleanMap() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py new file mode 100644 index 000000000000..c63cb8cba8fe --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.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 sys +import unittest + +import petstore_api +from petstore_api.model.string_enum import StringEnum + + +class TestStringEnum(unittest.TestCase): + """StringEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_StringEnum(self): + """Test StringEnum""" + # FIXME: construct object with mandatory attributes with example values + # model = StringEnum() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py new file mode 100644 index 000000000000..87073fe5be27 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.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 sys +import unittest + +import petstore_api +from petstore_api.model.string_enum_with_default_value import StringEnumWithDefaultValue + + +class TestStringEnumWithDefaultValue(unittest.TestCase): + """StringEnumWithDefaultValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_StringEnumWithDefaultValue(self): + """Test StringEnumWithDefaultValue""" + # FIXME: construct object with mandatory attributes with example values + # model = StringEnumWithDefaultValue() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py new file mode 100644 index 000000000000..338768440244 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.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 sys +import unittest + +import petstore_api +from petstore_api.model.string_with_validation import StringWithValidation + + +class TestStringWithValidation(unittest.TestCase): + """StringWithValidation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_StringWithValidation(self): + """Test StringWithValidation""" + # FIXME: construct object with mandatory attributes with example values + # model = StringWithValidation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_tag.py b/samples/openapi3/client/petstore/python-experimental/test/test_tag.py new file mode 100644 index 000000000000..a0325e55679f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_tag.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 sys +import unittest + +import petstore_api +from petstore_api.model.tag import Tag + + +class TestTag(unittest.TestCase): + """Tag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Tag(self): + """Test Tag""" + # FIXME: construct object with mandatory attributes with example values + # model = Tag() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py new file mode 100644 index 000000000000..e7978b7d1bf2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_triangle.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 sys +import unittest + +import petstore_api +from petstore_api.model.triangle import Triangle + + +class TestTriangle(unittest.TestCase): + """Triangle unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Triangle(self): + """Test Triangle""" + # FIXME: construct object with mandatory attributes with example values + # model = Triangle() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py new file mode 100644 index 000000000000..9e498660c0b0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.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 sys +import unittest + +import petstore_api +from petstore_api.model.triangle_interface import TriangleInterface + + +class TestTriangleInterface(unittest.TestCase): + """TriangleInterface unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_TriangleInterface(self): + """Test TriangleInterface""" + # FIXME: construct object with mandatory attributes with example values + # model = TriangleInterface() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_user.py b/samples/openapi3/client/petstore/python-experimental/test/test_user.py new file mode 100644 index 000000000000..8d6e394ecb3c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_user.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 sys +import unittest + +import petstore_api +from petstore_api.model.user import User + + +class TestUser(unittest.TestCase): + """User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_User(self): + """Test User""" + # FIXME: construct object with mandatory attributes with example values + # model = User() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py new file mode 100644 index 000000000000..abf57b0733da --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py @@ -0,0 +1,86 @@ +# 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.api.user_api import UserApi # noqa: E501 + + +class TestUserApi(unittest.TestCase): + """UserApi unit test stubs""" + + def setUp(self): + self.api = UserApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_user(self): + """Test case for create_user + + Create user # noqa: E501 + """ + pass + + def test_create_users_with_array_input(self): + """Test case for create_users_with_array_input + + Creates list of users with given input array # noqa: E501 + """ + pass + + def test_create_users_with_list_input(self): + """Test case for create_users_with_list_input + + Creates list of users with given input array # noqa: E501 + """ + pass + + def test_delete_user(self): + """Test case for delete_user + + Delete user # noqa: E501 + """ + pass + + def test_get_user_by_name(self): + """Test case for get_user_by_name + + Get user by user name # noqa: E501 + """ + pass + + def test_login_user(self): + """Test case for login_user + + Logs user into the system # noqa: E501 + """ + pass + + def test_logout_user(self): + """Test case for logout_user + + Logs out current logged in user session # noqa: E501 + """ + pass + + def test_update_user(self): + """Test case for update_user + + Updated user # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_whale.py b/samples/openapi3/client/petstore/python-experimental/test/test_whale.py new file mode 100644 index 000000000000..16cfebae3379 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_whale.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 sys +import unittest + +import petstore_api +from petstore_api.model.whale import Whale + + +class TestWhale(unittest.TestCase): + """Whale unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Whale(self): + """Test Whale""" + # FIXME: construct object with mandatory attributes with example values + # model = Whale() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py b/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py new file mode 100644 index 000000000000..dc53745dea55 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_zebra.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 sys +import unittest + +import petstore_api +from petstore_api.model.zebra import Zebra + + +class TestZebra(unittest.TestCase): + """Zebra unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Zebra(self): + """Test Zebra""" + # FIXME: construct object with mandatory attributes with example values + # model = Zebra() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test_python.sh b/samples/openapi3/client/petstore/python-experimental/test_python.sh new file mode 100755 index 000000000000..9728a9b53163 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test_python.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +REQUIREMENTS_FILE=dev-requirements.txt +REQUIREMENTS_OUT=dev-requirements.txt.log +SETUP_OUT=*.egg-info +VENV=venv +DEACTIVE=false + +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +### set virtualenv +if [ -z "$VENVV" ]; then + python3 -m venv $VENV + source $VENV/bin/activate + DEACTIVE=true +fi + +### install dependencies +pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT +### locally install the package, needed for pycharm problem checking +pip install -e . + +### run tests +tox || exit 1 + +### static analysis of code +#flake8 --show-source petstore_api/ + +### deactivate virtualenv +#if [ $DEACTIVE == true ]; then +# deactivate +#fi diff --git a/samples/openapi3/client/petstore/python-experimental/testfiles/1px_pic1.png b/samples/openapi3/client/petstore/python-experimental/testfiles/1px_pic1.png new file mode 100644 index 0000000000000000000000000000000000000000..7d3a386a21026f9b15b2c303a81f5c69333e9056 GIT binary patch literal 67 zcmeAS@N?(olHy`uVBq!ia0vp^j3CSbBp9sfW`_bPE>9Q7kcv6UzxWv#Ss9tmFVH&+ OlJ#`;b6Mw<&;$T@!wsPT literal 0 HcmV?d00001 diff --git a/samples/openapi3/client/petstore/python-experimental/testfiles/1px_pic2.png b/samples/openapi3/client/petstore/python-experimental/testfiles/1px_pic2.png new file mode 100644 index 0000000000000000000000000000000000000000..7d3a386a21026f9b15b2c303a81f5c69333e9056 GIT binary patch literal 67 zcmeAS@N?(olHy`uVBq!ia0vp^j3CSbBp9sfW`_bPE>9Q7kcv6UzxWv#Ss9tmFVH&+ OlJ#`;b6Mw<&;$T@!wsPT literal 0 HcmV?d00001 diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/__init__.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py new file mode 100644 index 000000000000..e3443becb141 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py @@ -0,0 +1,97 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.cat import Cat +from petstore_api.model.cat_all_of import CatAllOf +from petstore_api.model.dog import Dog +from petstore_api.model.dog_all_of import DogAllOf +from petstore_api.model.animal import Animal +from petstore_api.schemas import StrSchema, BoolSchema, frozendict + + +class TestAnimal(unittest.TestCase): + """Animal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnimal(self): + """Test Animal""" + + regex_err = ( + r"Invalid discriminator value was passed in to Animal.className " + r"Only the values \['Cat', 'Dog'\] are allowed at \('args\[0\]', 'className'\)" + ) + with self.assertRaisesRegex(petstore_api.ApiValueError, regex_err): + Animal(className='Fox', color='red') + + animal = Animal(className='Cat', color='black') + assert isinstance(animal, Animal) + assert isinstance(animal, frozendict) + assert isinstance(animal, Cat) + assert isinstance(animal, CatAllOf) + assert set(animal.keys()) == {'className', 'color'} + assert animal.className == 'Cat' + assert animal.color == 'black' + assert animal.__class__.color is StrSchema + assert animal.__class__.className is StrSchema + + # pass in optional param + animal = Animal(className='Cat', color='black', declawed=True) + assert isinstance(animal, Animal) + assert isinstance(animal, frozendict) + assert isinstance(animal, Cat) + assert isinstance(animal, CatAllOf) + assert set(animal.keys()) == {'className', 'color', 'declawed'} + assert animal.className == 'Cat' + assert animal.color == 'black' + assert bool(animal.declawed) is True + assert animal.__class__.color is StrSchema + assert animal.__class__.className is StrSchema + assert animal.__class__.declawed is BoolSchema + + # make a Dog + animal = Animal(className='Dog', color='black') + assert isinstance(animal, Animal) + assert isinstance(animal, frozendict) + assert isinstance(animal, Dog) + assert isinstance(animal, DogAllOf) + assert set(animal.keys()) == {'className', 'color'} + assert animal.className == 'Dog' + assert animal.color == 'black' + assert animal.__class__.color is StrSchema + assert animal.__class__.className is StrSchema + + # pass in optional param + animal = Animal(className='Dog', color='black', breed='Labrador') + assert isinstance(animal, Animal) + assert isinstance(animal, frozendict) + assert isinstance(animal, Dog) + assert isinstance(animal, DogAllOf) + assert set(animal.keys()) == {'className', 'color', 'breed'} + assert animal.className == 'Dog' + assert animal.color == 'black' + assert animal.breed == 'Labrador' + assert animal.__class__.color is StrSchema + assert animal.__class__.className is StrSchema + assert animal.__class__.breed is StrSchema + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py new file mode 100644 index 000000000000..e10f99b44bca --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py @@ -0,0 +1,273 @@ +# 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.schemas import ( + AnyTypeSchema, + DictSchema, + ListSchema, + StrSchema, + NumberSchema, + IntSchema, + BoolSchema, + NoneSchema, + DateSchema, + DateTimeSchema, + ComposedSchema, + frozendict, + Decimal, + NoneClass, + BoolClass +) + + +class TestAnyTypeSchema(unittest.TestCase): + + def testDictSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + DictSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model(a=1, b='hi') + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, DictSchema) + assert isinstance(m, frozendict) + assert m == frozendict(a=Decimal(1), b='hi') + + def testListSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + ListSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model([1, 'hi']) + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, ListSchema) + assert isinstance(m, tuple) + assert m == tuple([Decimal(1), 'hi']) + + def testStrSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + StrSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model('hi') + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, StrSchema) + assert isinstance(m, str) + assert m == 'hi' + + def testNumberSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + NumberSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model(1) + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, NumberSchema) + assert isinstance(m, Decimal) + assert m == Decimal(1) + + m = Model(3.14) + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, NumberSchema) + assert isinstance(m, Decimal) + assert m == Decimal(3.14) + + def testIntSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + IntSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model(1) + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, IntSchema) + assert isinstance(m, Decimal) + assert m == Decimal(1) + + with self.assertRaises(petstore_api.exceptions.ApiValueError): + # can't pass in float into Int + m = Model(3.14) + + def testBoolSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + BoolSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model(True) + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, BoolSchema) + assert isinstance(m, BoolClass) + self.assertTrue(m) + + m = Model(False) + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, BoolSchema) + assert isinstance(m, BoolClass) + self.assertFalse(m) + + def testNoneSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + NoneSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model(None) + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, NoneSchema) + assert isinstance(m, NoneClass) + self.assertTrue(m.is_none()) + + def testDateSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + DateSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model('1970-01-01') + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, DateSchema) + assert isinstance(m, str) + assert m == '1970-01-01' + + def testDateTimeSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + DateTimeSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model('2020-01-01T00:00:00') + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, DateTimeSchema) + assert isinstance(m, str) + assert m == '2020-01-01T00:00:00' + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_array_holding_any_type.py new file mode 100644 index 000000000000..6addb31d8fc2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_array_holding_any_type.py @@ -0,0 +1,64 @@ +# 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 sys +import unittest +from datetime import date, datetime, timezone + +import petstore_api +from petstore_api.model.array_holding_any_type import ArrayHoldingAnyType +from petstore_api.schemas import NoneClass, BoolClass + + +class TestArrayHoldingAnyType(unittest.TestCase): + """ArrayHoldingAnyType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testArrayHoldingAnyType(self): + """Test ArrayHoldingAnyType""" + + enum_values = [True, False] + for enum_value in enum_values: + inst = ArrayHoldingAnyType([enum_value]) + assert isinstance(inst, ArrayHoldingAnyType) + assert isinstance(inst, tuple) + assert isinstance(inst[0], BoolClass) + assert bool(inst[0]) is enum_value + + inst = ArrayHoldingAnyType([None]) + assert isinstance(inst, ArrayHoldingAnyType) + assert isinstance(inst, tuple) + assert isinstance(inst[0], NoneClass) + + input_to_stored_value = [ + (0, 0), + (3.14, 3.14), + (date(1970, 1, 1), '1970-01-01'), + (datetime(1970, 1, 1, 0, 0, 0), '1970-01-01T00:00:00'), + (datetime(1970, 1, 1, 0, 0, 0, tzinfo=timezone.utc), '1970-01-01T00:00:00+00:00'), + ([], ()), + ({}, {}), + ('hi', 'hi'), + ] + for input, stored_value in input_to_stored_value: + inst = ArrayHoldingAnyType([input]) + assert isinstance(inst, ArrayHoldingAnyType) + assert isinstance(inst, tuple) + assert inst[0] == stored_value + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_array_with_validations_in_items.py new file mode 100644 index 000000000000..1d3eccb68edd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_array_with_validations_in_items.py @@ -0,0 +1,52 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems + + +class TestArrayWithValidationsInItems(unittest.TestCase): + """ArrayWithValidationsInItems unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testArrayWithValidationsInItems(self): + """Test ArrayWithValidationsInItems""" + + valid_values = [-1, 5, 7] + for valid_value in valid_values: + inst = ArrayWithValidationsInItems([valid_value]) + assert isinstance(inst, ArrayWithValidationsInItems) + assert inst == (valid_value,) + + with self.assertRaisesRegex( + petstore_api.exceptions.ApiValueError, + r"Invalid value `8`, must be a value less than or equal to `7` at \('args\[0\]', 0\)" + ): + ArrayWithValidationsInItems([8]) + + with self.assertRaisesRegex( + petstore_api.exceptions.ApiValueError, + r"Invalid value `\(Decimal\('1'\), Decimal\('2'\), Decimal\('3'\)\)`, number of items must be less than or equal to `2` at \('args\[0\]',\)" + ): + ArrayWithValidationsInItems([1, 2, 3]) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_boolean_enum.py new file mode 100644 index 000000000000..b2080043ce25 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_boolean_enum.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import petstore_api +from petstore_api.model.boolean_enum import BooleanEnum + + +class TestBooleanEnum(unittest.TestCase): + """BooleanEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_BooleanEnum(self): + """Test BooleanEnum""" + # FIXME: construct object with mandatory attributes with example values + model = BooleanEnum(True) + model is BooleanEnum.TRUE + with self.assertRaises(petstore_api.ApiValueError): + BooleanEnum(False) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_object_schemas.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_object_schemas.py new file mode 100644 index 000000000000..cdbd7b1747cf --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_object_schemas.py @@ -0,0 +1,152 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.schemas import AnyTypeSchema, DictSchema, IntSchema, StrSchema, Float32Schema, DateSchema +from petstore_api.model.danish_pig import DanishPig +from petstore_api.model.basque_pig import BasquePig +from petstore_api.model.no_additional_properties import NoAdditionalProperties +from petstore_api.model.address import Address +from petstore_api.model.apple_req import AppleReq +from petstore_api.model.banana_req import BananaReq +from petstore_api.model.player import Player + +class TestCombineObjectSchemas(unittest.TestCase): + pass +# def test_invalid_combo_additional_properties_missing(self): +# regex_err = ( +# r"Cannot combine additionalProperties schemas from.+?DanishPig.+?and.+?NoAdditionalProperties.+?" +# r"in.+?Combo.+?because additionalProperties does not exist in both schemas" +# ) +# with self.assertRaisesRegex(petstore_api.ApiTypeError, regex_err): +# class Combo(DanishPig, NoAdditionalProperties): +# pass +# +# def test_invalid_combo_both_no_addprops(self): +# regex_err = ( +# r"Cannot combine schemas from.+?AppleReq.+?and.+?BananaReq.+?" +# r"in.+?Combo.+?because cultivar is missing from.+?BananaReq.+?" +# ) +# with self.assertRaisesRegex(petstore_api.ApiTypeError, regex_err): +# class Combo(AppleReq, BananaReq): +# pass +# +# def test_valid_no_addprops(self): +# class FirstSchema(DictSchema): +# +# +# class a(IntSchema): +# _validations = { +# 'inclusive_maximum': 20, +# } +# +# b = Float32Schema +# +# _additional_properties = None +# +# class SecondSchema(DictSchema): +# +# +# class a(IntSchema): +# _validations = { +# 'inclusive_minimum': 10, +# } +# +# b = Float32Schema +# +# _additional_properties = None +# +# class Combo(FirstSchema, SecondSchema): +# pass +# +# assert Combo._additional_properties is None +# self.assertEqual(Combo._property_names, ('a', 'b')) +# assert Combo.a._validations == { +# 'inclusive_maximum': 20, +# 'inclusive_minimum': 10, +# } +# assert Combo.b is Float32Schema +# +# +# def test_valid_combo_additional_properties_anytype_prim(self): +# class TwoPropsAndIntegerAddProp(DictSchema): +# a = StrSchema +# b = Float32Schema +# _additional_properties = IntSchema +# +# class OnePropAndAnyTypeAddProps(DictSchema): +# c = IntSchema +# _additional_properties = AnyTypeSchema +# +# class Combo(TwoPropsAndIntegerAddProp, OnePropAndAnyTypeAddProps): +# pass +# +# assert Combo._additional_properties is TwoPropsAndIntegerAddProp._additional_properties +# self.assertEqual(Combo._property_names, ('a', 'b', 'c')) +# assert Combo.a is TwoPropsAndIntegerAddProp.a +# assert Combo.b is TwoPropsAndIntegerAddProp.b +# assert Combo.c is OnePropAndAnyTypeAddProps.c +# +# def test_invalid_type_disagreement(self): +# class StrSchemaA(DictSchema): +# a = StrSchema +# _additional_properties = AnyTypeSchema +# +# class FloatSchemaA(DictSchema): +# a = Float32Schema +# _additional_properties = AnyTypeSchema +# +# regex_err = ( +# r"Cannot combine schemas.+?StrSchema.+?and.+?Float32Schema.+?" +# r"in.+?a.+?because their types do not intersect" +# ) +# with self.assertRaisesRegex(petstore_api.ApiTypeError, regex_err): +# class Combo(StrSchemaA, FloatSchemaA): +# pass +# +# def test_valid_combo_including_self_reference(self): +# +# class EnemyPlayerAndA(DictSchema): +# a = DateSchema +# +# class enemyPlayer(DictSchema): +# heightCm = IntSchema +# _additional_properties = AnyTypeSchema +# +# _additional_properties = AnyTypeSchema +# +# class Combo(Player, EnemyPlayerAndA): +# # we have a self reference where Player.enemyPlayer = Player +# pass +# +# """ +# For Combo +# name is from Player +# enemyPlayer is from Player + EnemyPlayerAndA +# a is from EnemyPlayerAndA +# """ +# self.assertEqual(Combo._property_names, ('a', 'enemyPlayer', 'name')) +# self.assertEqual(Combo.enemyPlayer.__bases__, (EnemyPlayerAndA.enemyPlayer, Player)) +# """ +# For Combo.enemyPlayer +# heightCm is from EnemyPlayerAndA.enemyPlayer +# name is from Player.enemyPlayer +# enemyPlayer is from Player.enemyPlayer +# """ +# self.assertEqual(Combo.enemyPlayer._property_names, ('enemyPlayer', 'heightCm', 'name')) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_schemas.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_schemas.py new file mode 100644 index 000000000000..c6d353f66c97 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_combine_schemas.py @@ -0,0 +1,104 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.date_with_validations import DateWithValidations +from petstore_api.model.date_time_with_validations import DateTimeWithValidations +from petstore_api.model.string_with_validation import StringWithValidation +from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue +from petstore_api.model.integer_enum import IntegerEnum +from petstore_api.model.integer_enum_big import IntegerEnumBig +from petstore_api.model.integer_max10 import IntegerMax10 +from petstore_api.model.integer_min15 import IntegerMin15 +from petstore_api.model.nullable_string import NullableString +from petstore_api.schemas import AnyTypeSchema, Schema, NoneSchema, StrSchema, none_type, Singleton + + +class TestCombineNonObjectSchemas(unittest.TestCase): + + def test_valid_enum_plus_prim(self): + class EnumPlusPrim(IntegerMax10, IntegerEnumOneValue): + pass + + assert EnumPlusPrim._enum_value_to_name == {0: "POSITIVE_0"} + + # order of base classes does not matter + class EnumPlusPrim(IntegerEnumOneValue, IntegerMax10): + pass + + assert EnumPlusPrim._enum_value_to_name == {0: "POSITIVE_0"} + + # _enum_value_to_name only contains one key + assert set(EnumPlusPrim._enum_value_to_name) == {0} + # the value is the expected enum class + enum_value_cls = EnumPlusPrim._enum_by_value[0] + assert issubclass(enum_value_cls, EnumPlusPrim) + assert issubclass(enum_value_cls, Singleton) + assert issubclass(enum_value_cls, int) + # the enum stored in that class is expected + enum_value = enum_value_cls.POSITIVE_0 + assert isinstance(enum_value, EnumPlusPrim) + assert isinstance(enum_value, Singleton) + assert isinstance(enum_value, int) + # we can access this enum from our class + assert EnumPlusPrim.POSITIVE_0 == enum_value + + # invalid value throws an exception + with self.assertRaises(petstore_api.ApiValueError): + EnumPlusPrim(9) + + # valid value succeeds + val = EnumPlusPrim(0) + assert val == 0 + assert isinstance(val, EnumPlusPrim) + assert isinstance(val, Singleton) + assert isinstance(val, int) + + def test_valid_enum_plus_enum(self): + class IntegerOneEnum(IntegerEnum, IntegerEnumOneValue): + pass + + assert IntegerOneEnum._enum_value_to_name == {0: "POSITIVE_0"} + + # order of base classes does not matter + class IntegerOneEnum(IntegerEnumOneValue, IntegerEnum): + pass + + assert IntegerOneEnum._enum_value_to_name == {0: "POSITIVE_0"} + + # _enum_by_value only contains one key + assert set(IntegerOneEnum._enum_by_value) == {0} + # the value is the expected enum class + enum_value_cls = IntegerOneEnum._enum_by_value[0] + assert issubclass(enum_value_cls, IntegerOneEnum) + assert issubclass(enum_value_cls, Singleton) + assert issubclass(enum_value_cls, int) + # the enum stored in that class is expected + enum_value = enum_value_cls.POSITIVE_0 + assert isinstance(enum_value, IntegerOneEnum) + assert isinstance(enum_value, Singleton) + assert isinstance(enum_value, int) + # we can access this enum from our class + assert IntegerOneEnum.POSITIVE_0 == enum_value + + # accessing invalid enum throws an exception + invalid_enums = ['POSITIVE_1', 'POSITIVE_2'] + for invalid_enum in invalid_enums: + with self.assertRaises(KeyError): + getattr(IntegerOneEnum, invalid_enum) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_bool.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_bool.py new file mode 100644 index 000000000000..7f0b29ee909d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_bool.py @@ -0,0 +1,42 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_bool import ComposedBool + + +class TestComposedBool(unittest.TestCase): + """ComposedBool unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedBool(self): + """Test ComposedBool""" + valid_values = [True, False] + all_values = [None, True, False, 2, 3.14, '', {}, []] + for value in all_values: + if value not in valid_values: + with self.assertRaises(petstore_api.ApiTypeError): + model = ComposedBool(value) + continue + model = ComposedBool(value) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_none.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_none.py new file mode 100644 index 000000000000..a37eb26b1048 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_none.py @@ -0,0 +1,42 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_none import ComposedNone + + +class TestComposedNone(unittest.TestCase): + """ComposedNone unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedNone(self): + """Test ComposedNone""" + valid_values = [None] + all_values = [None, True, False, 2, 3.14, '', {}, []] + for value in all_values: + if value not in valid_values: + with self.assertRaises(petstore_api.ApiTypeError): + model = ComposedNone(value) + continue + model = ComposedNone(value) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_number.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_number.py new file mode 100644 index 000000000000..1cd982e3f336 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_number.py @@ -0,0 +1,42 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_number import ComposedNumber + + +class TestComposedNumber(unittest.TestCase): + """ComposedNumber unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedNumber(self): + """Test ComposedNumber""" + valid_values = [2, 3.14] + all_values = [None, True, False, 2, 3.14, '', {}, []] + for value in all_values: + if value not in valid_values: + with self.assertRaises(petstore_api.ApiTypeError): + model = ComposedNumber(value) + continue + model = ComposedNumber(value) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_object.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_object.py new file mode 100644 index 000000000000..7c79c574d9b3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_object.py @@ -0,0 +1,42 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_object import ComposedObject + + +class TestComposedObject(unittest.TestCase): + """ComposedObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedObject(self): + """Test ComposedObject""" + valid_values = [{}] + all_values = [None, True, False, 2, 3.14, '', {}, []] + for value in all_values: + if value not in valid_values: + with self.assertRaises(petstore_api.ApiTypeError): + model = ComposedObject(value) + continue + model = ComposedObject(value) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_one_of_different_types.py new file mode 100644 index 000000000000..f08dd500b1db --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_one_of_different_types.py @@ -0,0 +1,107 @@ +# 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 sys +import unittest +from datetime import date, datetime, timezone +from dateutil.tz import tzutc + +import petstore_api +from petstore_api.schemas import DateSchema, DateTimeSchema, Singleton, NoneClass, frozendict +from petstore_api.model.animal import Animal +from petstore_api.model.cat import Cat +from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes +from petstore_api.model.number_with_validations import NumberWithValidations + +class TestComposedOneOfDifferentTypes(unittest.TestCase): + """ComposedOneOfDifferentTypes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedOneOfDifferentTypes(self): + """Test ComposedOneOfDifferentTypes""" + # we can make an instance that stores float data + inst = ComposedOneOfDifferentTypes(10.0) + assert isinstance(inst, NumberWithValidations) + + # we can make an instance that stores object (dict) data + inst = ComposedOneOfDifferentTypes(className="Cat", color="black") + assert isinstance(inst, ComposedOneOfDifferentTypes) + assert isinstance(inst, Animal) + assert isinstance(inst, Cat) + assert isinstance(inst, frozendict) + + # object that holds 4 properties and is not an Animal + inst = ComposedOneOfDifferentTypes(a="a", b="b", c="c", d="d") + assert isinstance(inst, ComposedOneOfDifferentTypes) + assert not isinstance(inst, Animal) + assert isinstance(inst, frozendict) + + # None + inst = ComposedOneOfDifferentTypes(None) + assert isinstance(inst, ComposedOneOfDifferentTypes) + assert isinstance(inst, Singleton) + assert isinstance(inst, NoneClass) + assert inst.is_none() is True + + # date + inst = ComposedOneOfDifferentTypes._from_openapi_data('2019-01-10') + assert isinstance(inst, ComposedOneOfDifferentTypes) + assert isinstance(inst, DateSchema) + assert isinstance(inst, str) + assert inst.as_date.year == 2019 + assert inst.as_date.month == 1 + assert inst.as_date.day == 10 + + # date + inst = ComposedOneOfDifferentTypes(date(2019, 1, 10)) + assert isinstance(inst, ComposedOneOfDifferentTypes) + assert isinstance(inst, DateSchema) + assert isinstance(inst, str) + assert inst.as_date.year == 2019 + assert inst.as_date.month == 1 + assert inst.as_date.day == 10 + + # date-time + inst = ComposedOneOfDifferentTypes._from_openapi_data('2020-01-02T03:04:05Z') + assert isinstance(inst, ComposedOneOfDifferentTypes) + assert isinstance(inst, DateTimeSchema) + assert isinstance(inst, str) + assert inst.as_datetime.year == 2020 + assert inst.as_datetime.month == 1 + assert inst.as_datetime.day == 2 + assert inst.as_datetime.hour == 3 + assert inst.as_datetime.minute == 4 + assert inst.as_datetime.second == 5 + utc_tz = tzutc() + assert inst.as_datetime.tzinfo == utc_tz + + # date-time + inst = ComposedOneOfDifferentTypes(datetime(2020, 1, 2, 3, 4, 5, tzinfo=timezone.utc)) + assert isinstance(inst, ComposedOneOfDifferentTypes) + assert isinstance(inst, DateTimeSchema) + assert isinstance(inst, str) + assert inst.as_datetime.year == 2020 + assert inst.as_datetime.month == 1 + assert inst.as_datetime.day == 2 + assert inst.as_datetime.hour == 3 + assert inst.as_datetime.minute == 4 + assert inst.as_datetime.second == 5 + assert inst.as_datetime.tzinfo == utc_tz + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_string.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_string.py new file mode 100644 index 000000000000..aeb5ea3a9724 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_composed_string.py @@ -0,0 +1,42 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.composed_string import ComposedString + + +class TestComposedString(unittest.TestCase): + """ComposedString unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ComposedString(self): + """Test ComposedString""" + valid_values = [''] + all_values = [None, True, False, 2, 3.14, '', {}, []] + for value in all_values: + if value not in valid_values: + with self.assertRaises(petstore_api.ApiTypeError): + model = ComposedString(value) + continue + model = ComposedString(value) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_configuration.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_configuration.py new file mode 100644 index 000000000000..9218e4fc2558 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_configuration.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +# flake8: noqa + +""" +Run the tests. +$ pip install nose (optional) +$ cd OpenAPIetstore-python +$ nosetests -v +""" + +import unittest + +from unittest.mock import patch +import urllib3 +from urllib3._collections import HTTPHeaderDict + +import petstore_api +from petstore_api.api_client import ApiClient +from petstore_api.api import pet_api + + +class ConfigurationTests(unittest.TestCase): + + def test_configuration(self): + config = petstore_api.Configuration() + config.host = 'http://localhost/' + + config.disabled_client_side_validations = ("multipleOf,maximum,exclusiveMaximum,minimum,exclusiveMinimum," + "maxLength,minLength,pattern,maxItems,minItems") + with self.assertRaisesRegex(ValueError, "Invalid keyword: 'foo'"): + config.disabled_client_side_validations = 'foo' + config.disabled_client_side_validations = "" + + def test_servers(self): + config = petstore_api.Configuration(server_index=1, server_variables={'version': 'v1'}) + client = pet_api.ApiClient(configuration=config) + api = pet_api.PetApi(client) + + with patch.object(ApiClient, 'request') as mock_request: + mock_request.return_value = urllib3.HTTPResponse(status=200) + api.add_pet({'name': 'pet', 'photoUrls': []}) + mock_request.assert_called_with( + 'POST', + 'http://path-server-test.petstore.local/v2/pet', + query_params=None, + headers=HTTPHeaderDict({ + 'Content-Type': 'application/json', + 'User-Agent': 'OpenAPI-Generator/1.0.0/python' + }), + fields=None, + body=b'{"name":"pet","photoUrls":[]}', + stream=False, + timeout=None, + ) + + with patch.object(ApiClient, 'request') as mock_request: + mock_request.return_value = urllib3.HTTPResponse(status=200) + api.delete_pet(path_params=dict(petId=123456789)) + mock_request.assert_called_with( + 'DELETE', + 'https://localhost:8080/v1/pet/123456789', + query_params=None, + headers={'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, + fields=None, + body=None, + stream=False, + timeout=None, + ) \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_date_time_with_validations.py new file mode 100644 index 000000000000..3d26e42bc1d9 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_date_time_with_validations.py @@ -0,0 +1,87 @@ +# 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.date_time_with_validations import DateTimeWithValidations +from datetime import date, datetime, timezone + + +class TestDateTimeWithValidations(unittest.TestCase): + """DateTimeWithValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDateTimeWithValidations(self): + """Test DateTimeWithValidations""" + + # works with datetime input + valid_values = [datetime(2020, 1, 1), '2020-01-01T00:00:00'] + expected_datetime = '2020-01-01T00:00:00' + for valid_value in valid_values: + inst = DateTimeWithValidations(valid_value) + assert inst == expected_datetime + + # when passing data in with _from_openapi_data one must use str + with self.assertRaisesRegex( + petstore_api.ApiTypeError, + r"Invalid type. Required value type is str and passed type was datetime at \['args\[0\]'\]" + ): + DateTimeWithValidations._from_openapi_data(datetime(2020, 1, 1)) + + # when passing data _from_openapi_data we can use str + input_value_to_datetime = { + "2020-01-01T00:00:00": datetime(2020, 1, 1, tzinfo=None), + "2020-01-01T00:00:00Z": datetime(2020, 1, 1, tzinfo=timezone.utc), + "2020-01-01T00:00:00+00:00": datetime(2020, 1, 1, tzinfo=timezone.utc) + } + for input_value, expected_datetime in input_value_to_datetime.items(): + inst = DateTimeWithValidations._from_openapi_data(input_value) + assert inst.as_datetime == expected_datetime + + # value error is raised if an invalid string is passed in + with self.assertRaisesRegex( + petstore_api.ApiValueError, + r"Value does not conform to the required ISO-8601 datetime format. Invalid value 'abcd' for type datetime at \('args\[0\]',\)" + ): + DateTimeWithValidations._from_openapi_data("abcd") + + # value error is raised if a date is passed in + with self.assertRaisesRegex( + petstore_api.ApiValueError, + r"Value does not conform to the required ISO-8601 datetime format. Invalid value '2020-01-01' for type datetime at \('args\[0\]',\)" + ): + DateTimeWithValidations(date(2020, 1, 1)) + + # pattern checking with string input + error_regex = r"Invalid value `2019-01-01T00:00:00Z`, must match regular expression `.+?` at \('args\[0\]',\)" + with self.assertRaisesRegex( + petstore_api.ApiValueError, + error_regex + ): + DateTimeWithValidations._from_openapi_data("2019-01-01T00:00:00Z") + # pattern checking with date input + error_regex = r"Invalid value `2019-01-01T00:00:00`, must match regular expression `.+?` at \('args\[0\]',\)" + with self.assertRaisesRegex( + petstore_api.ApiValueError, + error_regex + ): + DateTimeWithValidations(datetime(2019, 1, 1)) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_date_with_validations.py new file mode 100644 index 000000000000..fff79f16cfcd --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_date_with_validations.py @@ -0,0 +1,90 @@ +# 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.date_with_validations import DateWithValidations +from datetime import date, datetime + + +class TestDateWithValidations(unittest.TestCase): + """DateWithValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDateWithValidations(self): + """Test DateWithValidations""" + + # client side date inputs + valid_values = [date(2020, 1, 1), '2020-01-01'] + expected_date = '2020-01-01' + for valid_value in valid_values: + inst = DateWithValidations(valid_value) + assert inst == expected_date + + # when passing data in with _from_openapi_data one must use str + with self.assertRaisesRegex( + petstore_api.ApiTypeError, + r"Invalid type. Required value type is str and passed type was date at \['args\[0\]'\]" + ): + DateWithValidations._from_openapi_data(date(2020, 1, 1)) + + # when passing data in from the server we can use str + valid_values = ["2020-01-01", "2020-01", "2020"] + expected_date = date(2020, 1, 1) + for valid_value in valid_values: + inst = DateWithValidations._from_openapi_data(valid_value) + assert inst.as_date == expected_date + + # value error is raised if an invalid string is passed in + with self.assertRaisesRegex( + petstore_api.ApiValueError, + r"Value does not conform to the required ISO-8601 date format. Invalid value '2020-01-01T00:00:00Z' for type date at \('args\[0\]',\)" + ): + DateWithValidations._from_openapi_data("2020-01-01T00:00:00Z") + + # value error is raised if a datetime is passed in + with self.assertRaisesRegex( + petstore_api.ApiValueError, + r"Value does not conform to the required ISO-8601 date format. Invalid value '2020-01-01T00:00:00' for type date at \('args\[0\]',\)" + ): + DateWithValidations(datetime(2020, 1, 1)) + + # value error is raised if an invalid string is passed in + with self.assertRaisesRegex( + petstore_api.ApiValueError, + r"Value does not conform to the required ISO-8601 date format. Invalid value 'abcd' for type date at \('args\[0\]',\)" + ): + DateWithValidations._from_openapi_data("abcd") + + # pattern checking for str input + error_regex = r"Invalid value `2019-01-01`, must match regular expression `.+?` at \('args\[0\]',\)" + with self.assertRaisesRegex( + petstore_api.ApiValueError, + error_regex + ): + DateWithValidations._from_openapi_data("2019-01-01") + # pattern checking for date input + with self.assertRaisesRegex( + petstore_api.ApiValueError, + error_regex + ): + DateWithValidations(date(2019, 1, 1)) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_deserialization.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_deserialization.py new file mode 100644 index 000000000000..f3a389d67e7b --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_deserialization.py @@ -0,0 +1,458 @@ +# coding: utf-8 + +# flake8: noqa + +""" +Run the tests. +$ pip install nose (optional) +$ cd OpenAPIPetstore-python +$ nosetests -v +""" +from collections import namedtuple +from decimal import Decimal +import json +import typing +import unittest + +import urllib3 + +import petstore_api +from petstore_api import api_client +from petstore_api.schemas import NoneClass + + +MockResponse = namedtuple('MockResponse', 'data') + + +class DeserializationTests(unittest.TestCase): + json_content_type = 'application/json' + json_content_type_headers = {'content-type': json_content_type} + configuration = petstore_api.Configuration() + + @classmethod + def __response(cls, data: typing.Any) -> urllib3.HTTPResponse: + return urllib3.HTTPResponse( + json.dumps(data).encode('utf-8'), + headers=cls.json_content_type_headers + ) + + def test_deserialize_shape(self): + """ + + deserialize Shape to an instance of: + - EquilateralTriangle + - IsoscelesTriangle + - IsoscelesTriangle + - ScaleneTriangle + - ComplexQuadrilateral + - SimpleQuadrilateral + by traveling through 2 discriminators + """ + from petstore_api.model import shape, equilateral_triangle + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=shape.Shape), + }, + ) + data = { + 'shapeType': 'Triangle', + 'triangleType': 'EquilateralTriangle', + } + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + body = deserialized.body + self.assertTrue(isinstance(body, equilateral_triangle.EquilateralTriangle)) + self.assertEqual(body.shapeType, 'Triangle') + self.assertEqual(body.triangleType, 'EquilateralTriangle') + + # invalid quadrilateralType, second discriminator value + data = { + 'shapeType': 'Quadrilateral', + 'quadrilateralType': 'Triangle', + } + response = self.__response(data) + + err_msg = ( + r"Invalid discriminator value was passed in to Quadrilateral.quadrilateralType Only the values " + r"\['ComplexQuadrilateral', 'SimpleQuadrilateral'\] are allowed at \('args\[0\]', 'quadrilateralType'\)" + ) + with self.assertRaisesRegex(petstore_api.ApiValueError, err_msg): + _response_for_200.deserialize(response, self.configuration) + + def test_deserialize_animal(self): + """ + deserialize Animal to a Dog instance + Animal uses a discriminator which has a map built of child classes + that inherrit from Animal + This is the swagger (v2) way of doing something like oneOf composition + """ + from petstore_api.model import animal, dog + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=animal.Animal), + }, + ) + data = { + 'className': 'Dog', + 'color': 'white', + 'breed': 'Jack Russel Terrier' + } + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + body = deserialized.body + self.assertTrue(isinstance(body, dog.Dog)) + self.assertEqual(body.className, 'Dog') + self.assertEqual(body.color, 'white') + self.assertEqual(body.breed, 'Jack Russel Terrier') + + def test_regex_constraint(self): + """ + Test regex pattern validation. + """ + from petstore_api.model import apple + + # Test with valid regex pattern. + inst = apple.Apple( + cultivar="Akane" + ) + assert isinstance(inst, apple.Apple) + + inst = apple.Apple( + cultivar="Golden Delicious", + origin="cHiLe" + ) + assert isinstance(inst, apple.Apple) + + # Test with invalid regex pattern. + err_regex = r"Invalid value `.+?`, must match regular expression `.+?` at \('args\[0\]', 'cultivar'\)" + with self.assertRaisesRegex( + petstore_api.ApiValueError, + err_regex + ): + inst = apple.Apple( + cultivar="!@#%@$#Akane" + ) + + err_regex = r"Invalid value `.+?`, must match regular expression `.+?` at \('args\[0\]', 'origin'\)" + with self.assertRaisesRegex( + petstore_api.ApiValueError, + err_regex + ): + inst = apple.Apple( + cultivar="Golden Delicious", + origin="!@#%@$#Chile" + ) + + def test_deserialize_mammal(self): + """ + deserialize mammal + mammal is a oneOf composed schema model with discriminator + """ + + # whale test + from petstore_api.model import mammal, zebra, whale + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=mammal.Mammal), + }, + ) + has_baleen = True + has_teeth = False + class_name = 'whale' + data = { + 'hasBaleen': has_baleen, + 'hasTeeth': has_teeth, + 'className': class_name + } + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + body = deserialized.body + self.assertTrue(isinstance(body, whale.Whale)) + self.assertEqual(bool(body.hasBaleen), has_baleen) + self.assertEqual(bool(body.hasTeeth), has_teeth) + self.assertEqual(body.className, class_name) + + # zebra test + zebra_type = 'plains' + class_name = 'zebra' + data = { + 'type': zebra_type, + 'className': class_name + } + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + body = deserialized.body + self.assertTrue(isinstance(body, zebra.Zebra)) + self.assertEqual(body.type, zebra_type) + self.assertEqual(body.className, class_name) + + def test_deserialize_float_value(self): + """ + Deserialize floating point values. + """ + from petstore_api.model import banana + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=banana.Banana), + }, + ) + data = { + 'lengthCm': 3.1415 + } + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + body = deserialized.body + self.assertTrue(isinstance(body, banana.Banana)) + self.assertTrue(isinstance(body.lengthCm, Decimal)) + self.assertEqual(body.lengthCm, 3.1415) + + """ + Float value is serialized without decimal point + The client receive it as an integer, which work because Banana.lengthCm is type number without format + Which accepts int AND float + """ + data = { + 'lengthCm': 3 + } + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + body = deserialized.body + self.assertTrue(isinstance(body, banana.Banana)) + self.assertTrue(isinstance(body.lengthCm, Decimal)) + self.assertEqual(body.lengthCm, 3) + + def test_deserialize_fruit_null_value(self): + """ + deserialize fruit with null value. + fruitReq is a oneOf composed schema model with discriminator, including 'null' type. + """ + from petstore_api.model import fruit_req + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=fruit_req.FruitReq), + }, + ) + data = None + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + self.assertTrue(isinstance(deserialized.body, fruit_req.FruitReq)) + self.assertTrue(isinstance(deserialized.body, NoneClass)) + + def test_deserialize_with_additional_properties(self): + """ + Deserialize data with schemas that have the additionalProperties keyword. + Test conditions when additional properties are allowed, not allowed, have + specific types... + """ + + # Dog is allOf with two child schemas. + # The OAS document for Dog does not specify the 'additionalProperties' keyword, + # which means that by default, the Dog schema must allow undeclared properties. + # The additionalProperties keyword is used to control the handling of extra stuff, + # that is, properties whose names are not listed in the properties keyword. + # By default any additional properties are allowed. + from petstore_api.model import dog, mammal, zebra, banana_req + data = { + 'className': 'Dog', + 'color': 'brown', + 'breed': 'golden retriever', + # Below are additional, undeclared properties. + 'group': 'Terrier Group', + 'size': 'medium', + } + response = self.__response(data) + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=dog.Dog), + }, + ) + deserialized = _response_for_200.deserialize(response, self.configuration) + body = deserialized.body + self.assertTrue(isinstance(body, dog.Dog)) + self.assertEqual(body.className, 'Dog') + self.assertEqual(body.color, 'brown') + self.assertEqual(body.breed, 'golden retriever') + self.assertEqual(body.group, 'Terrier Group') + self.assertEqual(body.size, 'medium') + + # The 'zebra' schema allows additional properties by explicitly setting + # additionalProperties: true. + # This is equivalent to 'additionalProperties' not being present. + data = { + 'className': 'zebra', + 'type': 'plains', + # Below are additional, undeclared properties + 'group': 'abc', + 'size': 3, + 'p1': True, + 'p2': ['a', 'b', 123], + } + response = self.__response(data) + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=mammal.Mammal), + }, + ) + deserialized = _response_for_200.deserialize(response, self.configuration) + body = deserialized.body + self.assertTrue(isinstance(body, zebra.Zebra)) + self.assertEqual(body.className, 'zebra') + self.assertEqual(body.type, 'plains') + self.assertEqual(bool(body.p1), True) + + # The 'bananaReq' schema disallows additional properties by explicitly setting + # additionalProperties: false + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=banana_req.BananaReq), + }, + ) + with self.assertRaisesRegex( + petstore_api.exceptions.ApiTypeError, + r"BananaReq was passed 1 invalid argument: \['unknown-group'\]" + ): + data = { + 'lengthCm': 21.2, + 'sweet': False, + # Below are additional, undeclared properties. They are not allowed, + # an exception must be raised. + 'unknown-group': 'abc', + } + response = self.__response(data) + _response_for_200.deserialize(response, self.configuration) + + def test_deserialize_with_additional_properties_and_reference(self): + """ + Deserialize data with schemas that has the additionalProperties keyword + and the schema is specified as a reference ($ref). + """ + from petstore_api.model import drawing + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=drawing.Drawing), + }, + ) + data = { + 'mainShape': { + 'shapeType': 'Triangle', + 'triangleType': 'EquilateralTriangle', + }, + 'shapes': [ + { + 'shapeType': 'Triangle', + 'triangleType': 'IsoscelesTriangle', + }, + { + 'shapeType': 'Quadrilateral', + 'quadrilateralType': 'ComplexQuadrilateral', + }, + ], + 'an_additional_prop': { + 'lengthCm': 4, + 'color': 'yellow' + } + } + response = self.__response(data) + _response_for_200.deserialize(response, self.configuration) + + def test_deserialize_NumberWithValidations(self): + from petstore_api.model.number_with_validations import NumberWithValidations + from petstore_api.api.fake_api_endpoints.number_with_validations import _response_for_200 + + # make sure that an exception is thrown on an invalid type value + with self.assertRaises(petstore_api.ApiTypeError): + response = self.__response('test str') + _response_for_200.deserialize(response, self.configuration) + + # make sure that an exception is thrown on an invalid value + with self.assertRaises(petstore_api.ApiValueError): + response = self.__response(21.0) + _response_for_200.deserialize(response, self.configuration) + + # valid value works + number_val = 11.0 + response = self.__response(number_val) + response = _response_for_200.deserialize(response, self.configuration) + self.assertTrue(isinstance(response.body, NumberWithValidations)) + self.assertEqual(response.body, number_val) + + def test_array_of_enums(self): + from petstore_api.model.array_of_enums import ArrayOfEnums + from petstore_api.api.fake_api_endpoints.array_of_enums import _response_for_200 + from petstore_api.model import string_enum + data = ["placed", None] + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + assert isinstance(deserialized.body, ArrayOfEnums) + expected_results = ArrayOfEnums([string_enum.StringEnum(v) for v in data]) + assert expected_results == deserialized.body + + def test_multiple_of_deserialization(self): + data = { + 'byte': '3', + 'date': '1970-01-01', + 'password': "abcdefghijkl", + 'integer': 30, + 'number': 65.0, + 'float': 62.4, + } + from petstore_api.model import format_test + _response_for_200 = api_client.OpenApiResponse( + content={ + self.json_content_type: api_client.MediaType(schema=format_test.FormatTest), + }, + ) + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, self.configuration) + self.assertTrue(isinstance(deserialized.body, format_test.FormatTest)) + + with self.assertRaisesRegex( + petstore_api.exceptions.ApiValueError, + r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" + ): + data = { + 'byte': '3', + 'date': '1970-01-01', + 'password': "abcdefghijkl", + 'integer': 31, # Value is supposed to be multiple of '2'. An error must be raised + 'number': 65.0, + 'float': 62.4, + } + response = self.__response(data) + _response_for_200.deserialize(response, self.configuration) + + # Disable JSON schema validation. No error should be raised during deserialization. + configuration = petstore_api.Configuration() + configuration.disabled_client_side_validations = "multipleOf" + + data = { + 'byte': '3', + 'date': '1970-01-01', + 'password': "abcdefghijkl", + 'integer': 31, # Value is supposed to be multiple of '2' + 'number': 65.0, + 'float': 62.4, + } + response = self.__response(data) + deserialized = _response_for_200.deserialize(response, configuration) + self.assertTrue(isinstance(deserialized.body, format_test.FormatTest)) + + # Disable JSON schema validation but for a different keyword. + # An error should be raised during deserialization. + configuration = petstore_api.Configuration() + configuration.disabled_client_side_validations = "maxItems" + + with self.assertRaisesRegex( + petstore_api.exceptions.ApiValueError, + r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" + ): + data = { + 'byte': '3', + 'date': '1970-01-01', + 'password': "abcdefghijkl", + 'integer': 31, # Value is supposed to be multiple of '2' + 'number': 65.0, + 'float': 62.4, + } + response = self.__response(data) + _response_for_200.deserialize(response, configuration) diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_discard_unknown_properties.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_discard_unknown_properties.py new file mode 100644 index 000000000000..97d850d56b68 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_discard_unknown_properties.py @@ -0,0 +1,157 @@ +# # coding: utf-8 +# +# # flake8: noqa +# +# """ +# Run the tests. +# $ docker pull swaggerapi/petstore +# $ docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore +# $ pip install nose (optional) +# $ cd petstore_api-python +# $ nosetests -v +# """ +# from collections import namedtuple +# import json +# import re +# import unittest +# +# import petstore_api +# from petstore_api.model import cat, dog, isosceles_triangle, banana_req +# from petstore_api import Configuration, signing +# +# from petstore_api.schemas import ( +# file_type, +# model_to_dict, +# ) +# +# MockResponse = namedtuple('MockResponse', 'data') +# +# class DiscardUnknownPropertiesTests(unittest.TestCase): +# +# def test_deserialize_banana_req_do_not_discard_unknown_properties(self): +# """ +# deserialize bananaReq with unknown properties. +# Strict validation is enabled. +# Simple (non-composed) schema scenario. +# """ +# config = Configuration(discard_unknown_keys=False) +# api_client = petstore_api.ApiClient(config) +# data = { +# 'lengthCm': 21.3, +# 'sweet': False, +# # Below is an unknown property not explicitly declared in the OpenAPI document. +# # It should not be in the payload because additional properties (undeclared) are +# # not allowed in the bananaReq schema (additionalProperties: false). +# 'unknown_property': 'a-value' +# } +# response = MockResponse(data=json.dumps(data)) +# +# # Deserializing with strict validation raises an exception because the 'unknown_property' +# # is undeclared. +# with self.assertRaises(petstore_api.exceptions.ApiAttributeError) as cm: +# deserialized = api_client.deserialize(response, ((banana_req.BananaReq),), True) +# self.assertTrue(re.match("BananaReq has no attribute 'unknown_property' at.*", str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# +# +# def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self): +# """ +# deserialize IsoscelesTriangle with unknown properties. +# Strict validation is enabled. +# Composed schema scenario. +# """ +# config = Configuration(discard_unknown_keys=False) +# api_client = petstore_api.ApiClient(config) +# data = { +# 'shape_type': 'Triangle', +# 'triangle_type': 'EquilateralTriangle', +# # Below is an unknown property not explicitly declared in the OpenAPI document. +# # It should not be in the payload because additional properties (undeclared) are +# # not allowed in the schema (additionalProperties: false). +# 'unknown_property': 'a-value' +# } +# response = MockResponse(data=json.dumps(data)) +# +# # Deserializing with strict validation raises an exception because the 'unknown_property' +# # is undeclared. +# with self.assertRaises(petstore_api.ApiValueError) as cm: +# deserialized = api_client.deserialize(response, ((isosceles_triangle.IsoscelesTriangle),), True) +# self.assertTrue(re.match('.*Not all inputs were used.*unknown_property.*', str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# +# +# def test_deserialize_banana_req_discard_unknown_properties(self): +# """ +# Deserialize bananaReq with unknown properties. +# Discard unknown properties. +# """ +# config = Configuration(discard_unknown_keys=True) +# api_client = petstore_api.ApiClient(config) +# data = { +# 'lengthCm': 21.3, +# 'sweet': False, +# # Below are additional (undeclared) properties not specified in the bananaReq schema. +# 'unknown_property': 'a-value', +# 'more-unknown': [ +# 'a' +# ] +# } +# # The 'unknown_property' is undeclared, which would normally raise an exception, but +# # when discard_unknown_keys is set to True, the unknown properties are discarded. +# response = MockResponse(data=json.dumps(data)) +# deserialized = api_client.deserialize(response, ((banana_req.BananaReq),), True) +# self.assertTrue(isinstance(deserialized, banana_req.BananaReq)) +# # Check the 'unknown_property' and 'more-unknown' properties are not present in the +# # output. +# self.assertIn("length_cm", deserialized.to_dict().keys()) +# self.assertNotIn("unknown_property", deserialized.to_dict().keys()) +# self.assertNotIn("more-unknown", deserialized.to_dict().keys()) +# +# def test_deserialize_cat_do_not_discard_unknown_properties(self): +# """ +# Deserialize Cat with unknown properties. +# Strict validation is enabled. +# """ +# config = Configuration(discard_unknown_keys=False) +# api_client = petstore_api.ApiClient(config) +# data = { +# "class_name": "Cat", +# "color": "black", +# "declawed": True, +# "dynamic-property": 12345, +# } +# response = MockResponse(data=json.dumps(data)) +# +# # Deserializing with strict validation does not raise an exception because the even though +# # the 'dynamic-property' is undeclared, the 'Cat' schema defines the additionalProperties +# # attribute. +# deserialized = api_client.deserialize(response, ((cat.Cat),), True) +# self.assertTrue(isinstance(deserialized, cat.Cat)) +# self.assertIn('color', deserialized.to_dict()) +# self.assertEqual(deserialized['color'], 'black') +# +# def test_deserialize_cat_discard_unknown_properties(self): +# """ +# Deserialize Cat with unknown properties. +# Request to discard unknown properties, but Cat is composed schema +# with one inner schema that has 'additionalProperties' set to true. +# """ +# config = Configuration(discard_unknown_keys=True) +# api_client = petstore_api.ApiClient(config) +# data = { +# "class_name": "Cat", +# "color": "black", +# "declawed": True, +# # Below are additional (undeclared) properties. +# "my_additional_property": 123, +# } +# # The 'my_additional_property' is undeclared, but 'Cat' has a 'Address' type through +# # the allOf: [ $ref: '#/components/schemas/Address' ]. +# response = MockResponse(data=json.dumps(data)) +# deserialized = api_client.deserialize(response, ((cat.Cat),), True) +# self.assertTrue(isinstance(deserialized, cat.Cat)) +# # Check the 'unknown_property' and 'more-unknown' properties are not present in the +# # output. +# self.assertIn("declawed", deserialized.to_dict().keys()) +# self.assertIn("my_additional_property", deserialized.to_dict().keys()) +# diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_drawing.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_drawing.py new file mode 100644 index 000000000000..3be8388499c7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_drawing.py @@ -0,0 +1,166 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.schemas import NoneClass +from petstore_api.model import shape +from petstore_api.model import shape_or_null +from petstore_api.model.drawing import Drawing + + +class TestDrawing(unittest.TestCase): + """Drawing unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_create_instances(self): + """ + Validate instance can be created + """ + + inst = shape.Shape( + shapeType="Triangle", + triangleType="IsoscelesTriangle" + ) + from petstore_api.model.isosceles_triangle import IsoscelesTriangle + assert isinstance(inst, IsoscelesTriangle) + + def test_deserialize_oneof_reference(self): + """ + Validate the scenario when the type of a OAS property is 'oneOf', and the 'oneOf' + schema is specified as a reference ($ref), not an inline 'oneOf' schema. + """ + isosceles_triangle = shape.Shape( + shapeType="Triangle", + triangleType="IsoscelesTriangle" + ) + from petstore_api.model.isosceles_triangle import IsoscelesTriangle + assert isinstance(isosceles_triangle, IsoscelesTriangle) + from petstore_api.model.equilateral_triangle import EquilateralTriangle + + inst = Drawing( + mainShape=isosceles_triangle, + shapes=[ + shape.Shape( + shapeType="Triangle", + triangleType="EquilateralTriangle" + ), + shape.Shape( + shapeType="Triangle", + triangleType="IsoscelesTriangle" + ), + shape.Shape( + shapeType="Triangle", + triangleType="EquilateralTriangle" + ), + shape.Shape( + shapeType="Quadrilateral", + quadrilateralType="ComplexQuadrilateral" + ) + ], + ) + assert isinstance(inst, Drawing) + assert isinstance(inst.mainShape, IsoscelesTriangle) + self.assertEqual(len(inst.shapes), 4) + from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral + assert isinstance(inst.shapes[0], EquilateralTriangle) + assert isinstance(inst.shapes[1], IsoscelesTriangle) + assert isinstance(inst.shapes[2], EquilateralTriangle) + assert isinstance(inst.shapes[3], ComplexQuadrilateral) + + # Validate we cannot assign the None value to mainShape because the 'null' type + # is not one of the allowed types in the 'Shape' schema. + err_msg = (r"Invalid inputs given to generate an instance of .+?Shape.+? " + r"None of the oneOf schemas matched the input data.") + with self.assertRaisesRegex( + petstore_api.ApiValueError, + err_msg + ): + inst = Drawing( + # 'mainShape' has type 'Shape', which is a oneOf [triangle, quadrilateral] + # So the None value should not be allowed and an exception should be raised. + mainShape=None, + ) + + """ + we can't pass in an incorrect type for shapes + 'shapes' items has type 'Shape', which is a oneOf [Triangle, Quadrilateral] + composed schema. We are not able to assign Triangle tor Quadrilateral + to a shapes item because those instances do not include Shape validation + Shape could require additional validations that Triangle + Quadrilateral do not include + """ + from petstore_api.model.triangle import Triangle + err_msg = (r"Incorrect type passed in, required type was " + r"and passed type was at " + r"\('args\[0\]', 'shapes', 0\)") + with self.assertRaisesRegex( + petstore_api.ApiTypeError, + err_msg + ): + inst = Drawing( + mainShape=isosceles_triangle, + shapes=[ + Triangle( + shapeType="Triangle", + triangleType="EquilateralTriangle" + ) + ] + ) + + def test_deserialize_oneof_reference_with_null_type(self): + """ + Validate the scenario when the type of a OAS property is 'oneOf', and the 'oneOf' + schema is specified as a reference ($ref), not an inline 'oneOf' schema. + Further, the 'oneOf' schema has a 'null' type child schema (as introduced in + OpenAPI 3.1). + """ + + # Validate we can assign the None value to shape_or_null, because the 'null' type + # is one of the allowed types in the 'ShapeOrNull' schema. + inst = Drawing( + # 'shapeOrNull' has type 'ShapeOrNull', which is a oneOf [null, triangle, quadrilateral] + shapeOrNull=None, + ) + assert isinstance(inst, Drawing) + self.assertFalse('mainShape' in inst) + self.assertTrue('shapeOrNull' in inst) + self.assertTrue(isinstance(inst.shapeOrNull, NoneClass)) + + def test_deserialize_oneof_reference_with_nullable_type(self): + """ + Validate the scenario when the type of a OAS property is 'oneOf', and the 'oneOf' + schema is specified as a reference ($ref), not an inline 'oneOf' schema. + Further, the 'oneOf' schema has the 'nullable' attribute (as introduced in + OpenAPI 3.0 and deprecated in 3.1). + """ + + # Validate we can assign the None value to nullableShape, because the NullableShape + # has the 'nullable: true' attribute. + inst = Drawing( + # 'nullableShape' has type 'NullableShape', which is a oneOf [triangle, quadrilateral] + # and the 'nullable: true' attribute. + nullableShape=None, + ) + assert isinstance(inst, Drawing) + self.assertFalse('mainShape' in inst) + self.assertTrue('nullableShape' in inst) + self.assertTrue(isinstance(inst.nullableShape, NoneClass)) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_extra_pool_config_options.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_extra_pool_config_options.py new file mode 100644 index 000000000000..5bf6b989ebe2 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_extra_pool_config_options.py @@ -0,0 +1,61 @@ +import unittest +from unittest.mock import patch + +import petstore_api + + +class StubPoolManager(object): + actual_kwargs = None + + def __init__(self, num_pools=10, headers=None, **kwargs): + # Matches the contract of urllib3.PoolManager + self.actual_kwargs = kwargs + + +class StubProxyManager: + actual_kwargs = None + + def __init__( + self, + proxy_url, + num_pools=10, + headers=None, + proxy_headers=None, + **kwargs + ): + # Matches the contract of urllib3.ProxyManager + self.actual_kwargs = kwargs + + +class TestExtraOptionsForPools(unittest.TestCase): + + def test_socket_options_get_passed_to_pool_manager(self): + + socket_options = ["extra", "socket", "options"] + + config = petstore_api.Configuration(host="HOST") + config.socket_options = socket_options + + with patch("petstore_api.rest.urllib3.PoolManager", StubPoolManager): + api_client = petstore_api.ApiClient(config) + + # urllib3.PoolManager promises to pass socket_options in kwargs + # to the underlying socket. So asserting that our manager + # gets it is a good start + assert api_client.rest_client.pool_manager.actual_kwargs["socket_options"] == socket_options + + def test_socket_options_get_passed_to_proxy_manager(self): + + socket_options = ["extra", "socket", "options"] + + config = petstore_api.Configuration(host="HOST") + config.socket_options = socket_options + config.proxy = True + + with patch("petstore_api.rest.urllib3.ProxyManager", StubProxyManager): + api_client = petstore_api.ApiClient(config) + + # urllib3.ProxyManager promises to pass socket_options in kwargs + # to the underlying socket. So asserting that our manager + # gets it is a good start + assert api_client.rest_client.pool_manager.actual_kwargs["socket_options"] == socket_options diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fake_api.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fake_api.py new file mode 100644 index 000000000000..c053cee62fbc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fake_api.py @@ -0,0 +1,575 @@ +# 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 io +import sys +import unittest +import json +import typing +from unittest.mock import patch + +import urllib3 +from urllib3._collections import HTTPHeaderDict + +import petstore_api +from petstore_api import api_client, schemas +from petstore_api.api.fake_api import FakeApi # noqa: E501 +from petstore_api.rest import RESTClientObject + + +class TestFakeApi(unittest.TestCase): + """FakeApi unit test stubs""" + json_content_type = 'application/json' + configuration = petstore_api.Configuration() + api = FakeApi(api_client=api_client.ApiClient(configuration=configuration)) + + @staticmethod + def headers_for_content_type(content_type: str) -> dict[str, str]: + return {'content-type': content_type} + + @classmethod + def __response( + cls, + body: typing.Union[str, bytes], + status: int = 200, + content_type: str = json_content_type, + headers: typing.Optional[dict[str, str]] = None, + preload_content: bool = True + ) -> urllib3.HTTPResponse: + if headers is None: + headers = {} + headers.update(cls.headers_for_content_type(content_type)) + return urllib3.HTTPResponse( + body, + headers=headers, + status=status, + preload_content=preload_content + ) + + @staticmethod + def __json_bytes(in_data: typing.Any) -> bytes: + return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') + + @staticmethod + def __assert_request_called_with( + mock_request, + url: str, + body: typing.Optional[bytes] = None, + content_type: str = 'application/json', + fields: typing.Optional[tuple[api_client.RequestField, ...]] = None, + accept_content_type: str = 'application/json', + stream: bool = False, + ): + mock_request.assert_called_with( + 'POST', + url, + headers=HTTPHeaderDict( + { + 'Accept': accept_content_type, + 'Content-Type': content_type, + 'User-Agent': 'OpenAPI-Generator/1.0.0/python' + } + ), + body=body, + query_params=None, + fields=fields, + stream=stream, + timeout=None, + ) + + def test_array_model(self): + from petstore_api.model import animal_farm, animal + + # serialization + deserialization works + with patch.object(RESTClientObject, 'request') as mock_request: + json_data = [{"className": "Cat", "color": "black"}] + mock_request.return_value = self.__response( + self.__json_bytes(json_data) + ) + + cat = animal.Animal(className="Cat", color="black") + body = animal_farm.AnimalFarm([cat]) + api_response = self.api.array_model(body=body) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/refs/arraymodel', + body=self.__json_bytes(json_data) + ) + + assert isinstance(api_response.body, animal_farm.AnimalFarm) + assert api_response.body == body + + def test_recursionlimit(self): + """Test case for recursionlimit + + """ + assert sys.getrecursionlimit() == 1234 + + def test_array_of_enums(self): + from petstore_api.model import array_of_enums, string_enum + + # serialization + deserialization works + with patch.object(RESTClientObject, 'request') as mock_request: + value = [string_enum.StringEnum("placed")] + body = array_of_enums.ArrayOfEnums(value) + value_simple = ["placed"] + mock_request.return_value = self.__response( + self.__json_bytes(value_simple) + ) + + api_response = self.api.array_of_enums(body=body) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/refs/array-of-enums', + body=self.__json_bytes(value_simple) + ) + + assert isinstance(api_response.body, array_of_enums.ArrayOfEnums) + assert api_response.body == body + + def test_number_with_validations(self): + from petstore_api.model import number_with_validations + + # serialization + deserialization works + with patch.object(RESTClientObject, 'request') as mock_request: + value = 10.0 + body = number_with_validations.NumberWithValidations(value) + mock_request.return_value = self.__response( + self.__json_bytes(value) + ) + + api_response = self.api.number_with_validations(body=body) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/refs/number', + body=self.__json_bytes(value) + ) + + assert isinstance(api_response.body, number_with_validations.NumberWithValidations) + assert api_response.body == value + + def test_composed_one_of_different_types(self): + from petstore_api.model import composed_one_of_different_types + + # serialization + deserialization works + number = composed_one_of_different_types.ComposedOneOfDifferentTypes(10.0) + cat = composed_one_of_different_types.ComposedOneOfDifferentTypes( + className="Cat", color="black" + ) + none_instance = composed_one_of_different_types.ComposedOneOfDifferentTypes(None) + date_instance = composed_one_of_different_types.ComposedOneOfDifferentTypes('1970-01-01') + cast_to_simple_value = [ + (number, 10.0), + (cat, {"className": "Cat", "color": "black"}), + (none_instance, None), + (date_instance, '1970-01-01'), + ] + for (body, value_simple) in cast_to_simple_value: + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = self.__response( + self.__json_bytes(value_simple) + ) + + api_response = self.api.composed_one_of_different_types(body=body) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/refs/composed_one_of_number_with_validations', + body=self.__json_bytes(value_simple) + ) + + assert isinstance(api_response.body, composed_one_of_different_types.ComposedOneOfDifferentTypes) + assert api_response.body == body + + # inputting the uncast values into the endpoint also works + for (body, value_simple) in cast_to_simple_value: + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = self.__response( + self.__json_bytes(value_simple) + ) + + api_response = self.api.composed_one_of_different_types(body=value_simple) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/refs/composed_one_of_number_with_validations', + body=self.__json_bytes(value_simple) + ) + + assert isinstance(api_response.body, composed_one_of_different_types.ComposedOneOfDifferentTypes) + assert api_response.body == body + + def test_string(self): + # serialization + deserialization works + with patch.object(RESTClientObject, 'request') as mock_request: + body = "blah" + value_simple = body + mock_request.return_value = self.__response( + self.__json_bytes(value_simple) + ) + + api_response = self.api.string(body=body) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/refs/string', + body=self.__json_bytes(value_simple) + ) + + assert isinstance(api_response.body, str) + assert api_response.body == value_simple + + def test_string_enum(self): + from petstore_api.model import string_enum + # serialization + deserialization works + with patch.object(RESTClientObject, 'request') as mock_request: + value = "placed" + body = string_enum.StringEnum(value) + mock_request.return_value = self.__response( + self.__json_bytes(value) + ) + + api_response = self.api.string_enum(body=body) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/refs/enum', + body=self.__json_bytes(value) + ) + + assert isinstance(api_response.body, string_enum.StringEnum) + assert api_response.body == value + + def test_mammal(self): + # serialization + deserialization works + from petstore_api.model.mammal import Mammal + with patch.object(RESTClientObject, 'request') as mock_request: + body = Mammal(className="BasquePig") + value_simple = dict(className='BasquePig') + mock_request.return_value = self.__response( + self.__json_bytes(value_simple) + ) + + api_response = self.api.mammal(body=body) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/refs/mammal', + body=self.__json_bytes(value_simple) + ) + + assert isinstance(api_response.body, Mammal) + assert api_response.body == value_simple + + def test_missing_or_unset_required_body(self): + # missing required body + with self.assertRaises(TypeError): + self.api.mammal() + # required body may not be unset + with self.assertRaises(petstore_api.ApiValueError): + self.api.mammal(body=schemas.unset) + + def test_missing_or_unset_required_query_parameter(self): + from petstore_api.model.user import User + user = User({}) + # missing required query param + with self.assertRaises(petstore_api.ApiTypeError): + self.api.body_with_query_params(body=user) + # required query param may not be unset + with self.assertRaises(petstore_api.ApiValueError): + self.api.body_with_query_params(body=schemas.unset, query_params=dict(query=schemas.unset)) + + def test_upload_download_file_tx_bytes_and_file(self): + """Test case for upload_download_file + uploads a file and downloads a file using application/octet-stream # noqa: E501 + """ + import os + test_file_dir = os.path.realpath( + os.path.join(os.path.dirname(__file__), "..", "testfiles")) + file_name = '1px_pic1.png' + file_path1 = os.path.join(test_file_dir, file_name) + + with open(file_path1, "rb") as some_file: + file_bytes = some_file.read() + file1 = open(file_path1, "rb") + mock_response = self.__response( + file_bytes, + content_type='application/octet-stream' + ) + try: + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = mock_response + api_response = self.api.upload_download_file(body=file1) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', + body=file_bytes, + content_type='application/octet-stream', + accept_content_type='application/octet-stream' + ) + self.assertTrue(isinstance(api_response.body, schemas.BinarySchema)) + self.assertTrue(isinstance(api_response.body, schemas.BytesSchema)) + self.assertTrue(isinstance(api_response.body, bytes)) + self.assertEqual(api_response.body, file_bytes) + except petstore_api.ApiException as e: + self.fail("upload_file() raised {0} unexpectedly".format(type(e))) + finally: + file1.close() + + # sending just bytes works also + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = mock_response + api_response = self.api.upload_download_file(body=file_bytes) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', + body=file_bytes, + content_type='application/octet-stream', + accept_content_type='application/octet-stream' + ) + self.assertEqual(api_response.body, file_bytes) + + def test_upload_download_file_rx_file(self): + import os + test_file_dir = os.path.realpath( + os.path.join(os.path.dirname(__file__), "..", "testfiles")) + file_name = '1px_pic1.png' + file_path1 = os.path.join(test_file_dir, file_name) + + with open(file_path1, "rb") as some_file: + file_bytes = some_file.read() + + # passing in file1 as the response body simulates a streamed response + file1 = open(file_path1, "rb") + + class StreamableBody: + """ + This class simulates http.client.HTTPResponse for a streamable response + """ + def __init__(self, file: io.BufferedReader): + self.fp = file + + def read(self, *args, **kwargs): + return self.fp.read(*args, **kwargs) + + def close(self): + self.fp.close() + + streamable_body = StreamableBody(file1) + + mock_response = self.__response( + streamable_body, + content_type='application/octet-stream', + preload_content=False + ) + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = mock_response + api_response = self.api.upload_download_file(body=file_bytes, stream=True) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', + body=file_bytes, + content_type='application/octet-stream', + accept_content_type='application/octet-stream', + stream=True + ) + self.assertTrue(file1.closed) + self.assertTrue(isinstance(api_response.body, schemas.BinarySchema)) + self.assertTrue(isinstance(api_response.body, schemas.FileSchema)) + self.assertTrue(isinstance(api_response.body, schemas.FileIO)) + self.assertEqual(api_response.body.read(), file_bytes) + api_response.body.close() + os.unlink(api_response.body.name) + + file1 = open(file_path1, "rb") + streamable_body = StreamableBody(file1) + saved_file_name = "fileName.abc" + + """ + when streaming is used and the response contains the content disposition header with a filename + that filename is used when saving the file locally + """ + mock_response = self.__response( + streamable_body, + content_type='application/octet-stream', + headers={'content-disposition': f'attachment; filename="{saved_file_name}"'}, + preload_content=False + ) + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = mock_response + api_response = self.api.upload_download_file(body=file_bytes, stream=True) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', + body=file_bytes, + content_type='application/octet-stream', + accept_content_type='application/octet-stream', + stream=True + ) + self.assertTrue(file1.closed) + self.assertTrue(isinstance(api_response.body, schemas.BinarySchema)) + self.assertTrue(isinstance(api_response.body, schemas.FileSchema)) + self.assertTrue(isinstance(api_response.body, schemas.FileIO)) + self.assertTrue(api_response.body.name.endswith(saved_file_name)) + self.assertEqual(api_response.body.read(), file_bytes) + api_response.body.close() + os.unlink(api_response.body.name) + + def test_upload_file(self): + """Test case for upload_file + uploads a file using multipart/form-data # noqa: E501 + """ + import os + test_file_dir = os.path.realpath( + os.path.join(os.path.dirname(__file__), "..", "testfiles")) + file_name = '1px_pic1.png' + file_path1 = os.path.join(test_file_dir, file_name) + + with open(file_path1, "rb") as some_file: + file_bytes = some_file.read() + file1 = open(file_path1, "rb") + response_json = { + 'code': 200, + 'type': 'blah', + 'message': 'file upload succeeded' + } + try: + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = self.__response( + self.__json_bytes(response_json) + ) + api_response = self.api.upload_file(body={'file': file1}) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/uploadFile', + fields=( + api_client.RequestField( + name='file', + data=file_bytes, + filename=file_name, + headers={'Content-Type': 'application/octet-stream'} + ), + ), + content_type='multipart/form-data' + ) + self.assertEqual(api_response.body, response_json) + except petstore_api.ApiException as e: + self.fail("upload_file() raised {0} unexpectedly".format(type(e))) + finally: + file1.close() + + # sending just bytes works also + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = self.__response( + self.__json_bytes(response_json) + ) + api_response = self.api.upload_file(body={'file': file_bytes}) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/uploadFile', + fields=( + api_client.RequestField( + name='file', + data=file_bytes, + headers={'Content-Type': 'application/octet-stream'} + ), + ), + content_type='multipart/form-data' + ) + self.assertEqual(api_response.body, response_json) + + # passing in an array of files to when file only allows one + # raises an exceptions + try: + file = open(file_path1, "rb") + with self.assertRaises(petstore_api.ApiTypeError): + self.api.upload_file(body={'file': [file]}) + finally: + file.close() + + # passing in a closed file raises an exception + with self.assertRaises(ValueError): + file = open(file_path1, "rb") + file.close() + self.api.upload_file(body={'file': file}) + + def test_upload_files(self): + """Test case for upload_files + uploads files using multipart/form-data # noqa: E501 + """ + import os + test_file_dir = os.path.realpath( + os.path.join(os.path.dirname(__file__), "..", "testfiles")) + file_name = '1px_pic1.png' + file_path1 = os.path.join(test_file_dir, file_name) + + with open(file_path1, "rb") as some_file: + file_bytes = some_file.read() + file1 = open(file_path1, "rb") + response_json = { + 'code': 200, + 'type': 'blah', + 'message': 'file upload succeeded' + } + try: + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = self.__response( + self.__json_bytes(response_json) + ) + api_response = self.api.upload_files(body={'files': [file1, file1]}) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/uploadFiles', + fields=( + api_client.RequestField( + name='files', + data=file_bytes, + filename=file_name, + headers={'Content-Type': 'application/octet-stream'} + ), + api_client.RequestField( + name='files', + data=file_bytes, + filename=file_name, + headers={'Content-Type': 'application/octet-stream'} + ), + ), + content_type='multipart/form-data' + ) + self.assertEqual(api_response.body, response_json) + except petstore_api.ApiException as e: + self.fail("upload_file() raised {0} unexpectedly".format(type(e))) + finally: + file1.close() + + # sending just bytes works also + with patch.object(RESTClientObject, 'request') as mock_request: + mock_request.return_value = self.__response( + self.__json_bytes(response_json) + ) + api_response = self.api.upload_files(body={'files': [file_bytes, file_bytes]}) + self.__assert_request_called_with( + mock_request, + 'http://petstore.swagger.io:80/v2/fake/uploadFiles', + fields=( + api_client.RequestField( + name='files', + data=file_bytes, + headers={'Content-Type': 'application/octet-stream'} + ), + api_client.RequestField( + name='files', + data=file_bytes, + headers={'Content-Type': 'application/octet-stream'} + ), + ), + content_type='multipart/form-data' + ) + self.assertEqual(api_response.body, response_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_format_test.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_format_test.py new file mode 100644 index 000000000000..915783953177 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_format_test.py @@ -0,0 +1,134 @@ +# 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 decimal import Decimal +import datetime +import unittest + +import petstore_api +from petstore_api.model.format_test import FormatTest +from petstore_api.schemas import BinarySchema, BytesSchema, frozendict, Singleton + + +class TestFormatTest(unittest.TestCase): + """FormatTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_FormatTest(self): + """Test FormatTest""" + + required_args = dict( + number=32.5, + byte='a', + date='2021-01-01', + password='abcdefghij' + ) + # int32 + # under min + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(int32=-2147483649, **required_args) + # over max + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(int32=2147483648, **required_args) + # valid values in range work + valid_values = [-2147483648, 2147483647] + for valid_value in valid_values: + model = FormatTest(int32=valid_value, **required_args) + assert model.int32 == valid_value + + # int64 + # under min + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(int64=-9223372036854775809, **required_args) + # over max + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(int64=9223372036854775808, **required_args) + # valid values in range work + valid_values = [-9223372036854775808, 9223372036854775807] + for valid_value in valid_values: + model = FormatTest(int64=valid_value, **required_args) + assert model.int64 == valid_value + + # float32 + # under min + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(float32=-3.402823466385289e+38, **required_args) + # over max + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(float32=3.402823466385289e+38, **required_args) + # valid values in range work + valid_values = [-3.4028234663852886e+38, 3.4028234663852886e+38] + for valid_value in valid_values: + model = FormatTest(float32=valid_value, **required_args) + assert model.float32 == valid_value + + # float64 + # under min, Decimal is used because flat can only store 64bit numbers and the max and min + # take up more space than 64bit + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(float64=Decimal('-1.7976931348623157082e+308'), **required_args) + # over max + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(float64=Decimal('1.7976931348623157082e+308'), **required_args) + valid_values = [-1.7976931348623157E+308, 1.7976931348623157E+308] + for valid_value in valid_values: + model = FormatTest(float64=valid_value, **required_args) + assert model.float64 == valid_value + + # unique_items with duplicates throws exception + with self.assertRaises(petstore_api.ApiValueError): + model = FormatTest(arrayWithUniqueItems=[0, 1, 1], **required_args) + # no duplicates works + values = [0, 1, 2] + model = FormatTest(arrayWithUniqueItems=values, **required_args) + assert model.arrayWithUniqueItems == tuple(values) + + # __bool__ value of noneProp is False + model = FormatTest(noneProp=None, **required_args) + assert isinstance(model.noneProp, Singleton) + self.assertFalse(model.noneProp) + self.assertTrue(model.noneProp.is_none()) + + # binary check + model = FormatTest(binary=b'123', **required_args) + assert isinstance(model.binary, BinarySchema) + assert isinstance(model.binary, BytesSchema) + assert isinstance(model.binary, bytes) + assert model == frozendict( + binary=b'123', + number=Decimal(32.5), + byte='a', + date='2021-01-01', + password='abcdefghij' + ) + + def test_multiple_of(self): + with self.assertRaisesRegex( + petstore_api.exceptions.ApiValueError, + r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" + ): + inst = FormatTest( + byte='3', + date=datetime.date(2000, 1, 1), + password="abcdefghijkl", + integer=31, # Value is supposed to be multiple of '2'. An error must be raised + number=65.0, + float=62.4 + ) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit.py new file mode 100644 index 000000000000..7d31b94a8252 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit.py @@ -0,0 +1,170 @@ +# 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 +import unittest + +import petstore_api +from petstore_api.model import apple +from petstore_api.model import banana +from petstore_api.model.fruit import Fruit +from petstore_api.schemas import Singleton + + +class TestFruit(unittest.TestCase): + """Fruit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFruit(self): + """Test Fruit""" + + # make an instance of Fruit, a composed schema oneOf model + # banana test + length_cm = 20.3 + color = 'yellow' + fruit = Fruit(lengthCm=length_cm, color=color) + # check its properties + self.assertEqual(fruit.lengthCm, length_cm) + self.assertEqual(fruit['lengthCm'], length_cm) + self.assertEqual(fruit.get('lengthCm'), length_cm) + self.assertEqual(getattr(fruit, 'lengthCm'), length_cm) + self.assertEqual(fruit.color, color) + self.assertEqual(fruit['color'], color) + self.assertEqual(getattr(fruit, 'color'), color) + # check the dict representation + self.assertEqual( + fruit, + { + 'lengthCm': length_cm, + 'color': color + } + ) + # setting values after instance creation is not allowed + with self.assertRaises(TypeError): + fruit['color'] = 'some value' + + # Assert that we can call the builtin hasattr() function. + # hasattr should return False for non-existent attribute. + # Internally hasattr catches the AttributeError exception. + self.assertFalse(hasattr(fruit, 'invalid_variable')) + + # Assert that we can call the builtin hasattr() function. + # hasattr should return True for existent attribute. + self.assertTrue(hasattr(fruit, 'color')) + + # getting a value that doesn't exist raises an exception + # with a key + with self.assertRaises(KeyError): + fruit['cultivar'] + # with getattr + # Per Python doc, if the named attribute does not exist, + # default is returned if provided. + self.assertEqual(getattr(fruit, 'cultivar', 'some value'), 'some value') + self.assertEqual(fruit.get('cultivar'), None) + self.assertEqual(fruit.get('cultivar', 'some value'), 'some value') + + # Per Python doc, if the named attribute does not exist, + # default is returned if provided, otherwise AttributeError is raised. + with self.assertRaises(AttributeError): + getattr(fruit, 'cultivar') + + # make sure that the ModelComposed class properties are correct + # model._composed_schemas stores the anyOf/allOf/oneOf info + self.assertEqual( + fruit._composed_schemas, + { + 'anyOf': [], + 'allOf': [], + 'oneOf': [ + apple.Apple, + banana.Banana, + ], + } + ) + + """ + including extra parameters does not raise an exception + because objects support additional properties by default + """ + kwargs = dict( + color=color, + lengthCm=length_cm, + additional_string='some value', + additional_date='2021-01-02', + ) + + fruit = Fruit._from_openapi_data(**kwargs) + self.assertEqual( + fruit, + kwargs + ) + + fruit = Fruit(**kwargs) + self.assertEqual( + fruit, + kwargs + ) + + # including input parameters for two oneOf instances raise an exception + with self.assertRaises(petstore_api.ApiValueError): + Fruit( + lengthCm=length_cm, + cultivar='granny smith' + ) + + # make an instance of Fruit, a composed schema oneOf model + # apple test + color = 'red' + cultivar = 'golden delicious' + fruit = Fruit(color=color, cultivar=cultivar) + # check its properties + self.assertEqual(fruit.color, color) + self.assertEqual(fruit['color'], color) + self.assertEqual(getattr(fruit, 'color'), color) + self.assertEqual(fruit.cultivar, cultivar) + self.assertEqual(fruit['cultivar'], cultivar) + self.assertEqual(getattr(fruit, 'cultivar'), cultivar) + # check the dict representation + self.assertEqual( + fruit, + { + 'color': color, + 'cultivar': cultivar + } + ) + + def testFruitNullValue(self): + # Since 'apple' is nullable, validate we can create an apple with the 'null' value. + fruit = apple.Apple(None) + assert isinstance(fruit, Singleton) + assert isinstance(fruit, apple.Apple) + assert fruit.is_none() is True + + # 'banana' is not nullable. + # TODO cast this into ApiTypeError? + with self.assertRaises(TypeError): + banana.Banana(None) + + # Since 'fruit' has oneOf 'apple', 'banana' and 'apple' is nullable, + # validate we can create a fruit with the 'null' value. + fruit = Fruit(None) + assert isinstance(fruit, Singleton) + assert isinstance(fruit, apple.Apple) + assert isinstance(fruit, Fruit) + assert fruit.is_none() is True + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit_req.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit_req.py new file mode 100644 index 000000000000..e777e603e1a1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_fruit_req.py @@ -0,0 +1,122 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model import apple_req +from petstore_api.model import banana_req +from petstore_api.model.fruit_req import FruitReq +from petstore_api.schemas import NoneSchema, Singleton + + +class TestFruitReq(unittest.TestCase): + """FruitReq unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFruitReq(self): + """Test FruitReq""" + + # make an instance of Fruit, a composed schema oneOf model + # banana test + length_cm = 20.3 + fruit = FruitReq(lengthCm=length_cm) + # check its properties + self.assertEqual(fruit.lengthCm, length_cm) + self.assertEqual(fruit['lengthCm'], length_cm) + self.assertEqual(getattr(fruit, 'lengthCm'), length_cm) + # check the dict representation + self.assertEqual( + fruit, + { + 'lengthCm': length_cm, + } + ) + # setting values after instance creation is not allowed + with self.assertRaises(TypeError): + fruit['lengthCm'] = 'some value' + + # setting values after instance creation is not allowed + with self.assertRaises(AttributeError): + setattr(fruit, 'lengthCm', 'some value') + + # getting a value that doesn't exist raises an exception + # with a key + with self.assertRaises(KeyError): + invalid_variable = fruit['cultivar'] + + # with getattr + self.assertEqual(getattr(fruit, 'cultivar', 'some value'), 'some value') + + with self.assertRaises(AttributeError): + getattr(fruit, 'cultivar') + + # make sure that the ModelComposed class properties are correct + # model._composed_schemas stores the anyOf/allOf/oneOf info + self.assertEqual( + fruit._composed_schemas, + { + 'anyOf': [], + 'allOf': [], + 'oneOf': [ + NoneSchema, + apple_req.AppleReq, + banana_req.BananaReq, + ], + } + ) + + # including extra parameters raises an exception + with self.assertRaises(petstore_api.ApiValueError): + fruit = FruitReq( + length_cm=length_cm, + unknown_property='some value' + ) + + # including input parameters for two oneOf instances raise an exception + with self.assertRaises(petstore_api.ApiValueError): + fruit = FruitReq( + length_cm=length_cm, + cultivar='granny smith' + ) + + # make an instance of Fruit, a composed schema oneOf model + # apple test + cultivar = 'golden delicious' + fruit = FruitReq(cultivar=cultivar) + # check its properties + self.assertEqual(fruit.cultivar, cultivar) + self.assertEqual(fruit['cultivar'], cultivar) + self.assertEqual(getattr(fruit, 'cultivar'), cultivar) + # check the dict representation + self.assertEqual( + fruit, + { + 'cultivar': cultivar + } + ) + + # we can pass in None + fruit = FruitReq(None) + assert isinstance(fruit, Singleton) + assert isinstance(fruit, FruitReq) + assert isinstance(fruit, NoneSchema) + assert fruit.is_none() is True + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_gm_fruit.py new file mode 100644 index 000000000000..6d27f7c9dab8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_gm_fruit.py @@ -0,0 +1,135 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model import apple +from petstore_api.model import banana +from petstore_api.model.gm_fruit import GmFruit +from petstore_api.schemas import frozendict + +class TestGmFruit(unittest.TestCase): + """GmFruit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGmFruit(self): + """Test GmFruit""" + + # make an instance of GmFruit, a composed schema anyOf model + # banana test + length_cm = 20.3 + color = 'yellow' + cultivar = 'banaple' + fruit = GmFruit(lengthCm=length_cm, color=color, cultivar=cultivar) + assert isinstance(fruit, GmFruit) + assert isinstance(fruit, banana.Banana) + assert isinstance(fruit, apple.Apple) + assert isinstance(fruit, frozendict) + # check its properties + self.assertEqual(fruit.lengthCm, length_cm) + self.assertEqual(fruit['lengthCm'], length_cm) + self.assertEqual(getattr(fruit, 'lengthCm'), length_cm) + self.assertEqual(fruit.color, color) + self.assertEqual(fruit['color'], color) + self.assertEqual(getattr(fruit, 'color'), color) + # check the dict representation + self.assertEqual( + fruit, + { + 'lengthCm': length_cm, + 'color': color, + 'cultivar': cultivar + } + ) + + with self.assertRaises(KeyError): + invalid_variable = fruit['origin'] + # with getattr + self.assertTrue(getattr(fruit, 'origin', 'some value'), 'some value') + + # make sure that the ModelComposed class properties are correct + # model._composed_schemas stores the anyOf/allOf/oneOf info + self.assertEqual( + fruit._composed_schemas, + { + 'anyOf': [ + apple.Apple, + banana.Banana, + ], + 'allOf': [], + 'oneOf': [], + } + ) + + # including extra parameters works + fruit = GmFruit( + color=color, + length_cm=length_cm, + cultivar=cultivar, + unknown_property='some value' + ) + + # including input parameters for both anyOf instances works + color = 'orange' + color_stored = b'orange' + fruit = GmFruit( + color=color, + cultivar=cultivar, + length_cm=length_cm + ) + self.assertEqual(fruit.color, color) + self.assertEqual(fruit['color'], color) + self.assertEqual(getattr(fruit, 'color'), color) + self.assertEqual(fruit.cultivar, cultivar) + self.assertEqual(fruit['cultivar'], cultivar) + self.assertEqual(getattr(fruit, 'cultivar'), cultivar) + self.assertEqual(fruit.length_cm, length_cm) + self.assertEqual(fruit['length_cm'], length_cm) + self.assertEqual(getattr(fruit, 'length_cm'), length_cm) + + # make an instance of GmFruit, a composed schema anyOf model + # apple test + color = 'red' + cultivar = 'golden delicious' + origin = 'California' + fruit = GmFruit(color=color, cultivar=cultivar, origin=origin) + # check its properties + self.assertEqual(fruit.color, color) + self.assertEqual(fruit['color'], color) + self.assertEqual(getattr(fruit, 'color'), color) + self.assertEqual(fruit.cultivar, cultivar) + self.assertEqual(fruit['cultivar'], cultivar) + self.assertEqual(getattr(fruit, 'cultivar'), cultivar) + + self.assertEqual(fruit.origin, origin) + self.assertEqual(fruit['origin'], origin) + self.assertEqual(getattr(fruit, 'origin'), origin) + + # check the dict representation + self.assertEqual( + fruit, + { + 'color': color, + 'cultivar': cultivar, + 'origin': origin, + } + ) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_http_signature.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_http_signature.py new file mode 100644 index 000000000000..9783829e30bc --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_http_signature.py @@ -0,0 +1,518 @@ +# # coding: utf-8 +# +# # flake8: noqa +# +# """ +# Run the tests. +# $ docker pull swaggerapi/petstore +# $ docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore +# $ pip install nose (optional) +# $ cd petstore_api-python +# $ nosetests -v +# """ +# +# from collections import namedtuple +# from datetime import datetime, timedelta +# import base64 +# import json +# import os +# import re +# import shutil +# import unittest +# from urllib.parse import urlencode, urlparse +# +# from Crypto.Hash import SHA256, SHA512 +# from Crypto.PublicKey import ECC, RSA +# from Crypto.Signature import pkcs1_15, pss, DSS +# +# import petstore_api +# from petstore_api.model import category, tag, pet +# from petstore_api.api.pet_api import PetApi +# from petstore_api import Configuration, signing +# from petstore_api.rest import ( +# RESTClientObject, +# RESTResponse +# ) +# +# from petstore_api.exceptions import ( +# ApiException, +# ApiValueError, +# ApiTypeError, +# ) +# +# from .util import id_gen +# +# import urllib3 +# +# from unittest.mock import patch +# +# HOST = 'http://localhost/v2' +# +# # This test RSA private key below is published in Appendix C 'Test Values' of +# # https://www.ietf.org/id/draft-cavage-http-signatures-12.txt +# RSA_TEST_PRIVATE_KEY = """-----BEGIN RSA PRIVATE KEY----- +# MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF +# NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F +# UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB +# AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA +# QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK +# kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg +# f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u +# 412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc +# mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 +# kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA +# gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW +# G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI +# 7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== +# -----END RSA PRIVATE KEY-----""" +# +# +# class TimeoutWithEqual(urllib3.Timeout): +# def __init__(self, *arg, **kwargs): +# super(TimeoutWithEqual, self).__init__(*arg, **kwargs) +# +# def __eq__(self, other): +# return self._read == other._read and self._connect == other._connect and self.total == other.total +# +# class MockPoolManager(object): +# def __init__(self, tc): +# self._tc = tc +# self._reqs = [] +# +# def expect_request(self, *args, **kwargs): +# self._reqs.append((args, kwargs)) +# +# def set_signing_config(self, signing_cfg): +# self.signing_cfg = signing_cfg +# self._tc.assertIsNotNone(self.signing_cfg) +# self.pubkey = self.signing_cfg.get_public_key() +# self._tc.assertIsNotNone(self.pubkey) +# +# def request(self, *actual_request_target, **actual_request_headers_and_body): +# self._tc.assertTrue(len(self._reqs) > 0) +# expected_results = self._reqs.pop(0) +# self._tc.maxDiff = None +# expected_request_target = expected_results[0] # The expected HTTP method and URL path. +# expected_request_headers_and_body = expected_results[1] # dict that contains the expected body, headers +# self._tc.assertEqual(expected_request_target, actual_request_target) +# # actual_request_headers_and_body is a dict that contains the actual body, headers +# for k, expected in expected_request_headers_and_body.items(): +# self._tc.assertIn(k, actual_request_headers_and_body) +# if k == 'body': +# actual_body = actual_request_headers_and_body[k] +# self._tc.assertEqual(expected, actual_body) +# elif k == 'headers': +# actual_headers = actual_request_headers_and_body[k] +# for expected_header_name, expected_header_value in expected.items(): +# # Validate the generated request contains the expected header. +# self._tc.assertIn(expected_header_name, actual_headers) +# actual_header_value = actual_headers[expected_header_name] +# # Compare the actual value of the header against the expected value. +# pattern = re.compile(expected_header_value) +# m = pattern.match(actual_header_value) +# self._tc.assertTrue(m, msg="Expected:\n{0}\nActual:\n{1}".format( +# expected_header_value,actual_header_value)) +# if expected_header_name == 'Authorization': +# self._validate_authorization_header( +# expected_request_target, actual_headers, actual_header_value) +# elif k == 'timeout': +# self._tc.assertEqual(expected, actual_request_headers_and_body[k]) +# return urllib3.HTTPResponse(status=200, body=b'test') +# +# def _validate_authorization_header(self, request_target, actual_headers, authorization_header): +# """Validate the signature. +# """ +# # Extract (created) +# r1 = re.compile(r'created=([0-9]+)') +# m1 = r1.search(authorization_header) +# self._tc.assertIsNotNone(m1) +# created = m1.group(1) +# +# # Extract list of signed headers +# r1 = re.compile(r'headers="([^"]+)"') +# m1 = r1.search(authorization_header) +# self._tc.assertIsNotNone(m1) +# headers = m1.group(1).split(' ') +# signed_headers_list = [] +# for h in headers: +# if h == '(created)': +# signed_headers_list.append((h, created)) +# elif h == '(request-target)': +# url = request_target[1] +# target_path = urlparse(url).path +# signed_headers_list.append((h, "{0} {1}".format(request_target[0].lower(), target_path))) +# else: +# value = next((v for k, v in actual_headers.items() if k.lower() == h), None) +# self._tc.assertIsNotNone(value) +# signed_headers_list.append((h, value)) +# header_items = [ +# "{0}: {1}".format(key.lower(), value) for key, value in signed_headers_list] +# string_to_sign = "\n".join(header_items) +# digest = None +# if self.signing_cfg.hash_algorithm == signing.HASH_SHA512: +# digest = SHA512.new() +# elif self.signing_cfg.hash_algorithm == signing.HASH_SHA256: +# digest = SHA256.new() +# else: +# self._tc.fail("Unsupported hash algorithm: {0}".format(self.signing_cfg.hash_algorithm)) +# digest.update(string_to_sign.encode()) +# b64_body_digest = base64.b64encode(digest.digest()).decode() +# +# # Extract the signature +# r2 = re.compile(r'signature="([^"]+)"') +# m2 = r2.search(authorization_header) +# self._tc.assertIsNotNone(m2) +# b64_signature = m2.group(1) +# signature = base64.b64decode(b64_signature) +# # Build the message +# signing_alg = self.signing_cfg.signing_algorithm +# if signing_alg is None: +# # Determine default +# if isinstance(self.pubkey, RSA.RsaKey): +# signing_alg = signing.ALGORITHM_RSASSA_PSS +# elif isinstance(self.pubkey, ECC.EccKey): +# signing_alg = signing.ALGORITHM_ECDSA_MODE_FIPS_186_3 +# else: +# self._tc.fail("Unsupported key: {0}".format(type(self.pubkey))) +# +# if signing_alg == signing.ALGORITHM_RSASSA_PKCS1v15: +# pkcs1_15.new(self.pubkey).verify(digest, signature) +# elif signing_alg == signing.ALGORITHM_RSASSA_PSS: +# pss.new(self.pubkey).verify(digest, signature) +# elif signing_alg == signing.ALGORITHM_ECDSA_MODE_FIPS_186_3: +# verifier = DSS.new(key=self.pubkey, mode=signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, +# encoding='der') +# verifier.verify(digest, signature) +# elif signing_alg == signing.ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979: +# verifier = DSS.new(key=self.pubkey, mode=signing.ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979, +# encoding='der') +# verifier.verify(digest, signature) +# else: +# self._tc.fail("Unsupported signing algorithm: {0}".format(signing_alg)) +# +# class PetApiTests(unittest.TestCase): +# +# @classmethod +# def setUpClass(cls): +# cls.setUpModels() +# cls.setUpFiles() +# +# @classmethod +# def tearDownClass(cls): +# file_paths = [ +# cls.rsa_key_path, +# cls.rsa4096_key_path, +# cls.ec_p521_key_path, +# ] +# for file_path in file_paths: +# os.unlink(file_path) +# +# @classmethod +# def setUpModels(cls): +# cls.category = category.Category() +# cls.category.id = id_gen() +# cls.category.name = "dog" +# cls.tag = tag.Tag() +# cls.tag.id = id_gen() +# cls.tag.name = "python-pet-tag" +# cls.pet = pet.Pet( +# name="hello kity", +# photo_urls=["http://foo.bar.com/1", "http://foo.bar.com/2"] +# ) +# cls.pet.id = id_gen() +# cls.pet.status = "sold" +# cls.pet.category = cls.category +# cls.pet.tags = [cls.tag] +# +# @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.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') +# +# if not os.path.exists(cls.rsa_key_path): +# with open(cls.rsa_key_path, 'w') as f: +# f.write(RSA_TEST_PRIVATE_KEY) +# +# if not os.path.exists(cls.rsa4096_key_path): +# key = RSA.generate(4096) +# private_key = key.export_key( +# passphrase=cls.private_key_passphrase, +# protection='PEM' +# ) +# with open(cls.rsa4096_key_path, "wb") as f: +# f.write(private_key) +# +# if not os.path.exists(cls.ec_p521_key_path): +# key = ECC.generate(curve='P-521') +# private_key = key.export_key( +# format='PEM', +# passphrase=cls.private_key_passphrase, +# use_pkcs8=True, +# protection='PBKDF2WithHMAC-SHA1AndAES128-CBC' +# ) +# with open(cls.ec_p521_key_path, "wt") as f: +# f.write(private_key) +# +# def test_valid_http_signature(self): +# privkey_path = self.rsa_key_path +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=privkey_path, +# private_key_passphrase=self.private_key_passphrase, +# signing_algorithm=signing.ALGORITHM_RSASSA_PKCS1v15, +# signed_headers=[ +# signing.HEADER_REQUEST_TARGET, +# signing.HEADER_CREATED, +# signing.HEADER_HOST, +# signing.HEADER_DATE, +# signing.HEADER_DIGEST, +# 'Content-Type' +# ] +# ) +# config = Configuration(host=HOST, signing_info=signing_cfg) +# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # the HTTP signature scheme. +# config.access_token = None +# +# api_client = petstore_api.ApiClient(config) +# pet_api = PetApi(api_client) +# +# mock_pool = MockPoolManager(self) +# api_client.rest_client.pool_manager = mock_pool +# +# mock_pool.set_signing_config(signing_cfg) +# mock_pool.expect_request('POST', HOST + '/pet', +# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), +# headers={'Content-Type': r'application/json', +# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' +# r'headers="\(request-target\) \(created\) host date digest content-type",' +# r'signature="[a-zA-Z0-9+/=]+"', +# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, +# preload_content=True, timeout=None) +# +# pet_api.add_pet(self.pet) +# +# def test_valid_http_signature_with_defaults(self): +# privkey_path = self.rsa4096_key_path +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=privkey_path, +# 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 +# # the HTTP signature scheme. +# config.access_token = None +# +# api_client = petstore_api.ApiClient(config) +# pet_api = PetApi(api_client) +# +# mock_pool = MockPoolManager(self) +# api_client.rest_client.pool_manager = mock_pool +# +# mock_pool.set_signing_config(signing_cfg) +# mock_pool.expect_request('POST', HOST + '/pet', +# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), +# headers={'Content-Type': r'application/json', +# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' +# r'headers="\(created\)",' +# r'signature="[a-zA-Z0-9+/=]+"', +# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, +# preload_content=True, timeout=None) +# +# pet_api.add_pet(self.pet) +# +# def test_valid_http_signature_rsassa_pkcs1v15(self): +# privkey_path = self.rsa4096_key_path +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=privkey_path, +# private_key_passphrase=self.private_key_passphrase, +# signing_algorithm=signing.ALGORITHM_RSASSA_PKCS1v15, +# signed_headers=[ +# signing.HEADER_REQUEST_TARGET, +# signing.HEADER_CREATED, +# ] +# ) +# config = Configuration(host=HOST, signing_info=signing_cfg) +# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # the HTTP signature scheme. +# config.access_token = None +# +# api_client = petstore_api.ApiClient(config) +# pet_api = PetApi(api_client) +# +# mock_pool = MockPoolManager(self) +# api_client.rest_client.pool_manager = mock_pool +# +# mock_pool.set_signing_config(signing_cfg) +# mock_pool.expect_request('POST', HOST + '/pet', +# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), +# headers={'Content-Type': r'application/json', +# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' +# r'headers="\(request-target\) \(created\)",' +# r'signature="[a-zA-Z0-9+/=]+"', +# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, +# preload_content=True, timeout=None) +# +# pet_api.add_pet(self.pet) +# +# def test_valid_http_signature_rsassa_pss(self): +# privkey_path = self.rsa4096_key_path +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=privkey_path, +# private_key_passphrase=self.private_key_passphrase, +# signing_algorithm=signing.ALGORITHM_RSASSA_PSS, +# signed_headers=[ +# signing.HEADER_REQUEST_TARGET, +# signing.HEADER_CREATED, +# ] +# ) +# config = Configuration(host=HOST, signing_info=signing_cfg) +# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # the HTTP signature scheme. +# config.access_token = None +# +# api_client = petstore_api.ApiClient(config) +# pet_api = PetApi(api_client) +# +# mock_pool = MockPoolManager(self) +# api_client.rest_client.pool_manager = mock_pool +# +# mock_pool.set_signing_config(signing_cfg) +# mock_pool.expect_request('POST', HOST + '/pet', +# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), +# headers={'Content-Type': r'application/json', +# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' +# r'headers="\(request-target\) \(created\)",' +# r'signature="[a-zA-Z0-9+/=]+"', +# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, +# preload_content=True, timeout=None) +# +# pet_api.add_pet(self.pet) +# +# def test_valid_http_signature_ec_p521(self): +# privkey_path = self.ec_p521_key_path +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=privkey_path, +# private_key_passphrase=self.private_key_passphrase, +# hash_algorithm=signing.HASH_SHA512, +# signed_headers=[ +# signing.HEADER_REQUEST_TARGET, +# signing.HEADER_CREATED, +# ] +# ) +# config = Configuration(host=HOST, signing_info=signing_cfg) +# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # the HTTP signature scheme. +# config.access_token = None +# +# api_client = petstore_api.ApiClient(config) +# pet_api = PetApi(api_client) +# +# mock_pool = MockPoolManager(self) +# api_client.rest_client.pool_manager = mock_pool +# +# mock_pool.set_signing_config(signing_cfg) +# mock_pool.expect_request('POST', HOST + '/pet', +# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), +# headers={'Content-Type': r'application/json', +# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' +# r'headers="\(request-target\) \(created\)",' +# r'signature="[a-zA-Z0-9+/=]+"', +# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, +# preload_content=True, timeout=None) +# +# pet_api.add_pet(self.pet) +# +# def test_invalid_configuration(self): +# # Signing scheme must be valid. +# with self.assertRaises(Exception) as cm: +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme='foo', +# private_key_path=self.ec_p521_key_path +# ) +# self.assertTrue(re.match('Unsupported security scheme', str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# +# # Signing scheme must be specified. +# with self.assertRaises(Exception) as cm: +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# private_key_path=self.ec_p521_key_path, +# signing_scheme=None +# ) +# self.assertTrue(re.match('Unsupported security scheme', str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# +# # Private key passphrase is missing but key is encrypted. +# with self.assertRaises(Exception) as cm: +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=self.ec_p521_key_path, +# ) +# self.assertTrue(re.match('Not a valid clear PKCS#8 structure', str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# +# # File containing private key must exist. +# with self.assertRaises(Exception) as cm: +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path='foobar', +# ) +# self.assertTrue(re.match('Private key file does not exist', str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# +# # The max validity must be a positive value. +# with self.assertRaises(Exception) as cm: +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=self.ec_p521_key_path, +# signature_max_validity=timedelta(hours=-1) +# ) +# self.assertTrue(re.match('The signature max validity must be a positive value', +# str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# +# # Cannot include the 'Authorization' header. +# with self.assertRaises(Exception) as cm: +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=self.ec_p521_key_path, +# signed_headers=['Authorization'] +# ) +# self.assertTrue(re.match("'Authorization' header cannot be included", str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# +# # Cannot specify duplicate headers. +# with self.assertRaises(Exception) as cm: +# signing_cfg = signing.HttpSigningConfiguration( +# key_id="my-key-id", +# signing_scheme=signing.SCHEME_HS2019, +# private_key_path=self.ec_p521_key_path, +# signed_headers=['Host', 'Date', 'Host'] +# ) +# self.assertTrue(re.match('Cannot have duplicates in the signed_headers parameter', +# str(cm.exception)), +# 'Exception message: {0}'.format(str(cm.exception))) +# diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_integer_enum_one_value.py new file mode 100644 index 000000000000..a5d92cd0833e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_integer_enum_one_value.py @@ -0,0 +1,55 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue + + +class TestIntegerEnumOneValue(unittest.TestCase): + """IntegerEnumOneValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIntegerEnumOneValue(self): + """Test IntegerEnumOneValue""" + + with self.assertRaises(TypeError): + """ + a value must be passed in + We cannot auto assign values because that would break composition if + received payloads included this with no inputs and we the 0 value to the data to the incoming payload + One is not allowed to mutate incoming payloads because then: + - order of composed schema ingestion matters + - one can have default value collisions + - the added data will make expected schemas not match payloads + """ + model = IntegerEnumOneValue() + + model = IntegerEnumOneValue(0) + assert model == 0, "We can also pass in the value as a positional arg" + + # one cannot pass the value with the value keyword + with self.assertRaises(TypeError): + model = IntegerEnumOneValue(value=0) + + # one can pass in the enum value + model = IntegerEnumOneValue(IntegerEnumOneValue.POSITIVE_0) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_json_encoder.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_json_encoder.py new file mode 100644 index 000000000000..45cce4c0f02f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_json_encoder.py @@ -0,0 +1,50 @@ +# 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 +import unittest + +import petstore_api +from petstore_api import schemas +from petstore_api import api_client + + +class TestJSONEncoder(unittest.TestCase): + """Fruit unit test stubs""" + serializer = api_client.JSONEncoder() + + def test_receive_encode_str_types(self): + schema_to_value = { + schemas.StrSchema: 'hi', + schemas.DateSchema: '2021-05-09', + schemas.DateTimeSchema: '2020-01-01T00:00:00' + } + for schema, value in schema_to_value.items(): + inst = schema._from_openapi_data(value) + assert value == self.serializer.default(inst) + + def test_receive_encode_numeric_types(self): + value_to_schema = { + 1: schemas.IntSchema, + 1.0: schemas.Float32Schema, + 3.14: schemas.Float32Schema, + 4: schemas.NumberSchema, + 4.0: schemas.NumberSchema, + 7.14: schemas.NumberSchema, + } + for value, schema in value_to_schema.items(): + inst = schema._from_openapi_data(value) + pre_serialize_value = self.serializer.default(inst) + assert value == pre_serialize_value and type(value) == type(pre_serialize_value) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_mammal.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_mammal.py new file mode 100644 index 000000000000..9101280fc663 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_mammal.py @@ -0,0 +1,55 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.mammal import Mammal + + +class TestMammal(unittest.TestCase): + """Mammal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMammal(self): + """Test Mammal""" + + # tests that we can make a BasquePig by traveling through discriminator in Pig + m = Mammal(className="BasquePig") + from petstore_api.model import pig + from petstore_api.model import basque_pig + assert isinstance(m, Mammal) + assert isinstance(m, basque_pig.BasquePig) + assert isinstance(m, pig.Pig) + + # can make a Whale + m = Mammal(className="whale") + from petstore_api.model import whale + assert isinstance(m, whale.Whale) + + # can use the enum value + m = Mammal(className=whale.Whale.className.WHALE) + assert isinstance(m, whale.Whale) + + from petstore_api.model import zebra + m = Mammal(className='zebra') + assert isinstance(m, zebra.Zebra) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_no_additional_properties.py new file mode 100644 index 000000000000..7aff4811327f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_no_additional_properties.py @@ -0,0 +1,64 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.no_additional_properties import NoAdditionalProperties + + +class TestNoAdditionalProperties(unittest.TestCase): + """NoAdditionalProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNoAdditionalProperties(self): + """Test NoAdditionalProperties""" + + # works with only required + inst = NoAdditionalProperties(id=1) + + # works with required + optional + inst = NoAdditionalProperties(id=1, petId=2) + + # needs required + # TODO cast this to ApiTypeError? + with self.assertRaisesRegex( + TypeError, + r"missing 1 required keyword-only argument: 'id'" + ): + NoAdditionalProperties(petId=2) + + # may not be passed additional properties + # TODO cast this to ApiTypeError? + with self.assertRaisesRegex( + TypeError, + r"got an unexpected keyword argument 'invalidArg'" + ): + NoAdditionalProperties(id=2, invalidArg=2) + + # plural example + # TODO cast this to ApiTypeError? + with self.assertRaisesRegex( + TypeError, + r"got an unexpected keyword argument 'firstInvalidArg'" + ): + NoAdditionalProperties(id=2, firstInvalidArg=1, secondInvalidArg=1) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_nullable_string.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_nullable_string.py new file mode 100644 index 000000000000..2a704a708464 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_nullable_string.py @@ -0,0 +1,54 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.nullable_string import NullableString +from petstore_api.schemas import Schema, Singleton + + +class TestNullableString(unittest.TestCase): + """NullableString unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNullableString(self): + """Test NullableString""" + inst = NullableString(None) + assert isinstance(inst, Singleton) + assert isinstance(inst, NullableString) + assert isinstance(inst, Schema) + assert inst.is_none() is True + + inst = NullableString('approved') + assert isinstance(inst, NullableString) + assert isinstance(inst, Schema) + assert isinstance(inst, str) + assert inst == 'approved' + + invalid_values = [1] + for invalid_value in invalid_values: + with self.assertRaisesRegex( + petstore_api.ApiTypeError, + r"Invalid type. Required value type is one of \[NoneType, str\] and passed type was Decimal at \['args\[0\]'\]" + ): + NullableString(invalid_value) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_number_with_validations.py new file mode 100644 index 000000000000..5cf1dfaa9c53 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_number_with_validations.py @@ -0,0 +1,46 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.number_with_validations import NumberWithValidations + + +class TestNumberWithValidations(unittest.TestCase): + """NumberWithValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNumberWithValidations(self): + """Test NumberWithValidations""" + valid_values = [10.0, 15.0, 20.0] + for valid_value in valid_values: + model = NumberWithValidations(valid_value) + assert model == valid_value + + value_error_msg_pairs = ( + (9.0, r"Invalid value `9.0`, must be a value greater than or equal to `10` at \('args\[0\]',\)"), + (21.0, r"Invalid value `21.0`, must be a value less than or equal to `20` at \('args\[0\]',\)"), + ) + for invalid_value, error_msg in value_error_msg_pairs: + with self.assertRaisesRegex(petstore_api.ApiValueError, error_msg): + NumberWithValidations(invalid_value) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_model_with_ref_props.py new file mode 100644 index 000000000000..64a6a4c898f8 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_model_with_ref_props.py @@ -0,0 +1,49 @@ +# 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 +import sys +import unittest + +import petstore_api +from petstore_api.schemas import BoolClass, frozendict +from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps +from petstore_api.model.number_with_validations import NumberWithValidations + + +class TestObjectModelWithRefProps(unittest.TestCase): + """ObjectModelWithRefProps unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectModelWithRefProps(self): + """Test ObjectModelWithRefProps""" + self.assertEqual(ObjectModelWithRefProps.myNumber, NumberWithValidations) + + inst = ObjectModelWithRefProps(myNumber=15.0, myString="a", myBoolean=True) + assert isinstance(inst, ObjectModelWithRefProps) + assert isinstance(inst, frozendict) + assert set(inst.keys()) == {"myNumber", "myString", "myBoolean"} + assert inst.myNumber == 15.0 + assert isinstance(inst.myNumber, NumberWithValidations) + assert inst.myString == 'a' + assert isinstance(inst.myString, ObjectModelWithRefProps.myString) + assert bool(inst.myBoolean) is True + assert isinstance(inst.myBoolean, ObjectModelWithRefProps.myBoolean) + assert isinstance(inst.myBoolean, BoolClass) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_with_difficultly_named_props.py new file mode 100644 index 000000000000..386304ecc672 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_with_difficultly_named_props.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 sys +import unittest + +import petstore_api +from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps + + +class TestObjectWithDifficultlyNamedProps(unittest.TestCase): + """ObjectWithDifficultlyNamedProps unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ObjectWithDifficultlyNamedProps(self): + """Test ObjectWithDifficultlyNamedProps""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectWithDifficultlyNamedProps() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_with_validations.py new file mode 100644 index 000000000000..3a443dfa39a0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_object_with_validations.py @@ -0,0 +1,52 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.object_with_validations import ObjectWithValidations + + +class TestObjectWithValidations(unittest.TestCase): + """ObjectWithValidations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ObjectWithValidations(self): + """Test ObjectWithValidations""" + + with self.assertRaisesRegex( + petstore_api.ApiValueError, + r"Invalid value `frozendict.frozendict\({}\)`, number of properties must be greater than or equal to `2` at \('args\[0\]',\)" + ): + ObjectWithValidations({}) + + + with self.assertRaisesRegex( + petstore_api.ApiValueError, + r"Invalid value `frozendict.frozendict\({'a': 'a'}\)`, number of properties must be greater than or equal to `2` at \('args\[0\]',\)" + ): + # number of properties less than 2 fails + model = ObjectWithValidations(a='a') + + # 2 or more properties succeeds + model = ObjectWithValidations(a='a', b='b') + model = ObjectWithValidations(a='a', b='b', c='c') + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_parameters.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_parameters.py new file mode 100644 index 000000000000..49940bab9026 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_parameters.py @@ -0,0 +1,954 @@ +# 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 collections + +from petstore_api import api_client +from petstore_api import schemas + +ParamTestCase = collections.namedtuple('ParamTestCase', 'payload expected_serialization explode', defaults=[False]) + + +class TestParameter(unittest.TestCase): + in_type_to_parameter_cls = { + api_client.ParameterInType.PATH: api_client.PathParameter, + api_client.ParameterInType.QUERY: api_client.QueryParameter, + api_client.ParameterInType.COOKIE: api_client.CookieParameter, + api_client.ParameterInType.HEADER: api_client.HeaderParameter, + } + + def test_throws_exception_when_schema_and_content_omitted(self): + with self.assertRaises(ValueError): + api_client.QueryParameter( + name='' + ) + + def test_throws_exception_when_schema_and_content_input(self): + with self.assertRaises(ValueError): + schema = schemas.StrSchema + api_client.QueryParameter( + name='', + schema=schema, + content={'application/json': schema} + ) + + def test_succeeds_when_schema_or_content_input(self): + schema = schemas.StrSchema + api_client.QueryParameter( + name='', + schema=schema, + ) + api_client.QueryParameter( + name='', + content={'application/json': schema} + ) + + def test_succeeds_and_fails_for_style_and_in_type_combos(self): + style_to_in_type = { + api_client.ParameterStyle.MATRIX: {api_client.ParameterInType.PATH}, + api_client.ParameterStyle.LABEL: {api_client.ParameterInType.PATH}, + api_client.ParameterStyle.FORM: {api_client.ParameterInType.QUERY, api_client.ParameterInType.COOKIE}, + api_client.ParameterStyle.SIMPLE: {api_client.ParameterInType.PATH, api_client.ParameterInType.HEADER}, + api_client.ParameterStyle.SPACE_DELIMITED: {api_client.ParameterInType.QUERY}, + api_client.ParameterStyle.PIPE_DELIMITED: {api_client.ParameterInType.QUERY}, + api_client.ParameterStyle.DEEP_OBJECT: {api_client.ParameterInType.QUERY}, + } + schema = schemas.StrSchema + for style in style_to_in_type: + valid_in_types = style_to_in_type[style] + for valid_in_type in valid_in_types: + parameter_cls = self.in_type_to_parameter_cls[valid_in_type] + parameter_cls( + name='', + style=style, + schema=schema, + ) + invalid_in_types = {in_t for in_t in api_client.ParameterInType if in_t not in valid_in_types} + for invalid_in_type in invalid_in_types: + parameter_cls = self.in_type_to_parameter_cls[invalid_in_type] + with self.assertRaises(ValueError): + parameter_cls( + name='', + style=style, + schema=schema, + ) + + def test_throws_exception_when_invalid_name_input(self): + disallowed_names = {'Accept', 'Content-Type', 'Authorization'} + for disallowed_name in disallowed_names: + with self.assertRaises(ValueError): + api_client.HeaderParameter( + name=disallowed_name, + schema=schemas.StrSchema, + ) + + def test_query_style_form_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + () + ), + ParamTestCase( + 1, + (('color', '1'),) + ), + ParamTestCase( + 3.14, + (('color', '3.14'),) + ), + ParamTestCase( + 'blue', + (('color', 'blue'),) + ), + ParamTestCase( + 'hello world', + (('color', 'hello%20world'),) + ), + ParamTestCase( + '', + (('color', ''),) + ), + ParamTestCase( + True, + (('color', 'true'),) + ), + ParamTestCase( + False, + (('color', 'false'),) + ), + ParamTestCase( + [], + () + ), + ParamTestCase( + ['blue', 'black', 'brown'], + (('color', 'blue,black,brown'),) + ), + ParamTestCase( + ['blue', 'black', 'brown'], + ( + ('color', 'blue'), + ('color', 'black'), + ('color', 'brown'), + ), + explode=True + ), + ParamTestCase( + {}, + () + ), + ParamTestCase( + dict(R=100, G=200, B=150), + (('color', 'R,100,G,200,B,150'),) + ), + ParamTestCase( + dict(R=100, G=200, B=150), + ( + ('R', '100'), + ('G', '200'), + ('B', '150'), + ), + explode=True + ), + ) + for test_case in test_cases: + parameter = api_client.QueryParameter( + name=name, + style=api_client.ParameterStyle.FORM, + schema=schemas.AnyTypeSchema, + explode=test_case.explode, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_cookie_style_form_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + () + ), + ParamTestCase( + 1, + (('color', '1'),) + ), + ParamTestCase( + 3.14, + (('color', '3.14'),) + ), + ParamTestCase( + 'blue', + (('color', 'blue'),) + ), + ParamTestCase( + 'hello world', + (('color', 'hello%20world'),) + ), + ParamTestCase( + '', + (('color', ''),) + ), + ParamTestCase( + True, + (('color', 'true'),) + ), + ParamTestCase( + False, + (('color', 'false'),) + ), + ParamTestCase( + [], + () + ), + ParamTestCase( + ['blue', 'black', 'brown'], + (('color', 'blue,black,brown'),) + ), + ParamTestCase( + ['blue', 'black', 'brown'], + ( + ('color', 'blue'), + ('color', 'black'), + ('color', 'brown'), + ), + explode=True + ), + ParamTestCase( + {}, + () + ), + ParamTestCase( + dict(R=100, G=200, B=150), + (('color', 'R,100,G,200,B,150'),) + ), + ParamTestCase( + dict(R=100, G=200, B=150), + ( + ('R', '100'), + ('G', '200'), + ('B', '150'), + ), + explode=True + ), + ) + for test_case in test_cases: + parameter = api_client.CookieParameter( + name=name, + style=api_client.ParameterStyle.FORM, + schema=schemas.AnyTypeSchema, + explode=test_case.explode, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_style_simple_in_path_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + dict(color='') + ), + ParamTestCase( + 1, + dict(color='1') + ), + ParamTestCase( + 3.14, + dict(color='3.14') + ), + ParamTestCase( + 'blue', + dict(color='blue') + ), + ParamTestCase( + 'hello world', + dict(color='hello%20world') + ), + ParamTestCase( + '', + dict(color='') + ), + ParamTestCase( + True, + dict(color='true') + ), + ParamTestCase( + False, + dict(color='false') + ), + ParamTestCase( + [], + dict(color='') + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color='blue,black,brown') + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color='blue,black,brown'), + explode=True + ), + ParamTestCase( + {}, + dict(color='') + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color='R,100,G,200,B,150') + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color='R=100,G=200,B=150'), + explode=True + ), + ) + for test_case in test_cases: + parameter = api_client.PathParameter( + name=name, + style=api_client.ParameterStyle.SIMPLE, + schema=schemas.AnyTypeSchema, + explode=test_case.explode, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_style_simple_in_header_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + {} + ), + ParamTestCase( + 1, + dict(color='1') + ), + ParamTestCase( + 3.14, + dict(color='3.14') + ), + ParamTestCase( + 'blue', + dict(color='blue') + ), + ParamTestCase( + 'hello world', + dict(color='hello%20world') + ), + ParamTestCase( + '', + dict(color='') + ), + ParamTestCase( + True, + dict(color='true') + ), + ParamTestCase( + False, + dict(color='false') + ), + ParamTestCase( + [], + {} + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color='blue,black,brown') + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color='blue,black,brown'), + explode=True + ), + ParamTestCase( + {}, + {} + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color='R,100,G,200,B,150') + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color='R=100,G=200,B=150'), + explode=True + ), + ) + for test_case in test_cases: + print(test_case.payload) + parameter = api_client.HeaderParameter( + name=name, + style=api_client.ParameterStyle.SIMPLE, + schema=schemas.AnyTypeSchema, + explode=test_case.explode, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_style_label_in_path_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + dict(color='') + ), + ParamTestCase( + 1, + dict(color='.1') + ), + ParamTestCase( + 3.14, + dict(color='.3.14') + ), + ParamTestCase( + 'blue', + dict(color='.blue') + ), + ParamTestCase( + 'hello world', + dict(color='.hello%20world') + ), + ParamTestCase( + '', + dict(color='.') + ), + ParamTestCase( + True, + dict(color='.true') + ), + ParamTestCase( + False, + dict(color='.false') + ), + ParamTestCase( + [], + dict(color='') + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color='.blue.black.brown') + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color='.blue.black.brown'), + explode=True + ), + ParamTestCase( + {}, + dict(color='') + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color='.R.100.G.200.B.150') + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color='.R=100.G=200.B=150'), + explode=True + ), + ) + for test_case in test_cases: + parameter = api_client.PathParameter( + name=name, + style=api_client.ParameterStyle.LABEL, + schema=schemas.AnyTypeSchema, + explode=test_case.explode, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_style_matrix_in_path_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + dict(color='') + ), + ParamTestCase( + 1, + dict(color=';color=1') + ), + ParamTestCase( + 3.14, + dict(color=';color=3.14') + ), + ParamTestCase( + 'blue', + dict(color=';color=blue') + ), + ParamTestCase( + 'hello world', + dict(color=';color=hello%20world') + ), + ParamTestCase( + '', + dict(color=';color') + ), + ParamTestCase( + True, + dict(color=';color=true') + ), + ParamTestCase( + False, + dict(color=';color=false') + ), + ParamTestCase( + [], + dict(color='') + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color=';color=blue,black,brown') + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color=';color=blue;color=black;color=brown'), + explode=True + ), + ParamTestCase( + {}, + dict(color='') + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color=';color=R,100,G,200,B,150') + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color=';R=100;G=200;B=150'), + explode=True + ), + ) + for test_case in test_cases: + parameter = api_client.PathParameter( + name=name, + style=api_client.ParameterStyle.MATRIX, + schema=schemas.AnyTypeSchema, + explode=test_case.explode, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_style_space_delimited_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + () + ), + ParamTestCase( + 1, + (('color', '1'),) + ), + ParamTestCase( + 3.14, + (('color', '3.14'),) + ), + ParamTestCase( + 'blue', + (('color', 'blue'),) + ), + ParamTestCase( + 'hello world', + (('color', 'hello%20world'),) + ), + ParamTestCase( + '', + (('color', ''),) + ), + ParamTestCase( + True, + (('color', 'true'),) + ), + ParamTestCase( + False, + (('color', 'false'),) + ), + ParamTestCase( + [], + () + ), + ParamTestCase( + ['blue', 'black', 'brown'], + (('color', 'blue%20black%20brown'),) + ), + ParamTestCase( + ['blue', 'black', 'brown'], + (('color', 'color=blue%20color=black%20color=brown'),), + explode=True + ), + ParamTestCase( + {}, + () + ), + ParamTestCase( + dict(R=100, G=200, B=150), + (('color', 'R%20100%20G%20200%20B%20150'),) + ), + ParamTestCase( + dict(R=100, G=200, B=150), + (('color', 'R=100%20G=200%20B=150'),), + explode=True + ), + ) + for test_case in test_cases: + parameter = api_client.QueryParameter( + name=name, + style=api_client.ParameterStyle.SPACE_DELIMITED, + schema=schemas.AnyTypeSchema, + explode=test_case.explode, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_style_pipe_delimited_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + () + ), + ParamTestCase( + 1, + (('color', '1'),) + ), + ParamTestCase( + 3.14, + (('color', '3.14'),) + ), + ParamTestCase( + 'blue', + (('color', 'blue'),) + ), + ParamTestCase( + 'hello world', + (('color', 'hello%20world'),) + ), + ParamTestCase( + '', + (('color', ''),) + ), + ParamTestCase( + True, + (('color', 'true'),) + ), + ParamTestCase( + False, + (('color', 'false'),) + ), + ParamTestCase( + [], + () + ), + ParamTestCase( + ['blue', 'black', 'brown'], + (('color', 'blue|black|brown'),) + ), + ParamTestCase( + ['blue', 'black', 'brown'], + (('color', 'color=blue|color=black|color=brown'),), + explode=True + ), + ParamTestCase( + {}, + () + ), + ParamTestCase( + dict(R=100, G=200, B=150), + (('color', 'R|100|G|200|B|150'),) + ), + ParamTestCase( + dict(R=100, G=200, B=150), + (('color', 'R=100|G=200|B=150'),), + explode=True + ), + ) + for test_case in test_cases: + parameter = api_client.QueryParameter( + name=name, + style=api_client.ParameterStyle.PIPE_DELIMITED, + schema=schemas.AnyTypeSchema, + explode=test_case.explode, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_path_params_no_style(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + dict(color='') + ), + ParamTestCase( + 1, + dict(color='1') + ), + ParamTestCase( + 3.14, + dict(color='3.14') + ), + ParamTestCase( + 'blue', + dict(color='blue') + ), + ParamTestCase( + 'hello world', + dict(color='hello%20world') + ), + ParamTestCase( + '', + dict(color='') + ), + ParamTestCase( + True, + dict(color='true') + ), + ParamTestCase( + False, + dict(color='false') + ), + ParamTestCase( + [], + dict(color='') + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color='blue,black,brown') + ), + ParamTestCase( + {}, + dict(color='') + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color='R,100,G,200,B,150') + ), + ) + for test_case in test_cases: + parameter = api_client.PathParameter( + name=name, + schema=schemas.AnyTypeSchema, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_header_params_no_style(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + {} + ), + ParamTestCase( + 1, + dict(color='1') + ), + ParamTestCase( + 3.14, + dict(color='3.14') + ), + ParamTestCase( + 'blue', + dict(color='blue') + ), + ParamTestCase( + 'hello world', + dict(color='hello%20world') + ), + ParamTestCase( + '', + dict(color='') + ), + ParamTestCase( + True, + dict(color='true') + ), + ParamTestCase( + False, + dict(color='false') + ), + ParamTestCase( + [], + {} + ), + ParamTestCase( + ['blue', 'black', 'brown'], + dict(color='blue,black,brown') + ), + ParamTestCase( + {}, + {} + ), + ParamTestCase( + dict(R=100, G=200, B=150), + dict(color='R,100,G,200,B,150') + ), + ) + for test_case in test_cases: + parameter = api_client.HeaderParameter( + name=name, + schema=schemas.AnyTypeSchema, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_query_or_cookie_params_no_style(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + () + ), + ParamTestCase( + 1, + (('color', '1'),) + ), + ParamTestCase( + 3.14, + (('color', '3.14'),) + ), + ParamTestCase( + 'blue', + (('color', 'blue'),) + ), + ParamTestCase( + 'hello world', + (('color', 'hello%20world'),) + ), + ParamTestCase( + '', + (('color', ''),) + ), + ParamTestCase( + True, + (('color', 'true'),) + ), + ParamTestCase( + False, + (('color', 'false'),) + ), + ParamTestCase( + [], + () + ), + ParamTestCase( + ['blue', 'black', 'brown'], + (('color', 'blue,black,brown'),) + ), + ParamTestCase( + {}, + () + ), + ParamTestCase( + dict(R=100, G=200, B=150), + (('color', 'R,100,G,200,B,150'),) + ), + ) + for in_type in {api_client.ParameterInType.QUERY, api_client.ParameterInType.COOKIE}: + for test_case in test_cases: + parameter_cls = self.in_type_to_parameter_cls[in_type] + parameter = parameter_cls( + name=name, + schema=schemas.AnyTypeSchema, + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_checks_content_lengths(self): + with self.assertRaises(ValueError): + api_client.QueryParameter( + name='', content={} + ) + with self.assertRaises(ValueError): + api_client.QueryParameter( + name='', + content={'application/json': schemas.AnyTypeSchema, 'text/plain': schemas.AnyTypeSchema} + ) + # valid length works + api_client.QueryParameter( + name='', + content={'application/json': schemas.AnyTypeSchema} + ) + + def test_content_json_serialization(self): + name = 'color' + test_cases = ( + ParamTestCase( + None, + {'color': 'null'} + ), + ParamTestCase( + 1, + {'color': '1'} + ), + ParamTestCase( + 3.14, + {'color': '3.14'} + ), + ParamTestCase( + 'blue', + {'color': '"blue"'} + ), + ParamTestCase( + 'hello world', + {'color': '"hello world"'} + ), + ParamTestCase( + '', + {'color': '""'} + ), + ParamTestCase( + True, + {'color': 'true'} + ), + ParamTestCase( + False, + {'color': 'false'} + ), + ParamTestCase( + [], + {'color': '[]'} + ), + ParamTestCase( + ['blue', 'black', 'brown'], + {'color': '["blue", "black", "brown"]'} + ), + ParamTestCase( + {}, + {'color': '{}'} + ), + ParamTestCase( + dict(R=100, G=200, B=150), + {'color': '{"R": 100, "G": 200, "B": 150}'} + ), + ) + for test_case in test_cases: + parameter = api_client.HeaderParameter( + name=name, + content={'application/json': schemas.AnyTypeSchema} + ) + serialization = parameter.serialize(test_case.payload) + self.assertEqual(serialization, test_case.expected_serialization) + + def test_throws_error_for_unimplemented_serialization(self): + with self.assertRaises(NotImplementedError): + parameter = api_client.HeaderParameter( + name='color', + content={'text/plain': schemas.AnyTypeSchema} + ) + parameter.serialize(None) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_parent_pet.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_parent_pet.py new file mode 100644 index 000000000000..171310075abf --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_parent_pet.py @@ -0,0 +1,42 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.grandparent_animal import GrandparentAnimal +from petstore_api.model.parent_pet import ParentPet + + +class TestParentPet(unittest.TestCase): + """ParentPet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testParentPet(self): + """Test ParentPet""" + + # test that we can make a ParentPet from a ParentPet + # which requires that we travel back through ParentPet's allOf descendant + # GrandparentAnimal, and we use the descendant's discriminator to make ParentPet + model = ParentPet(pet_type="ParentPet") + assert isinstance(model, ParentPet) + assert isinstance(model, GrandparentAnimal) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_quadrilateral.py new file mode 100644 index 000000000000..dff97bc716ad --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_quadrilateral.py @@ -0,0 +1,40 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model import complex_quadrilateral +from petstore_api.model import simple_quadrilateral +from petstore_api.model.quadrilateral import Quadrilateral + + +class TestQuadrilateral(unittest.TestCase): + """Quadrilateral unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testQuadrilateral(self): + """Test Quadrilateral""" + instance = Quadrilateral(shapeType="Quadrilateral", quadrilateralType="ComplexQuadrilateral") + assert isinstance(instance, complex_quadrilateral.ComplexQuadrilateral) + instance = Quadrilateral(shapeType="Quadrilateral", quadrilateralType="SimpleQuadrilateral") + assert isinstance(instance, simple_quadrilateral.SimpleQuadrilateral) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_request_body.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_request_body.py new file mode 100644 index 000000000000..88e9b67f6917 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_request_body.py @@ -0,0 +1,147 @@ +# 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 collections +import json +import unittest + +from petstore_api import api_client, exceptions, schemas + +ParamTestCase = collections.namedtuple('ParamTestCase', 'payload expected_serialization') + + +class TestParameter(unittest.TestCase): + + def test_throws_exception_when_content_is_invalid_size(self): + with self.assertRaises(ValueError): + api_client.RequestBody( + content={} + ) + + def test_content_json_serialization(self): + payloads = [ + None, + 1, + 3.14, + 'blue', + 'hello world', + '', + True, + False, + [], + ['blue', 'black', 'brown'], + {}, + dict(R=100, G=200, B=150), + ] + for payload in payloads: + request_body = api_client.RequestBody( + content={'application/json': api_client.MediaType(schema=schemas.AnyTypeSchema)} + ) + serialization = request_body.serialize(payload, 'application/json') + self.assertEqual( + serialization, + dict(body=json.dumps(payload, separators=(",", ":"), ensure_ascii=False).encode('utf-8')) + ) + + def test_content_multipart_form_data_serialization(self): + payload = dict( + some_null=None, + some_bool=True, + some_str='a', + some_int=1, + some_float=3.14, + some_list=[], + some_dict={}, + some_bytes=b'abc' + ) + request_body = api_client.RequestBody( + content={'multipart/form-data': api_client.MediaType(schema=schemas.AnyTypeSchema)} + ) + serialization = request_body.serialize(payload, 'multipart/form-data') + self.assertEqual( + serialization, + dict( + fields=( + api_client.RequestField( + name='some_null', data='null', headers={'Content-Type': 'application/json'}), + api_client.RequestField( + name='some_bool', data='true', headers={'Content-Type': 'application/json'}), + api_client.RequestField( + name='some_str', data='a', headers={'Content-Type': 'text/plain'}), + api_client.RequestField( + name='some_int', data='1', headers={'Content-Type': 'application/json'}), + api_client.RequestField( + name='some_float', data='3.14', headers={'Content-Type': 'application/json'}), + api_client.RequestField( + name='some_list', data='[]', headers={'Content-Type': 'application/json'}), + api_client.RequestField( + name='some_dict', data='{}', headers={'Content-Type': 'application/json'}), + api_client.RequestField( + name='some_bytes', data=b'abc', headers={'Content-Type': 'application/octet-stream'}) + ) + ) + ) + + def test_throws_error_for_nonexistant_content_type(self): + request_body = api_client.RequestBody( + content={'application/json': api_client.MediaType(schema=schemas.AnyTypeSchema)} + ) + with self.assertRaises(KeyError): + request_body.serialize(None, 'abc/def') + + def test_throws_error_for_not_implemented_content_type(self): + request_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType(schema=schemas.AnyTypeSchema), + 'text/css': api_client.MediaType(schema=schemas.AnyTypeSchema) + } + ) + with self.assertRaises(NotImplementedError): + request_body.serialize(None, 'text/css') + + def test_application_x_www_form_urlencoded_serialization(self): + payload = dict( + some_null=None, + some_str='a', + some_int=1, + some_float=3.14, + some_list=[], + some_dict={}, + ) + content_type = 'application/x-www-form-urlencoded' + request_body = api_client.RequestBody( + content={content_type: api_client.MediaType(schema=schemas.AnyTypeSchema)} + ) + serialization = request_body.serialize(payload, content_type) + self.assertEqual( + serialization, + {'fields': (('some_str', 'a'), ('some_int', '1'), ('some_float', '3.14'))} + ) + + serialization = request_body.serialize({}, content_type) + self.assertEqual( + serialization, + {} + ) + + invalid_payloads = [ + dict(some_bool=True), + dict(some_bytes=b'abc'), + dict(some_list_with_data=[0]), + dict(some_dict_with_data={'a': 'b'}), + ] + for invalid_payload in invalid_payloads: + with self.assertRaises(exceptions.ApiValueError): + request_body.serialize(invalid_payload, content_type) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_shape.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_shape.py new file mode 100644 index 000000000000..ce8906fdd139 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_shape.py @@ -0,0 +1,117 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.schemas import Singleton, frozendict +from petstore_api.model.shape import Shape +from petstore_api.model import quadrilateral +from petstore_api.model import complex_quadrilateral +from petstore_api.model import simple_quadrilateral +from petstore_api.model import triangle +from petstore_api.model import triangle_interface +from petstore_api.model import equilateral_triangle +from petstore_api.model import isosceles_triangle +from petstore_api.model import scalene_triangle + + +class TestShape(unittest.TestCase): + """Shape unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_recursionlimit(self): + """Test case for recursionlimit + + """ + assert sys.getrecursionlimit() == 1234 + + def testShape(self): + """Test Shape""" + + tri = Shape( + shapeType="Triangle", + triangleType="EquilateralTriangle" + ) + assert isinstance(tri, equilateral_triangle.EquilateralTriangle) + assert isinstance(tri, triangle.Triangle) + assert isinstance(tri, triangle_interface.TriangleInterface) + assert isinstance(tri, Shape) + assert isinstance(tri, frozendict) + assert isinstance(tri.shapeType, str) + assert isinstance(tri.shapeType, Singleton) + + tri = Shape( + shapeType="Triangle", + triangleType="IsoscelesTriangle" + ) + assert isinstance(tri, isosceles_triangle.IsoscelesTriangle) + + tri = Shape( + shapeType="Triangle", + triangleType="ScaleneTriangle" + ) + assert isinstance(tri, scalene_triangle.ScaleneTriangle) + + quad = Shape( + shapeType="Quadrilateral", + quadrilateralType="ComplexQuadrilateral" + ) + assert isinstance(quad, complex_quadrilateral.ComplexQuadrilateral) + + quad = Shape( + shapeType="Quadrilateral", + quadrilateralType="SimpleQuadrilateral" + ) + assert isinstance(quad, simple_quadrilateral.SimpleQuadrilateral) + + # data missing + with self.assertRaisesRegex( + petstore_api.exceptions.ApiValueError, + r"Cannot deserialize input data due to missing discriminator. The discriminator " + r"property 'shapeType' is missing at path: \('args\[0\]',\)" + ): + Shape({}) + + # invalid shape_type (first discriminator). 'Circle' does not exist in the model. + err_msg = ( + r"Invalid discriminator value was passed in to Shape.shapeType Only the values " + r"\['Quadrilateral', 'Triangle'\] are allowed at \('args\[0\]', 'shapeType'\)" + ) + with self.assertRaisesRegex( + petstore_api.ApiValueError, + err_msg + ): + Shape(shapeType="Circle") + + # invalid quadrilateral_type (second discriminator) + err_msg = ( + r"Invalid discriminator value was passed in to Quadrilateral.quadrilateralType Only the values " + r"\['ComplexQuadrilateral', 'SimpleQuadrilateral'\] are allowed at \('args\[0\]', 'quadrilateralType'\)" + ) + with self.assertRaisesRegex( + petstore_api.ApiValueError, + err_msg + ): + Shape( + shapeType="Quadrilateral", + quadrilateralType="Triangle" + ) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_string_enum.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_string_enum.py new file mode 100644 index 000000000000..efba299d9f3c --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_string_enum.py @@ -0,0 +1,56 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.model.string_enum import StringEnum +from petstore_api.schemas import Singleton, NoneClass + + +class TestStringEnum(unittest.TestCase): + """StringEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStringEnum(self): + """Test StringEnum""" + inst = StringEnum(None) + assert isinstance(inst, StringEnum) + assert isinstance(inst, NoneClass) + + inst = StringEnum('approved') + assert isinstance(inst, StringEnum) + assert isinstance(inst, Singleton) + assert isinstance(inst, str) + assert inst == 'approved' + + with self.assertRaises(petstore_api.ApiValueError): + StringEnum('garbage') + + # make sure that we can access its allowed_values + assert isinstance(StringEnum.NONE, NoneClass) + assert StringEnum.PLACED == 'placed' + assert StringEnum.APPROVED == 'approved' + assert StringEnum.DELIVERED == 'delivered' + assert StringEnum.DOUBLE_QUOTE_WITH_NEWLINE == "double quote \n with newline" + assert StringEnum.MULTIPLE_LINES == "multiple\nlines" + assert StringEnum.SINGLE_QUOTED == "single quoted" + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_triangle.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_triangle.py new file mode 100644 index 000000000000..286b5b0f9eb1 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_triangle.py @@ -0,0 +1,38 @@ +# 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.model.equilateral_triangle import EquilateralTriangle +from petstore_api.model.isosceles_triangle import IsoscelesTriangle +from petstore_api.model.scalene_triangle import ScaleneTriangle +from petstore_api.model.triangle import Triangle +from petstore_api.model.triangle_interface import TriangleInterface +from petstore_api.schemas import frozendict + + +class TestTriangle(unittest.TestCase): + """Triangle unit test stubs""" + + def testTriangle(self): + """Test Triangle""" + tri_classes = [EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle] + for tri_class in tri_classes: + tri = Triangle(shapeType="Triangle", triangleType=tri_class.__name__) + assert isinstance(tri, tri_class) + assert isinstance(tri, Triangle) + assert isinstance(tri, TriangleInterface) + assert isinstance(tri, frozendict) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py new file mode 100644 index 000000000000..32a7f60d1caa --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py @@ -0,0 +1,330 @@ +# coding: utf-8 + +from collections import defaultdict +from decimal import Decimal +import sys +import typing +from unittest.mock import patch +import unittest + +import petstore_api +from petstore_api.model.string_with_validation import StringWithValidation +from petstore_api.model.string_enum import StringEnum +from petstore_api.model.number_with_validations import NumberWithValidations +from petstore_api.model.array_holding_any_type import ArrayHoldingAnyType +from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems +from petstore_api.model.foo import Foo +from petstore_api.model.animal import Animal +from petstore_api.model.dog import Dog +from petstore_api.model.dog_all_of import DogAllOf +from petstore_api.model.boolean_enum import BooleanEnum +from petstore_api.model.pig import Pig +from petstore_api.model.danish_pig import DanishPig +from petstore_api.model.gm_fruit import GmFruit +from petstore_api.model.apple import Apple +from petstore_api.model.banana import Banana + +from petstore_api.schemas import ( + AnyTypeSchema, + StrSchema, + NumberSchema, + Schema, + InstantiationMetadata, + Int64Schema, + StrBase, + NumberBase, + DictBase, + ListBase, + frozendict, +) + +class TestValidateResults(unittest.TestCase): + + def test_str_validate(self): + im = InstantiationMetadata() + path_to_schemas = StringWithValidation._validate('abcdefg', _instantiation_metadata=im) + assert path_to_schemas == {('args[0]',): set([StringWithValidation, str])} + + def test_number_validate(self): + im = InstantiationMetadata() + path_to_schemas = NumberWithValidations._validate(Decimal(11), _instantiation_metadata=im) + assert path_to_schemas == {('args[0]',): set([NumberWithValidations, Decimal])} + + def test_str_enum_validate(self): + im = InstantiationMetadata() + path_to_schemas = StringEnum._validate('placed', _instantiation_metadata=im) + assert path_to_schemas == {('args[0]',): set([StringEnum])} + + def test_nullable_enum_validate(self): + im = InstantiationMetadata() + path_to_schemas = StringEnum._validate(None, _instantiation_metadata=im) + assert path_to_schemas == {('args[0]',): set([StringEnum])} + + def test_empty_list_validate(self): + im = InstantiationMetadata() + path_to_schemas = ArrayHoldingAnyType._validate((), _instantiation_metadata=im) + assert path_to_schemas == {('args[0]',): set([ArrayHoldingAnyType, tuple])} + + def test_list_validate(self): + im = InstantiationMetadata() + path_to_schemas = ArrayHoldingAnyType._validate((Decimal(1), 'a'), _instantiation_metadata=im) + assert path_to_schemas == { + ('args[0]',): set([ArrayHoldingAnyType, tuple]), + ('args[0]', 0): set([AnyTypeSchema, Decimal]), + ('args[0]', 1): set([AnyTypeSchema, str]) + } + + def test_empty_dict_validate(self): + im = InstantiationMetadata() + path_to_schemas = Foo._validate(frozendict({}), _instantiation_metadata=im) + assert path_to_schemas == {('args[0]',): set([Foo, frozendict])} + + def test_dict_validate(self): + im = InstantiationMetadata() + path_to_schemas = Foo._validate(frozendict({'bar': 'a', 'additional': Decimal(0)}), _instantiation_metadata=im) + assert path_to_schemas == { + ('args[0]',): set([Foo, frozendict]), + ('args[0]', 'bar'): set([StrSchema, str]), + ('args[0]', 'additional'): set([AnyTypeSchema, Decimal]) + } + + def test_discriminated_dict_validate(self): + im = InstantiationMetadata() + path_to_schemas = Animal._validate(frozendict(className='Dog', color='black'), _instantiation_metadata=im) + assert path_to_schemas == { + ('args[0]',): set([Animal, Dog, DogAllOf, frozendict]), + ('args[0]', 'className'): set([StrSchema, AnyTypeSchema, str]), + ('args[0]', 'color'): set([StrSchema, AnyTypeSchema, str]), + } + + def test_bool_enum_validate(self): + im = InstantiationMetadata() + path_to_schemas = BooleanEnum._validate(True, _instantiation_metadata=im) + assert path_to_schemas == { + ('args[0]',): set([BooleanEnum]) + } + + def test_oneof_composition_pig_validate(self): + im = InstantiationMetadata() + path_to_schemas = Pig._validate(frozendict(className='DanishPig'), _instantiation_metadata=im) + assert path_to_schemas == { + ('args[0]',): set([Pig, DanishPig, frozendict]), + ('args[0]', 'className'): set([DanishPig.className, AnyTypeSchema, str]), + } + + def test_anyof_composition_gm_fruit_validate(self): + im = InstantiationMetadata() + path_to_schemas = GmFruit._validate(frozendict(cultivar='GoldenDelicious', lengthCm=Decimal(10)), _instantiation_metadata=im) + assert path_to_schemas == { + ('args[0]',): set([GmFruit, Apple, Banana, frozendict]), + ('args[0]', 'cultivar'): set([Apple.cultivar, AnyTypeSchema, str]), + ('args[0]', 'lengthCm'): set([AnyTypeSchema, NumberSchema, Decimal]), + } + +class TestValidateCalls(unittest.TestCase): + def test_empty_list_validate(self): + return_value = {('args[0]',): set([ArrayHoldingAnyType, tuple])} + with patch.object(Schema, '_validate', return_value=return_value) as mock_validate: + instance = ArrayHoldingAnyType([]) + assert mock_validate.call_count == 1 + + with patch.object(Schema, '_validate', return_value=return_value) as mock_validate: + ArrayHoldingAnyType._from_openapi_data([]) + assert mock_validate.call_count == 1 + + def test_empty_dict_validate(self): + return_value = {('args[0]',): set([Foo, frozendict])} + with patch.object(Schema, '_validate', return_value=return_value) as mock_validate: + instance = Foo({}) + assert mock_validate.call_count == 1 + + with patch.object(Schema, '_validate', return_value=return_value) as mock_validate: + Foo._from_openapi_data({}) + assert mock_validate.call_count == 1 + + def test_list_validate_direct_instantiation(self): + expected_call_by_index = { + 0: [ + ArrayWithValidationsInItems, + ((Decimal('7'),),), + InstantiationMetadata(path_to_item=('args[0]',)) + ], + 1: [ + ArrayWithValidationsInItems._items, + (Decimal('7'),), + InstantiationMetadata(path_to_item=('args[0]', 0)) + ] + } + call_index = 0 + result_by_call_index = { + 0: defaultdict(set, [( ('args[0]',), set([ArrayWithValidationsInItems, tuple]))] ), + 1: defaultdict(set, [( ('args[0]', 0), set([ArrayWithValidationsInItems._items, Decimal]) )] ), + } + + @classmethod + def new_validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + nonlocal call_index + assert [cls, args, _instantiation_metadata] == expected_call_by_index[call_index] + result = result_by_call_index.get(call_index) + call_index += 1 + if result is None: + raise petstore_api.ApiValueError('boom') + return result + + with patch.object(Schema, '_validate', new=new_validate): + ArrayWithValidationsInItems([7]) + + def test_list_validate_direct_instantiation_cast_item(self): + # validation is skipped if items are of the correct type + expected_call_by_index = { + 0: [ + ArrayWithValidationsInItems, + ((Decimal('7'),),), + InstantiationMetadata(path_to_item=('args[0]',)) + ], + } + call_index = 0 + result_by_call_index = { + 0: defaultdict(set, [( ('args[0]',), set([ArrayWithValidationsInItems, tuple]))] ), + } + + @classmethod + def new_validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + nonlocal call_index + assert [cls, args, _instantiation_metadata] == expected_call_by_index[call_index] + result = result_by_call_index.get(call_index) + call_index += 1 + if result is None: + raise petstore_api.ApiValueError('boom') + return result + + item = ArrayWithValidationsInItems._items(7) + with patch.object(Schema, '_validate', new=new_validate): + ArrayWithValidationsInItems([item]) + + def test_list_validate_from_openai_data_instantiation(self): + expected_call_by_index = { + 0: [ + ArrayWithValidationsInItems, + ((Decimal('7'),),), + InstantiationMetadata(path_to_item=('args[0]',), from_server=True) + ], + 1: [ + ArrayWithValidationsInItems._items, + (Decimal('7'),), + InstantiationMetadata(path_to_item=('args[0]', 0), from_server=True) + ] + } + call_index = 0 + result_by_call_index = { + 0: defaultdict(set, [( ('args[0]',), set([ArrayWithValidationsInItems, tuple]))] ), + 1: defaultdict(set, [( ('args[0]', 0), set([ArrayWithValidationsInItems._items, Decimal]) )] ), + } + + @classmethod + def new_validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + nonlocal call_index + assert [cls, args, _instantiation_metadata] == expected_call_by_index[call_index] + result = result_by_call_index.get(call_index) + call_index += 1 + if result is None: + raise petstore_api.ApiValueError('boom') + return result + + with patch.object(Schema, '_validate', new=new_validate): + ArrayWithValidationsInItems._from_openapi_data([7]) + + def test_dict_validate_direct_instantiation(self): + expected_call_by_index = { + 0: [ + Foo, + (frozendict({'bar': 'a'}),), + InstantiationMetadata(path_to_item=('args[0]',)) + ], + 1: [ + StrSchema, + ('a',), + InstantiationMetadata(path_to_item=('args[0]', 'bar')) + ] + } + call_index = 0 + result_by_call_index = { + 0: defaultdict(set, [( ('args[0]',), set([Foo, frozendict]))] ), + 1: defaultdict(set, [( ('args[0]', 'bar'), set([StrSchema, str]) )] ), + } + + @classmethod + def new_validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + nonlocal call_index + assert [cls, args, _instantiation_metadata] == expected_call_by_index[call_index] + result = result_by_call_index.get(call_index) + call_index += 1 + if result is None: + raise petstore_api.ApiValueError('boom') + return result + + with patch.object(Schema, '_validate', new=new_validate): + Foo(bar='a') + + def test_dict_validate_direct_instantiation_cast_item(self): + expected_call_by_index = { + 0: [ + Foo, + (frozendict({'bar': 'a'}),), + InstantiationMetadata(path_to_item=('args[0]',)) + ], + } + call_index = 0 + result_by_call_index = { + 0: defaultdict(set, [( ('args[0]',), set([Foo, frozendict]))] ), + } + + @classmethod + def new_validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + nonlocal call_index + assert [cls, args, _instantiation_metadata] == expected_call_by_index[call_index] + result = result_by_call_index.get(call_index) + call_index += 1 + if result is None: + raise petstore_api.ApiValueError('boom') + return result + + bar = StrSchema('a') + with patch.object(Schema, '_validate', new=new_validate): + Foo(bar=bar) + + def test_dict_validate_from_openapi_data_instantiation(self): + expected_call_by_index = { + 0: [ + Foo, + (frozendict({'bar': 'a'}),), + InstantiationMetadata(path_to_item=('args[0]',), from_server=True) + ], + 1: [ + StrSchema, + ('a',), + InstantiationMetadata(path_to_item=('args[0]', 'bar'), from_server=True) + ] + } + call_index = 0 + result_by_call_index = { + 0: defaultdict(set, [( ('args[0]',), set([Foo, frozendict]))] ), + 1: defaultdict(set, [( ('args[0]', 'bar'), set([StrSchema, str]) )] ), + } + + @classmethod + def new_validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + nonlocal call_index + assert [cls, args, _instantiation_metadata] == expected_call_by_index[call_index] + result = result_by_call_index.get(call_index) + call_index += 1 + if result is None: + raise petstore_api.ApiValueError('boom') + return result + + with patch.object(Schema, '_validate', new=new_validate): + Foo._from_openapi_data({'bar': 'a'}) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_whale.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_whale.py new file mode 100644 index 000000000000..88bd8ed12d44 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_whale.py @@ -0,0 +1,49 @@ +# 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 sys +import unittest + +import petstore_api +from petstore_api.schemas import BoolClass +from petstore_api.model.whale import Whale + + +class TestWhale(unittest.TestCase): + """Whale unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Whale(self): + # test that the hasBaleen __bool__ method is working, True input + whale = Whale( + className='whale', + hasBaleen=True + ) + assert isinstance(whale.hasBaleen, BoolClass) + self.assertTrue(whale.hasBaleen) + + # test that the hasBaleen __bool__ method is working, False input + whale = Whale( + className='whale', + hasBaleen=False + ) + assert isinstance(whale.hasBaleen, BoolClass) + self.assertFalse(whale.hasBaleen) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/util.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/util.py new file mode 100644 index 000000000000..113d7dcc5478 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/util.py @@ -0,0 +1,8 @@ +# flake8: noqa + +import random + + +def id_gen(bits=32): + """ Returns a n-bit randomly generated int """ + return int(random.getrandbits(bits)) diff --git a/samples/openapi3/client/petstore/python-experimental/tox.ini b/samples/openapi3/client/petstore/python-experimental/tox.ini new file mode 100644 index 000000000000..8989fc3c4d96 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=petstore_api From 88f3db3a6e729d26bcd349f4c260dedd885e1f88 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 5 Jan 2022 13:05:18 -0800 Subject: [PATCH 066/175] Adds spacether sponsorship link and python-experimental item (#11237) --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 48bae346b512..e526479d1275 100644 --- a/README.md +++ b/README.md @@ -853,10 +853,12 @@ OpenAPI Generator core team members are contributors who have been making signif * [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview) * [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini) * [@etherealjoy](https://github.com/etherealjoy) (2019/06) -* [@spacether](https://github.com/spacether) (2020/05) +* [@spacether](https://github.com/spacether) (2020/05) [:heart:][spacether sponsorship] :heart: = Link to support the contributor directly +[spacether sponsorship]: https://github.com/sponsors/spacether/ + #### Template Creator **NOTE**: Embedded templates are only supported in _Mustache_ format. Support for all other formats is experimental and subject to change at any time. @@ -919,7 +921,8 @@ Here is a list of template creators: * PHP (with Data Transfer): @Articus * PowerShell: @beatcracker * PowerShell (refactored in 5.0.0): @wing328 - * Python: @spacether + * Python: @spacether [:heart:][spacether sponsorship] + * Python-Experimental: @spacether [:heart:][spacether sponsorship] * R: @ramnov * Ruby (Faraday): @meganemura @dkliban * Rust: @farcaller @@ -1068,7 +1071,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) | | PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) | | PowerShell | @wing328 (2020/05) | -| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @arun-nalla (2019/11) @spacether (2019/11) | +| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @arun-nalla (2019/11) @spacether (2019/11) [:heart:][spacether sponsorship] | | R | @Ramanth (2019/07) @saigiridhar21 (2019/07) | | Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) | | Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) | From e1902257b373f2deb9e6563b64532d9bd449dca6 Mon Sep 17 00:00:00 2001 From: jiangyuan <469391363@qq.com> Date: Thu, 6 Jan 2022 06:26:10 +0800 Subject: [PATCH 067/175] [Python] add '_spec_property_naming' param (#11226) * add '_spec_property_naming' param * add '_spec_property_naming' comment Co-authored-by: jiangyuan04 --- .../src/main/resources/python/api.mustache | 7 + .../main/resources/python/api_client.mustache | 6 +- .../petstore_api/api/another_fake_api.py | 7 + .../python/petstore_api/api/fake_api.py | 112 ++++++++++ .../api/fake_classname_tags_123_api.py | 7 + .../python/petstore_api/api/pet_api.py | 63 ++++++ .../python/petstore_api/api/store_api.py | 28 +++ .../python/petstore_api/api/user_api.py | 56 +++++ .../python/petstore_api/api_client.py | 6 +- .../petstore_api/api/another_fake_api.py | 7 + .../petstore_api/api/fake_api.py | 112 ++++++++++ .../api/fake_classname_tags_123_api.py | 7 + .../petstore_api/api/pet_api.py | 63 ++++++ .../petstore_api/api/store_api.py | 28 +++ .../petstore_api/api/user_api.py | 56 +++++ .../petstore_api/api_client.py | 6 +- .../python/x_auth_id_alias/api/usage_api.py | 28 +++ .../python/x_auth_id_alias/api_client.py | 6 +- .../python/dynamic_servers/api/usage_api.py | 14 ++ .../python/dynamic_servers/api_client.py | 6 +- .../petstore_api/api/another_fake_api.py | 7 + .../python/petstore_api/api/default_api.py | 7 + .../python/petstore_api/api/fake_api.py | 196 ++++++++++++++++++ .../api/fake_classname_tags_123_api.py | 7 + .../python/petstore_api/api/pet_api.py | 49 +++++ .../python/petstore_api/api/store_api.py | 28 +++ .../python/petstore_api/api/user_api.py | 56 +++++ .../python/petstore_api/api_client.py | 6 +- 28 files changed, 969 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index bba20b6210b2..3406400b4b57 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -270,6 +270,10 @@ class {{classname}}(object): _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -301,6 +305,9 @@ class {{classname}}(object): kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index b083d401dd4e..b4d1260eb746 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -694,7 +694,8 @@ class Endpoint(object): '_return_http_data_only', '_check_input_type', '_check_return_type', - '_content_type' + '_content_type', + '_spec_property_naming' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -708,6 +709,7 @@ class Endpoint(object): '_return_http_data_only': (bool,), '_check_input_type': (bool,), '_check_return_type': (bool,), + '_spec_property_naming': (bool,), '_content_type': (none_type, str) } self.openapi_types.update(extra_types) @@ -744,7 +746,7 @@ class Endpoint(object): value, self.openapi_types[key], [key], - False, + kwargs['_spec_property_naming'], kwargs['_check_input_type'], configuration=self.api_client.configuration ) diff --git a/samples/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/client/petstore/python/petstore_api/api/another_fake_api.py index 1411f08cbc18..093a4ca6a337 100644 --- a/samples/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/another_fake_api.py @@ -119,6 +119,10 @@ def call_123_test_special_tags( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -150,6 +154,9 @@ def call_123_test_special_tags( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index a21d5838f41f..f630549347fc 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -1132,6 +1132,10 @@ def array_model( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1163,6 +1167,9 @@ def array_model( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1199,6 +1206,10 @@ def boolean( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1230,6 +1241,9 @@ def boolean( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1268,6 +1282,10 @@ def create_xml_item( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1299,6 +1317,9 @@ def create_xml_item( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1337,6 +1358,10 @@ def number_with_validations( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1368,6 +1393,9 @@ def number_with_validations( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1404,6 +1432,10 @@ def object_model_with_ref_props( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1435,6 +1467,9 @@ def object_model_with_ref_props( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1471,6 +1506,10 @@ def string( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1502,6 +1541,9 @@ def string( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1538,6 +1580,10 @@ def string_enum( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1569,6 +1615,9 @@ def string_enum( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1607,6 +1656,10 @@ def test_body_with_file_schema( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1638,6 +1691,9 @@ def test_body_with_file_schema( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1679,6 +1735,10 @@ def test_body_with_query_params( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1710,6 +1770,9 @@ def test_body_with_query_params( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1752,6 +1815,10 @@ def test_client_model( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1783,6 +1850,9 @@ def test_client_model( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1831,6 +1901,10 @@ def test_endpoint_enums_length_one( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1862,6 +1936,9 @@ def test_endpoint_enums_length_one( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1926,6 +2003,10 @@ def test_endpoint_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1957,6 +2038,9 @@ def test_endpoint_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2008,6 +2092,10 @@ def test_enum_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2039,6 +2127,9 @@ def test_enum_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2084,6 +2175,10 @@ def test_group_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2115,6 +2210,9 @@ def test_group_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2158,6 +2256,10 @@ def test_inline_additional_properties( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2189,6 +2291,9 @@ def test_inline_additional_properties( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2230,6 +2335,10 @@ def test_json_form_data( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2261,6 +2370,9 @@ def test_json_form_data( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 76e35824fbe1..70b4a535a815 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -121,6 +121,10 @@ def test_classname( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -152,6 +156,9 @@ def test_classname( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index 13fb1d981f43..290bf04cf1ee 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -584,6 +584,10 @@ def add_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -615,6 +619,9 @@ def add_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -655,6 +662,10 @@ def delete_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -686,6 +697,9 @@ def delete_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -726,6 +740,10 @@ def find_pets_by_status( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -757,6 +775,9 @@ def find_pets_by_status( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -797,6 +818,10 @@ def find_pets_by_tags( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -828,6 +853,9 @@ def find_pets_by_tags( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -868,6 +896,10 @@ def get_pet_by_id( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -899,6 +931,9 @@ def get_pet_by_id( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -938,6 +973,10 @@ def update_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -969,6 +1008,9 @@ def update_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1010,6 +1052,10 @@ def update_pet_with_form( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1041,6 +1087,9 @@ def update_pet_with_form( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1083,6 +1132,10 @@ def upload_file( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1114,6 +1167,9 @@ def upload_file( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1156,6 +1212,10 @@ def upload_file_with_required_file( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1187,6 +1247,9 @@ def upload_file_with_required_file( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python/petstore_api/api/store_api.py b/samples/client/petstore/python/petstore_api/api/store_api.py index 934c55259995..a1172b1f10e5 100644 --- a/samples/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/client/petstore/python/petstore_api/api/store_api.py @@ -265,6 +265,10 @@ def delete_order( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -296,6 +300,9 @@ def delete_order( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -333,6 +340,10 @@ def get_inventory( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -364,6 +375,9 @@ def get_inventory( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -402,6 +416,10 @@ def get_order_by_id( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -433,6 +451,9 @@ def get_order_by_id( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -472,6 +493,10 @@ def place_order( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -503,6 +528,9 @@ def place_order( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python/petstore_api/api/user_api.py b/samples/client/petstore/python/petstore_api/api/user_api.py index 78cc2f4a8b6b..6eabc2a0a015 100644 --- a/samples/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/client/petstore/python/petstore_api/api/user_api.py @@ -452,6 +452,10 @@ def create_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -483,6 +487,9 @@ def create_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -522,6 +529,10 @@ def create_users_with_array_input( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -553,6 +564,9 @@ def create_users_with_array_input( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -592,6 +606,10 @@ def create_users_with_list_input( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -623,6 +641,9 @@ def create_users_with_list_input( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -663,6 +684,10 @@ def delete_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -694,6 +719,9 @@ def delete_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -733,6 +761,10 @@ def get_user_by_name( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -764,6 +796,9 @@ def get_user_by_name( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -805,6 +840,10 @@ def login_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -836,6 +875,9 @@ def login_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -874,6 +916,10 @@ def logout_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -905,6 +951,9 @@ def logout_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -945,6 +994,10 @@ def update_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -976,6 +1029,9 @@ def update_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index 7b4eea830ea8..e750f965b223 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -673,7 +673,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only', '_check_input_type', '_check_return_type', - '_content_type' + '_content_type', + '_spec_property_naming' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -687,6 +688,7 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only': (bool,), '_check_input_type': (bool,), '_check_return_type': (bool,), + '_spec_property_naming': (bool,), '_content_type': (none_type, str) } self.openapi_types.update(extra_types) @@ -723,7 +725,7 @@ def __validate_inputs(self, kwargs): value, self.openapi_types[key], [key], - False, + kwargs['_spec_property_naming'], kwargs['_check_input_type'], configuration=self.api_client.configuration ) diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py index 1411f08cbc18..093a4ca6a337 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py @@ -119,6 +119,10 @@ def call_123_test_special_tags( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -150,6 +154,9 @@ def call_123_test_special_tags( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py index a21d5838f41f..f630549347fc 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py @@ -1132,6 +1132,10 @@ def array_model( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1163,6 +1167,9 @@ def array_model( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1199,6 +1206,10 @@ def boolean( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1230,6 +1241,9 @@ def boolean( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1268,6 +1282,10 @@ def create_xml_item( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1299,6 +1317,9 @@ def create_xml_item( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1337,6 +1358,10 @@ def number_with_validations( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1368,6 +1393,9 @@ def number_with_validations( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1404,6 +1432,10 @@ def object_model_with_ref_props( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1435,6 +1467,9 @@ def object_model_with_ref_props( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1471,6 +1506,10 @@ def string( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1502,6 +1541,9 @@ def string( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1538,6 +1580,10 @@ def string_enum( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1569,6 +1615,9 @@ def string_enum( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1607,6 +1656,10 @@ def test_body_with_file_schema( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1638,6 +1691,9 @@ def test_body_with_file_schema( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1679,6 +1735,10 @@ def test_body_with_query_params( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1710,6 +1770,9 @@ def test_body_with_query_params( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1752,6 +1815,10 @@ def test_client_model( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1783,6 +1850,9 @@ def test_client_model( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1831,6 +1901,10 @@ def test_endpoint_enums_length_one( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1862,6 +1936,9 @@ def test_endpoint_enums_length_one( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1926,6 +2003,10 @@ def test_endpoint_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1957,6 +2038,9 @@ def test_endpoint_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2008,6 +2092,10 @@ def test_enum_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2039,6 +2127,9 @@ def test_enum_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2084,6 +2175,10 @@ def test_group_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2115,6 +2210,9 @@ def test_group_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2158,6 +2256,10 @@ def test_inline_additional_properties( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2189,6 +2291,9 @@ def test_inline_additional_properties( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2230,6 +2335,10 @@ def test_json_form_data( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2261,6 +2370,9 @@ def test_json_form_data( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py index 76e35824fbe1..70b4a535a815 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py @@ -121,6 +121,10 @@ def test_classname( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -152,6 +156,9 @@ def test_classname( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py index 13fb1d981f43..290bf04cf1ee 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py @@ -584,6 +584,10 @@ def add_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -615,6 +619,9 @@ def add_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -655,6 +662,10 @@ def delete_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -686,6 +697,9 @@ def delete_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -726,6 +740,10 @@ def find_pets_by_status( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -757,6 +775,9 @@ def find_pets_by_status( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -797,6 +818,10 @@ def find_pets_by_tags( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -828,6 +853,9 @@ def find_pets_by_tags( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -868,6 +896,10 @@ def get_pet_by_id( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -899,6 +931,9 @@ def get_pet_by_id( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -938,6 +973,10 @@ def update_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -969,6 +1008,9 @@ def update_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1010,6 +1052,10 @@ def update_pet_with_form( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1041,6 +1087,9 @@ def update_pet_with_form( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1083,6 +1132,10 @@ def upload_file( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1114,6 +1167,9 @@ def upload_file( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1156,6 +1212,10 @@ def upload_file_with_required_file( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1187,6 +1247,9 @@ def upload_file_with_required_file( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py index 934c55259995..a1172b1f10e5 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py @@ -265,6 +265,10 @@ def delete_order( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -296,6 +300,9 @@ def delete_order( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -333,6 +340,10 @@ def get_inventory( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -364,6 +375,9 @@ def get_inventory( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -402,6 +416,10 @@ def get_order_by_id( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -433,6 +451,9 @@ def get_order_by_id( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -472,6 +493,10 @@ def place_order( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -503,6 +528,9 @@ def place_order( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py index 78cc2f4a8b6b..6eabc2a0a015 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py @@ -452,6 +452,10 @@ def create_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -483,6 +487,9 @@ def create_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -522,6 +529,10 @@ def create_users_with_array_input( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -553,6 +564,9 @@ def create_users_with_array_input( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -592,6 +606,10 @@ def create_users_with_list_input( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -623,6 +641,9 @@ def create_users_with_list_input( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -663,6 +684,10 @@ def delete_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -694,6 +719,9 @@ def delete_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -733,6 +761,10 @@ def get_user_by_name( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -764,6 +796,9 @@ def get_user_by_name( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -805,6 +840,10 @@ def login_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -836,6 +875,9 @@ def login_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -874,6 +916,10 @@ def logout_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -905,6 +951,9 @@ def logout_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -945,6 +994,10 @@ def update_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -976,6 +1029,9 @@ def update_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py index 7b4eea830ea8..e750f965b223 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py @@ -673,7 +673,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only', '_check_input_type', '_check_return_type', - '_content_type' + '_content_type', + '_spec_property_naming' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -687,6 +688,7 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only': (bool,), '_check_input_type': (bool,), '_check_return_type': (bool,), + '_spec_property_naming': (bool,), '_content_type': (none_type, str) } self.openapi_types.update(extra_types) @@ -723,7 +725,7 @@ def __validate_inputs(self, kwargs): value, self.openapi_types[key], [key], - False, + kwargs['_spec_property_naming'], kwargs['_check_input_type'], configuration=self.api_client.configuration ) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api/usage_api.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api/usage_api.py index b636697b0c47..9f3775456e04 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api/usage_api.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api/usage_api.py @@ -243,6 +243,10 @@ def any_key( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -274,6 +278,9 @@ def any_key( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -309,6 +316,10 @@ def both_keys( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -340,6 +351,9 @@ def both_keys( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -375,6 +389,10 @@ def key_in_header( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -406,6 +424,9 @@ def key_in_header( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -441,6 +462,10 @@ def key_in_query( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -472,6 +497,9 @@ def key_in_query( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py index 0da461222793..d7137238a179 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py @@ -673,7 +673,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only', '_check_input_type', '_check_return_type', - '_content_type' + '_content_type', + '_spec_property_naming' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -687,6 +688,7 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only': (bool,), '_check_input_type': (bool,), '_check_return_type': (bool,), + '_spec_property_naming': (bool,), '_content_type': (none_type, str) } self.openapi_types.update(extra_types) @@ -723,7 +725,7 @@ def __validate_inputs(self, kwargs): value, self.openapi_types[key], [key], - False, + kwargs['_spec_property_naming'], kwargs['_check_input_type'], configuration=self.api_client.configuration ) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py index ec975f752c6b..f71f533ceeca 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py @@ -198,6 +198,10 @@ def custom_server( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -229,6 +233,9 @@ def custom_server( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -264,6 +271,10 @@ def default_server( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -295,6 +306,9 @@ def default_server( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py index a7d12d3e3c10..470cc1aac899 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py @@ -673,7 +673,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only', '_check_input_type', '_check_return_type', - '_content_type' + '_content_type', + '_spec_property_naming' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -687,6 +688,7 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only': (bool,), '_check_input_type': (bool,), '_check_return_type': (bool,), + '_spec_property_naming': (bool,), '_content_type': (none_type, str) } self.openapi_types.update(extra_types) @@ -723,7 +725,7 @@ def __validate_inputs(self, kwargs): value, self.openapi_types[key], [key], - False, + kwargs['_spec_property_naming'], kwargs['_check_input_type'], configuration=self.api_client.configuration ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py index 52d1fc410d35..503decf303f1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py @@ -119,6 +119,10 @@ def call_123_test_special_tags( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -150,6 +154,9 @@ def call_123_test_special_tags( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py index 26a35b8e65fc..8ba49f05e760 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py @@ -107,6 +107,10 @@ def foo_get( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -138,6 +142,9 @@ def foo_get( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index dd2db14c8ad7..9ebd02954cfa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -1720,6 +1720,10 @@ def additional_properties_with_array_of_enums( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1751,6 +1755,9 @@ def additional_properties_with_array_of_enums( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1787,6 +1794,10 @@ def array_model( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1818,6 +1829,9 @@ def array_model( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1853,6 +1867,10 @@ def array_of_enums( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1884,6 +1902,9 @@ def array_of_enums( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1920,6 +1941,10 @@ def boolean( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -1951,6 +1976,9 @@ def boolean( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -1987,6 +2015,10 @@ def composed_one_of_number_with_validations( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2018,6 +2050,9 @@ def composed_one_of_number_with_validations( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2055,6 +2090,10 @@ def download_attachment( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2086,6 +2125,9 @@ def download_attachment( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2123,6 +2165,10 @@ def enum_test( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2154,6 +2200,9 @@ def enum_test( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2188,6 +2237,10 @@ def fake_health_get( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2219,6 +2272,9 @@ def fake_health_get( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2257,6 +2313,10 @@ def mammal( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2288,6 +2348,9 @@ def mammal( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2326,6 +2389,10 @@ def number_with_validations( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2357,6 +2424,9 @@ def number_with_validations( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2393,6 +2463,10 @@ def object_model_with_ref_props( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2424,6 +2498,9 @@ def object_model_with_ref_props( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2459,6 +2536,10 @@ def post_inline_additional_properties_payload( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2490,6 +2571,9 @@ def post_inline_additional_properties_payload( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2525,6 +2609,10 @@ def post_inline_additional_properties_ref_payload( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2556,6 +2644,9 @@ def post_inline_additional_properties_ref_payload( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2592,6 +2683,10 @@ def string( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2623,6 +2718,9 @@ def string( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2659,6 +2757,10 @@ def string_enum( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2690,6 +2792,9 @@ def string_enum( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2728,6 +2833,10 @@ def test_body_with_file_schema( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2759,6 +2868,9 @@ def test_body_with_file_schema( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2800,6 +2912,10 @@ def test_body_with_query_params( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2831,6 +2947,9 @@ def test_body_with_query_params( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2873,6 +2992,10 @@ def test_client_model( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2904,6 +3027,9 @@ def test_client_model( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -2960,6 +3086,10 @@ def test_endpoint_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -2991,6 +3121,9 @@ def test_endpoint_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3042,6 +3175,10 @@ def test_enum_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3073,6 +3210,9 @@ def test_enum_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3118,6 +3258,10 @@ def test_group_parameters( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3149,6 +3293,9 @@ def test_group_parameters( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3192,6 +3339,10 @@ def test_inline_additional_properties( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3223,6 +3374,9 @@ def test_inline_additional_properties( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3264,6 +3418,10 @@ def test_json_form_data( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3295,6 +3453,9 @@ def test_json_form_data( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3345,6 +3506,10 @@ def test_query_parameter_collection_format( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3376,6 +3541,9 @@ def test_query_parameter_collection_format( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3421,6 +3589,10 @@ def tx_rx_any_of_model( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3452,6 +3624,9 @@ def tx_rx_any_of_model( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3489,6 +3664,10 @@ def upload_download_file( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3520,6 +3699,9 @@ def upload_download_file( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3560,6 +3742,10 @@ def upload_file( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3591,6 +3777,9 @@ def upload_file( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -3628,6 +3817,10 @@ def upload_files( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -3659,6 +3852,9 @@ def upload_files( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 0284c348b363..a6c187b02518 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -121,6 +121,10 @@ def test_classname( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -152,6 +156,9 @@ def test_classname( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index d555b6995ad4..2f87475abf7c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -472,6 +472,10 @@ def add_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -503,6 +507,9 @@ def add_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -543,6 +550,10 @@ def delete_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -574,6 +585,9 @@ def delete_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -614,6 +628,10 @@ def find_pets_by_status( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -645,6 +663,9 @@ def find_pets_by_status( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -685,6 +706,10 @@ def find_pets_by_tags( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -716,6 +741,9 @@ def find_pets_by_tags( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -756,6 +784,10 @@ def get_pet_by_id( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -787,6 +819,9 @@ def get_pet_by_id( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -826,6 +861,10 @@ def update_pet( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -857,6 +896,9 @@ def update_pet( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -898,6 +940,10 @@ def update_pet_with_form( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -929,6 +975,9 @@ def update_pet_with_form( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py index c1cb69094fe5..f5f1d16cbeed 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py @@ -267,6 +267,10 @@ def delete_order( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -298,6 +302,9 @@ def delete_order( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -335,6 +342,10 @@ def get_inventory( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -366,6 +377,9 @@ def get_inventory( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -404,6 +418,10 @@ def get_order_by_id( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -435,6 +453,9 @@ def get_order_by_id( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -474,6 +495,10 @@ def place_order( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -505,6 +530,9 @@ def place_order( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index da2217633ffc..81bcdeb6d867 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -460,6 +460,10 @@ def create_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -491,6 +495,9 @@ def create_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -530,6 +537,10 @@ def create_users_with_array_input( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -561,6 +572,9 @@ def create_users_with_array_input( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -600,6 +614,10 @@ def create_users_with_list_input( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -631,6 +649,9 @@ def create_users_with_list_input( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -671,6 +692,10 @@ def delete_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -702,6 +727,9 @@ def delete_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -741,6 +769,10 @@ def get_user_by_name( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -772,6 +804,9 @@ def get_user_by_name( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -813,6 +848,10 @@ def login_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -844,6 +883,9 @@ def login_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -882,6 +924,10 @@ def logout_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -913,6 +959,9 @@ def logout_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') @@ -953,6 +1002,10 @@ def update_user( _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) _content_type (str/None): force body content-type. Default is None and content-type will be predicted by allowed content-types and body. @@ -984,6 +1037,9 @@ def update_user( kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') 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 86cddf1a7b2b..9fbac41d73ac 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -680,7 +680,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only', '_check_input_type', '_check_return_type', - '_content_type' + '_content_type', + '_spec_property_naming' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -694,6 +695,7 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_return_http_data_only': (bool,), '_check_input_type': (bool,), '_check_return_type': (bool,), + '_spec_property_naming': (bool,), '_content_type': (none_type, str) } self.openapi_types.update(extra_types) @@ -730,7 +732,7 @@ def __validate_inputs(self, kwargs): value, self.openapi_types[key], [key], - False, + kwargs['_spec_property_naming'], kwargs['_check_input_type'], configuration=self.api_client.configuration ) From ef882a4e6c6066007952de3bd7013f9940dc0de7 Mon Sep 17 00:00:00 2001 From: Andreas Allacher Date: Fri, 7 Jan 2022 02:07:09 +0100 Subject: [PATCH 068/175] Issue 11152: Allow guzzlehttp/psr7 ^1.7 or ^2.0 (#11240) --- .../openapi-generator/src/main/resources/php/composer.mustache | 2 +- samples/client/petstore/php/OpenAPIClient-php/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/composer.mustache b/modules/openapi-generator/src/main/resources/php/composer.mustache index 6a69cead65d3..e8c6f3bf10c9 100644 --- a/modules/openapi-generator/src/main/resources/php/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php/composer.mustache @@ -29,7 +29,7 @@ "ext-json": "*", "ext-mbstring": "*", "guzzlehttp/guzzle": "^7.3", - "guzzlehttp/psr7": "^2.0" + "guzzlehttp/psr7": "^1.7 || ^2.0" }, "require-dev": { "phpunit/phpunit": "^8.0 || ^9.0", diff --git a/samples/client/petstore/php/OpenAPIClient-php/composer.json b/samples/client/petstore/php/OpenAPIClient-php/composer.json index d884b222adb1..2318059097fb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/composer.json +++ b/samples/client/petstore/php/OpenAPIClient-php/composer.json @@ -23,7 +23,7 @@ "ext-json": "*", "ext-mbstring": "*", "guzzlehttp/guzzle": "^7.3", - "guzzlehttp/psr7": "^2.0" + "guzzlehttp/psr7": "^1.7 || ^2.0" }, "require-dev": { "phpunit/phpunit": "^8.0 || ^9.0", From 13430247866cdb06ddedfb03ef02eebb1726fe78 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 6 Jan 2022 17:45:49 -0800 Subject: [PATCH 069/175] Adds fix for broken python test (#11247) * Adds fix for broken python test * Removes space * Fixes another test too --- samples/client/petstore/python/test/test_fake_api.py | 1 + .../test/test_fake_api.py | 1 + 2 files changed, 2 insertions(+) diff --git a/samples/client/petstore/python/test/test_fake_api.py b/samples/client/petstore/python/test/test_fake_api.py index c8345a8760ab..d17375a994d5 100644 --- a/samples/client/petstore/python/test/test_fake_api.py +++ b/samples/client/petstore/python/test/test_fake_api.py @@ -126,6 +126,7 @@ def test_test_endpoint_enums_length_one(self): _preload_content=True, _request_timeout=None, _return_http_data_only=True, + _spec_property_naming=False, async_req=False, header_number=1.234, path_integer=34, diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py index c8345a8760ab..d17375a994d5 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py @@ -126,6 +126,7 @@ def test_test_endpoint_enums_length_one(self): _preload_content=True, _request_timeout=None, _return_http_data_only=True, + _spec_property_naming=False, async_req=False, header_number=1.234, path_integer=34, From febf49662a4d4fda5dbeed4888a1840db801177d Mon Sep 17 00:00:00 2001 From: Akira MATSUDA Date: Mon, 10 Jan 2022 00:47:03 +0900 Subject: [PATCH 070/175] Make moduleObject.mustache confirms to JSONEncodable. (#11202) * Make moduleObject.mustache confirms to JSONEncodable. * Regenerate samples * Don't confirm JSONEncodable when using Vapor. * Use CodableHelper.jsonEncoder * Encode `Data` using `encodeToJSON()` * Update sample * Don't extend JSONEncodable when using Vapor. * Add JSONEncodable in moduleEnum, moduleInlineEnumDeclaration, and modelOneOf * Update sample * Remove line break. * Update sample * Revert "Update sample" This reverts commit 6ec206b506a5402a225184bd8e80f5e654f426f8. * Don't confirm JSONEncodable when enum confirms RawRepresentable. * Update sample * Add space before { * Update sample * Don't confirm JSONEncodable when enum confirms RawRepresentable. --- .../main/resources/swift5/Extensions.mustache | 10 +++++ .../main/resources/swift5/modelEnum.mustache | 2 +- .../modelInlineEnumDeclaration.mustache | 2 +- .../resources/swift5/modelObject.mustache | 4 +- .../main/resources/swift5/modelOneOf.mustache | 2 +- .../src/test/resources/jsoncodable.yaml | 44 +++++++++++++++++++ .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesAnyType.swift | 2 +- .../Models/AdditionalPropertiesArray.swift | 2 +- .../Models/AdditionalPropertiesBoolean.swift | 2 +- .../Models/AdditionalPropertiesClass.swift | 2 +- .../Models/AdditionalPropertiesInteger.swift | 2 +- .../Models/AdditionalPropertiesNumber.swift | 2 +- .../Models/AdditionalPropertiesObject.swift | 2 +- .../Models/AdditionalPropertiesString.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../Classes/OpenAPIs/Models/BigCat.swift | 2 +- .../Classes/OpenAPIs/Models/BigCatAllOf.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Models/XmlItem.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Classes/OpenAPIs/Models/Apple.swift | 2 +- .../Classes/OpenAPIs/Models/Banana.swift | 2 +- .../Classes/OpenAPIs/Models/Fruit.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- .../Sources/PetstoreClient/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../PetstoreClient/Models/Animal.swift | 2 +- .../PetstoreClient/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../Models/ArrayOfNumberOnly.swift | 2 +- .../PetstoreClient/Models/ArrayTest.swift | 2 +- .../Models/Capitalization.swift | 2 +- .../Sources/PetstoreClient/Models/Cat.swift | 2 +- .../PetstoreClient/Models/CatAllOf.swift | 2 +- .../PetstoreClient/Models/Category.swift | 2 +- .../PetstoreClient/Models/ClassModel.swift | 2 +- .../PetstoreClient/Models/Client.swift | 2 +- .../Sources/PetstoreClient/Models/Dog.swift | 2 +- .../PetstoreClient/Models/DogAllOf.swift | 2 +- .../PetstoreClient/Models/EnumArrays.swift | 2 +- .../PetstoreClient/Models/EnumTest.swift | 2 +- .../Sources/PetstoreClient/Models/File.swift | 2 +- .../Models/FileSchemaTestClass.swift | 2 +- .../PetstoreClient/Models/FormatTest.swift | 2 +- .../Models/HasOnlyReadOnly.swift | 2 +- .../Sources/PetstoreClient/Models/List.swift | 2 +- .../PetstoreClient/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../Models/Model200Response.swift | 2 +- .../Sources/PetstoreClient/Models/Name.swift | 2 +- .../PetstoreClient/Models/NumberOnly.swift | 2 +- .../Sources/PetstoreClient/Models/Order.swift | 2 +- .../Models/OuterComposite.swift | 2 +- .../Sources/PetstoreClient/Models/Pet.swift | 2 +- .../PetstoreClient/Models/ReadOnlyFirst.swift | 2 +- .../PetstoreClient/Models/Return.swift | 2 +- .../Models/SpecialModelName.swift | 2 +- .../Models/StringBooleanMap.swift | 2 +- .../Sources/PetstoreClient/Models/Tag.swift | 2 +- .../Models/TypeHolderDefault.swift | 2 +- .../Models/TypeHolderExample.swift | 2 +- .../Sources/PetstoreClient/Models/User.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 10 +++++ .../Models/AdditionalPropertiesClass.swift | 2 +- .../Classes/OpenAPIs/Models/Animal.swift | 2 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 2 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 2 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 2 +- .../OpenAPIs/Models/Capitalization.swift | 2 +- .../Classes/OpenAPIs/Models/Cat.swift | 2 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/Category.swift | 2 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 2 +- .../Classes/OpenAPIs/Models/Dog.swift | 2 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 2 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 2 +- .../Classes/OpenAPIs/Models/EnumTest.swift | 2 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 2 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 2 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 2 +- .../Classes/OpenAPIs/Models/List.swift | 2 +- .../Classes/OpenAPIs/Models/MapTest.swift | 2 +- ...opertiesAndAdditionalPropertiesClass.swift | 2 +- .../OpenAPIs/Models/Model200Response.swift | 2 +- .../Classes/OpenAPIs/Models/Name.swift | 2 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 2 +- .../Classes/OpenAPIs/Models/Order.swift | 2 +- .../OpenAPIs/Models/OuterComposite.swift | 2 +- .../Classes/OpenAPIs/Models/Pet.swift | 2 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 2 +- .../Classes/OpenAPIs/Models/Return.swift | 2 +- .../OpenAPIs/Models/SpecialModelName.swift | 2 +- .../OpenAPIs/Models/StringBooleanMap.swift | 2 +- .../Classes/OpenAPIs/Models/Tag.swift | 2 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 2 +- .../OpenAPIs/Models/TypeHolderExample.swift | 2 +- .../Classes/OpenAPIs/Models/User.swift | 2 +- 521 files changed, 709 insertions(+), 505 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/jsoncodable.yaml diff --git a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache index eb3fd11eb8e1..9411b9f94831 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache @@ -65,6 +65,16 @@ extension Date: JSONEncodable { func encodeToJSON() -> Any { return CodableHelper.dateFormatter.string(from: self) } +} + +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } }{{/useVapor}}{{#generateModelAdditionalProperties}} extension String: CodingKey { diff --git a/modules/openapi-generator/src/main/resources/swift5/modelEnum.mustache b/modules/openapi-generator/src/main/resources/swift5/modelEnum.mustache index 2b28d7c00810..060a14ce74c7 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelEnum.mustache @@ -1,4 +1,4 @@ -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{classname}}: {{dataType}}, {{#useVapor}}Content, Hashable{{/useVapor}}{{^useVapor}}Codable{{/useVapor}}, CaseIterable{{#enumUnknownDefaultCase}}{{#isInteger}}, CaseIterableDefaultsLast{{/isInteger}}{{#isFloat}}, CaseIterableDefaultsLast{{/isFloat}}{{#isDouble}}, CaseIterableDefaultsLast{{/isDouble}}{{#isString}}, CaseIterableDefaultsLast{{/isString}}{{/enumUnknownDefaultCase}} { +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{classname}}: {{dataType}}, {{#useVapor}}Content, Hashable{{/useVapor}}{{^useVapor}}Codable{{^isString}}{{^isInteger}}{{^isFloat}}{{^isDouble}}, JSONEncodable{{/isDouble}}{{/isFloat}}{{/isInteger}}{{/isString}}{{/useVapor}}, CaseIterable{{#enumUnknownDefaultCase}}{{#isInteger}}, CaseIterableDefaultsLast{{/isInteger}}{{#isFloat}}, CaseIterableDefaultsLast{{/isFloat}}{{#isDouble}}, CaseIterableDefaultsLast{{/isDouble}}{{#isString}}, CaseIterableDefaultsLast{{/isString}}{{/enumUnknownDefaultCase}} { {{#allowableValues}} {{#enumVars}} case {{{name}}} = {{{value}}} diff --git a/modules/openapi-generator/src/main/resources/swift5/modelInlineEnumDeclaration.mustache b/modules/openapi-generator/src/main/resources/swift5/modelInlineEnumDeclaration.mustache index 445f56873884..27f1e51a979b 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelInlineEnumDeclaration.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelInlineEnumDeclaration.mustache @@ -1,4 +1,4 @@ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, {{#useVapor}}Content, Hashable{{/useVapor}}{{^useVapor}}Codable{{/useVapor}}, CaseIterable{{#enumUnknownDefaultCase}}{{#isInteger}}, CaseIterableDefaultsLast{{/isInteger}}{{#isFloat}}, CaseIterableDefaultsLast{{/isFloat}}{{#isDouble}}, CaseIterableDefaultsLast{{/isDouble}}{{#isString}}, CaseIterableDefaultsLast{{/isString}}{{#isContainer}}, CaseIterableDefaultsLast{{/isContainer}}{{/enumUnknownDefaultCase}} { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, {{#useVapor}}Content, Hashable{{/useVapor}}{{^useVapor}}Codable{{^isContainer}}{{^isString}}{{^isInteger}}{{^isFloat}}{{^isDouble}}, JSONEncodable{{/isDouble}}{{/isFloat}}{{/isInteger}}{{/isString}}{{/isContainer}}{{/useVapor}}, CaseIterable{{#enumUnknownDefaultCase}}{{#isInteger}}, CaseIterableDefaultsLast{{/isInteger}}{{#isFloat}}, CaseIterableDefaultsLast{{/isFloat}}{{#isDouble}}, CaseIterableDefaultsLast{{/isDouble}}{{#isString}}, CaseIterableDefaultsLast{{/isString}}{{#isContainer}}, CaseIterableDefaultsLast{{/isContainer}}{{/enumUnknownDefaultCase}} { {{#allowableValues}} {{#enumVars}} case {{{name}}} = {{{value}}} diff --git a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache index 713bc305495b..a82cc1e89537 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache @@ -1,5 +1,5 @@ -{{^objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#useClasses}}final class{{/useClasses}}{{^useClasses}}struct{{/useClasses}} {{{classname}}}: {{#useVapor}}Content{{/useVapor}}{{^useVapor}}Codable{{/useVapor}}{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} { -{{/objcCompatible}}{{#objcCompatible}}@objc {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class {{classname}}: NSObject, Codable { +{{^objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#useClasses}}final class{{/useClasses}}{{^useClasses}}struct{{/useClasses}} {{{classname}}}: {{#useVapor}}Content{{/useVapor}}{{^useVapor}}Codable, JSONEncodable{{/useVapor}}{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} { +{{/objcCompatible}}{{#objcCompatible}}@objc {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class {{classname}}: NSObject, Codable, JSONEncodable { {{/objcCompatible}} {{#allVars}} diff --git a/modules/openapi-generator/src/main/resources/swift5/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/swift5/modelOneOf.mustache index 1c16a3955bc4..277f6f26ab4d 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelOneOf.mustache @@ -1,4 +1,4 @@ -public enum {{classname}}: {{#useVapor}}Content{{/useVapor}}{{^useVapor}}Codable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}}{{/useVapor}} { +public enum {{classname}}: {{#useVapor}}Content{{/useVapor}}{{^useVapor}}Codable, JSONEncodable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}}{{/useVapor}} { {{#oneOf}} case type{{.}}({{.}}) {{/oneOf}} diff --git a/modules/openapi-generator/src/test/resources/jsoncodable.yaml b/modules/openapi-generator/src/test/resources/jsoncodable.yaml new file mode 100644 index 000000000000..324b29c5c497 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/jsoncodable.yaml @@ -0,0 +1,44 @@ +openapi: 3.0.0 +info: + title: test + version: '1.0' +servers: + - url: 'http://localhost:3000' +paths: + /postModel: + post: + summary: Create New User + operationId: post-user + responses: + '200': + description: User Created + content: + application/json: + schema: + $ref: '#/components/schemas/User' + examples: {} + '400': + description: Missing Required Information + description: Create a new user. + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Request' + parameters: [] +components: + schemas: + User: + title: User + type: object + description: '' + x-examples: {} + properties: + integerValue: + type: integer + Request: + title: Request + type: object + properties: + user1: + $ref: '#/components/schemas/User' \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 621afb93561d..623c4c7fd2c4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index cdd4f5335b98..a6882d6517fd 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c365505ab9d8..1890fcf9fde7 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 226f74561811..eabae42d3bf4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 398311278715..fa93d7c6c743 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8865d76bef23..c99f82be9b93 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 71cd93bce5fe..f8a3f64e2ee8 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 457e04bd475e..253bbd7c04c6 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 8caebb1c2065..681bcada15f3 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 89016ca353d8..75b68ec01e27 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 16e69e560bdf..a0419d54f15c 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public var _class: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 60dbc5dc5c1c..21a539ba0109 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 658732a7f36f..dc3bb465a5f1 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 82b0dedf35bf..627bb997c5e0 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..e06009060c54 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 8c8bca49774a..3a9edb08ea78 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 05dd5b1a825e..1378b4f9b207 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 3ca66a313590..f9a39d2e58e0 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index a7a4b39e7207..0a3299554824 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 54ed8a723c64..9e2fe8cc87fd 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 67e3048469fe..b9a06034e01e 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 1e728fcdf587..c4792800425f 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c79ca459217e..c15921ae6c76 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 23402143f718..d5ab7e422f2b 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8698915e5ef2..e8a19ee3d99b 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 87ceb64bb973..10fd059c8566 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index e2eeced4c571..bf7da6a3f862 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index edeaccaeaa6f..99568c8facf1 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index bceec7ccb53f..f93b402b0fd5 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 57ba3f577c87..05cf40bedd38 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index afc2b51f8f38..9429b341fa9b 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public var _return: Int? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index bfe9723f888f..543f1fa5ad4a 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 126c35c85a6a..548b82c049e2 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index e58eecd960f2..9a7d7e6c8e6a 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 6c22fdbae7aa..dd67ca7851d4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7afe359ae409..e55b50dc4f73 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 621afb93561d..623c4c7fd2c4 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index cdd4f5335b98..a6882d6517fd 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c365505ab9d8..1890fcf9fde7 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 226f74561811..eabae42d3bf4 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 398311278715..fa93d7c6c743 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8865d76bef23..c99f82be9b93 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 71cd93bce5fe..f8a3f64e2ee8 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 457e04bd475e..253bbd7c04c6 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 8caebb1c2065..681bcada15f3 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 89016ca353d8..75b68ec01e27 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 16e69e560bdf..a0419d54f15c 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public var _class: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 60dbc5dc5c1c..21a539ba0109 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 658732a7f36f..dc3bb465a5f1 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 82b0dedf35bf..627bb997c5e0 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..e06009060c54 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 8c8bca49774a..3a9edb08ea78 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 05dd5b1a825e..1378b4f9b207 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 3ca66a313590..f9a39d2e58e0 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index a7a4b39e7207..0a3299554824 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 54ed8a723c64..9e2fe8cc87fd 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 67e3048469fe..b9a06034e01e 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 1e728fcdf587..c4792800425f 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c79ca459217e..c15921ae6c76 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 23402143f718..d5ab7e422f2b 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8698915e5ef2..e8a19ee3d99b 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 87ceb64bb973..10fd059c8566 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index e2eeced4c571..bf7da6a3f862 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index edeaccaeaa6f..99568c8facf1 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index bceec7ccb53f..f93b402b0fd5 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 57ba3f577c87..05cf40bedd38 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index afc2b51f8f38..9429b341fa9b 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public var _return: Int? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index bfe9723f888f..543f1fa5ad4a 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 126c35c85a6a..548b82c049e2 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index e58eecd960f2..9a7d7e6c8e6a 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 6c22fdbae7aa..dd67ca7851d4 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7afe359ae409..e55b50dc4f73 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 621afb93561d..623c4c7fd2c4 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index cdd4f5335b98..a6882d6517fd 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c365505ab9d8..1890fcf9fde7 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 226f74561811..eabae42d3bf4 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 398311278715..fa93d7c6c743 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8865d76bef23..c99f82be9b93 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 71cd93bce5fe..f8a3f64e2ee8 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 457e04bd475e..253bbd7c04c6 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 8caebb1c2065..681bcada15f3 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 89016ca353d8..75b68ec01e27 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 16e69e560bdf..a0419d54f15c 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public var _class: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 60dbc5dc5c1c..21a539ba0109 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 658732a7f36f..dc3bb465a5f1 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 82b0dedf35bf..627bb997c5e0 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..e06009060c54 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 8c8bca49774a..3a9edb08ea78 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 05dd5b1a825e..1378b4f9b207 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 3ca66a313590..f9a39d2e58e0 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index a7a4b39e7207..0a3299554824 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 54ed8a723c64..9e2fe8cc87fd 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 67e3048469fe..b9a06034e01e 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 1e728fcdf587..c4792800425f 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c79ca459217e..c15921ae6c76 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 23402143f718..d5ab7e422f2b 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8698915e5ef2..e8a19ee3d99b 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 87ceb64bb973..10fd059c8566 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index e2eeced4c571..bf7da6a3f862 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index edeaccaeaa6f..99568c8facf1 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index bceec7ccb53f..f93b402b0fd5 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 57ba3f577c87..05cf40bedd38 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index afc2b51f8f38..9429b341fa9b 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public var _return: Int? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index bfe9723f888f..543f1fa5ad4a 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 126c35c85a6a..548b82c049e2 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index e58eecd960f2..9a7d7e6c8e6a 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 6c22fdbae7aa..dd67ca7851d4 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7afe359ae409..e55b50dc4f73 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift index 07dd0c38a1fa..71141047347b 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesAnyType: Codable, Hashable { +public struct AdditionalPropertiesAnyType: Codable, JSONEncodable, Hashable { public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift index 43a6d66cb592..e6b88a3f1d27 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesArray: Codable, Hashable { +public struct AdditionalPropertiesArray: Codable, JSONEncodable, Hashable { public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesBoolean.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesBoolean.swift index a2a20a926a16..a8b5930bdf2d 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesBoolean.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesBoolean.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesBoolean: Codable, Hashable { +public struct AdditionalPropertiesBoolean: Codable, JSONEncodable, Hashable { public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index eb6669c105a7..674eec97cc41 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapNumber: [String: Double]? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesInteger.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesInteger.swift index 0ccd9115bfd5..a6661e776dde 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesInteger.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesInteger.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesInteger: Codable, Hashable { +public struct AdditionalPropertiesInteger: Codable, JSONEncodable, Hashable { public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesNumber.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesNumber.swift index 06987825557b..676c6e7838d7 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesNumber.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesNumber.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesNumber: Codable, Hashable { +public struct AdditionalPropertiesNumber: Codable, JSONEncodable, Hashable { public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesObject.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesObject.swift index 848a0983a3f6..7480c9a65b50 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesObject.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesObject.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesObject: Codable, Hashable { +public struct AdditionalPropertiesObject: Codable, JSONEncodable, Hashable { public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesString.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesString.swift index 7b5bd40f70f1..3f35bbf770cb 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesString.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesString.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesString: Codable, Hashable { +public struct AdditionalPropertiesString: Codable, JSONEncodable, Hashable { public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index cdd4f5335b98..a6882d6517fd 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c365505ab9d8..1890fcf9fde7 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 226f74561811..eabae42d3bf4 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 398311278715..fa93d7c6c743 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8865d76bef23..c99f82be9b93 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift index 4ca3454f9bd9..6a01769ede3a 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct BigCat: Codable, Hashable { +public struct BigCat: Codable, JSONEncodable, Hashable { public enum Kind: String, Codable, CaseIterable { case lions = "lions" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift index 8c6a92c8b484..24dcc39dfe27 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct BigCatAllOf: Codable, Hashable { +public struct BigCatAllOf: Codable, JSONEncodable, Hashable { public enum Kind: String, Codable, CaseIterable { case lions = "lions" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 71cd93bce5fe..f8a3f64e2ee8 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 457e04bd475e..253bbd7c04c6 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 8caebb1c2065..681bcada15f3 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index e880b792bbe9..80ac2aeaf8b2 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String = "default-name" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 16e69e560bdf..a0419d54f15c 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public var _class: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 60dbc5dc5c1c..21a539ba0109 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 658732a7f36f..dc3bb465a5f1 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 82b0dedf35bf..627bb997c5e0 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..e06009060c54 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 8c8bca49774a..3a9edb08ea78 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 05dd5b1a825e..1378b4f9b207 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 3ca66a313590..f9a39d2e58e0 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 5dccf04e1e16..2892d53a3b6c 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 54ed8a723c64..9e2fe8cc87fd 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 67e3048469fe..b9a06034e01e 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 1e728fcdf587..c4792800425f 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c79ca459217e..c15921ae6c76 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 23402143f718..d5ab7e422f2b 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index a28f46a33ce7..a4ba4255e0cc 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: Int? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 87ceb64bb973..10fd059c8566 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index e2eeced4c571..bf7da6a3f862 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index edeaccaeaa6f..99568c8facf1 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index f3a1bc922893..abd848e5836f 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 57ba3f577c87..05cf40bedd38 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index afc2b51f8f38..9429b341fa9b 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public var _return: Int? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index bfe9723f888f..543f1fa5ad4a 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 126c35c85a6a..548b82c049e2 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index e58eecd960f2..9a7d7e6c8e6a 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 23343c3c393e..1a37683324db 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7afe359ae409..e55b50dc4f73 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/XmlItem.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/XmlItem.swift index ae43cd286927..84b13d99b5fa 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/XmlItem.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/XmlItem.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct XmlItem: Codable, Hashable { +public struct XmlItem: Codable, JSONEncodable, Hashable { public var attributeString: String? public var attributeNumber: Double? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ff77211ec29f..d272a225436d 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Describes the result of uploading an image resource */ -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 0036cc7a8573..d92169c4bc56 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** A category for a pet */ -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index ccd3bea0249b..3471c82ef951 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -12,7 +12,7 @@ import AnyCodable /** An order for a pets from the pet store */ @available(*, deprecated, message: "This schema is deprecated.") -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 047967197a70..345cbbfa49fe 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** A pet for sale in the pet store */ -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 555a33e6a186..c50903998f1c 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** A tag for a pet */ -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 4d8eeffdbf82..f0b4a0d362a5 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** A User who is purchasing from the pet store */ -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 621afb93561d..623c4c7fd2c4 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index cdd4f5335b98..a6882d6517fd 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c365505ab9d8..1890fcf9fde7 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 226f74561811..eabae42d3bf4 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 398311278715..fa93d7c6c743 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8865d76bef23..c99f82be9b93 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 71cd93bce5fe..f8a3f64e2ee8 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 457e04bd475e..253bbd7c04c6 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 8caebb1c2065..681bcada15f3 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 89016ca353d8..75b68ec01e27 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 16e69e560bdf..a0419d54f15c 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public var _class: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 60dbc5dc5c1c..21a539ba0109 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 658732a7f36f..dc3bb465a5f1 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 82b0dedf35bf..627bb997c5e0 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index e41babad70f4..6c945fc2047b 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable, CaseIterableDefaultsLast { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 72eaac6069a6..58c1b4665dd2 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable, CaseIterableDefaultsLast { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 05dd5b1a825e..1378b4f9b207 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 3ca66a313590..f9a39d2e58e0 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index a7a4b39e7207..0a3299554824 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 54ed8a723c64..9e2fe8cc87fd 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 67e3048469fe..b9a06034e01e 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index fcae4e7e9372..42728d2a308e 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable, CaseIterableDefaultsLast { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c79ca459217e..c15921ae6c76 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 23402143f718..d5ab7e422f2b 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8698915e5ef2..e8a19ee3d99b 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 87ceb64bb973..10fd059c8566 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 57c1c4f866e5..daaada5d4e88 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable, CaseIterableDefaultsLast { case placed = "placed" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index edeaccaeaa6f..99568c8facf1 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index a0e8a03c82ba..04512ffe4bae 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable, CaseIterableDefaultsLast { case available = "available" diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 57ba3f577c87..05cf40bedd38 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index afc2b51f8f38..9429b341fa9b 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public var _return: Int? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index bfe9723f888f..543f1fa5ad4a 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 126c35c85a6a..548b82c049e2 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index e58eecd960f2..9a7d7e6c8e6a 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 6c22fdbae7aa..dd67ca7851d4 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7afe359ae409..e55b50dc4f73 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 255ab49db7b6..c2bbbb3af6b7 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 731b7b76eb62..da4e91633259 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct AdditionalPropertiesClass: Codable, Hashable { +internal struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { internal var mapString: [String: String]? internal var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index b160f8c835df..0ce2b123708f 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Animal: Codable, Hashable { +internal struct Animal: Codable, JSONEncodable, Hashable { internal var className: String internal var color: String? = "red" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c62ce400c81b..529c00859975 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct ApiResponse: Codable, Hashable { +internal struct ApiResponse: Codable, JSONEncodable, Hashable { internal var code: Int? internal var type: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 2fa5da894c49..671efcb4efe1 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +internal struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { internal var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 4ad2ff35d21e..82f41544ff1c 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct ArrayOfNumberOnly: Codable, Hashable { +internal struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { internal var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index e3464b693ecc..79399389451b 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct ArrayTest: Codable, Hashable { +internal struct ArrayTest: Codable, JSONEncodable, Hashable { internal var arrayOfString: [String]? internal var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 042f77b8ab80..d564608fe855 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Capitalization: Codable, Hashable { +internal struct Capitalization: Codable, JSONEncodable, Hashable { internal var smallCamel: String? internal var capitalCamel: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 4828c445c1bc..63bff8570b80 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Cat: Codable, Hashable { +internal struct Cat: Codable, JSONEncodable, Hashable { internal var className: String internal var color: String? = "red" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 343d71d6873f..9c7e6d829f2b 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct CatAllOf: Codable, Hashable { +internal struct CatAllOf: Codable, JSONEncodable, Hashable { internal var declawed: Bool? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index df67d9bd6f1c..2edac90e1bcc 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Category: Codable, Hashable { +internal struct Category: Codable, JSONEncodable, Hashable { internal var id: Int64? internal var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index d679cfe582af..966c60af5abb 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -internal struct ClassModel: Codable, Hashable { +internal struct ClassModel: Codable, JSONEncodable, Hashable { internal var _class: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 2e50c580b653..1722e5aa9610 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Client: Codable, Hashable { +internal struct Client: Codable, JSONEncodable, Hashable { internal var client: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index cdf48f3a786e..b8ab31682676 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Dog: Codable, Hashable { +internal struct Dog: Codable, JSONEncodable, Hashable { internal var className: String internal var color: String? = "red" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index f2e801a399e4..ace1ac3eab40 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct DogAllOf: Codable, Hashable { +internal struct DogAllOf: Codable, JSONEncodable, Hashable { internal var breed: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 950a66d752a7..cf7484732ca9 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct EnumArrays: Codable, Hashable { +internal struct EnumArrays: Codable, JSONEncodable, Hashable { internal enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 774198165702..e82207bd88bc 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct EnumTest: Codable, Hashable { +internal struct EnumTest: Codable, JSONEncodable, Hashable { internal enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 14b22772e3fa..b39148dbd2fb 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -internal struct File: Codable, Hashable { +internal struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ internal var sourceURI: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index e0f8e9990a57..2b5d09df6194 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct FileSchemaTestClass: Codable, Hashable { +internal struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { internal var file: File? internal var files: [File]? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 6f8b00eddf8d..87dd9fb1c4d2 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct FormatTest: Codable, Hashable { +internal struct FormatTest: Codable, JSONEncodable, Hashable { internal var integer: Int? internal var int32: Int? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 0ddedc17958c..d446fea284f2 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct HasOnlyReadOnly: Codable, Hashable { +internal struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { internal var bar: String? internal var foo: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 0e7903fd06a1..4b88251418c3 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct List: Codable, Hashable { +internal struct List: Codable, JSONEncodable, Hashable { internal var _123list: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 748bc6781a5d..32e525f81311 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct MapTest: Codable, Hashable { +internal struct MapTest: Codable, JSONEncodable, Hashable { internal enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 68ef87daf003..e2f306998958 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +internal struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { internal var uuid: UUID? internal var dateTime: Date? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index dad6079ddb2d..f7de4ac565e0 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -internal struct Model200Response: Codable, Hashable { +internal struct Model200Response: Codable, JSONEncodable, Hashable { internal var name: Int? internal var _class: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 59807f762099..c5f81444e454 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -internal struct Name: Codable, Hashable { +internal struct Name: Codable, JSONEncodable, Hashable { internal var name: Int internal var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 36cf8d164bd1..11ae4447f994 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct NumberOnly: Codable, Hashable { +internal struct NumberOnly: Codable, JSONEncodable, Hashable { internal var justNumber: Double? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 45046f9a00fd..72bdd4d71b4b 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Order: Codable, Hashable { +internal struct Order: Codable, JSONEncodable, Hashable { internal enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 082cdebd26c7..225f0c777870 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct OuterComposite: Codable, Hashable { +internal struct OuterComposite: Codable, JSONEncodable, Hashable { internal var myNumber: Double? internal var myString: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index ca9db44f248e..bb526c4dba2c 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Pet: Codable, Hashable { +internal struct Pet: Codable, JSONEncodable, Hashable { internal enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index e8961d9d8a85..9a37d814952f 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct ReadOnlyFirst: Codable, Hashable { +internal struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { internal var bar: String? internal var baz: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 7a2e2da47f87..f3a0c0a55642 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -internal struct Return: Codable, Hashable { +internal struct Return: Codable, JSONEncodable, Hashable { internal var _return: Int? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 2c3d25c5bbbe..0ff74e0c2dba 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct SpecialModelName: Codable, Hashable { +internal struct SpecialModelName: Codable, JSONEncodable, Hashable { internal var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 4b76e50cecef..9cba9f300946 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct StringBooleanMap: Codable, Hashable { +internal struct StringBooleanMap: Codable, JSONEncodable, Hashable { internal enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 810603ff0b52..b765ab745f28 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct Tag: Codable, Hashable { +internal struct Tag: Codable, JSONEncodable, Hashable { internal var id: Int64? internal var name: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index 4a71a601e1b1..9d14f7189f20 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct TypeHolderDefault: Codable, Hashable { +internal struct TypeHolderDefault: Codable, JSONEncodable, Hashable { internal var stringItem: String = "what" internal var numberItem: Double diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 71cdf9ee1eab..82b087cf7d98 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct TypeHolderExample: Codable, Hashable { +internal struct TypeHolderExample: Codable, JSONEncodable, Hashable { internal var stringItem: String internal var numberItem: Double diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 57017c341e78..3430a514b913 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -internal struct User: Codable, Hashable { +internal struct User: Codable, JSONEncodable, Hashable { internal var id: Int64? internal var username: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 1421cb642ee7..7719c8969ea4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class AdditionalPropertiesClass: NSObject, Codable { +@objc public class AdditionalPropertiesClass: NSObject, Codable, JSONEncodable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index d60621e7bf6c..da38f5b0da4e 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Animal: NSObject, Codable { +@objc public class Animal: NSObject, Codable, JSONEncodable { public var _className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index 1b42b26535cc..37145a774164 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class ApiResponse: NSObject, Codable { +@objc public class ApiResponse: NSObject, Codable, JSONEncodable { public var code: Int? public var codeNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 08aca8598d0b..060c953f61a3 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class ArrayOfArrayOfNumberOnly: NSObject, Codable { +@objc public class ArrayOfArrayOfNumberOnly: NSObject, Codable, JSONEncodable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index e8114a8f45e4..6c038d5f1306 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class ArrayOfNumberOnly: NSObject, Codable { +@objc public class ArrayOfNumberOnly: NSObject, Codable, JSONEncodable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index be0dea61b912..e2d31205744a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class ArrayTest: NSObject, Codable { +@objc public class ArrayTest: NSObject, Codable, JSONEncodable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 6f137adc91f6..2bb646fafafc 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Capitalization: NSObject, Codable { +@objc public class Capitalization: NSObject, Codable, JSONEncodable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 60eccac9412c..3b2bcc29f690 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Cat: NSObject, Codable { +@objc public class Cat: NSObject, Codable, JSONEncodable { public var _className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index cce886558e8a..44bfb91f2d2a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class CatAllOf: NSObject, Codable { +@objc public class CatAllOf: NSObject, Codable, JSONEncodable { public var declawed: Bool? public var declawedNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index c8e542ad6b52..193628d78fb0 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Category: NSObject, Codable { +@objc public class Category: NSObject, Codable, JSONEncodable { public var _id: Int64? public var _idNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 6bc90a989bd1..05ad9f6e929f 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -@objc public class ClassModel: NSObject, Codable { +@objc public class ClassModel: NSObject, Codable, JSONEncodable { public var _class: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index a3585de4f0d5..16accb0036f4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Client: NSObject, Codable { +@objc public class Client: NSObject, Codable, JSONEncodable { public var client: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 2b060c8ad38c..8e3e5825e7c2 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Dog: NSObject, Codable { +@objc public class Dog: NSObject, Codable, JSONEncodable { public var _className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index d92db038ca42..92476d0c42a8 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class DogAllOf: NSObject, Codable { +@objc public class DogAllOf: NSObject, Codable, JSONEncodable { public var breed: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1269cb72e27c..937f2d445af7 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class EnumArrays: NSObject, Codable { +@objc public class EnumArrays: NSObject, Codable, JSONEncodable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 066d266386bd..aff4dfcee012 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class EnumTest: NSObject, Codable { +@objc public class EnumTest: NSObject, Codable, JSONEncodable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift index b175f6370d26..fb8b728d3be5 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -@objc public class File: NSObject, Codable { +@objc public class File: NSObject, Codable, JSONEncodable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 24a6e66432bc..d29b62fe76df 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class FileSchemaTestClass: NSObject, Codable { +@objc public class FileSchemaTestClass: NSObject, Codable, JSONEncodable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 413656ff25e6..d4ba9d436bbc 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class FormatTest: NSObject, Codable { +@objc public class FormatTest: NSObject, Codable, JSONEncodable { public var integer: Int? public var integerNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index eac4a1446161..ba7da0978e13 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class HasOnlyReadOnly: NSObject, Codable { +@objc public class HasOnlyReadOnly: NSObject, Codable, JSONEncodable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift index f48559c0c451..bb1d3f7347a6 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class List: NSObject, Codable { +@objc public class List: NSObject, Codable, JSONEncodable { public var _123list: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 68a3e128cc21..401cfdc61bf4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class MapTest: NSObject, Codable { +@objc public class MapTest: NSObject, Codable, JSONEncodable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 1594ac4a26a9..c98d6c09be62 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class MixedPropertiesAndAdditionalPropertiesClass: NSObject, Codable { +@objc public class MixedPropertiesAndAdditionalPropertiesClass: NSObject, Codable, JSONEncodable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index dfae9880b135..6469aa6217a4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -@objc public class Model200Response: NSObject, Codable { +@objc public class Model200Response: NSObject, Codable, JSONEncodable { public var name: Int? public var nameNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index e1fed77c4a91..3f96e8c58f50 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -@objc public class Name: NSObject, Codable { +@objc public class Name: NSObject, Codable, JSONEncodable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index b828f6d3b472..646a33e63ae2 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class NumberOnly: NSObject, Codable { +@objc public class NumberOnly: NSObject, Codable, JSONEncodable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 27237e43da70..ccdd4da20c33 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Order: NSObject, Codable { +@objc public class Order: NSObject, Codable, JSONEncodable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index bbc4536d4288..9300269b2a42 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class OuterComposite: NSObject, Codable { +@objc public class OuterComposite: NSObject, Codable, JSONEncodable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index d4d38218ecd9..abd31c6042b0 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Pet: NSObject, Codable { +@objc public class Pet: NSObject, Codable, JSONEncodable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 8aef54563320..056dfa5e970d 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class ReadOnlyFirst: NSObject, Codable { +@objc public class ReadOnlyFirst: NSObject, Codable, JSONEncodable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index f497fdc7e09e..49942cb402b6 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -@objc public class Return: NSObject, Codable { +@objc public class Return: NSObject, Codable, JSONEncodable { public var _return: Int? public var _returnNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 8a5860ae0b9a..a75d92608fa3 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class SpecialModelName: NSObject, Codable { +@objc public class SpecialModelName: NSObject, Codable, JSONEncodable { public var specialPropertyName: Int64? public var specialPropertyNameNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 4708c93daa0d..29d7afe6a68a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class StringBooleanMap: NSObject, Codable { +@objc public class StringBooleanMap: NSObject, Codable, JSONEncodable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 6150ef4895fd..5c7181fff983 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class Tag: NSObject, Codable { +@objc public class Tag: NSObject, Codable, JSONEncodable { public var _id: Int64? public var _idNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index 27408db6f27a..7606991fa33a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class TypeHolderDefault: NSObject, Codable { +@objc public class TypeHolderDefault: NSObject, Codable, JSONEncodable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 61c7c8b4fb41..9f272d040fb9 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class TypeHolderExample: NSObject, Codable { +@objc public class TypeHolderExample: NSObject, Codable, JSONEncodable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 3c71f76aab0a..b2444a4c7af3 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -@objc public class User: NSObject, Codable { +@objc public class User: NSObject, Codable, JSONEncodable { public var _id: Int64? public var _idNum: NSNumber? { diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Apple.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Apple.swift index ee0b5786ef15..897f9223084b 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Apple.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Apple.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Apple: Codable, Hashable { +public struct Apple: Codable, JSONEncodable, Hashable { public var kind: String? diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift index 1ad6e976a7ea..9173607e0b5c 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Banana: Codable, Hashable { +public struct Banana: Codable, JSONEncodable, Hashable { public var count: Double? diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Fruit.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Fruit.swift index c249774d2a2b..76f10ba92e7a 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Fruit.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Fruit.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public enum Fruit: Codable, Hashable { +public enum Fruit: Codable, JSONEncodable, Hashable { case typeApple(Apple) case typeBanana(Banana) diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index cc93d4c30d3c..152de64ee6eb 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -66,6 +66,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 621afb93561d..623c4c7fd2c4 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index cdd4f5335b98..a6882d6517fd 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c365505ab9d8..1890fcf9fde7 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 226f74561811..eabae42d3bf4 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 398311278715..fa93d7c6c743 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8865d76bef23..c99f82be9b93 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 71cd93bce5fe..f8a3f64e2ee8 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 457e04bd475e..253bbd7c04c6 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 8caebb1c2065..681bcada15f3 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 89016ca353d8..75b68ec01e27 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 16e69e560bdf..a0419d54f15c 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public var _class: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 60dbc5dc5c1c..21a539ba0109 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 658732a7f36f..dc3bb465a5f1 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 82b0dedf35bf..627bb997c5e0 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..e06009060c54 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 8c8bca49774a..3a9edb08ea78 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 05dd5b1a825e..1378b4f9b207 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 3ca66a313590..f9a39d2e58e0 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index a7a4b39e7207..0a3299554824 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 54ed8a723c64..9e2fe8cc87fd 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 67e3048469fe..b9a06034e01e 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 1e728fcdf587..c4792800425f 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c79ca459217e..c15921ae6c76 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 23402143f718..d5ab7e422f2b 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8698915e5ef2..e8a19ee3d99b 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 87ceb64bb973..10fd059c8566 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index e2eeced4c571..bf7da6a3f862 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index edeaccaeaa6f..99568c8facf1 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index bceec7ccb53f..f93b402b0fd5 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 57ba3f577c87..05cf40bedd38 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index afc2b51f8f38..9429b341fa9b 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public var _return: Int? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index bfe9723f888f..543f1fa5ad4a 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 126c35c85a6a..548b82c049e2 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index e58eecd960f2..9a7d7e6c8e6a 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 6c22fdbae7aa..dd67ca7851d4 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7afe359ae409..e55b50dc4f73 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 34f35d9b4c95..fa46ae0b457d 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public private(set) var mapString: [String: String]? public private(set) var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 14bb2bd2fe05..0cff33a9e4dc 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public private(set) var className: String public private(set) var color: String? = "red" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index acaac402ef4b..05b7a1702f28 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public private(set) var code: Int? public private(set) var type: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index d8ef19116b83..d386237437cd 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public private(set) var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 949077533e9b..53892ad173b0 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public private(set) var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 6135c1556a29..0df050c0c7f8 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public private(set) var arrayOfString: [String]? public private(set) var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 6353bd4d8a87..ce9ccf6e82de 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public private(set) var smallCamel: String? public private(set) var capitalCamel: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 834c51d91529..bd99d8d43889 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public private(set) var className: String public private(set) var color: String? = "red" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index b227089dc4fe..26d078c63b09 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public private(set) var declawed: Bool? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 1413c58141e6..1b25bb682069 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public private(set) var id: Int64? public private(set) var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 73b8414f3424..d2bf98371fb3 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public private(set) var _class: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 364b58f1c4e0..073a19f51382 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public private(set) var client: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 849fbfed7450..7765adb807e8 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public private(set) var className: String public private(set) var color: String? = "red" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 527edd845c46..00536fafe471 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public private(set) var breed: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1a79ffe95b1f..de3154323f3b 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index c097933904bb..6d471e606dc3 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/File.swift index c5ebbaf2f4f8..8e9d198ac242 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public private(set) var sourceURI: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index c04b1dccf76c..a66a9b98daff 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public private(set) var file: File? public private(set) var files: [File]? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 65bb0ca08429..3bc18bc29790 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public private(set) var integer: Int? public private(set) var int32: Int? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index e8216047d6ec..638236127d10 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public private(set) var bar: String? public private(set) var foo: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 1269b40251d7..0f84dfd4264e 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public private(set) var _123list: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 19f258d29296..665fe0315a86 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 2dd49ab02129..b0342881fd09 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public private(set) var uuid: UUID? public private(set) var dateTime: Date? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 9080e5c382f4..a76505ff962b 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public private(set) var name: Int? public private(set) var _class: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index cf7c0094910d..afa3c0c1f85b 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public private(set) var name: Int public private(set) var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 36be35a05339..74a00b384428 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public private(set) var justNumber: Double? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index bda67408a9d2..2a13d9693889 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index d8e7469f99a5..2e191a0964c5 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public private(set) var myNumber: Double? public private(set) var myString: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 5ba4da07a5cb..51c763572843 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 6b80302150ab..b0ad79f0a72b 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public private(set) var bar: String? public private(set) var baz: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index ca4883d92514..99b9adfda10c 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public private(set) var _return: Int? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 66b8f4d69ffc..a8d327a5d901 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public private(set) var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 11a5a8548954..989685c535e1 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 2af3e2f06982..804f73c2ca64 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public private(set) var id: Int64? public private(set) var name: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index 125a63b0ed36..80da349b93cc 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public private(set) var stringItem: String = "what" public private(set) var numberItem: Double diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 3aa1851a5853..eba6a29c27ce 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public private(set) var stringItem: String public private(set) var numberItem: Double diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 4af156b9bac9..370047ceea5e 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public private(set) var id: Int64? public private(set) var username: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 621afb93561d..623c4c7fd2c4 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index cdd4f5335b98..a6882d6517fd 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c365505ab9d8..1890fcf9fde7 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 226f74561811..eabae42d3bf4 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 398311278715..fa93d7c6c743 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8865d76bef23..c99f82be9b93 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 71cd93bce5fe..f8a3f64e2ee8 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 457e04bd475e..253bbd7c04c6 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 8caebb1c2065..681bcada15f3 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 89016ca353d8..75b68ec01e27 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 16e69e560bdf..a0419d54f15c 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public var _class: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 60dbc5dc5c1c..21a539ba0109 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 658732a7f36f..dc3bb465a5f1 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 82b0dedf35bf..627bb997c5e0 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..e06009060c54 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 8c8bca49774a..3a9edb08ea78 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 05dd5b1a825e..1378b4f9b207 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 3ca66a313590..f9a39d2e58e0 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index a7a4b39e7207..0a3299554824 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 54ed8a723c64..9e2fe8cc87fd 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 67e3048469fe..b9a06034e01e 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 1e728fcdf587..c4792800425f 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c79ca459217e..c15921ae6c76 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 23402143f718..d5ab7e422f2b 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8698915e5ef2..e8a19ee3d99b 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 87ceb64bb973..10fd059c8566 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index e2eeced4c571..bf7da6a3f862 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index edeaccaeaa6f..99568c8facf1 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index bceec7ccb53f..f93b402b0fd5 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 57ba3f577c87..05cf40bedd38 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index afc2b51f8f38..9429b341fa9b 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public var _return: Int? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index bfe9723f888f..543f1fa5ad4a 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 126c35c85a6a..548b82c049e2 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index e58eecd960f2..9a7d7e6c8e6a 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 6c22fdbae7aa..dd67ca7851d4 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7afe359ae409..e55b50dc4f73 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 570ea5f64bdf..0b074d6d0708 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return (200 ..< 300).contains(statusCode) diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 621afb93561d..623c4c7fd2c4 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable, Hashable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index cdd4f5335b98..a6882d6517fd 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable, Hashable { +public struct Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index c365505ab9d8..1890fcf9fde7 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable, Hashable { +public struct ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 226f74561811..eabae42d3bf4 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 398311278715..fa93d7c6c743 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable, Hashable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8865d76bef23..c99f82be9b93 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable, Hashable { +public struct ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 71cd93bce5fe..f8a3f64e2ee8 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable, Hashable { +public struct Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 457e04bd475e..253bbd7c04c6 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable, Hashable { +public struct Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 8caebb1c2065..681bcada15f3 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable, Hashable { +public struct CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 89016ca353d8..75b68ec01e27 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 6a72957b687e..f75fe8ac3319 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable, Hashable { +public struct ClassModel: Codable, JSONEncodable, Hashable { public var `class`: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 60dbc5dc5c1c..21a539ba0109 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable, Hashable { +public struct Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 658732a7f36f..dc3bb465a5f1 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable, Hashable { +public struct Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 82b0dedf35bf..627bb997c5e0 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable, Hashable { +public struct DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 1d8ce99539cc..e06009060c54 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable, Hashable { +public struct EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 8c8bca49774a..3a9edb08ea78 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable, Hashable { +public struct EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 05dd5b1a825e..1378b4f9b207 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable, Hashable { +public struct File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 3ca66a313590..f9a39d2e58e0 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable, Hashable { +public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index a7a4b39e7207..0a3299554824 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable, Hashable { +public struct FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 54ed8a723c64..9e2fe8cc87fd 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable, Hashable { +public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 67e3048469fe..b9a06034e01e 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable, Hashable { +public struct List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 1e728fcdf587..c4792800425f 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable, Hashable { +public struct MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c79ca459217e..c15921ae6c76 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 7d15d45c21a9..b1b3712eac31 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable, Hashable { +public struct Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var `class`: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8698915e5ef2..e8a19ee3d99b 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable, Hashable { +public struct Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 87ceb64bb973..10fd059c8566 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable, Hashable { +public struct NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index e2eeced4c571..bf7da6a3f862 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable, Hashable { +public struct Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index edeaccaeaa6f..99568c8facf1 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable, Hashable { +public struct OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index bceec7ccb53f..f93b402b0fd5 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 57ba3f577c87..05cf40bedd38 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable, Hashable { +public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index bda0c791d83d..4886c9a8ac25 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable, Hashable { +public struct Return: Codable, JSONEncodable, Hashable { public var `return`: Int? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index bfe9723f888f..543f1fa5ad4a 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable, Hashable { +public struct SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 2edf881a8f08..9c40477ece7b 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable, Hashable { +public struct StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index e58eecd960f2..9a7d7e6c8e6a 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable, Hashable { +public struct TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 6c22fdbae7aa..dd67ca7851d4 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable, Hashable { +public struct TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7afe359ae409..e55b50dc4f73 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable, Hashable { +public struct User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift index e0ae7a604721..bbe32fd2015f 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift @@ -15,7 +15,7 @@ public typealias AdditionalPropertiesClass = PetstoreClientAPI.AdditionalPropert extension PetstoreClientAPI { -public final class AdditionalPropertiesClass: Codable, Hashable { +public final class AdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Animal.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Animal.swift index 48bce08faa05..d61432435c61 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Animal.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Animal.swift @@ -15,7 +15,7 @@ public typealias Animal = PetstoreClientAPI.Animal extension PetstoreClientAPI { -public final class Animal: Codable, Hashable { +public final class Animal: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ApiResponse.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ApiResponse.swift index 3ba139fd8036..a42b0caaddee 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ApiResponse.swift @@ -15,7 +15,7 @@ public typealias ApiResponse = PetstoreClientAPI.ApiResponse extension PetstoreClientAPI { -public final class ApiResponse: Codable, Hashable { +public final class ApiResponse: Codable, JSONEncodable, Hashable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift index 14f26778b17f..a7860c6b8aac 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift @@ -15,7 +15,7 @@ public typealias ArrayOfArrayOfNumberOnly = PetstoreClientAPI.ArrayOfArrayOfNumb extension PetstoreClientAPI { -public final class ArrayOfArrayOfNumberOnly: Codable, Hashable { +public final class ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift index 8eb085e6b55a..2c5a2dc48905 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift @@ -15,7 +15,7 @@ public typealias ArrayOfNumberOnly = PetstoreClientAPI.ArrayOfNumberOnly extension PetstoreClientAPI { -public final class ArrayOfNumberOnly: Codable, Hashable { +public final class ArrayOfNumberOnly: Codable, JSONEncodable, Hashable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayTest.swift index aade19d76db0..94b6a87508a8 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayTest.swift @@ -15,7 +15,7 @@ public typealias ArrayTest = PetstoreClientAPI.ArrayTest extension PetstoreClientAPI { -public final class ArrayTest: Codable, Hashable { +public final class ArrayTest: Codable, JSONEncodable, Hashable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Capitalization.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Capitalization.swift index 22f31556b1d0..a0a2e2b7ed2f 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Capitalization.swift @@ -15,7 +15,7 @@ public typealias Capitalization = PetstoreClientAPI.Capitalization extension PetstoreClientAPI { -public final class Capitalization: Codable, Hashable { +public final class Capitalization: Codable, JSONEncodable, Hashable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Cat.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Cat.swift index d7388043fef3..006b34e4510c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Cat.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Cat.swift @@ -15,7 +15,7 @@ public typealias Cat = PetstoreClientAPI.Cat extension PetstoreClientAPI { -public final class Cat: Codable, Hashable { +public final class Cat: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/CatAllOf.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/CatAllOf.swift index 9a37243f5d11..b92fe697f1c4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/CatAllOf.swift @@ -15,7 +15,7 @@ public typealias CatAllOf = PetstoreClientAPI.CatAllOf extension PetstoreClientAPI { -public final class CatAllOf: Codable, Hashable { +public final class CatAllOf: Codable, JSONEncodable, Hashable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Category.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Category.swift index 743b83ae8219..90eec24e2a68 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Category.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Category.swift @@ -15,7 +15,7 @@ public typealias Category = PetstoreClientAPI.Category extension PetstoreClientAPI { -public final class Category: Codable, Hashable { +public final class Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ClassModel.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ClassModel.swift index a089549ef8da..411d00c88496 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ClassModel.swift @@ -16,7 +16,7 @@ public typealias ClassModel = PetstoreClientAPI.ClassModel extension PetstoreClientAPI { /** Model for testing model with \"_class\" property */ -public final class ClassModel: Codable, Hashable { +public final class ClassModel: Codable, JSONEncodable, Hashable { public var _class: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Client.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Client.swift index 9ddec91144b6..c41a2876504a 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Client.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Client.swift @@ -15,7 +15,7 @@ public typealias Client = PetstoreClientAPI.Client extension PetstoreClientAPI { -public final class Client: Codable, Hashable { +public final class Client: Codable, JSONEncodable, Hashable { public var client: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Dog.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Dog.swift index e4c05c90cb44..a8f98eecb28f 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Dog.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Dog.swift @@ -15,7 +15,7 @@ public typealias Dog = PetstoreClientAPI.Dog extension PetstoreClientAPI { -public final class Dog: Codable, Hashable { +public final class Dog: Codable, JSONEncodable, Hashable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/DogAllOf.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/DogAllOf.swift index 0ea9da741ca4..c8de40cab7b9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/DogAllOf.swift @@ -15,7 +15,7 @@ public typealias DogAllOf = PetstoreClientAPI.DogAllOf extension PetstoreClientAPI { -public final class DogAllOf: Codable, Hashable { +public final class DogAllOf: Codable, JSONEncodable, Hashable { public var breed: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift index a796ffc79c6b..c9c9ab8756cf 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift @@ -15,7 +15,7 @@ public typealias EnumArrays = PetstoreClientAPI.EnumArrays extension PetstoreClientAPI { -public final class EnumArrays: Codable, Hashable { +public final class EnumArrays: Codable, JSONEncodable, Hashable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumTest.swift index ad77e814461a..b0a4756d3e8b 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/EnumTest.swift @@ -15,7 +15,7 @@ public typealias EnumTest = PetstoreClientAPI.EnumTest extension PetstoreClientAPI { -public final class EnumTest: Codable, Hashable { +public final class EnumTest: Codable, JSONEncodable, Hashable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/File.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/File.swift index 74ca2caa49d7..d10c0e0a4b5c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/File.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/File.swift @@ -16,7 +16,7 @@ public typealias File = PetstoreClientAPI.File extension PetstoreClientAPI { /** Must be named `File` for test. */ -public final class File: Codable, Hashable { +public final class File: Codable, JSONEncodable, Hashable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift index 13048f3fb446..550858bd70ea 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift @@ -15,7 +15,7 @@ public typealias FileSchemaTestClass = PetstoreClientAPI.FileSchemaTestClass extension PetstoreClientAPI { -public final class FileSchemaTestClass: Codable, Hashable { +public final class FileSchemaTestClass: Codable, JSONEncodable, Hashable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift index 24057510679e..9b54a4d7342f 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift @@ -15,7 +15,7 @@ public typealias FormatTest = PetstoreClientAPI.FormatTest extension PetstoreClientAPI { -public final class FormatTest: Codable, Hashable { +public final class FormatTest: Codable, JSONEncodable, Hashable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift index 56c0865e0dc6..7c991e9e7c43 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift @@ -15,7 +15,7 @@ public typealias HasOnlyReadOnly = PetstoreClientAPI.HasOnlyReadOnly extension PetstoreClientAPI { -public final class HasOnlyReadOnly: Codable, Hashable { +public final class HasOnlyReadOnly: Codable, JSONEncodable, Hashable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/List.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/List.swift index bf620d4aa169..7f77dd2d5f03 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/List.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/List.swift @@ -15,7 +15,7 @@ public typealias List = PetstoreClientAPI.List extension PetstoreClientAPI { -public final class List: Codable, Hashable { +public final class List: Codable, JSONEncodable, Hashable { public var _123list: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/MapTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/MapTest.swift index c94fa116b114..90feda030db8 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/MapTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/MapTest.swift @@ -15,7 +15,7 @@ public typealias MapTest = PetstoreClientAPI.MapTest extension PetstoreClientAPI { -public final class MapTest: Codable, Hashable { +public final class MapTest: Codable, JSONEncodable, Hashable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 9980d557872e..f6e53c350284 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -15,7 +15,7 @@ public typealias MixedPropertiesAndAdditionalPropertiesClass = PetstoreClientAPI extension PetstoreClientAPI { -public final class MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { +public final class MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Model200Response.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Model200Response.swift index 21981f46098b..917b539da009 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Model200Response.swift @@ -16,7 +16,7 @@ public typealias Model200Response = PetstoreClientAPI.Model200Response extension PetstoreClientAPI { /** Model for testing model name starting with number */ -public final class Model200Response: Codable, Hashable { +public final class Model200Response: Codable, JSONEncodable, Hashable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift index c7c6374fcd7c..fa3e1bc692f9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift @@ -16,7 +16,7 @@ public typealias Name = PetstoreClientAPI.Name extension PetstoreClientAPI { /** Model for testing model name same as property name */ -public final class Name: Codable, Hashable { +public final class Name: Codable, JSONEncodable, Hashable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/NumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/NumberOnly.swift index 1cbf7fc2235b..9412892a2231 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/NumberOnly.swift @@ -15,7 +15,7 @@ public typealias NumberOnly = PetstoreClientAPI.NumberOnly extension PetstoreClientAPI { -public final class NumberOnly: Codable, Hashable { +public final class NumberOnly: Codable, JSONEncodable, Hashable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Order.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Order.swift index ca252a55cbcd..6a9c4ec8937d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Order.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Order.swift @@ -15,7 +15,7 @@ public typealias Order = PetstoreClientAPI.Order extension PetstoreClientAPI { -public final class Order: Codable, Hashable { +public final class Order: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/OuterComposite.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/OuterComposite.swift index ac2e2c17b632..cc9598c3fa11 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/OuterComposite.swift @@ -15,7 +15,7 @@ public typealias OuterComposite = PetstoreClientAPI.OuterComposite extension PetstoreClientAPI { -public final class OuterComposite: Codable, Hashable { +public final class OuterComposite: Codable, JSONEncodable, Hashable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift index c764a418dea5..ee791a3947a4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift @@ -15,7 +15,7 @@ public typealias Pet = PetstoreClientAPI.Pet extension PetstoreClientAPI { -public final class Pet: Codable, Hashable { +public final class Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift index 1487fd0b22c8..80fb29f9d9d7 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift @@ -15,7 +15,7 @@ public typealias ReadOnlyFirst = PetstoreClientAPI.ReadOnlyFirst extension PetstoreClientAPI { -public final class ReadOnlyFirst: Codable, Hashable { +public final class ReadOnlyFirst: Codable, JSONEncodable, Hashable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Return.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Return.swift index 63a541827841..233b3d401e06 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Return.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Return.swift @@ -16,7 +16,7 @@ public typealias Return = PetstoreClientAPI.Return extension PetstoreClientAPI { /** Model for testing reserved words */ -public final class Return: Codable, Hashable { +public final class Return: Codable, JSONEncodable, Hashable { public var _return: Int? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift index d9b2471b63cd..ac7c5f87a764 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift @@ -15,7 +15,7 @@ public typealias SpecialModelName = PetstoreClientAPI.SpecialModelName extension PetstoreClientAPI { -public final class SpecialModelName: Codable, Hashable { +public final class SpecialModelName: Codable, JSONEncodable, Hashable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift index e9b64b3e3617..495a09ba807a 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift @@ -15,7 +15,7 @@ public typealias StringBooleanMap = PetstoreClientAPI.StringBooleanMap extension PetstoreClientAPI { -public final class StringBooleanMap: Codable, Hashable { +public final class StringBooleanMap: Codable, JSONEncodable, Hashable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Tag.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Tag.swift index e9bbb0b75e47..fbb689857fcf 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Tag.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/Tag.swift @@ -15,7 +15,7 @@ public typealias Tag = PetstoreClientAPI.Tag extension PetstoreClientAPI { -public final class Tag: Codable, Hashable { +public final class Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift index b1bad05f594e..39bc3abd9a95 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift @@ -15,7 +15,7 @@ public typealias TypeHolderDefault = PetstoreClientAPI.TypeHolderDefault extension PetstoreClientAPI { -public final class TypeHolderDefault: Codable, Hashable { +public final class TypeHolderDefault: Codable, JSONEncodable, Hashable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift index 604354fd3f0a..6f955d93f3c0 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift @@ -15,7 +15,7 @@ public typealias TypeHolderExample = PetstoreClientAPI.TypeHolderExample extension PetstoreClientAPI { -public final class TypeHolderExample: Codable, Hashable { +public final class TypeHolderExample: Codable, JSONEncodable, Hashable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/User.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/User.swift index 438f702a5a3a..e0616cdca592 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/User.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/User.swift @@ -15,7 +15,7 @@ public typealias User = PetstoreClientAPI.User extension PetstoreClientAPI { -public final class User: Codable, Hashable { +public final class User: Codable, JSONEncodable, Hashable { public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e2b73073804d..8a06e2524e51 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -65,6 +65,16 @@ extension Date: JSONEncodable { } } +extension JSONEncodable where Self: Encodable { + func encodeToJSON() -> Any { + let encoder = CodableHelper.jsonEncoder + guard let data = try? encoder.encode(self) else { + fatalError("Could not encode to json: \(self)") + } + return data.encodeToJSON() + } +} + extension String: CodingKey { public var stringValue: String { diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index e760b2005634..6292a8a54034 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AdditionalPropertiesClass: Codable { +public struct AdditionalPropertiesClass: Codable, JSONEncodable { public var mapString: [String: String]? public var mapMapString: [String: [String: String]]? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index fb1a2df615d3..06c768bb6bc8 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Animal: Codable { +public struct Animal: Codable, JSONEncodable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index 4ee097de054b..15dcb8747c40 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ApiResponse: Codable { +public struct ApiResponse: Codable, JSONEncodable { public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 6f3ceb17753d..1ae8a36fefee 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfArrayOfNumberOnly: Codable { +public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable { public var arrayArrayNumber: [[Double]]? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index eb9892beb2b8..90167ba90ef0 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayOfNumberOnly: Codable { +public struct ArrayOfNumberOnly: Codable, JSONEncodable { public var arrayNumber: [Double]? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 76aad66ec825..e24014ff7b7e 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ArrayTest: Codable { +public struct ArrayTest: Codable, JSONEncodable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d06bb38d2d1e..dd8c7ad0a6bd 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Capitalization: Codable { +public struct Capitalization: Codable, JSONEncodable { public var smallCamel: String? public var capitalCamel: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7a394aca88db..80d27fa1a2f1 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Cat: Codable { +public struct Cat: Codable, JSONEncodable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 679eda93b89a..80814e4a9ccf 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CatAllOf: Codable { +public struct CatAllOf: Codable, JSONEncodable { public var declawed: Bool? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 89016ca353d8..75b68ec01e27 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Category: Codable, Hashable { +public struct Category: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? = "default-name" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index bc4e56c01ae1..a30176749509 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable, JSONEncodable { public var _class: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index f1c50e5b8b9a..9dda2b6224af 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Client: Codable { +public struct Client: Codable, JSONEncodable { public var client: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 55c387c28ae1..f9fd593859b8 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Dog: Codable { +public struct Dog: Codable, JSONEncodable { public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index b86ba8ccf8f4..16cbfcd3e701 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct DogAllOf: Codable { +public struct DogAllOf: Codable, JSONEncodable { public var breed: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index edd583c8a292..3c847126473d 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumArrays: Codable { +public struct EnumArrays: Codable, JSONEncodable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 4ae75032cfc9..c0894dbd97a2 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct EnumTest: Codable { +public struct EnumTest: Codable, JSONEncodable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/File.swift index d6513e0df749..72273d1ca657 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable, JSONEncodable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index d707e2ff2e24..adf7f317dd93 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FileSchemaTestClass: Codable { +public struct FileSchemaTestClass: Codable, JSONEncodable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index cbf0050081e7..c2883d93dce6 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct FormatTest: Codable { +public struct FormatTest: Codable, JSONEncodable { public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 9185cd673a86..46ca8c52847c 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct HasOnlyReadOnly: Codable { +public struct HasOnlyReadOnly: Codable, JSONEncodable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 6568fe28f34e..1cd923efb5d9 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct List: Codable { +public struct List: Codable, JSONEncodable { public var _123list: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index eb9634803b33..4dbb2aef1e22 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MapTest: Codable { +public struct MapTest: Codable, JSONEncodable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 4d171a58c804..56070f31c64d 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable { public var uuid: UUID? public var dateTime: Date? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 24a07e862b87..6f6a801aef8f 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable, JSONEncodable { public var name: Int? public var _class: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index e38ffc2eebd3..dec47015e2f6 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable, JSONEncodable { public var name: Int public var snakeCase: NullEncodable = .encodeValue(11033) diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 555b1beda1d3..b570fda3d191 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct NumberOnly: Codable { +public struct NumberOnly: Codable, JSONEncodable { public var justNumber: Double? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index be133bc42ad1..45694b3beef9 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Order: Codable { +public struct Order: Codable, JSONEncodable { public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 6e555ae9e1e7..1a59760d19c4 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct OuterComposite: Codable { +public struct OuterComposite: Codable, JSONEncodable { public var myNumber: Double? public var myString: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index bceec7ccb53f..f93b402b0fd5 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Pet: Codable, Hashable { +public struct Pet: Codable, JSONEncodable, Hashable { public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index b4cd35ad2964..34d46afc574a 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct ReadOnlyFirst: Codable { +public struct ReadOnlyFirst: Codable, JSONEncodable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index f12d1c17fdc5..29b11b873b75 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -11,7 +11,7 @@ import AnyCodable #endif /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable, JSONEncodable { public var _return: Int? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index f797e4064530..378debbd7cf3 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct SpecialModelName: Codable { +public struct SpecialModelName: Codable, JSONEncodable { public var specialPropertyName: Int64? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 1ef2bd41c793..e973ed2a6629 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct StringBooleanMap: Codable { +public struct StringBooleanMap: Codable, JSONEncodable { public enum CodingKeys: CodingKey, CaseIterable { diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 07b826264f36..f2dea74b09d8 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct Tag: Codable, Hashable { +public struct Tag: Codable, JSONEncodable, Hashable { public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index dcf87b413ab0..340d4ddc019a 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderDefault: Codable { +public struct TypeHolderDefault: Codable, JSONEncodable { public var stringItem: String = "what" public var numberItem: Double diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 634f2d551682..4c96232af419 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct TypeHolderExample: Codable { +public struct TypeHolderExample: Codable, JSONEncodable { public var stringItem: String public var numberItem: Double diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/User.swift index bad75dea179f..54dede9e823a 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct User: Codable { +public struct User: Codable, JSONEncodable { public var id: Int64? public var username: String? From e7ca67071e391ae2c2cb08e34ae040a8d1053c12 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 9 Jan 2022 11:19:57 -0500 Subject: [PATCH 071/175] [python] Fix 10773 - Use base_name for file uploads in form data (#11182) * Use base_name for file uploads in form data * Added missed sample changes --- .../src/main/resources/python/api_client.mustache | 4 ++-- samples/client/petstore/python/petstore_api/api_client.py | 4 ++-- .../petstore_api/api_client.py | 4 ++-- .../x-auth-id-alias/python/x_auth_id_alias/api_client.py | 4 ++-- .../dynamic-servers/python/dynamic_servers/api_client.py | 4 ++-- .../client/petstore/python/petstore_api/api_client.py | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index b4d1260eb746..39f33aee0b39 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -774,11 +774,11 @@ class Endpoint(object): base_name = self.attribute_map[param_name] if (param_location == 'form' and self.openapi_types[param_name] == (file_type,)): - params['file'][param_name] = [param_value] + params['file'][base_name] = [param_value] elif (param_location == 'form' and self.openapi_types[param_name] == ([file_type],)): # param_value is already a list - params['file'][param_name] = param_value + params['file'][base_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index e750f965b223..664cf1c917b7 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -753,11 +753,11 @@ def __gather_params(self, kwargs): base_name = self.attribute_map[param_name] if (param_location == 'form' and self.openapi_types[param_name] == (file_type,)): - params['file'][param_name] = [param_value] + params['file'][base_name] = [param_value] elif (param_location == 'form' and self.openapi_types[param_name] == ([file_type],)): # param_value is already a list - params['file'][param_name] = param_value + params['file'][base_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py index e750f965b223..664cf1c917b7 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py @@ -753,11 +753,11 @@ def __gather_params(self, kwargs): base_name = self.attribute_map[param_name] if (param_location == 'form' and self.openapi_types[param_name] == (file_type,)): - params['file'][param_name] = [param_value] + params['file'][base_name] = [param_value] elif (param_location == 'form' and self.openapi_types[param_name] == ([file_type],)): # param_value is already a list - params['file'][param_name] = param_value + params['file'][base_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py index d7137238a179..e77be7a5319d 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py @@ -753,11 +753,11 @@ def __gather_params(self, kwargs): base_name = self.attribute_map[param_name] if (param_location == 'form' and self.openapi_types[param_name] == (file_type,)): - params['file'][param_name] = [param_value] + params['file'][base_name] = [param_value] elif (param_location == 'form' and self.openapi_types[param_name] == ([file_type],)): # param_value is already a list - params['file'][param_name] = param_value + params['file'][base_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py index 470cc1aac899..e38f7442f7bf 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py @@ -753,11 +753,11 @@ def __gather_params(self, kwargs): base_name = self.attribute_map[param_name] if (param_location == 'form' and self.openapi_types[param_name] == (file_type,)): - params['file'][param_name] = [param_value] + params['file'][base_name] = [param_value] elif (param_location == 'form' and self.openapi_types[param_name] == ([file_type],)): # param_value is already a list - params['file'][param_name] = param_value + params['file'][base_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) 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 9fbac41d73ac..f29efaa1ce14 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -760,11 +760,11 @@ def __gather_params(self, kwargs): base_name = self.attribute_map[param_name] if (param_location == 'form' and self.openapi_types[param_name] == (file_type,)): - params['file'][param_name] = [param_value] + params['file'][base_name] = [param_value] elif (param_location == 'form' and self.openapi_types[param_name] == ([file_type],)): # param_value is already a list - params['file'][param_name] = param_value + params['file'][base_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) From 478219744e71b1faf6e6d5dee7c15a24605429f1 Mon Sep 17 00:00:00 2001 From: carmenquan Date: Sun, 9 Jan 2022 08:22:11 -0800 Subject: [PATCH 072/175] Making PyPi markdown friendly requires additional property (#11093) * updating python markdown property * adding to samples --- .../src/main/resources/python-legacy/setup.mustache | 3 ++- samples/client/petstore/python-asyncio/setup.py | 1 + samples/client/petstore/python-legacy/setup.py | 1 + samples/client/petstore/python-tornado/setup.py | 1 + samples/openapi3/client/petstore/python-legacy/setup.py | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/python-legacy/setup.mustache b/modules/openapi-generator/src/main/resources/python-legacy/setup.mustache index 71f0e122b933..efb15b97e7a2 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/setup.mustache @@ -36,7 +36,8 @@ setup( packages=find_packages(exclude=["test", "tests"]), include_package_data=True, {{#licenseInfo}}license="{{.}}", - {{/licenseInfo}}long_description="""\ + {{/licenseInfo}}long_description_content_type='text/markdown', + long_description="""\ {{appDescription}} # noqa: E501 """ ) diff --git a/samples/client/petstore/python-asyncio/setup.py b/samples/client/petstore/python-asyncio/setup.py index b9fc72e727fe..974fea3373fe 100644 --- a/samples/client/petstore/python-asyncio/setup.py +++ b/samples/client/petstore/python-asyncio/setup.py @@ -36,6 +36,7 @@ packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="Apache-2.0", + long_description_content_type='text/markdown', long_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: \" \\ # noqa: E501 """ diff --git a/samples/client/petstore/python-legacy/setup.py b/samples/client/petstore/python-legacy/setup.py index 217134e79476..58abfa11b8df 100644 --- a/samples/client/petstore/python-legacy/setup.py +++ b/samples/client/petstore/python-legacy/setup.py @@ -35,6 +35,7 @@ packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="Apache-2.0", + long_description_content_type='text/markdown', long_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: \" \\ # noqa: E501 """ diff --git a/samples/client/petstore/python-tornado/setup.py b/samples/client/petstore/python-tornado/setup.py index c6e7ddc51bf4..db9d6f380256 100644 --- a/samples/client/petstore/python-tornado/setup.py +++ b/samples/client/petstore/python-tornado/setup.py @@ -36,6 +36,7 @@ packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="Apache-2.0", + long_description_content_type='text/markdown', long_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: \" \\ # noqa: E501 """ diff --git a/samples/openapi3/client/petstore/python-legacy/setup.py b/samples/openapi3/client/petstore/python-legacy/setup.py index 217134e79476..58abfa11b8df 100755 --- a/samples/openapi3/client/petstore/python-legacy/setup.py +++ b/samples/openapi3/client/petstore/python-legacy/setup.py @@ -35,6 +35,7 @@ packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="Apache-2.0", + long_description_content_type='text/markdown', long_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: \" \\ # noqa: E501 """ From d813d04f4601b5bf96534f99b5233e93fb1ad79c Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 9 Jan 2022 14:10:47 -0800 Subject: [PATCH 073/175] Improves generator docs, adds metadata section (#11262) * Refactors generator md creation, adds generateMdMetadata * Removes extra space * Adds docs updates * Fixes table definition for metadata * Docs update * Docs update * Updates title, removes sidebar_label because it was not doing anything on pages like https://openapi-generator.tech/docs/generators/android * Docs updated --- docs/generators/ada-server.md | 12 +- docs/generators/ada.md | 12 +- docs/generators/android.md | 12 +- docs/generators/apache2.md | 12 +- docs/generators/apex.md | 12 +- docs/generators/asciidoc.md | 12 +- docs/generators/aspnetcore.md | 12 +- docs/generators/avro-schema.md | 12 +- docs/generators/bash.md | 12 +- docs/generators/c.md | 12 +- docs/generators/clojure.md | 12 +- docs/generators/cpp-pistache-server.md | 12 +- docs/generators/cpp-qt-client.md | 12 +- docs/generators/cpp-qt-qhttpengine-server.md | 12 +- docs/generators/cpp-restbed-server.md | 12 +- docs/generators/cpp-restsdk.md | 12 +- docs/generators/cpp-tiny.md | 12 +- docs/generators/cpp-tizen.md | 12 +- docs/generators/cpp-ue4.md | 12 +- docs/generators/crystal.md | 12 +- docs/generators/csharp-dotnet2.md | 12 +- docs/generators/csharp-nancyfx.md | 12 +- docs/generators/csharp-netcore-functions.md | 12 +- docs/generators/csharp-netcore.md | 12 +- docs/generators/csharp.md | 12 +- docs/generators/cwiki.md | 12 +- docs/generators/dart-dio-next.md | 12 +- docs/generators/dart-dio.md | 12 +- docs/generators/dart-jaguar.md | 12 +- docs/generators/dart.md | 12 +- docs/generators/dynamic-html.md | 12 +- docs/generators/eiffel.md | 12 +- docs/generators/elixir.md | 12 +- docs/generators/elm.md | 12 +- docs/generators/erlang-client.md | 12 +- docs/generators/erlang-proper.md | 12 +- docs/generators/erlang-server.md | 12 +- docs/generators/flash-deprecated.md | 12 +- docs/generators/fsharp-functions.md | 12 +- docs/generators/fsharp-giraffe-server.md | 12 +- docs/generators/go-deprecated.md | 12 +- docs/generators/go-echo-server.md | 12 +- docs/generators/go-gin-server.md | 12 +- docs/generators/go-server.md | 12 +- docs/generators/go.md | 12 +- .../graphql-nodejs-express-server.md | 12 +- docs/generators/graphql-schema.md | 12 +- docs/generators/groovy.md | 12 +- docs/generators/haskell-http-client.md | 12 +- docs/generators/haskell-yesod.md | 12 +- docs/generators/haskell.md | 12 +- docs/generators/html.md | 12 +- docs/generators/html2.md | 12 +- docs/generators/java-inflector.md | 12 +- docs/generators/java-micronaut-client.md | 12 +- docs/generators/java-msf4j.md | 12 +- docs/generators/java-pkmst.md | 12 +- docs/generators/java-play-framework.md | 12 +- docs/generators/java-undertow-server.md | 12 +- docs/generators/java-vertx-web.md | 12 +- docs/generators/java-vertx.md | 12 +- docs/generators/java.md | 12 +- docs/generators/javascript-apollo.md | 12 +- docs/generators/javascript-closure-angular.md | 12 +- docs/generators/javascript-flowtyped.md | 12 +- docs/generators/javascript.md | 12 +- docs/generators/jaxrs-cxf-cdi.md | 12 +- docs/generators/jaxrs-cxf-client.md | 12 +- docs/generators/jaxrs-cxf-extended.md | 12 +- docs/generators/jaxrs-cxf.md | 12 +- docs/generators/jaxrs-jersey.md | 12 +- docs/generators/jaxrs-resteasy-eap.md | 12 +- docs/generators/jaxrs-resteasy.md | 12 +- docs/generators/jaxrs-spec.md | 12 +- docs/generators/jmeter.md | 12 +- docs/generators/k6.md | 12 +- docs/generators/kotlin-server-deprecated.md | 12 +- docs/generators/kotlin-server.md | 12 +- docs/generators/kotlin-spring.md | 12 +- docs/generators/kotlin-vertx.md | 12 +- docs/generators/kotlin.md | 12 +- docs/generators/ktorm-schema.md | 12 +- docs/generators/lua.md | 12 +- docs/generators/markdown.md | 12 +- docs/generators/mysql-schema.md | 12 +- docs/generators/nim.md | 12 +- docs/generators/nodejs-express-server.md | 12 +- docs/generators/objc.md | 12 +- docs/generators/ocaml.md | 12 +- docs/generators/openapi-yaml.md | 12 +- docs/generators/openapi.md | 12 +- docs/generators/perl.md | 12 +- docs/generators/php-dt.md | 12 +- docs/generators/php-laravel.md | 12 +- docs/generators/php-lumen.md | 12 +- docs/generators/php-mezzio-ph.md | 12 +- docs/generators/php-silex-deprecated.md | 12 +- docs/generators/php-slim-deprecated.md | 12 +- docs/generators/php-slim4.md | 12 +- docs/generators/php-symfony.md | 12 +- docs/generators/php.md | 12 +- docs/generators/plantuml.md | 12 +- docs/generators/powershell.md | 12 +- docs/generators/protobuf-schema.md | 12 +- docs/generators/python-aiohttp.md | 12 +- docs/generators/python-blueplanet.md | 12 +- docs/generators/python-experimental.md | 12 +- docs/generators/python-fastapi.md | 12 +- docs/generators/python-flask.md | 12 +- docs/generators/python-legacy.md | 12 +- docs/generators/python.md | 12 +- docs/generators/r.md | 12 +- docs/generators/ruby-on-rails.md | 12 +- docs/generators/ruby-sinatra.md | 12 +- docs/generators/ruby.md | 12 +- docs/generators/rust-server.md | 12 +- docs/generators/rust.md | 12 +- docs/generators/scala-akka-http-server.md | 12 +- docs/generators/scala-akka.md | 12 +- docs/generators/scala-finch.md | 12 +- docs/generators/scala-gatling.md | 12 +- .../generators/scala-httpclient-deprecated.md | 12 +- docs/generators/scala-lagom-server.md | 12 +- docs/generators/scala-play-server.md | 12 +- docs/generators/scala-sttp.md | 12 +- docs/generators/scalatra.md | 12 +- docs/generators/scalaz.md | 12 +- docs/generators/spring.md | 12 +- docs/generators/swift4-deprecated.md | 12 +- docs/generators/swift5.md | 12 +- docs/generators/typescript-angular.md | 12 +- .../typescript-angularjs-deprecated.md | 12 +- docs/generators/typescript-aurelia.md | 12 +- docs/generators/typescript-axios.md | 12 +- docs/generators/typescript-fetch.md | 12 +- docs/generators/typescript-inversify.md | 12 +- docs/generators/typescript-jquery.md | 12 +- docs/generators/typescript-nestjs.md | 12 +- docs/generators/typescript-node.md | 12 +- docs/generators/typescript-redux-query.md | 12 +- docs/generators/typescript-rxjs.md | 12 +- docs/generators/typescript.md | 12 +- docs/generators/wsdl-schema.md | 12 +- .../openapitools/codegen/cmd/ConfigHelp.java | 210 +++++++++++------- .../PythonExperimentalClientCodegen.java | 2 +- 145 files changed, 1560 insertions(+), 368 deletions(-) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index f88751432cb6..ae41a6fb725c 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for ada-server -sidebar_label: ada-server +title: Documentation for the ada-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | ada-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates an Ada server implementation (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 3c08371fe24c..ba6a764ac31b 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -1,8 +1,16 @@ --- -title: Config Options for ada -sidebar_label: ada +title: Documentation for the ada Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | ada | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an Ada client implementation (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/android.md b/docs/generators/android.md index 12e99f75cf31..53bde3fa4861 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -1,8 +1,16 @@ --- -title: Config Options for android -sidebar_label: android +title: Documentation for the android Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | android | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an Android 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. | Option | Description | Values | Default | diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 0db25b032cde..c31d64f49863 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -1,8 +1,16 @@ --- -title: Config Options for apache2 -sidebar_label: apache2 +title: Documentation for the apache2 Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | apache2 | pass this to the generate command after -g | +| generator type | CONFIG | | +| helpTxt | Generates an Apache2 Config file with the permissions | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/apex.md b/docs/generators/apex.md index 89dfd44654d7..5610d51d22e0 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -1,8 +1,16 @@ --- -title: Config Options for apex -sidebar_label: apex +title: Documentation for the apex Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | apex | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an Apex API 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. | Option | Description | Values | Default | diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index 80f949644c80..a3b4795a2c83 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -1,8 +1,16 @@ --- -title: Config Options for asciidoc -sidebar_label: asciidoc +title: Documentation for the asciidoc Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | asciidoc | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Generates asciidoc markup based documentation. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 6e07567bcc18..cebbaf9a870f 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -1,8 +1,16 @@ --- -title: Config Options for aspnetcore -sidebar_label: aspnetcore +title: Documentation for the aspnetcore Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | aspnetcore | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates an ASP.NET Core Web API server. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index cbb7dd6e3f07..506aca5d85bd 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -1,8 +1,16 @@ --- -title: Config Options for avro-schema -sidebar_label: avro-schema +title: Documentation for the avro-schema Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | avro-schema | pass this to the generate command after -g | +| generator type | SCHEMA | | +| helpTxt | Generates a Avro model (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 590f535c54f5..524c9534fa57 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -1,8 +1,16 @@ --- -title: Config Options for bash -sidebar_label: bash +title: Documentation for the bash Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | bash | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Bash client script based on cURL. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/c.md b/docs/generators/c.md index c6e5c35372f1..3eb885a9a118 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -1,8 +1,16 @@ --- -title: Config Options for c -sidebar_label: c +title: Documentation for the c Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | c | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a C (libcurl) client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index cf7b0c3bc03c..2f5fadc54c98 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -1,8 +1,16 @@ --- -title: Config Options for clojure -sidebar_label: clojure +title: Documentation for the clojure Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | clojure | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Clojure 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. | Option | Description | Values | Default | diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index 0e4046ec5665..d58a5f17572d 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for cpp-pistache-server -sidebar_label: cpp-pistache-server +title: Documentation for the cpp-pistache-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cpp-pistache-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a C++ API server (based on Pistache) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/cpp-qt-client.md b/docs/generators/cpp-qt-client.md index 4bb53da53f33..8ad0c33d85cd 100644 --- a/docs/generators/cpp-qt-client.md +++ b/docs/generators/cpp-qt-client.md @@ -1,8 +1,16 @@ --- -title: Config Options for cpp-qt-client -sidebar_label: cpp-qt-client +title: Documentation for the cpp-qt-client Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cpp-qt-client | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Qt C++ 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. | Option | Description | Values | Default | diff --git a/docs/generators/cpp-qt-qhttpengine-server.md b/docs/generators/cpp-qt-qhttpengine-server.md index 6126b80c2542..99dbeca87592 100644 --- a/docs/generators/cpp-qt-qhttpengine-server.md +++ b/docs/generators/cpp-qt-qhttpengine-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for cpp-qt-qhttpengine-server -sidebar_label: cpp-qt-qhttpengine-server +title: Documentation for the cpp-qt-qhttpengine-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cpp-qt-qhttpengine-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Qt C++ Server using the QHTTPEngine HTTP 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. | Option | Description | Values | Default | diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index 4683a9be64b9..193e11cc92d8 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for cpp-restbed-server -sidebar_label: cpp-restbed-server +title: Documentation for the cpp-restbed-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cpp-restbed-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a C++ API Server with Restbed (https://github.com/Corvusoft/restbed). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 4fc97b939ae2..480178fdf622 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -1,8 +1,16 @@ --- -title: Config Options for cpp-restsdk -sidebar_label: cpp-restsdk +title: Documentation for the cpp-restsdk Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cpp-restsdk | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a C++ API client with C++ REST SDK (https://github.com/Microsoft/cpprestsdk). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/cpp-tiny.md b/docs/generators/cpp-tiny.md index 4da8351e58a6..006561e38f7e 100644 --- a/docs/generators/cpp-tiny.md +++ b/docs/generators/cpp-tiny.md @@ -1,8 +1,16 @@ --- -title: Config Options for cpp-tiny -sidebar_label: cpp-tiny +title: Documentation for the cpp-tiny Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cpp-tiny | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a C++ Arduino REST API client. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index 7f5b106c048a..4f40b91b7d3b 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -1,8 +1,16 @@ --- -title: Config Options for cpp-tizen -sidebar_label: cpp-tizen +title: Documentation for the cpp-tizen Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cpp-tizen | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Samsung Tizen C++ 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. | Option | Description | Values | Default | diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md index be06301a99d8..a2961af1612e 100644 --- a/docs/generators/cpp-ue4.md +++ b/docs/generators/cpp-ue4.md @@ -1,8 +1,16 @@ --- -title: Config Options for cpp-ue4 -sidebar_label: cpp-ue4 +title: Documentation for the cpp-ue4 Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cpp-ue4 | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Unreal Engine 4 C++ Module (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/crystal.md b/docs/generators/crystal.md index b79135246bb9..eaacb566be94 100644 --- a/docs/generators/crystal.md +++ b/docs/generators/crystal.md @@ -1,8 +1,16 @@ --- -title: Config Options for crystal -sidebar_label: crystal +title: Documentation for the crystal Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | crystal | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Crystal client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index fa97c7170000..b1d47b73ac6d 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -1,8 +1,16 @@ --- -title: Config Options for csharp-dotnet2 -sidebar_label: csharp-dotnet2 +title: Documentation for the csharp-dotnet2 Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | csharp-dotnet2 | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a C# .Net 2.0 client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index f08b51579305..b8b5928ed630 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -1,8 +1,16 @@ --- -title: Config Options for csharp-nancyfx -sidebar_label: csharp-nancyfx +title: Documentation for the csharp-nancyfx Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | csharp-nancyfx | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a C# NancyFX Web API server. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/csharp-netcore-functions.md b/docs/generators/csharp-netcore-functions.md index 50ec49b34a1b..6d8565773173 100644 --- a/docs/generators/csharp-netcore-functions.md +++ b/docs/generators/csharp-netcore-functions.md @@ -1,8 +1,16 @@ --- -title: Config Options for csharp-netcore-functions -sidebar_label: csharp-netcore-functions +title: Documentation for the csharp-netcore-functions Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | csharp-netcore-functions | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a csharp server. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index bb138ef414d0..33b124200fb6 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -1,8 +1,16 @@ --- -title: Config Options for csharp-netcore -sidebar_label: csharp-netcore +title: Documentation for the csharp-netcore Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | csharp-netcore | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a C# client library (.NET Standard, .NET Core). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index b572a6c37105..c925eecc8e73 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -1,8 +1,16 @@ --- -title: Config Options for csharp -sidebar_label: csharp +title: Documentation for the csharp Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | csharp | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a CSharp 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. | Option | Description | Values | Default | diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index d10f1d303efc..13a6eb489e34 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -1,8 +1,16 @@ --- -title: Config Options for cwiki -sidebar_label: cwiki +title: Documentation for the cwiki Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | cwiki | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Generates confluence wiki markup. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index 869645f7da8f..07b20e71d1a4 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -1,8 +1,16 @@ --- -title: Config Options for dart-dio-next -sidebar_label: dart-dio-next +title: Documentation for the dart-dio-next Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | dart-dio-next | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Dart Dio client library with null-safety. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index e3b6ac956394..77aeaab25381 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -1,8 +1,16 @@ --- -title: Config Options for dart-dio -sidebar_label: dart-dio +title: Documentation for the dart-dio Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | dart-dio | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Dart Dio 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. | Option | Description | Values | Default | diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index 769fa166dab3..1cbdd8bad482 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -1,8 +1,16 @@ --- -title: Config Options for dart-jaguar -sidebar_label: dart-jaguar +title: Documentation for the dart-jaguar Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | dart-jaguar | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Dart Jaguar 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. | Option | Description | Values | Default | diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 73f113808b46..7793319b30f1 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -1,8 +1,16 @@ --- -title: Config Options for dart -sidebar_label: dart +title: Documentation for the dart Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | dart | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Dart 2.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. | Option | Description | Values | Default | diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 771cecc8b158..ff0c25132f5a 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -1,8 +1,16 @@ --- -title: Config Options for dynamic-html -sidebar_label: dynamic-html +title: Documentation for the dynamic-html Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | dynamic-html | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Generates a dynamic HTML site. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index b2f38750ebad..151654c6f146 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -1,8 +1,16 @@ --- -title: Config Options for eiffel -sidebar_label: eiffel +title: Documentation for the eiffel Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | eiffel | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Eiffel client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 543f116ddb25..2a6d9d93e4ca 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -1,8 +1,16 @@ --- -title: Config Options for elixir -sidebar_label: elixir +title: Documentation for the elixir Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | elixir | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an elixir client library (alpha). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 73b67667616f..79ff7df2e322 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -1,8 +1,16 @@ --- -title: Config Options for elm -sidebar_label: elm +title: Documentation for the elm Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | elm | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an Elm 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. | Option | Description | Values | Default | diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index ebbd5e53ec6c..3436fc2faadd 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -1,8 +1,16 @@ --- -title: Config Options for erlang-client -sidebar_label: erlang-client +title: Documentation for the erlang-client Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | erlang-client | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an Erlang client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 4db9d763c9b2..0a50ff9c2850 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -1,8 +1,16 @@ --- -title: Config Options for erlang-proper -sidebar_label: erlang-proper +title: Documentation for the erlang-proper Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | erlang-proper | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an Erlang library with PropEr generators (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index 385100fac8e2..c6bbba108b45 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for erlang-server -sidebar_label: erlang-server +title: Documentation for the erlang-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | erlang-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates an Erlang server library (beta) using OpenAPI Generator (https://openapi-generator.tech). By default, it will also generate service classes, which can be disabled with the `-Dnoservice` environment variable. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/flash-deprecated.md b/docs/generators/flash-deprecated.md index 5330b928fa4a..b82898633d4a 100644 --- a/docs/generators/flash-deprecated.md +++ b/docs/generators/flash-deprecated.md @@ -1,8 +1,16 @@ --- -title: Config Options for flash-deprecated -sidebar_label: flash-deprecated +title: Documentation for the flash-deprecated Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | flash-deprecated | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Flash (ActionScript) client library (beta). IMPORTANT: this generator has been deprecated in v5.x | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index de363c1ca6bb..534dbbc445f5 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -1,8 +1,16 @@ --- -title: Config Options for fsharp-functions -sidebar_label: fsharp-functions +title: Documentation for the fsharp-functions Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | fsharp-functions | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a fsharp-functions server (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index f374168aa71f..fe1c0c180b40 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for fsharp-giraffe-server -sidebar_label: fsharp-giraffe-server +title: Documentation for the fsharp-giraffe-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | fsharp-giraffe-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a F# Giraffe server (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/go-deprecated.md b/docs/generators/go-deprecated.md index 4faa3a8b636d..cb19432610dd 100644 --- a/docs/generators/go-deprecated.md +++ b/docs/generators/go-deprecated.md @@ -1,8 +1,16 @@ --- -title: Config Options for go-deprecated -sidebar_label: go-deprecated +title: Documentation for the go-deprecated Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | go-deprecated | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Go client library (beta). NOTE: this generator has been deprecated. Please use `go` client generator instead. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/go-echo-server.md b/docs/generators/go-echo-server.md index 53c726fb85e8..9ad9e61c9526 100644 --- a/docs/generators/go-echo-server.md +++ b/docs/generators/go-echo-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for go-echo-server -sidebar_label: go-echo-server +title: Documentation for the go-echo-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | go-echo-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a go-echo server. (Beta) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 0c1d324191de..85c1e5efbc4b 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for go-gin-server -sidebar_label: go-gin-server +title: Documentation for the go-gin-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | go-gin-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Go server library with the gin framework using OpenAPI-Generator.By default, it will also generate service classes. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index 440b3461b0fc..f3f0a91da944 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for go-server -sidebar_label: go-server +title: Documentation for the go-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | go-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Go server library using OpenAPI-Generator. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/go.md b/docs/generators/go.md index a2318c003f30..1bb81764435b 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -1,8 +1,16 @@ --- -title: Config Options for go -sidebar_label: go +title: Documentation for the go Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | go | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Go 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. | Option | Description | Values | Default | diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index ab641eba44b4..a1f1248d285e 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for graphql-nodejs-express-server -sidebar_label: graphql-nodejs-express-server +title: Documentation for the graphql-nodejs-express-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | graphql-nodejs-express-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a GraphQL Node.js Express server (beta) including it's types, queries, mutations, (resolvers) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index 27f6b8ab9eb9..ecdedafb3daa 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -1,8 +1,16 @@ --- -title: Config Options for graphql-schema -sidebar_label: graphql-schema +title: Documentation for the graphql-schema Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | graphql-schema | pass this to the generate command after -g | +| generator type | SCHEMA | | +| helpTxt | Generates GraphQL schema files (beta) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 96df596870d7..18c943c28607 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -1,8 +1,16 @@ --- -title: Config Options for groovy -sidebar_label: groovy +title: Documentation for the groovy Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | groovy | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Groovy API client. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index f287982ab71a..4515d4ad850f 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -1,8 +1,16 @@ --- -title: Config Options for haskell-http-client -sidebar_label: haskell-http-client +title: Documentation for the haskell-http-client Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | haskell-http-client | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Haskell http-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. | Option | Description | Values | Default | diff --git a/docs/generators/haskell-yesod.md b/docs/generators/haskell-yesod.md index e4f8bd5a3626..7993d7988b2e 100644 --- a/docs/generators/haskell-yesod.md +++ b/docs/generators/haskell-yesod.md @@ -1,8 +1,16 @@ --- -title: Config Options for haskell-yesod -sidebar_label: haskell-yesod +title: Documentation for the haskell-yesod Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | haskell-yesod | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a haskell-yesod server. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 75dfe15ca508..28e698254937 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -1,8 +1,16 @@ --- -title: Config Options for haskell -sidebar_label: haskell +title: Documentation for the haskell Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | haskell | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Haskell server and 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. | Option | Description | Values | Default | diff --git a/docs/generators/html.md b/docs/generators/html.md index 0ece134692ac..d597f69ce9e4 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -1,8 +1,16 @@ --- -title: Config Options for html -sidebar_label: html +title: Documentation for the html Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | html | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Generates a static HTML file. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 40dc30a42e42..0e99b15a11e5 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -1,8 +1,16 @@ --- -title: Config Options for html2 -sidebar_label: html2 +title: Documentation for the html2 Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | html2 | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Generates a static HTML file. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 309bc1a3dbb9..48b4070382e9 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -1,8 +1,16 @@ --- -title: Config Options for java-inflector -sidebar_label: java-inflector +title: Documentation for the java-inflector Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-inflector | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java Inflector Server application. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 98ce5396a978..898f2ee2f334 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -1,8 +1,16 @@ --- -title: Config Options for java-micronaut-client -sidebar_label: java-micronaut-client +title: Documentation for the java-micronaut-client Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-micronaut-client | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Java Micronaut Client. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index d3a7aa4bd218..fd0b6ec7c274 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -1,8 +1,16 @@ --- -title: Config Options for java-msf4j -sidebar_label: java-msf4j +title: Documentation for the java-msf4j Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-msf4j | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java Micro Service based on WSO2 Microservices Framework for Java (MSF4J) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 1f7b1f7e2627..9731d407c37b 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -1,8 +1,16 @@ --- -title: Config Options for java-pkmst -sidebar_label: java-pkmst +title: Documentation for the java-pkmst Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-pkmst | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a PKMST SpringBoot Server application using the SpringFox integration. Also enables EurekaServerClient / Zipkin / Spring-Boot admin | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 851e0c567a15..8137dc2f7a6f 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -1,8 +1,16 @@ --- -title: Config Options for java-play-framework -sidebar_label: java-play-framework +title: Documentation for the java-play-framework Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-play-framework | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java Play Framework Server application. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index f240e9490900..340ae31025b4 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for java-undertow-server -sidebar_label: java-undertow-server +title: Documentation for the java-undertow-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-undertow-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java Undertow Server application (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 011359877603..5d4946c67d42 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -1,8 +1,16 @@ --- -title: Config Options for java-vertx-web -sidebar_label: java-vertx-web +title: Documentation for the java-vertx-web Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-vertx-web | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java Vert.x-Web Server (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 435c1a122663..82660a9c9eac 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -1,8 +1,16 @@ --- -title: Config Options for java-vertx -sidebar_label: java-vertx +title: Documentation for the java-vertx Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-vertx | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a java-Vert.X Server 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. | Option | Description | Values | Default | diff --git a/docs/generators/java.md b/docs/generators/java.md index cdab88d701e2..90aa5d73f66a 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -1,8 +1,16 @@ --- -title: Config Options for java -sidebar_label: java +title: Documentation for the java Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index 260fc9809450..3129864fb331 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -1,8 +1,16 @@ --- -title: Config Options for javascript-apollo -sidebar_label: javascript-apollo +title: Documentation for the javascript-apollo Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | javascript-apollo | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a JavaScript client library (beta) using Apollo RESTDatasource. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index 891b35cb9331..b9da1dc8f55c 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -1,8 +1,16 @@ --- -title: Config Options for javascript-closure-angular -sidebar_label: javascript-closure-angular +title: Documentation for the javascript-closure-angular Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | javascript-closure-angular | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Javascript AngularJS client library (beta) annotated with Google Closure Compiler annotations(https://developers.google.com/closure/compiler/docs/js-for-compiler?hl=en) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index a6fcea0533c7..76b81c5aa822 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -1,8 +1,16 @@ --- -title: Config Options for javascript-flowtyped -sidebar_label: javascript-flowtyped +title: Documentation for the javascript-flowtyped Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | javascript-flowtyped | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Javascript client library (beta) using Flow types and Fetch API. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 962b9ffc40ee..2381c5108f33 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -1,8 +1,16 @@ --- -title: Config Options for javascript -sidebar_label: javascript +title: Documentation for the javascript Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | javascript | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a JavaScript 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. | Option | Description | Values | Default | diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index c46ec4c96310..1564b252520f 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -1,8 +1,16 @@ --- -title: Config Options for jaxrs-cxf-cdi -sidebar_label: jaxrs-cxf-cdi +title: Documentation for the jaxrs-cxf-cdi Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jaxrs-cxf-cdi | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java JAXRS Server according to JAXRS 2.0 specification, assuming an Apache CXF runtime and a Java EE runtime with CDI enabled. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index ad1c60900364..b7fcd7f49423 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -1,8 +1,16 @@ --- -title: Config Options for jaxrs-cxf-client -sidebar_label: jaxrs-cxf-client +title: Documentation for the jaxrs-cxf-client Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jaxrs-cxf-client | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Java JAXRS Client based on Apache CXF framework. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 0eef8cacd4e8..c44b15f100bb 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -1,8 +1,16 @@ --- -title: Config Options for jaxrs-cxf-extended -sidebar_label: jaxrs-cxf-extended +title: Documentation for the jaxrs-cxf-extended Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jaxrs-cxf-extended | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Extends jaxrs-cxf with options to generate a functional mock server. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 80b178858a31..f3cb09d41762 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -1,8 +1,16 @@ --- -title: Config Options for jaxrs-cxf -sidebar_label: jaxrs-cxf +title: Documentation for the jaxrs-cxf Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jaxrs-cxf | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java JAXRS Server application based on Apache CXF framework. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 15584410d1f8..086f079c0594 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -1,8 +1,16 @@ --- -title: Config Options for jaxrs-jersey -sidebar_label: jaxrs-jersey +title: Documentation for the jaxrs-jersey Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jaxrs-jersey | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java JAXRS Server application based on Jersey framework. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 247353cbb327..3670d584186e 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -1,8 +1,16 @@ --- -title: Config Options for jaxrs-resteasy-eap -sidebar_label: jaxrs-resteasy-eap +title: Documentation for the jaxrs-resteasy-eap Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jaxrs-resteasy-eap | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java JAXRS-Resteasy Server application. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index ff9fab072fdc..bf56de2f2359 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -1,8 +1,16 @@ --- -title: Config Options for jaxrs-resteasy -sidebar_label: jaxrs-resteasy +title: Documentation for the jaxrs-resteasy Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jaxrs-resteasy | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java JAXRS-Resteasy Server application. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index a29e8a931781..84d8b47d5015 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -1,8 +1,16 @@ --- -title: Config Options for jaxrs-spec -sidebar_label: jaxrs-spec +title: Documentation for the jaxrs-spec Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jaxrs-spec | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java JAXRS Server according to JAXRS 2.0 specification. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 71584a1e793a..e47e7fef1771 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -1,8 +1,16 @@ --- -title: Config Options for jmeter -sidebar_label: jmeter +title: Documentation for the jmeter Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | jmeter | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a JMeter .jmx file. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/k6.md b/docs/generators/k6.md index 529527a890c4..a23aec49d2d1 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -1,8 +1,16 @@ --- -title: Config Options for k6 -sidebar_label: k6 +title: Documentation for the k6 Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | k6 | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a k6 script (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/kotlin-server-deprecated.md b/docs/generators/kotlin-server-deprecated.md index 7e53620aa6e5..79e12009c63b 100644 --- a/docs/generators/kotlin-server-deprecated.md +++ b/docs/generators/kotlin-server-deprecated.md @@ -1,8 +1,16 @@ --- -title: Config Options for kotlin-server-deprecated -sidebar_label: kotlin-server-deprecated +title: Documentation for the kotlin-server-deprecated Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | kotlin-server-deprecated | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Kotlin server (Ktor v1.1.3). IMPORTANT: this generator has been deprecated. Please migrate to `kotlin-server` which supports Ktor v1.5.2+. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 0c0228d8a8c5..95dce36a0279 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for kotlin-server -sidebar_label: kotlin-server +title: Documentation for the kotlin-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | kotlin-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Kotlin server. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 5cd67ff64aae..d09124f4a7f2 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -1,8 +1,16 @@ --- -title: Config Options for kotlin-spring -sidebar_label: kotlin-spring +title: Documentation for the kotlin-spring Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | kotlin-spring | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Kotlin Spring application. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 02d608e5274f..174d19f16693 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -1,8 +1,16 @@ --- -title: Config Options for kotlin-vertx -sidebar_label: kotlin-vertx +title: Documentation for the kotlin-vertx Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | kotlin-vertx | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a kotlin-vertx server. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 786ff7013ebb..31f9601161d1 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -1,8 +1,16 @@ --- -title: Config Options for kotlin -sidebar_label: kotlin +title: Documentation for the kotlin Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | kotlin | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Kotlin client. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/ktorm-schema.md b/docs/generators/ktorm-schema.md index 7a45b88b69a3..163fce14c156 100644 --- a/docs/generators/ktorm-schema.md +++ b/docs/generators/ktorm-schema.md @@ -1,8 +1,16 @@ --- -title: Config Options for ktorm-schema -sidebar_label: ktorm-schema +title: Documentation for the ktorm-schema Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | ktorm-schema | pass this to the generate command after -g | +| generator type | SCHEMA | | +| helpTxt | Generates a kotlin-ktorm schema (beta) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/lua.md b/docs/generators/lua.md index 6f9f4a80eaf5..3f4e6e34c6c3 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -1,8 +1,16 @@ --- -title: Config Options for lua -sidebar_label: lua +title: Documentation for the lua Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | lua | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Lua client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 4d87a35f9640..87e922f1b9d4 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -1,8 +1,16 @@ --- -title: Config Options for markdown -sidebar_label: markdown +title: Documentation for the markdown Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | markdown | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Generates a markdown documentation. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 8526ade4f060..3499563f5a8a 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -1,8 +1,16 @@ --- -title: Config Options for mysql-schema -sidebar_label: mysql-schema +title: Documentation for the mysql-schema Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | mysql-schema | pass this to the generate command after -g | +| generator type | SCHEMA | | +| helpTxt | Generates a MySQL schema based on the model or schema defined in the OpenAPI specification (v2, v3). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 3d90efad1598..77a6d5e9046d 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -1,8 +1,16 @@ --- -title: Config Options for nim -sidebar_label: nim +title: Documentation for the nim Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | nim | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a nim client (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index 9fffa3c28b79..f2bca5103347 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for nodejs-express-server -sidebar_label: nodejs-express-server +title: Documentation for the nodejs-express-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | nodejs-express-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a NodeJS Express server (alpha). IMPORTANT: this generator may subject to breaking changes without further notice). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/objc.md b/docs/generators/objc.md index ad51253f978a..fa4c1350801e 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -1,8 +1,16 @@ --- -title: Config Options for objc -sidebar_label: objc +title: Documentation for the objc Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | objc | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an Objective-C 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. | Option | Description | Values | Default | diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 597f07b84112..a453f1087924 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -1,8 +1,16 @@ --- -title: Config Options for ocaml -sidebar_label: ocaml +title: Documentation for the ocaml Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | ocaml | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates an OCaml client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 4476c7900003..db86e36ac3dd 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -1,8 +1,16 @@ --- -title: Config Options for openapi-yaml -sidebar_label: openapi-yaml +title: Documentation for the openapi-yaml Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | openapi-yaml | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Creates a static openapi.yaml file (OpenAPI spec v3). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index 53ea3bf812c3..754d65ebc264 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -1,8 +1,16 @@ --- -title: Config Options for openapi -sidebar_label: openapi +title: Documentation for the openapi Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | openapi | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Creates a static openapi.json file (OpenAPI spec v3.0). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 910abd784325..5d9c89a3a106 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -1,8 +1,16 @@ --- -title: Config Options for perl -sidebar_label: perl +title: Documentation for the perl Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | perl | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Perl 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. | Option | Description | Values | Default | diff --git a/docs/generators/php-dt.md b/docs/generators/php-dt.md index a4a6eac2b732..293940f6ca03 100644 --- a/docs/generators/php-dt.md +++ b/docs/generators/php-dt.md @@ -1,8 +1,16 @@ --- -title: Config Options for php-dt -sidebar_label: php-dt +title: Documentation for the php-dt Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php-dt | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a PHP client relying on Data Transfer ( https://github.com/Articus/DataTransfer ) and compliant with PSR-7, PSR-11, PSR-17 and PSR-18. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index 09e61d56c132..bd374554c82d 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -1,8 +1,16 @@ --- -title: Config Options for php-laravel -sidebar_label: php-laravel +title: Documentation for the php-laravel Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php-laravel | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a PHP laravel server 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. | Option | Description | Values | Default | diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 562b26a589da..1b91b92fd9a1 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -1,8 +1,16 @@ --- -title: Config Options for php-lumen -sidebar_label: php-lumen +title: Documentation for the php-lumen Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php-lumen | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a PHP Lumen server 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. | Option | Description | Values | Default | diff --git a/docs/generators/php-mezzio-ph.md b/docs/generators/php-mezzio-ph.md index 7abb3408bca7..712683865344 100644 --- a/docs/generators/php-mezzio-ph.md +++ b/docs/generators/php-mezzio-ph.md @@ -1,8 +1,16 @@ --- -title: Config Options for php-mezzio-ph -sidebar_label: php-mezzio-ph +title: Documentation for the php-mezzio-ph Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php-mezzio-ph | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates PHP server stub using Mezzio ( https://docs.mezzio.dev/mezzio/ ) and Path Handler ( https://github.com/Articus/PathHandler ). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md index 9b4d5b39b635..e9af8da6621e 100644 --- a/docs/generators/php-silex-deprecated.md +++ b/docs/generators/php-silex-deprecated.md @@ -1,8 +1,16 @@ --- -title: Config Options for php-silex-deprecated -sidebar_label: php-silex-deprecated +title: Documentation for the php-silex-deprecated Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php-silex-deprecated | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a PHP Silex server library. IMPORTANT NOTE: this generator is no longer actively maintained. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index 15c4d36ba80f..5e88e4e684ac 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -1,8 +1,16 @@ --- -title: Config Options for php-slim-deprecated -sidebar_label: php-slim-deprecated +title: Documentation for the php-slim-deprecated Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php-slim-deprecated | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a PHP Slim Framework server library. IMPORTANT NOTE: this generator (Slim 3.x) is no longer actively maintained so please use 'php-slim4' generator instead. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index ca1bd3b6a101..ae8676e2d9aa 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -1,8 +1,16 @@ --- -title: Config Options for php-slim4 -sidebar_label: php-slim4 +title: Documentation for the php-slim4 Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php-slim4 | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a PHP Slim 4 Framework server library(with Mock server). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 0a231dbd2e49..8ed3be46e390 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -1,8 +1,16 @@ --- -title: Config Options for php-symfony -sidebar_label: php-symfony +title: Documentation for the php-symfony Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php-symfony | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a PHP Symfony server bundle. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/php.md b/docs/generators/php.md index c84e12c36f66..b9a93234cb2a 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -1,8 +1,16 @@ --- -title: Config Options for php -sidebar_label: php +title: Documentation for the php Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | php | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a PHP 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. | Option | Description | Values | Default | diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md index 7a37ad0d187f..b2c4c230c0b7 100644 --- a/docs/generators/plantuml.md +++ b/docs/generators/plantuml.md @@ -1,8 +1,16 @@ --- -title: Config Options for plantuml -sidebar_label: plantuml +title: Documentation for the plantuml Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | plantuml | pass this to the generate command after -g | +| generator type | DOCUMENTATION | | +| helpTxt | Generates a plantuml documentation. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index c822e241889e..36d7ba9e54d4 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -1,8 +1,16 @@ --- -title: Config Options for powershell -sidebar_label: powershell +title: Documentation for the powershell Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | powershell | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a PowerShell API client (beta) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index a7d1f1d095b5..2f350f1a1b0b 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -1,8 +1,16 @@ --- -title: Config Options for protobuf-schema -sidebar_label: protobuf-schema +title: Documentation for the protobuf-schema Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | protobuf-schema | pass this to the generate command after -g | +| generator type | SCHEMA | | +| helpTxt | Generates gRPC and protocol buffer schema files (beta) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 14ffd174221f..fdfdf70f306f 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -1,8 +1,16 @@ --- -title: Config Options for python-aiohttp -sidebar_label: python-aiohttp +title: Documentation for the python-aiohttp Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | python-aiohttp | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index 049e3424ebbf..f8f6d4f63070 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -1,8 +1,16 @@ --- -title: Config Options for python-blueplanet -sidebar_label: python-blueplanet +title: Documentation for the python-blueplanet Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | python-blueplanet | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index e61a03a4e606..e026fdf032a5 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -1,8 +1,16 @@ --- -title: Config Options for python-experimental -sidebar_label: python-experimental +title: Documentation for the python-experimental Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | python-experimental | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Python client library

Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/python-fastapi.md b/docs/generators/python-fastapi.md index 4e321ff9e59e..bb88a406076c 100644 --- a/docs/generators/python-fastapi.md +++ b/docs/generators/python-fastapi.md @@ -1,8 +1,16 @@ --- -title: Config Options for python-fastapi -sidebar_label: python-fastapi +title: Documentation for the python-fastapi Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | python-fastapi | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Python FastAPI server (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index a0a5f44b20a3..b53c86fded14 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -1,8 +1,16 @@ --- -title: Config Options for python-flask -sidebar_label: python-flask +title: Documentation for the python-flask Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | python-flask | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/python-legacy.md b/docs/generators/python-legacy.md index a341d478882e..14821d0ae1ce 100644 --- a/docs/generators/python-legacy.md +++ b/docs/generators/python-legacy.md @@ -1,8 +1,16 @@ --- -title: Config Options for python-legacy -sidebar_label: python-legacy +title: Documentation for the python-legacy Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | python-legacy | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Python 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. | Option | Description | Values | Default | diff --git a/docs/generators/python.md b/docs/generators/python.md index fe60f0e511c7..607c71a2604d 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -1,8 +1,16 @@ --- -title: Config Options for python -sidebar_label: python +title: Documentation for the python Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | python | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Python 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. | Option | Description | Values | Default | diff --git a/docs/generators/r.md b/docs/generators/r.md index 696138356124..d2ee1ea68367 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -1,8 +1,16 @@ --- -title: Config Options for r -sidebar_label: r +title: Documentation for the r Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | r | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a R client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index 5c25cf1451bd..f0be7a29e133 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -1,8 +1,16 @@ --- -title: Config Options for ruby-on-rails -sidebar_label: ruby-on-rails +title: Documentation for the ruby-on-rails Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | ruby-on-rails | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Ruby on Rails (v5) server 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. | Option | Description | Values | Default | diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index 58043cfafc56..f58b4b948b1d 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -1,8 +1,16 @@ --- -title: Config Options for ruby-sinatra -sidebar_label: ruby-sinatra +title: Documentation for the ruby-sinatra Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | ruby-sinatra | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Ruby Sinatra server 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. | Option | Description | Values | Default | diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 6937905b9e3d..56c094bbd9f6 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -1,8 +1,16 @@ --- -title: Config Options for ruby -sidebar_label: ruby +title: Documentation for the ruby Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | ruby | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Ruby 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. | Option | Description | Values | Default | diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index 1d13b0321041..7822aa5417c7 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for rust-server -sidebar_label: rust-server +title: Documentation for the rust-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | rust-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Rust client/server library (beta) using the openapi-generator project. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/rust.md b/docs/generators/rust.md index dc57794b8d08..44b63aee0ec1 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -1,8 +1,16 @@ --- -title: Config Options for rust -sidebar_label: rust +title: Documentation for the rust Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | rust | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Rust client library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md index 3d27821c2315..9c35ef92e7db 100644 --- a/docs/generators/scala-akka-http-server.md +++ b/docs/generators/scala-akka-http-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for scala-akka-http-server -sidebar_label: scala-akka-http-server +title: Documentation for the scala-akka-http-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-akka-http-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a scala-akka-http server (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 1cc19c6216da..cf8b6909aca5 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -1,8 +1,16 @@ --- -title: Config Options for scala-akka -sidebar_label: scala-akka +title: Documentation for the scala-akka Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-akka | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Scala client library (beta) base on Akka/Spray. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 5d2bdded42a0..9796e5d50fda 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -1,8 +1,16 @@ --- -title: Config Options for scala-finch -sidebar_label: scala-finch +title: Documentation for the scala-finch Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-finch | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Scala server application with Finch. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 6daaef5d657e..19cd4528952a 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -1,8 +1,16 @@ --- -title: Config Options for scala-gatling -sidebar_label: scala-gatling +title: Documentation for the scala-gatling Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-gatling | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a gatling simulation library (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 4bd12dca9552..af714b42ed2d 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -1,8 +1,16 @@ --- -title: Config Options for scala-httpclient-deprecated -sidebar_label: scala-httpclient-deprecated +title: Documentation for the scala-httpclient-deprecated Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-httpclient-deprecated | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Scala client library (beta). IMPORTANT: This generator is no longer actively maintained and will be deprecated. PLease use 'scala-akka' generator instead. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index ed197a23e5eb..aba88bb57ee4 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for scala-lagom-server -sidebar_label: scala-lagom-server +title: Documentation for the scala-lagom-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-lagom-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Lagom API server (Beta) in scala | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index aeab7fd2538c..845b9a233b83 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -1,8 +1,16 @@ --- -title: Config Options for scala-play-server -sidebar_label: scala-play-server +title: Documentation for the scala-play-server Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-play-server | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Scala server application (beta) with Play Framework. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 9425f8f5c973..1befd28b70e7 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -1,8 +1,16 @@ --- -title: Config Options for scala-sttp -sidebar_label: scala-sttp +title: Documentation for the scala-sttp Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-sttp | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Scala client library (beta) based on Sttp. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 9159c798f233..56bef75b6cc8 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -1,8 +1,16 @@ --- -title: Config Options for scalatra -sidebar_label: scalatra +title: Documentation for the scalatra Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scalatra | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Scala server application with Scalatra. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index 18520f5e3b3f..7c356c9f8e28 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -1,8 +1,16 @@ --- -title: Config Options for scalaz -sidebar_label: scalaz +title: Documentation for the scalaz Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scalaz | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Scalaz client library (beta) that uses http4s | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 34e4a6a266cb..7623c432a75d 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -1,8 +1,16 @@ --- -title: Config Options for spring -sidebar_label: spring +title: Documentation for the spring Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | spring | pass this to the generate command after -g | +| generator type | SERVER | | +| helpTxt | Generates a Java SpringBoot Server application using the SpringFox integration. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index cf1e1f65df40..7743ddf5a456 100644 --- a/docs/generators/swift4-deprecated.md +++ b/docs/generators/swift4-deprecated.md @@ -1,8 +1,16 @@ --- -title: Config Options for swift4-deprecated -sidebar_label: swift4-deprecated +title: Documentation for the swift4-deprecated Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | swift4-deprecated | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Swift 4.x client library (Deprecated and will be removed in 5.x releases. Please use `swift5` instead.) | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 95f50fca7fc1..cb5ea31e1241 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -1,8 +1,16 @@ --- -title: Config Options for swift5 -sidebar_label: swift5 +title: Documentation for the swift5 Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | swift5 | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a Swift 5.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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 9421c54646ed..accefab18e0c 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-angular -sidebar_label: typescript-angular +title: Documentation for the typescript-angular Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-angular | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript Angular (6.x - 13.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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-angularjs-deprecated.md b/docs/generators/typescript-angularjs-deprecated.md index c094849a0781..bcacd72ecb8b 100644 --- a/docs/generators/typescript-angularjs-deprecated.md +++ b/docs/generators/typescript-angularjs-deprecated.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-angularjs-deprecated -sidebar_label: typescript-angularjs-deprecated +title: Documentation for the typescript-angularjs-deprecated Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-angularjs-deprecated | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript AngularJS client library. This generator has been deprecated and will be removed in the future release. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 23b71ae41a38..0632ee05eb02 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-aurelia -sidebar_label: typescript-aurelia +title: Documentation for the typescript-aurelia Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-aurelia | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript client library for the Aurelia framework (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index d489756bacb7..00bd32f95352 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-axios -sidebar_label: typescript-axios +title: Documentation for the typescript-axios Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-axios | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript client library using axios. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 3fe83380da4a..b272b0bb2bf7 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-fetch -sidebar_label: typescript-fetch +title: Documentation for the typescript-fetch Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-fetch | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript client library using Fetch API (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 21e44eac43f7..5834880e4a40 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-inversify -sidebar_label: typescript-inversify +title: Documentation for the typescript-inversify Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-inversify | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates Typescript services using Inversify IOC | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 030fdd2e572c..e9469f20589f 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-jquery -sidebar_label: typescript-jquery +title: Documentation for the typescript-jquery Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-jquery | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript jquery 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-nestjs.md b/docs/generators/typescript-nestjs.md index a3f0b52a05da..0619d801227d 100644 --- a/docs/generators/typescript-nestjs.md +++ b/docs/generators/typescript-nestjs.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-nestjs -sidebar_label: typescript-nestjs +title: Documentation for the typescript-nestjs Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-nestjs | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript Nestjs 6.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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 5de270453127..b2afd57352d7 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-node -sidebar_label: typescript-node +title: Documentation for the typescript-node Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-node | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript NodeJS 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index f2266c09703c..022f22d8c5e7 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-redux-query -sidebar_label: typescript-redux-query +title: Documentation for the typescript-redux-query Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-redux-query | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript client library using redux-query API (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 40921ae7f58a..52ed0e12ef0f 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript-rxjs -sidebar_label: typescript-rxjs +title: Documentation for the typescript-rxjs Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript-rxjs | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript client library using Rxjs API. | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/typescript.md b/docs/generators/typescript.md index 9c6eea23c032..3aae708a3bda 100644 --- a/docs/generators/typescript.md +++ b/docs/generators/typescript.md @@ -1,8 +1,16 @@ --- -title: Config Options for typescript -sidebar_label: typescript +title: Documentation for the typescript Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | typescript | pass this to the generate command after -g | +| generator type | CLIENT | | +| helpTxt | Generates a TypeScript client library using Fetch API (beta). | | + +## 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. | Option | Description | Values | Default | diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md index a2af11398624..47c95920be5a 100644 --- a/docs/generators/wsdl-schema.md +++ b/docs/generators/wsdl-schema.md @@ -1,8 +1,16 @@ --- -title: Config Options for wsdl-schema -sidebar_label: wsdl-schema +title: Documentation for the wsdl-schema Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | wsdl-schema | pass this to the generate command after -g | +| generator type | SCHEMA | | +| helpTxt | Generates WSDL files. | | + +## 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. | Option | Description | Values | Default | diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index 8193e20e3f42..3c61526cddc3 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -70,6 +70,9 @@ public class ConfigHelp extends OpenApiGeneratorCommand { @Option(name = {"--import-mappings"}, title = "import mappings", description = "displays the default import mappings (types and aliases, and what imports they will pull into the template)") private Boolean importMappings; + @Option(name = {"--metadata"}, title = "metadata", description = "displays the generator metadata like the help txt for the generator and generator type etc") + private Boolean metadata; + @Option(name = {"--language-specific-primitive"}, title = "language specific primitives", description = "displays the language specific primitives (types which require no additional imports, or which may conflict with user defined model names)") private Boolean languageSpecificPrimitives; @@ -104,6 +107,7 @@ public void execute() { languageSpecificPrimitives = Boolean.TRUE; importMappings = Boolean.TRUE; featureSets = Boolean.TRUE; + metadata = Boolean.TRUE; } try { @@ -153,26 +157,8 @@ public void execute() { } } - private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { - if (Boolean.TRUE.equals(markdownHeader)) { - sb.append("---").append(newline); - sb.append("title: Config Options for ").append(generatorName).append(newline); - sb.append("sidebar_label: ").append(generatorName).append(newline); - sb.append("---").append(newline); - sb.append(newline); - sb.append("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."); - sb.append(newline); - } else { - sb.append(newline); - sb.append("## CONFIG OPTIONS"); - - if (Boolean.TRUE.equals(namedHeader)) { - sb.append(" for ").append(generatorName).append("").append(newline); - } - } - + private void generateMdConfigOptions(StringBuilder sb, CodegenConfig config) { sb.append(newline); - sb.append("| Option | Description | Values | Default |").append(newline); sb.append("| ------ | ----------- | ------ | ------- |").append(newline); @@ -210,90 +196,152 @@ private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { // default sb.append(escapeHtml4(langCliOption.getDefault())).append("|").append(newline); }); + } + private void generateMdImportMappings(StringBuilder sb, CodegenConfig config) { + sb.append(newline).append("## IMPORT MAPPING").append(newline).append(newline); - if (Boolean.TRUE.equals(importMappings)) { - sb.append(newline).append("## IMPORT MAPPING").append(newline).append(newline); + sb.append("| Type/Alias | Imports |").append(newline); + sb.append("| ---------- | ------- |").append(newline); - sb.append("| Type/Alias | Imports |").append(newline); - sb.append("| ---------- | ------- |").append(newline); + config.importMapping() + .entrySet() + .stream() + .sorted(Map.Entry.comparingByKey()) + .forEachOrdered(kvp -> { + sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|"); + sb.append(newline); + }); - config.importMapping() - .entrySet() - .stream() - .sorted(Map.Entry.comparingByKey()) - .forEachOrdered(kvp -> { - sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|"); - sb.append(newline); - }); + sb.append(newline); + } - sb.append(newline); - } + private void generateMdInstantiationTypes(StringBuilder sb, CodegenConfig config) { + sb.append(newline).append("## INSTANTIATION TYPES").append(newline).append(newline); - if (Boolean.TRUE.equals(instantiationTypes)) { - sb.append(newline).append("## INSTANTIATION TYPES").append(newline).append(newline); + sb.append("| Type/Alias | Instantiated By |").append(newline); + sb.append("| ---------- | --------------- |").append(newline); + + config.instantiationTypes() + .entrySet() + .stream() + .sorted(Map.Entry.comparingByKey()) + .forEachOrdered(kvp -> { + sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|"); + sb.append(newline); + }); - sb.append("| Type/Alias | Instantiated By |").append(newline); - sb.append("| ---------- | --------------- |").append(newline); + sb.append(newline); + } - config.instantiationTypes() - .entrySet() - .stream() - .sorted(Map.Entry.comparingByKey()) - .forEachOrdered(kvp -> { - sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|"); - sb.append(newline); - }); + private void generateMdLanguageSpecificPrimitives(StringBuilder sb, CodegenConfig config) { + sb.append(newline).append("## LANGUAGE PRIMITIVES").append(newline).append(newline); + + sb.append("

    ").append(newline); + config.languageSpecificPrimitives() + .stream() + .sorted(String::compareTo) + .forEach(s -> sb.append("
  • ").append(escapeHtml4(s)).append("
  • ").append(newline)); + sb.append("
").append(newline); + } + + private void generateMdReservedWords(StringBuilder sb, CodegenConfig config) { + sb.append(newline).append("## RESERVED WORDS").append(newline).append(newline); + + sb.append("
    ").append(newline); + config.reservedWords() + .stream() + .sorted(String::compareTo) + .forEach(s -> sb.append("
  • ").append(escapeHtml4(s)).append("
  • ").append(newline)); + sb.append("
").append(newline); + } + + private void generateMdFeatureSets(StringBuilder sb, CodegenConfig config) { + sb.append(newline).append("## FEATURE SET").append(newline).append(newline); + + List flattened = config.getGeneratorMetadata().getFeatureSet().flatten(); + flattened.sort(Comparator.comparing(FeatureSet.FeatureSetFlattened::getFeatureCategory)); + + AtomicReference lastCategory = new AtomicReference<>(); + flattened.forEach(featureSet -> { + if (!featureSet.getFeatureCategory().equals(lastCategory.get())) { + lastCategory.set(featureSet.getFeatureCategory()); + + String[] header = StringUtils.splitByCharacterTypeCamelCase(featureSet.getFeatureCategory()); + sb.append(newline).append("### ").append(StringUtils.join(header, " ")).append(newline); + sb.append("| Name | Supported | Defined By |").append(newline); + sb.append("| ---- | --------- | ---------- |").append(newline); + } + + // Appends a ✓ or ✗ for support + sb.append("|").append(featureSet.getFeatureName()) + .append("|").append(featureSet.isSupported() ? "✓" : "✗") + .append("|").append(StringUtils.join(featureSet.getSource(), ",")) + .append(newline); + }); + } + + private void generateMdConfigOptionsHeader(StringBuilder sb, CodegenConfig config) { + if (Boolean.TRUE.equals(markdownHeader)) { + sb.append("## CONFIG OPTIONS").append(newline); + sb.append("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."); + sb.append(newline); + } else { sb.append(newline); + sb.append("## CONFIG OPTIONS"); + + if (Boolean.TRUE.equals(namedHeader)) { + sb.append(" for ").append(generatorName).append("").append(newline); + } } + } - if (Boolean.TRUE.equals(languageSpecificPrimitives)) { - sb.append(newline).append("## LANGUAGE PRIMITIVES").append(newline).append(newline); + private void generateMdMetadata(StringBuilder sb, CodegenConfig config) { + sb.append("## METADATA").append(newline).append(newline); - sb.append("
    ").append(newline); - config.languageSpecificPrimitives() - .stream() - .sorted(String::compareTo) - .forEach(s -> sb.append("
  • ").append(escapeHtml4(s)).append("
  • ").append(newline)); - sb.append("
").append(newline); - } + sb.append("| Property | Value | Notes |").append(newline); + sb.append("| -------- | ----- | ----- |").append(newline); + sb.append("| generator name | "+config.getName()+" | pass this to the generate command after -g |").append(newline); + sb.append("| generator type | "+config.getTag()+" | |").append(newline); + sb.append("| helpTxt | "+config.getHelp()+" | |").append(newline); - if (Boolean.TRUE.equals(reservedWords)) { - sb.append(newline).append("## RESERVED WORDS").append(newline).append(newline); + sb.append(newline); + } - sb.append("
    ").append(newline); - config.reservedWords() - .stream() - .sorted(String::compareTo) - .forEach(s -> sb.append("
  • ").append(escapeHtml4(s)).append("
  • ").append(newline)); - sb.append("
").append(newline); + private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { + if (Boolean.TRUE.equals(markdownHeader)) { + sb.append("---").append(newline); + sb.append("title: Documentation for the " + generatorName + " Generator").append(newline); + sb.append("---").append(newline); + sb.append(newline); } - if (Boolean.TRUE.equals(featureSets)) { - sb.append(newline).append("## FEATURE SET").append(newline).append(newline); + if (Boolean.TRUE.equals(metadata)) { + generateMdMetadata(sb, config); + } - List flattened = config.getGeneratorMetadata().getFeatureSet().flatten(); - flattened.sort(Comparator.comparing(FeatureSet.FeatureSetFlattened::getFeatureCategory)); + generateMdConfigOptionsHeader(sb, config); + generateMdConfigOptions(sb, config); - AtomicReference lastCategory = new AtomicReference<>(); - flattened.forEach(featureSet -> { - if (!featureSet.getFeatureCategory().equals(lastCategory.get())) { - lastCategory.set(featureSet.getFeatureCategory()); + if (Boolean.TRUE.equals(importMappings)) { + generateMdImportMappings(sb, config); + } - String[] header = StringUtils.splitByCharacterTypeCamelCase(featureSet.getFeatureCategory()); - sb.append(newline).append("### ").append(StringUtils.join(header, " ")).append(newline); + if (Boolean.TRUE.equals(instantiationTypes)) { + generateMdInstantiationTypes(sb, config); + } - sb.append("| Name | Supported | Defined By |").append(newline); - sb.append("| ---- | --------- | ---------- |").append(newline); - } + if (Boolean.TRUE.equals(languageSpecificPrimitives)) { + generateMdLanguageSpecificPrimitives(sb, config); + } - // Appends a ✓ or ✗ for support - sb.append("|").append(featureSet.getFeatureName()) - .append("|").append(featureSet.isSupported() ? "✓" : "✗") - .append("|").append(StringUtils.join(featureSet.getSource(), ",")) - .append(newline); - }); + if (Boolean.TRUE.equals(reservedWords)) { + generateMdReservedWords(sb, config); + } + + if (Boolean.TRUE.equals(featureSets)) { + generateMdFeatureSets(sb, config); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 187ae357e022..cc985490ae96 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -499,7 +499,7 @@ public String getName() { @Override public String getHelp() { String newLine = System.getProperty("line.separator"); - return String.join(newLine, + return String.join("
", "Generates a Python client library", "", "Features in this generator:", From a4325ec5205b68298fcc66b9e85927aa64d840ff Mon Sep 17 00:00:00 2001 From: Sorin Florea <30589784+sorin-florea@users.noreply.github.com> Date: Mon, 10 Jan 2022 15:23:28 +0200 Subject: [PATCH 074/175] ISSUE-11242: Fix Java native path param encoding (#11257) --- .../Java/libraries/native/ApiClient.mustache | 2 +- .../codegen/java/JavaClientCodegenTest.java | 32 +++++++++++++++- .../src/test/resources/3_0/issue11242.yaml | 37 +++++++++++++++++++ .../org/openapitools/client/ApiClient.java | 2 +- .../org/openapitools/client/ApiClient.java | 2 +- 5 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue11242.yaml diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache index 977147238108..03fe2a46841d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache @@ -76,7 +76,7 @@ public class ApiClient { * @return URL-encoded representation of the input string. */ public static String urlEncode(String s) { - return URLEncoder.encode(s, UTF_8); + return URLEncoder.encode(s, UTF_8).replaceAll("\\+", "%20"); } /** 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 2e25fa70a24a..1d326861f0a6 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 @@ -1170,7 +1170,7 @@ public void testWebClientWithUseAbstractionForFiles() throws IOException { "formParams.add(\"file\", file);" ); } - + /** * See https://github.com/OpenAPITools/openapi-generator/issues/8352 */ @@ -1228,4 +1228,34 @@ public void testWebClientWithFreeFormInQueryParameters() throws IOException { final Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/ApiClient.java"); TestUtils.assertFileContains(defaultApi, "value instanceof Map"); } + + /** + * See https://github.com/OpenAPITools/openapi-generator/issues/11242 + */ + @Test + public void testNativeClientWhiteSpacePathParamEncoding() throws IOException { + Map properties = new HashMap<>(); + properties.put(JavaClientCodegen.JAVA8_MODE, true); + 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.NATIVE) + .setAdditionalProperties(properties) + .setInputSpec("src/test/resources/3_0/issue11242.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(clientOptInput).generate(); + + Assert.assertEquals(files.size(), 34); + validateJavaSourceFiles(files); + + TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/ApiClient.java"), + "public static String urlEncode(String s) { return URLEncoder.encode(s, UTF_8).replaceAll(\"\\\\+\", \"%20\"); }"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/issue11242.yaml b/modules/openapi-generator/src/test/resources/3_0/issue11242.yaml new file mode 100644 index 000000000000..ee27ec7f33b1 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue11242.yaml @@ -0,0 +1,37 @@ +openapi: 3.0.3 +info: + title: Issue 11242 - Path Param encoding + description: "White space encoding in path parameters" + version: "1.0.0" +servers: + - url: localhost:8080 +paths: + /api/{someParam}: + parameters: + - in: path + name: someParam + schema: + type: string + required: true + description: Some parameter. + get: + operationId: GetSomeParam + summary: View some param + responses: + '200': + description: Some return value + content: + application/json: + schema: + $ref: '#/components/schemas/SomeReturnValue' + example: + someParam: someValue +components: + schemas: + SomeReturnValue: + type: object + required: + - someParam + properties: + someParam: + type: string diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java index 9d108d594e4a..f39fd0a344b6 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java @@ -81,7 +81,7 @@ private static String valueToString(Object value) { * @return URL-encoded representation of the input string. */ public static String urlEncode(String s) { - return URLEncoder.encode(s, UTF_8); + return URLEncoder.encode(s, UTF_8).replaceAll("\\+", "%20"); } /** diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java index 9d108d594e4a..f39fd0a344b6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -81,7 +81,7 @@ private static String valueToString(Object value) { * @return URL-encoded representation of the input string. */ public static String urlEncode(String s) { - return URLEncoder.encode(s, UTF_8); + return URLEncoder.encode(s, UTF_8).replaceAll("\\+", "%20"); } /** From dd3bba8c9442f2ee40d6ea8f0872ab0be43714b9 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 10 Jan 2022 08:59:20 -0800 Subject: [PATCH 075/175] Has generators set default template engine (#11245) * Adds default template engine to generators * Fixes sample batch generation --- bin/configs/python-experimental.yaml | 1 - .../codegen/config/WorkflowSettings.java | 2 +- .../org/openapitools/codegen/CodegenConfig.java | 2 ++ .../openapitools/codegen/DefaultCodegen.java | 5 +++++ .../codegen/config/CodegenConfigurator.java | 17 +++++++++++++---- .../PythonExperimentalClientCodegen.java | 5 +++++ 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/bin/configs/python-experimental.yaml b/bin/configs/python-experimental.yaml index 1a8ea6e002c2..dd204f44938d 100644 --- a/bin/configs/python-experimental.yaml +++ b/bin/configs/python-experimental.yaml @@ -2,7 +2,6 @@ generatorName: python-experimental outputDir: samples/openapi3/client/petstore/python-experimental inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/python-experimental -templatingEngineName: handlebars additionalProperties: packageName: petstore_api recursionLimit: "1234" diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java index e2feddb98222..64e426fa68a3 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java @@ -46,7 +46,7 @@ public class WorkflowSettings { public static final boolean DEFAULT_ENABLE_MINIMAL_UPDATE = false; public static final boolean DEFAULT_STRICT_SPEC_BEHAVIOR = true; public static final boolean DEFAULT_GENERATE_ALIAS_AS_MODEL = false; - public static final String DEFAULT_TEMPLATING_ENGINE_NAME = "mustache"; + public static final String DEFAULT_TEMPLATING_ENGINE_NAME = null; // this is set by the generator public static final Map DEFAULT_GLOBAL_PROPERTIES = Collections.unmodifiableMap(new HashMap<>()); private String inputSpec; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 5dc77787e600..17b9b978259f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -304,4 +304,6 @@ public interface CodegenConfig { void setRemoveEnumValuePrefix(boolean removeEnumValuePrefix); Schema unaliasSchema(Schema schema, Map usedImportMappings); + + public String defaultTemplatingEngine(); } 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 1af3ddbba392..1a9d09441c02 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 @@ -7356,4 +7356,9 @@ private List getComposedProperties(List xOfCollection, } return xOf; } + + @Override + public String defaultTemplatingEngine() { + return "mustache"; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index b5bd0b23c332..9eb6f558ef7f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -91,11 +91,18 @@ public static CodegenConfigurator fromFile(String configFile, Module... modules) WorkflowSettings workflowSettings = settings.getWorkflowSettings(); List userDefinedTemplateSettings = settings.getFiles(); + CodegenConfig config = CodegenConfigLoader.forName(generatorSettings.getGeneratorName()); + String templatingEngineName = workflowSettings.getTemplatingEngineName(); + if (isEmpty(templatingEngineName)) { + // if templatingEngineName is empty check the config for a default + templatingEngineName = config.defaultTemplatingEngine(); + } + // We copy "cached" properties into configurator so it is appropriately configured with all settings in external files. // FIXME: target is to eventually move away from CodegenConfigurator properties except gen/workflow settings. configurator.generatorName = generatorSettings.getGeneratorName(); configurator.inputSpec = workflowSettings.getInputSpec(); - configurator.templatingEngineName = workflowSettings.getTemplatingEngineName(); + configurator.templatingEngineName = templatingEngineName; if (workflowSettings.getGlobalProperties() != null) { configurator.globalProperties.putAll(workflowSettings.getGlobalProperties()); } @@ -482,15 +489,17 @@ public Context toContext() { Validate.notEmpty(generatorName, "generator name must be specified"); Validate.notEmpty(inputSpec, "input spec must be specified"); + GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); + CodegenConfig config = CodegenConfigLoader.forName(generatorSettings.getGeneratorName()); if (isEmpty(templatingEngineName)) { - // Built-in templates are mustache, but allow users to use a simplified handlebars engine for their custom templates. - workflowSettingsBuilder.withTemplatingEngineName("mustache"); + // if templatingEngineName is empty check the config for a default + String defaultTemplatingEngine = config.defaultTemplatingEngine(); + workflowSettingsBuilder.withTemplatingEngineName(defaultTemplatingEngine); } else { workflowSettingsBuilder.withTemplatingEngineName(templatingEngineName); } // at this point, all "additionalProperties" are set, and are now immutable per GeneratorSettings instance. - GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); WorkflowSettings workflowSettings = workflowSettingsBuilder.build(); if (workflowSettings.isVerbose()) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index cc985490ae96..6d1aebdac024 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -2075,4 +2075,9 @@ public CodegenOperation fromOperation(String path, } return co; } + + @Override + public String defaultTemplatingEngine() { + return "handlebars"; + } } From 0eca6291275394dab1bff79c9b4b6737202a9be9 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 10 Jan 2022 12:13:35 -0800 Subject: [PATCH 076/175] Adds generatorLanguage to all generators (#11268) * Adds generatorLanguage to all generators * Adds all generator languages and info to docs * Docs updated --- docs/generators/ada-server.md | 1 + docs/generators/ada.md | 1 + docs/generators/android.md | 1 + docs/generators/apache2.md | 1 + docs/generators/apex.md | 1 + docs/generators/asciidoc.md | 1 + docs/generators/aspnetcore.md | 1 + docs/generators/avro-schema.md | 1 + docs/generators/bash.md | 1 + docs/generators/c.md | 1 + docs/generators/clojure.md | 1 + docs/generators/cpp-pistache-server.md | 1 + docs/generators/cpp-qt-client.md | 1 + docs/generators/cpp-qt-qhttpengine-server.md | 1 + docs/generators/cpp-restbed-server.md | 1 + docs/generators/cpp-restsdk.md | 1 + docs/generators/cpp-tiny.md | 1 + docs/generators/cpp-tizen.md | 1 + docs/generators/cpp-ue4.md | 1 + docs/generators/crystal.md | 1 + docs/generators/csharp-dotnet2.md | 1 + docs/generators/csharp-nancyfx.md | 1 + docs/generators/csharp-netcore-functions.md | 1 + docs/generators/csharp-netcore.md | 1 + docs/generators/csharp.md | 1 + docs/generators/dart-dio-next.md | 1 + docs/generators/dart-dio.md | 1 + docs/generators/dart-jaguar.md | 1 + docs/generators/dart.md | 1 + docs/generators/eiffel.md | 1 + docs/generators/elixir.md | 1 + docs/generators/elm.md | 1 + docs/generators/erlang-client.md | 1 + docs/generators/erlang-proper.md | 1 + docs/generators/erlang-server.md | 1 + docs/generators/flash-deprecated.md | 1 + docs/generators/fsharp-functions.md | 1 + docs/generators/fsharp-giraffe-server.md | 1 + docs/generators/go-deprecated.md | 1 + docs/generators/go-echo-server.md | 1 + docs/generators/go-gin-server.md | 1 + docs/generators/go-server.md | 1 + docs/generators/go.md | 1 + .../graphql-nodejs-express-server.md | 1 + docs/generators/graphql-schema.md | 1 + docs/generators/groovy.md | 1 + docs/generators/haskell-http-client.md | 1 + docs/generators/haskell-yesod.md | 1 + docs/generators/haskell.md | 1 + docs/generators/java-inflector.md | 1 + docs/generators/java-micronaut-client.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/javascript-apollo.md | 1 + docs/generators/javascript-closure-angular.md | 1 + docs/generators/javascript-flowtyped.md | 1 + docs/generators/javascript.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/jmeter.md | 1 + docs/generators/k6.md | 1 + docs/generators/kotlin-server-deprecated.md | 1 + docs/generators/kotlin-server.md | 1 + docs/generators/kotlin-spring.md | 1 + docs/generators/kotlin-vertx.md | 1 + docs/generators/kotlin.md | 1 + docs/generators/ktorm-schema.md | 1 + docs/generators/lua.md | 1 + docs/generators/mysql-schema.md | 1 + docs/generators/nim.md | 1 + docs/generators/nodejs-express-server.md | 1 + docs/generators/objc.md | 1 + docs/generators/ocaml.md | 1 + docs/generators/perl.md | 1 + docs/generators/php-dt.md | 1 + docs/generators/php-laravel.md | 1 + docs/generators/php-lumen.md | 1 + docs/generators/php-mezzio-ph.md | 1 + docs/generators/php-silex-deprecated.md | 1 + docs/generators/php-slim-deprecated.md | 1 + docs/generators/php-slim4.md | 1 + docs/generators/php-symfony.md | 1 + docs/generators/php.md | 1 + docs/generators/powershell.md | 1 + docs/generators/protobuf-schema.md | 1 + docs/generators/python-aiohttp.md | 1 + docs/generators/python-blueplanet.md | 1 + docs/generators/python-experimental.md | 1 + docs/generators/python-fastapi.md | 1 + docs/generators/python-flask.md | 1 + docs/generators/python-legacy.md | 1 + docs/generators/python.md | 1 + docs/generators/r.md | 1 + docs/generators/ruby-on-rails.md | 1 + docs/generators/ruby-sinatra.md | 1 + docs/generators/ruby.md | 1 + docs/generators/rust-server.md | 1 + docs/generators/rust.md | 1 + docs/generators/scala-akka-http-server.md | 1 + docs/generators/scala-akka.md | 1 + docs/generators/scala-finch.md | 1 + docs/generators/scala-gatling.md | 1 + .../generators/scala-httpclient-deprecated.md | 1 + docs/generators/scala-lagom-server.md | 1 + docs/generators/scala-play-server.md | 1 + docs/generators/scala-sttp.md | 1 + docs/generators/scalatra.md | 1 + docs/generators/scalaz.md | 1 + docs/generators/spring.md | 1 + docs/generators/swift4-deprecated.md | 1 + docs/generators/swift5.md | 1 + docs/generators/typescript-angular.md | 1 + .../typescript-angularjs-deprecated.md | 1 + docs/generators/typescript-aurelia.md | 1 + docs/generators/typescript-axios.md | 1 + docs/generators/typescript-fetch.md | 1 + docs/generators/typescript-inversify.md | 1 + docs/generators/typescript-jquery.md | 1 + docs/generators/typescript-nestjs.md | 1 + docs/generators/typescript-node.md | 1 + docs/generators/typescript-redux-query.md | 1 + docs/generators/typescript-rxjs.md | 1 + docs/generators/typescript.md | 1 + docs/generators/wsdl-schema.md | 1 + .../openapitools/codegen/cmd/ConfigHelp.java | 3 ++ .../openapitools/codegen/CodegenConfig.java | 2 + .../openapitools/codegen/DefaultCodegen.java | 3 ++ .../codegen/GeneratorLanguage.java | 48 +++++++++++++++++++ .../codegen/languages/AbstractAdaCodegen.java | 3 ++ .../languages/AbstractCSharpCodegen.java | 3 ++ .../codegen/languages/AbstractCppCodegen.java | 10 ++-- .../languages/AbstractDartCodegen.java | 3 ++ .../languages/AbstractEiffelCodegen.java | 2 + .../languages/AbstractFSharpCodegen.java | 3 ++ .../codegen/languages/AbstractGoCodegen.java | 3 ++ .../languages/AbstractKotlinCodegen.java | 3 ++ .../codegen/languages/AbstractPhpCodegen.java | 3 ++ .../languages/AbstractPythonCodegen.java | 3 ++ .../languages/AbstractRubyCodegen.java | 4 ++ .../languages/AbstractScalaCodegen.java | 2 + .../AbstractTypeScriptClientCodegen.java | 3 ++ .../codegen/languages/ApexClientCodegen.java | 4 +- .../codegen/languages/BashClientCodegen.java | 2 + .../languages/CLibcurlClientCodegen.java | 3 ++ .../languages/ClojureClientCodegen.java | 3 ++ .../languages/ConfluenceWikiCodegen.java | 3 ++ .../languages/CrystalClientCodegen.java | 3 ++ .../languages/ElixirClientCodegen.java | 3 ++ .../codegen/languages/ElmClientCodegen.java | 3 ++ .../languages/ErlangClientCodegen.java | 3 ++ .../languages/ErlangProperCodegen.java | 3 ++ .../languages/ErlangServerCodegen.java | 3 ++ .../codegen/languages/FlashClientCodegen.java | 3 ++ .../GraphQLNodeJSExpressServerCodegen.java | 3 ++ .../languages/GraphQLSchemaCodegen.java | 8 ++-- .../languages/GroovyClientCodegen.java | 8 ++-- .../languages/HaskellHttpClientCodegen.java | 3 ++ .../languages/HaskellServantCodegen.java | 3 ++ .../languages/HaskellYesodServerCodegen.java | 3 ++ .../JavascriptApolloClientCodegen.java | 3 ++ .../languages/JavascriptClientCodegen.java | 3 ++ ...JavascriptClosureAngularClientCodegen.java | 3 ++ .../JavascriptFlowtypedClientCodegen.java | 2 + .../codegen/languages/K6ClientCodegen.java | 13 ++--- .../codegen/languages/KtormSchemaCodegen.java | 2 + .../codegen/languages/LuaClientCodegen.java | 3 ++ .../MarkdownDocumentationCodegen.java | 10 ++-- .../codegen/languages/MysqlSchemaCodegen.java | 3 ++ .../codegen/languages/NimClientCodegen.java | 3 ++ .../languages/NodeJSExpressServerCodegen.java | 3 ++ .../codegen/languages/OCamlClientCodegen.java | 3 ++ .../codegen/languages/ObjcClientCodegen.java | 2 + .../codegen/languages/OpenAPIGenerator.java | 3 ++ .../languages/OpenAPIYamlGenerator.java | 2 + .../codegen/languages/PerlClientCodegen.java | 3 ++ .../languages/PhpSilexServerCodegen.java | 2 + .../PlantumlDocumentationCodegen.java | 3 ++ .../languages/PowerShellClientCodegen.java | 3 ++ .../languages/ProtobufSchemaCodegen.java | 3 ++ .../codegen/languages/RClientCodegen.java | 2 + .../codegen/languages/RustClientCodegen.java | 3 ++ .../codegen/languages/RustServerCodegen.java | 3 ++ .../languages/ScalaFinchServerCodegen.java | 2 + .../codegen/languages/StaticDocCodegen.java | 3 ++ .../languages/StaticHtml2Generator.java | 3 ++ .../languages/StaticHtmlGenerator.java | 2 + .../codegen/languages/Swift4Codegen.java | 3 ++ .../languages/Swift5ClientCodegen.java | 3 ++ .../languages/TypeScriptClientCodegen.java | 3 ++ .../codegen/languages/WsdlSchemaCodegen.java | 3 ++ 201 files changed, 371 insertions(+), 31 deletions(-) create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/GeneratorLanguage.java diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index ae41a6fb725c..bda2ebc4d610 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -8,6 +8,7 @@ title: Documentation for the ada-server Generator | -------- | ----- | ----- | | generator name | ada-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Ada | | | helpTxt | Generates an Ada server implementation (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/ada.md b/docs/generators/ada.md index ba6a764ac31b..c7fc549290a9 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -8,6 +8,7 @@ title: Documentation for the ada Generator | -------- | ----- | ----- | | generator name | ada | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Ada | | | helpTxt | Generates an Ada client implementation (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/android.md b/docs/generators/android.md index 53bde3fa4861..78336829f034 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -8,6 +8,7 @@ title: Documentation for the android Generator | -------- | ----- | ----- | | generator name | android | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Java | | | helpTxt | Generates an Android client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index c31d64f49863..9f5cfa8ed6ca 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -8,6 +8,7 @@ title: Documentation for the apache2 Generator | -------- | ----- | ----- | | generator name | apache2 | pass this to the generate command after -g | | generator type | CONFIG | | +| generator language | Java | | | helpTxt | Generates an Apache2 Config file with the permissions | | ## CONFIG OPTIONS diff --git a/docs/generators/apex.md b/docs/generators/apex.md index 5610d51d22e0..7fc192390fa8 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -8,6 +8,7 @@ title: Documentation for the apex Generator | -------- | ----- | ----- | | generator name | apex | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Apex | | | helpTxt | Generates an Apex API client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index a3b4795a2c83..815a5eea266b 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -8,6 +8,7 @@ title: Documentation for the asciidoc Generator | -------- | ----- | ----- | | generator name | asciidoc | pass this to the generate command after -g | | generator type | DOCUMENTATION | | +| generator language | Java | | | helpTxt | Generates asciidoc markup based documentation. | | ## CONFIG OPTIONS diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index cebbaf9a870f..f97033ac35a9 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -8,6 +8,7 @@ title: Documentation for the aspnetcore Generator | -------- | ----- | ----- | | generator name | aspnetcore | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | C# | | | helpTxt | Generates an ASP.NET Core Web API server. | | ## CONFIG OPTIONS diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 506aca5d85bd..ce8261b07012 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -8,6 +8,7 @@ title: Documentation for the avro-schema Generator | -------- | ----- | ----- | | generator name | avro-schema | pass this to the generate command after -g | | generator type | SCHEMA | | +| generator language | Java | | | helpTxt | Generates a Avro model (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 524c9534fa57..3356189af73d 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -8,6 +8,7 @@ title: Documentation for the bash Generator | -------- | ----- | ----- | | generator name | bash | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Bash | | | helpTxt | Generates a Bash client script based on cURL. | | ## CONFIG OPTIONS diff --git a/docs/generators/c.md b/docs/generators/c.md index 3eb885a9a118..d7006f36cc99 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -8,6 +8,7 @@ title: Documentation for the c Generator | -------- | ----- | ----- | | generator name | c | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C | | | helpTxt | Generates a C (libcurl) client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 2f5fadc54c98..7cc512620edc 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -8,6 +8,7 @@ title: Documentation for the clojure Generator | -------- | ----- | ----- | | generator name | clojure | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Clojure | | | helpTxt | Generates a Clojure client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index d58a5f17572d..f9c171feeebe 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -8,6 +8,7 @@ title: Documentation for the cpp-pistache-server Generator | -------- | ----- | ----- | | generator name | cpp-pistache-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | C++ | | | helpTxt | Generates a C++ API server (based on Pistache) | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-qt-client.md b/docs/generators/cpp-qt-client.md index 8ad0c33d85cd..f26b827b8d48 100644 --- a/docs/generators/cpp-qt-client.md +++ b/docs/generators/cpp-qt-client.md @@ -8,6 +8,7 @@ title: Documentation for the cpp-qt-client Generator | -------- | ----- | ----- | | generator name | cpp-qt-client | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C++ | | | helpTxt | Generates a Qt C++ client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-qt-qhttpengine-server.md b/docs/generators/cpp-qt-qhttpengine-server.md index 99dbeca87592..42d3f4c7e04b 100644 --- a/docs/generators/cpp-qt-qhttpengine-server.md +++ b/docs/generators/cpp-qt-qhttpengine-server.md @@ -8,6 +8,7 @@ title: Documentation for the cpp-qt-qhttpengine-server Generator | -------- | ----- | ----- | | generator name | cpp-qt-qhttpengine-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | C++ | | | helpTxt | Generates a Qt C++ Server using the QHTTPEngine HTTP Library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index 193e11cc92d8..065ead399b78 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -8,6 +8,7 @@ title: Documentation for the cpp-restbed-server Generator | -------- | ----- | ----- | | generator name | cpp-restbed-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | C++ | | | helpTxt | Generates a C++ API Server with Restbed (https://github.com/Corvusoft/restbed). | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 480178fdf622..fa04e41dcd7e 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -8,6 +8,7 @@ title: Documentation for the cpp-restsdk Generator | -------- | ----- | ----- | | generator name | cpp-restsdk | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C++ | | | helpTxt | Generates a C++ API client with C++ REST SDK (https://github.com/Microsoft/cpprestsdk). | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-tiny.md b/docs/generators/cpp-tiny.md index 006561e38f7e..e669c1ad7c4d 100644 --- a/docs/generators/cpp-tiny.md +++ b/docs/generators/cpp-tiny.md @@ -8,6 +8,7 @@ title: Documentation for the cpp-tiny Generator | -------- | ----- | ----- | | generator name | cpp-tiny | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C++ | | | helpTxt | Generates a C++ Arduino REST API client. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index 4f40b91b7d3b..0528620b7769 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -8,6 +8,7 @@ title: Documentation for the cpp-tizen Generator | -------- | ----- | ----- | | generator name | cpp-tizen | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C++ | | | helpTxt | Generates a Samsung Tizen C++ client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md index a2961af1612e..56eb1c967998 100644 --- a/docs/generators/cpp-ue4.md +++ b/docs/generators/cpp-ue4.md @@ -8,6 +8,7 @@ title: Documentation for the cpp-ue4 Generator | -------- | ----- | ----- | | generator name | cpp-ue4 | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C++ | | | helpTxt | Generates a Unreal Engine 4 C++ Module (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/crystal.md b/docs/generators/crystal.md index eaacb566be94..d44e727ddbb4 100644 --- a/docs/generators/crystal.md +++ b/docs/generators/crystal.md @@ -8,6 +8,7 @@ title: Documentation for the crystal Generator | -------- | ----- | ----- | | generator name | crystal | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Crystal | | | helpTxt | Generates a Crystal client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index b1d47b73ac6d..22fbde9e287c 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -8,6 +8,7 @@ title: Documentation for the csharp-dotnet2 Generator | -------- | ----- | ----- | | generator name | csharp-dotnet2 | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C# | | | helpTxt | Generates a C# .Net 2.0 client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index b8b5928ed630..c20541a52f9a 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -8,6 +8,7 @@ title: Documentation for the csharp-nancyfx Generator | -------- | ----- | ----- | | generator name | csharp-nancyfx | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | C# | | | helpTxt | Generates a C# NancyFX Web API server. | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp-netcore-functions.md b/docs/generators/csharp-netcore-functions.md index 6d8565773173..888ada381288 100644 --- a/docs/generators/csharp-netcore-functions.md +++ b/docs/generators/csharp-netcore-functions.md @@ -8,6 +8,7 @@ title: Documentation for the csharp-netcore-functions Generator | -------- | ----- | ----- | | generator name | csharp-netcore-functions | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | C# | | | helpTxt | Generates a csharp server. | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 33b124200fb6..57d4e3ac2b6d 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -8,6 +8,7 @@ title: Documentation for the csharp-netcore Generator | -------- | ----- | ----- | | generator name | csharp-netcore | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C# | | | helpTxt | Generates a C# client library (.NET Standard, .NET Core). | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index c925eecc8e73..2a61a6fa326a 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -8,6 +8,7 @@ title: Documentation for the csharp Generator | -------- | ----- | ----- | | generator name | csharp | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | C# | | | helpTxt | Generates a CSharp client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index 07b20e71d1a4..157fb47af537 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -8,6 +8,7 @@ title: Documentation for the dart-dio-next Generator | -------- | ----- | ----- | | generator name | dart-dio-next | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Dart | | | helpTxt | Generates a Dart Dio client library with null-safety. | | ## CONFIG OPTIONS diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 77aeaab25381..2ef52cbffe49 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -8,6 +8,7 @@ title: Documentation for the dart-dio Generator | -------- | ----- | ----- | | generator name | dart-dio | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Dart | | | helpTxt | Generates a Dart Dio client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index 1cbdd8bad482..7bae4db6903e 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -8,6 +8,7 @@ title: Documentation for the dart-jaguar Generator | -------- | ----- | ----- | | generator name | dart-jaguar | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Dart | | | helpTxt | Generates a Dart Jaguar client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 7793319b30f1..0193acff4a9c 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -8,6 +8,7 @@ title: Documentation for the dart Generator | -------- | ----- | ----- | | generator name | dart | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Dart | | | helpTxt | Generates a Dart 2.x client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index 151654c6f146..b9406ac1f60e 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -8,6 +8,7 @@ title: Documentation for the eiffel Generator | -------- | ----- | ----- | | generator name | eiffel | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Eiffel | | | helpTxt | Generates a Eiffel client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 2a6d9d93e4ca..744474108487 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -8,6 +8,7 @@ title: Documentation for the elixir Generator | -------- | ----- | ----- | | generator name | elixir | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Elixir | | | helpTxt | Generates an elixir client library (alpha). | | ## CONFIG OPTIONS diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 79ff7df2e322..c26c96f85ebf 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -8,6 +8,7 @@ title: Documentation for the elm Generator | -------- | ----- | ----- | | generator name | elm | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Elm | | | helpTxt | Generates an Elm client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index 3436fc2faadd..afa0291fd211 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -8,6 +8,7 @@ title: Documentation for the erlang-client Generator | -------- | ----- | ----- | | generator name | erlang-client | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Erlang | | | helpTxt | Generates an Erlang client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 0a50ff9c2850..48571920cfd5 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -8,6 +8,7 @@ title: Documentation for the erlang-proper Generator | -------- | ----- | ----- | | generator name | erlang-proper | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Erlang | | | helpTxt | Generates an Erlang library with PropEr generators (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index c6bbba108b45..15a38755f5a9 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -8,6 +8,7 @@ title: Documentation for the erlang-server Generator | -------- | ----- | ----- | | generator name | erlang-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Erlang | | | helpTxt | Generates an Erlang server library (beta) using OpenAPI Generator (https://openapi-generator.tech). By default, it will also generate service classes, which can be disabled with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/flash-deprecated.md b/docs/generators/flash-deprecated.md index b82898633d4a..b5669b0e2ea7 100644 --- a/docs/generators/flash-deprecated.md +++ b/docs/generators/flash-deprecated.md @@ -8,6 +8,7 @@ title: Documentation for the flash-deprecated Generator | -------- | ----- | ----- | | generator name | flash-deprecated | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Flash | | | helpTxt | Generates a Flash (ActionScript) client library (beta). IMPORTANT: this generator has been deprecated in v5.x | | ## CONFIG OPTIONS diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 534dbbc445f5..5d148d8fe2fb 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -8,6 +8,7 @@ title: Documentation for the fsharp-functions Generator | -------- | ----- | ----- | | generator name | fsharp-functions | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | F# | | | helpTxt | Generates a fsharp-functions server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index fe1c0c180b40..176603a31355 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -8,6 +8,7 @@ title: Documentation for the fsharp-giraffe-server Generator | -------- | ----- | ----- | | generator name | fsharp-giraffe-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | F# | | | helpTxt | Generates a F# Giraffe server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/go-deprecated.md b/docs/generators/go-deprecated.md index cb19432610dd..fa44c2c81ad7 100644 --- a/docs/generators/go-deprecated.md +++ b/docs/generators/go-deprecated.md @@ -8,6 +8,7 @@ title: Documentation for the go-deprecated Generator | -------- | ----- | ----- | | generator name | go-deprecated | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Go | | | helpTxt | Generates a Go client library (beta). NOTE: this generator has been deprecated. Please use `go` client generator instead. | | ## CONFIG OPTIONS diff --git a/docs/generators/go-echo-server.md b/docs/generators/go-echo-server.md index 9ad9e61c9526..9f4a8e2e2363 100644 --- a/docs/generators/go-echo-server.md +++ b/docs/generators/go-echo-server.md @@ -8,6 +8,7 @@ title: Documentation for the go-echo-server Generator | -------- | ----- | ----- | | generator name | go-echo-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Go | | | helpTxt | Generates a go-echo server. (Beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 85c1e5efbc4b..86f6b26bdd87 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -8,6 +8,7 @@ title: Documentation for the go-gin-server Generator | -------- | ----- | ----- | | generator name | go-gin-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Go | | | helpTxt | Generates a Go server library with the gin framework using OpenAPI-Generator.By default, it will also generate service classes. | | ## CONFIG OPTIONS diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index f3f0a91da944..310a212a5049 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -8,6 +8,7 @@ title: Documentation for the go-server Generator | -------- | ----- | ----- | | generator name | go-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Go | | | helpTxt | Generates a Go server library using OpenAPI-Generator. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/go.md b/docs/generators/go.md index 1bb81764435b..4a005d47ac0e 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -8,6 +8,7 @@ title: Documentation for the go Generator | -------- | ----- | ----- | | generator name | go | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Go | | | helpTxt | Generates a Go client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index a1f1248d285e..8d323b1b7bcd 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -8,6 +8,7 @@ title: Documentation for the graphql-nodejs-express-server Generator | -------- | ----- | ----- | | generator name | graphql-nodejs-express-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Javascript | | | helpTxt | Generates a GraphQL Node.js Express server (beta) including it's types, queries, mutations, (resolvers) | | ## CONFIG OPTIONS diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index ecdedafb3daa..a5c60cf1a150 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -8,6 +8,7 @@ title: Documentation for the graphql-schema Generator | -------- | ----- | ----- | | generator name | graphql-schema | pass this to the generate command after -g | | generator type | SCHEMA | | +| generator language | GraphQL | | | helpTxt | Generates GraphQL schema files (beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 18c943c28607..a7d42bb7c05c 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -8,6 +8,7 @@ title: Documentation for the groovy Generator | -------- | ----- | ----- | | generator name | groovy | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Groovy | | | helpTxt | Generates a Groovy API client. | | ## CONFIG OPTIONS diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index 4515d4ad850f..8ffbcdb5cfd0 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -8,6 +8,7 @@ title: Documentation for the haskell-http-client Generator | -------- | ----- | ----- | | generator name | haskell-http-client | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Haskell | | | helpTxt | Generates a Haskell http-client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/haskell-yesod.md b/docs/generators/haskell-yesod.md index 7993d7988b2e..3b472c8a28be 100644 --- a/docs/generators/haskell-yesod.md +++ b/docs/generators/haskell-yesod.md @@ -8,6 +8,7 @@ title: Documentation for the haskell-yesod Generator | -------- | ----- | ----- | | generator name | haskell-yesod | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Haskell | | | helpTxt | Generates a haskell-yesod server. | | ## CONFIG OPTIONS diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 28e698254937..b2ebcdaa6996 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -8,6 +8,7 @@ title: Documentation for the haskell Generator | -------- | ----- | ----- | | generator name | haskell | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Haskell | | | helpTxt | Generates a Haskell server and client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 48b4070382e9..d397419112fc 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -8,6 +8,7 @@ title: Documentation for the java-inflector Generator | -------- | ----- | ----- | | generator name | java-inflector | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java Inflector Server application. | | ## CONFIG OPTIONS diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 898f2ee2f334..75c961bcf92d 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -8,6 +8,7 @@ title: Documentation for the java-micronaut-client Generator | -------- | ----- | ----- | | generator name | java-micronaut-client | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Java | | | helpTxt | Generates a Java Micronaut Client. | | ## CONFIG OPTIONS diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index fd0b6ec7c274..7b92e9cad42f 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -8,6 +8,7 @@ title: Documentation for the java-msf4j Generator | -------- | ----- | ----- | | generator name | java-msf4j | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java Micro Service based on WSO2 Microservices Framework for Java (MSF4J) | | ## CONFIG OPTIONS diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 9731d407c37b..18b27e77430a 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -8,6 +8,7 @@ title: Documentation for the java-pkmst Generator | -------- | ----- | ----- | | generator name | java-pkmst | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a PKMST SpringBoot Server application using the SpringFox integration. Also enables EurekaServerClient / Zipkin / Spring-Boot admin | | ## CONFIG OPTIONS diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 8137dc2f7a6f..abc3d0b4239d 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -8,6 +8,7 @@ title: Documentation for the java-play-framework Generator | -------- | ----- | ----- | | generator name | java-play-framework | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java Play Framework Server application. | | ## CONFIG OPTIONS diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 340ae31025b4..b359cf88035c 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -8,6 +8,7 @@ title: Documentation for the java-undertow-server Generator | -------- | ----- | ----- | | generator name | java-undertow-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java Undertow Server application (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 5d4946c67d42..4e599a29d086 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -8,6 +8,7 @@ title: Documentation for the java-vertx-web Generator | -------- | ----- | ----- | | generator name | java-vertx-web | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java Vert.x-Web Server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 82660a9c9eac..96ffc3ee9758 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -8,6 +8,7 @@ title: Documentation for the java-vertx Generator | -------- | ----- | ----- | | generator name | java-vertx | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a java-Vert.X Server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/java.md b/docs/generators/java.md index 90aa5d73f66a..dae11b0a614d 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -8,6 +8,7 @@ title: Documentation for the java Generator | -------- | ----- | ----- | | generator name | java | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Java | | | helpTxt | Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more. | | ## CONFIG OPTIONS diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index 3129864fb331..9d91580aba76 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -8,6 +8,7 @@ title: Documentation for the javascript-apollo Generator | -------- | ----- | ----- | | generator name | javascript-apollo | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Javascript | | | helpTxt | Generates a JavaScript client library (beta) using Apollo RESTDatasource. | | ## CONFIG OPTIONS diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index b9da1dc8f55c..aa2b36502f9d 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -8,6 +8,7 @@ title: Documentation for the javascript-closure-angular Generator | -------- | ----- | ----- | | generator name | javascript-closure-angular | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Javascript | | | helpTxt | Generates a Javascript AngularJS client library (beta) annotated with Google Closure Compiler annotations(https://developers.google.com/closure/compiler/docs/js-for-compiler?hl=en) | | ## CONFIG OPTIONS diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 76b81c5aa822..e404f23e631d 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -8,6 +8,7 @@ title: Documentation for the javascript-flowtyped Generator | -------- | ----- | ----- | | generator name | javascript-flowtyped | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Javascript | | | helpTxt | Generates a Javascript client library (beta) using Flow types and Fetch API. | | ## CONFIG OPTIONS diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 2381c5108f33..ce8123c03b29 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -8,6 +8,7 @@ title: Documentation for the javascript Generator | -------- | ----- | ----- | | generator name | javascript | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Javascript | | | helpTxt | Generates a JavaScript client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 1564b252520f..b4f16bea4c96 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -8,6 +8,7 @@ title: Documentation for the jaxrs-cxf-cdi Generator | -------- | ----- | ----- | | generator name | jaxrs-cxf-cdi | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java JAXRS Server according to JAXRS 2.0 specification, assuming an Apache CXF runtime and a Java EE runtime with CDI enabled. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index b7fcd7f49423..a31c00fe6983 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -8,6 +8,7 @@ title: Documentation for the jaxrs-cxf-client Generator | -------- | ----- | ----- | | generator name | jaxrs-cxf-client | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Java | | | helpTxt | Generates a Java JAXRS Client based on Apache CXF framework. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index c44b15f100bb..40fa6dfde174 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -8,6 +8,7 @@ title: Documentation for the jaxrs-cxf-extended Generator | -------- | ----- | ----- | | generator name | jaxrs-cxf-extended | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Extends jaxrs-cxf with options to generate a functional mock server. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index f3cb09d41762..ed251b835f0c 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -8,6 +8,7 @@ title: Documentation for the jaxrs-cxf Generator | -------- | ----- | ----- | | generator name | jaxrs-cxf | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java JAXRS Server application based on Apache CXF framework. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 086f079c0594..f82ae05541cd 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -8,6 +8,7 @@ title: Documentation for the jaxrs-jersey Generator | -------- | ----- | ----- | | generator name | jaxrs-jersey | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java JAXRS Server application based on Jersey framework. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 3670d584186e..7dff1caf8c7e 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -8,6 +8,7 @@ title: Documentation for the jaxrs-resteasy-eap Generator | -------- | ----- | ----- | | generator name | jaxrs-resteasy-eap | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java JAXRS-Resteasy Server application. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index bf56de2f2359..32fb664d902b 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -8,6 +8,7 @@ title: Documentation for the jaxrs-resteasy Generator | -------- | ----- | ----- | | generator name | jaxrs-resteasy | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java JAXRS-Resteasy Server application. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 84d8b47d5015..91bfa156aea6 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -8,6 +8,7 @@ title: Documentation for the jaxrs-spec Generator | -------- | ----- | ----- | | generator name | jaxrs-spec | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java JAXRS Server according to JAXRS 2.0 specification. | | ## CONFIG OPTIONS diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index e47e7fef1771..426ed04b4ccc 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -8,6 +8,7 @@ title: Documentation for the jmeter Generator | -------- | ----- | ----- | | generator name | jmeter | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Java | | | helpTxt | Generates a JMeter .jmx file. | | ## CONFIG OPTIONS diff --git a/docs/generators/k6.md b/docs/generators/k6.md index a23aec49d2d1..0ab38225e03d 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -8,6 +8,7 @@ title: Documentation for the k6 Generator | -------- | ----- | ----- | | generator name | k6 | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | k6 | | | helpTxt | Generates a k6 script (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin-server-deprecated.md b/docs/generators/kotlin-server-deprecated.md index 79e12009c63b..3c5c6ca448d1 100644 --- a/docs/generators/kotlin-server-deprecated.md +++ b/docs/generators/kotlin-server-deprecated.md @@ -8,6 +8,7 @@ title: Documentation for the kotlin-server-deprecated Generator | -------- | ----- | ----- | | generator name | kotlin-server-deprecated | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Kotlin | | | helpTxt | Generates a Kotlin server (Ktor v1.1.3). IMPORTANT: this generator has been deprecated. Please migrate to `kotlin-server` which supports Ktor v1.5.2+. | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 95dce36a0279..c0a473d9fd81 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -8,6 +8,7 @@ title: Documentation for the kotlin-server Generator | -------- | ----- | ----- | | generator name | kotlin-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Kotlin | | | helpTxt | Generates a Kotlin server. | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index d09124f4a7f2..8363a31d4bf5 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -8,6 +8,7 @@ title: Documentation for the kotlin-spring Generator | -------- | ----- | ----- | | generator name | kotlin-spring | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Kotlin | | | helpTxt | Generates a Kotlin Spring application. | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 174d19f16693..30c0474ca761 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -8,6 +8,7 @@ title: Documentation for the kotlin-vertx Generator | -------- | ----- | ----- | | generator name | kotlin-vertx | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Kotlin | | | helpTxt | Generates a kotlin-vertx server. | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 31f9601161d1..d825664c0c83 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -8,6 +8,7 @@ title: Documentation for the kotlin Generator | -------- | ----- | ----- | | generator name | kotlin | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Kotlin | | | helpTxt | Generates a Kotlin client. | | ## CONFIG OPTIONS diff --git a/docs/generators/ktorm-schema.md b/docs/generators/ktorm-schema.md index 163fce14c156..b301b23a3bce 100644 --- a/docs/generators/ktorm-schema.md +++ b/docs/generators/ktorm-schema.md @@ -8,6 +8,7 @@ title: Documentation for the ktorm-schema Generator | -------- | ----- | ----- | | generator name | ktorm-schema | pass this to the generate command after -g | | generator type | SCHEMA | | +| generator language | Ktorm | | | helpTxt | Generates a kotlin-ktorm schema (beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/lua.md b/docs/generators/lua.md index 3f4e6e34c6c3..a890b08256f6 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -8,6 +8,7 @@ title: Documentation for the lua Generator | -------- | ----- | ----- | | generator name | lua | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Lua | | | helpTxt | Generates a Lua client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 3499563f5a8a..0fa16e993281 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -8,6 +8,7 @@ title: Documentation for the mysql-schema Generator | -------- | ----- | ----- | | generator name | mysql-schema | pass this to the generate command after -g | | generator type | SCHEMA | | +| generator language | Mysql | | | helpTxt | Generates a MySQL schema based on the model or schema defined in the OpenAPI specification (v2, v3). | | ## CONFIG OPTIONS diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 77a6d5e9046d..669b310cd31f 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -8,6 +8,7 @@ title: Documentation for the nim Generator | -------- | ----- | ----- | | generator name | nim | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Nim | | | helpTxt | Generates a nim client (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index f2bca5103347..e530fd1a1b54 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -8,6 +8,7 @@ title: Documentation for the nodejs-express-server Generator | -------- | ----- | ----- | | generator name | nodejs-express-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Javascript | | | helpTxt | Generates a NodeJS Express server (alpha). IMPORTANT: this generator may subject to breaking changes without further notice). | | ## CONFIG OPTIONS diff --git a/docs/generators/objc.md b/docs/generators/objc.md index fa4c1350801e..11e1e4280bc5 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -8,6 +8,7 @@ title: Documentation for the objc Generator | -------- | ----- | ----- | | generator name | objc | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Objective-C | | | helpTxt | Generates an Objective-C client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index a453f1087924..d1a5175be918 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -8,6 +8,7 @@ title: Documentation for the ocaml Generator | -------- | ----- | ----- | | generator name | ocaml | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | OCaml | | | helpTxt | Generates an OCaml client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 5d9c89a3a106..82bb14d553f7 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -8,6 +8,7 @@ title: Documentation for the perl Generator | -------- | ----- | ----- | | generator name | perl | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Perl | | | helpTxt | Generates a Perl client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-dt.md b/docs/generators/php-dt.md index 293940f6ca03..9ee8556dc2b0 100644 --- a/docs/generators/php-dt.md +++ b/docs/generators/php-dt.md @@ -8,6 +8,7 @@ title: Documentation for the php-dt Generator | -------- | ----- | ----- | | generator name | php-dt | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | PHP | | | helpTxt | Generates a PHP client relying on Data Transfer ( https://github.com/Articus/DataTransfer ) and compliant with PSR-7, PSR-11, PSR-17 and PSR-18. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index bd374554c82d..0f4c9b9b43a1 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -8,6 +8,7 @@ title: Documentation for the php-laravel Generator | -------- | ----- | ----- | | generator name | php-laravel | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | PHP | | | helpTxt | Generates a PHP laravel server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 1b91b92fd9a1..44952212bd13 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -8,6 +8,7 @@ title: Documentation for the php-lumen Generator | -------- | ----- | ----- | | generator name | php-lumen | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | PHP | | | helpTxt | Generates a PHP Lumen server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-mezzio-ph.md b/docs/generators/php-mezzio-ph.md index 712683865344..1060eb030ed7 100644 --- a/docs/generators/php-mezzio-ph.md +++ b/docs/generators/php-mezzio-ph.md @@ -8,6 +8,7 @@ title: Documentation for the php-mezzio-ph Generator | -------- | ----- | ----- | | generator name | php-mezzio-ph | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | PHP | | | helpTxt | Generates PHP server stub using Mezzio ( https://docs.mezzio.dev/mezzio/ ) and Path Handler ( https://github.com/Articus/PathHandler ). | | ## CONFIG OPTIONS diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md index e9af8da6621e..df5ed167aecb 100644 --- a/docs/generators/php-silex-deprecated.md +++ b/docs/generators/php-silex-deprecated.md @@ -8,6 +8,7 @@ title: Documentation for the php-silex-deprecated Generator | -------- | ----- | ----- | | generator name | php-silex-deprecated | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | PHP | | | helpTxt | Generates a PHP Silex server library. IMPORTANT NOTE: this generator is no longer actively maintained. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index 5e88e4e684ac..19fb25e9a978 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -8,6 +8,7 @@ title: Documentation for the php-slim-deprecated Generator | -------- | ----- | ----- | | generator name | php-slim-deprecated | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | PHP | | | helpTxt | Generates a PHP Slim Framework server library. IMPORTANT NOTE: this generator (Slim 3.x) is no longer actively maintained so please use 'php-slim4' generator instead. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index ae8676e2d9aa..b021d9140773 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -8,6 +8,7 @@ title: Documentation for the php-slim4 Generator | -------- | ----- | ----- | | generator name | php-slim4 | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | PHP | | | helpTxt | Generates a PHP Slim 4 Framework server library(with Mock server). | | ## CONFIG OPTIONS diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 8ed3be46e390..da7aac53103b 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -8,6 +8,7 @@ title: Documentation for the php-symfony Generator | -------- | ----- | ----- | | generator name | php-symfony | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | PHP | | | helpTxt | Generates a PHP Symfony server bundle. | | ## CONFIG OPTIONS diff --git a/docs/generators/php.md b/docs/generators/php.md index b9a93234cb2a..113eb3247552 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -8,6 +8,7 @@ title: Documentation for the php Generator | -------- | ----- | ----- | | generator name | php | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | PHP | | | helpTxt | Generates a PHP client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index 36d7ba9e54d4..7efbc46ff081 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -8,6 +8,7 @@ title: Documentation for the powershell Generator | -------- | ----- | ----- | | generator name | powershell | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | PowerShell | | | helpTxt | Generates a PowerShell API client (beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index 2f350f1a1b0b..e8f8361bea03 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -8,6 +8,7 @@ title: Documentation for the protobuf-schema Generator | -------- | ----- | ----- | | generator name | protobuf-schema | pass this to the generate command after -g | | generator type | SCHEMA | | +| generator language | Protocol Buffers (Protobuf) | | | helpTxt | Generates gRPC and protocol buffer schema files (beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index fdfdf70f306f..79ee486c1ea8 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -8,6 +8,7 @@ title: Documentation for the python-aiohttp Generator | -------- | ----- | ----- | | generator name | python-aiohttp | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Python | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index f8f6d4f63070..bd5d365f4fba 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -8,6 +8,7 @@ title: Documentation for the python-blueplanet Generator | -------- | ----- | ----- | | generator name | python-blueplanet | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Python | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index e026fdf032a5..49e06706d543 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -8,6 +8,7 @@ title: Documentation for the python-experimental Generator | -------- | ----- | ----- | | generator name | python-experimental | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Python | | | helpTxt | Generates a Python client library

Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | ## CONFIG OPTIONS diff --git a/docs/generators/python-fastapi.md b/docs/generators/python-fastapi.md index bb88a406076c..72a438df3712 100644 --- a/docs/generators/python-fastapi.md +++ b/docs/generators/python-fastapi.md @@ -8,6 +8,7 @@ title: Documentation for the python-fastapi Generator | -------- | ----- | ----- | | generator name | python-fastapi | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Python | | | helpTxt | Generates a Python FastAPI server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index b53c86fded14..084f4723afc6 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -8,6 +8,7 @@ title: Documentation for the python-flask Generator | -------- | ----- | ----- | | generator name | python-flask | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Python | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-legacy.md b/docs/generators/python-legacy.md index 14821d0ae1ce..43d89e0b8447 100644 --- a/docs/generators/python-legacy.md +++ b/docs/generators/python-legacy.md @@ -8,6 +8,7 @@ title: Documentation for the python-legacy Generator | -------- | ----- | ----- | | generator name | python-legacy | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Python | | | helpTxt | Generates a Python client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/python.md b/docs/generators/python.md index 607c71a2604d..3db4f227b07b 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -8,6 +8,7 @@ title: Documentation for the python Generator | -------- | ----- | ----- | | generator name | python | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Python | | | helpTxt | Generates a Python client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/r.md b/docs/generators/r.md index d2ee1ea68367..f2ab5c638328 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -8,6 +8,7 @@ title: Documentation for the r Generator | -------- | ----- | ----- | | generator name | r | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | R | | | helpTxt | Generates a R client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index f0be7a29e133..3473ee666cd7 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -8,6 +8,7 @@ title: Documentation for the ruby-on-rails Generator | -------- | ----- | ----- | | generator name | ruby-on-rails | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Ruby | | | helpTxt | Generates a Ruby on Rails (v5) server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index f58b4b948b1d..981be7d3c327 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -8,6 +8,7 @@ title: Documentation for the ruby-sinatra Generator | -------- | ----- | ----- | | generator name | ruby-sinatra | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Ruby | | | helpTxt | Generates a Ruby Sinatra server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 56c094bbd9f6..126d32b111b7 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -8,6 +8,7 @@ title: Documentation for the ruby Generator | -------- | ----- | ----- | | generator name | ruby | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Ruby | | | helpTxt | Generates a Ruby client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index 7822aa5417c7..b669ac3fae96 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -8,6 +8,7 @@ title: Documentation for the rust-server Generator | -------- | ----- | ----- | | generator name | rust-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Rust | | | helpTxt | Generates a Rust client/server library (beta) using the openapi-generator project. | | ## CONFIG OPTIONS diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 44b63aee0ec1..6637bf69098a 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -8,6 +8,7 @@ title: Documentation for the rust Generator | -------- | ----- | ----- | | generator name | rust | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Rust | | | helpTxt | Generates a Rust client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md index 9c35ef92e7db..33fa8817eb8d 100644 --- a/docs/generators/scala-akka-http-server.md +++ b/docs/generators/scala-akka-http-server.md @@ -8,6 +8,7 @@ title: Documentation for the scala-akka-http-server Generator | -------- | ----- | ----- | | generator name | scala-akka-http-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Scala | | | helpTxt | Generates a scala-akka-http server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index cf8b6909aca5..9612a78014a3 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -8,6 +8,7 @@ title: Documentation for the scala-akka Generator | -------- | ----- | ----- | | generator name | scala-akka | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Scala | | | helpTxt | Generates a Scala client library (beta) base on Akka/Spray. | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 9796e5d50fda..02ebc385796f 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -8,6 +8,7 @@ title: Documentation for the scala-finch Generator | -------- | ----- | ----- | | generator name | scala-finch | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Scala | | | helpTxt | Generates a Scala server application with Finch. | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 19cd4528952a..fc111db20025 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -8,6 +8,7 @@ title: Documentation for the scala-gatling Generator | -------- | ----- | ----- | | generator name | scala-gatling | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Scala | | | helpTxt | Generates a gatling simulation library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index af714b42ed2d..6760f78c7760 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -8,6 +8,7 @@ title: Documentation for the scala-httpclient-deprecated Generator | -------- | ----- | ----- | | generator name | scala-httpclient-deprecated | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Scala | | | helpTxt | Generates a Scala client library (beta). IMPORTANT: This generator is no longer actively maintained and will be deprecated. PLease use 'scala-akka' generator instead. | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index aba88bb57ee4..aae66c6de02a 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -8,6 +8,7 @@ title: Documentation for the scala-lagom-server Generator | -------- | ----- | ----- | | generator name | scala-lagom-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Scala | | | helpTxt | Generates a Lagom API server (Beta) in scala | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index 845b9a233b83..ebe594a10a95 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -8,6 +8,7 @@ title: Documentation for the scala-play-server Generator | -------- | ----- | ----- | | generator name | scala-play-server | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Scala | | | helpTxt | Generates a Scala server application (beta) with Play Framework. | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 1befd28b70e7..7bd25ecef960 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -8,6 +8,7 @@ title: Documentation for the scala-sttp Generator | -------- | ----- | ----- | | generator name | scala-sttp | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Scala | | | helpTxt | Generates a Scala client library (beta) based on Sttp. | | ## CONFIG OPTIONS diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 56bef75b6cc8..3e52e8e9f9ab 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -8,6 +8,7 @@ title: Documentation for the scalatra Generator | -------- | ----- | ----- | | generator name | scalatra | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Scala | | | helpTxt | Generates a Scala server application with Scalatra. | | ## CONFIG OPTIONS diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index 7c356c9f8e28..077d1d3d14fb 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -8,6 +8,7 @@ title: Documentation for the scalaz Generator | -------- | ----- | ----- | | generator name | scalaz | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Scala | | | helpTxt | Generates a Scalaz client library (beta) that uses http4s | | ## CONFIG OPTIONS diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 7623c432a75d..8dee03a692ae 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -8,6 +8,7 @@ title: Documentation for the spring Generator | -------- | ----- | ----- | | generator name | spring | pass this to the generate command after -g | | generator type | SERVER | | +| generator language | Java | | | helpTxt | Generates a Java SpringBoot Server application using the SpringFox integration. | | ## CONFIG OPTIONS diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index 7743ddf5a456..26c3dbaf030d 100644 --- a/docs/generators/swift4-deprecated.md +++ b/docs/generators/swift4-deprecated.md @@ -8,6 +8,7 @@ title: Documentation for the swift4-deprecated Generator | -------- | ----- | ----- | | generator name | swift4-deprecated | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Swift | | | helpTxt | Generates a Swift 4.x client library (Deprecated and will be removed in 5.x releases. Please use `swift5` instead.) | | ## CONFIG OPTIONS diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index cb5ea31e1241..2d9b0128973f 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -8,6 +8,7 @@ title: Documentation for the swift5 Generator | -------- | ----- | ----- | | generator name | swift5 | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Swift | | | helpTxt | Generates a Swift 5.x client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index accefab18e0c..112ec3f54da9 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-angular Generator | -------- | ----- | ----- | | generator name | typescript-angular | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript Angular (6.x - 13.x) client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-angularjs-deprecated.md b/docs/generators/typescript-angularjs-deprecated.md index bcacd72ecb8b..4490fc90ba64 100644 --- a/docs/generators/typescript-angularjs-deprecated.md +++ b/docs/generators/typescript-angularjs-deprecated.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-angularjs-deprecated Generator | -------- | ----- | ----- | | generator name | typescript-angularjs-deprecated | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript AngularJS client library. This generator has been deprecated and will be removed in the future release. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 0632ee05eb02..6c2b5d91f999 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-aurelia Generator | -------- | ----- | ----- | | generator name | typescript-aurelia | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript client library for the Aurelia framework (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 00bd32f95352..244b5471e3d9 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-axios Generator | -------- | ----- | ----- | | generator name | typescript-axios | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript client library using axios. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index b272b0bb2bf7..104a33cf7453 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-fetch Generator | -------- | ----- | ----- | | generator name | typescript-fetch | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript client library using Fetch API (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 5834880e4a40..ceca00588a32 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-inversify Generator | -------- | ----- | ----- | | generator name | typescript-inversify | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates Typescript services using Inversify IOC | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index e9469f20589f..7f89c8e326d7 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-jquery Generator | -------- | ----- | ----- | | generator name | typescript-jquery | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript jquery client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-nestjs.md b/docs/generators/typescript-nestjs.md index 0619d801227d..f6cd75a328c5 100644 --- a/docs/generators/typescript-nestjs.md +++ b/docs/generators/typescript-nestjs.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-nestjs Generator | -------- | ----- | ----- | | generator name | typescript-nestjs | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript Nestjs 6.x client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index b2afd57352d7..03c988d6f259 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-node Generator | -------- | ----- | ----- | | generator name | typescript-node | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript NodeJS client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 022f22d8c5e7..85fc2a548c77 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-redux-query Generator | -------- | ----- | ----- | | generator name | typescript-redux-query | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript client library using redux-query API (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 52ed0e12ef0f..06ef6aa84b77 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -8,6 +8,7 @@ title: Documentation for the typescript-rxjs Generator | -------- | ----- | ----- | | generator name | typescript-rxjs | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript client library using Rxjs API. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript.md b/docs/generators/typescript.md index 3aae708a3bda..8659b4fbf96f 100644 --- a/docs/generators/typescript.md +++ b/docs/generators/typescript.md @@ -8,6 +8,7 @@ title: Documentation for the typescript Generator | -------- | ----- | ----- | | generator name | typescript | pass this to the generate command after -g | | generator type | CLIENT | | +| generator language | Typescript | | | helpTxt | Generates a TypeScript client library using Fetch API (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md index 47c95920be5a..131d78b443b8 100644 --- a/docs/generators/wsdl-schema.md +++ b/docs/generators/wsdl-schema.md @@ -8,6 +8,7 @@ title: Documentation for the wsdl-schema Generator | -------- | ----- | ----- | | generator name | wsdl-schema | pass this to the generate command after -g | | generator type | SCHEMA | | +| generator language | Web Services Description Language (WSDL) | | | helpTxt | Generates WSDL files. | | ## CONFIG OPTIONS diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index 3c61526cddc3..35e16eaf0e3d 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -304,6 +304,9 @@ private void generateMdMetadata(StringBuilder sb, CodegenConfig config) { sb.append("| -------- | ----- | ----- |").append(newline); sb.append("| generator name | "+config.getName()+" | pass this to the generate command after -g |").append(newline); sb.append("| generator type | "+config.getTag()+" | |").append(newline); + if (config.generatorLanguage() != null) { + sb.append("| generator language | "+config.generatorLanguage().toString()+" | |").append(newline); + } sb.append("| helpTxt | "+config.getHelp()+" | |").append(newline); sb.append(newline); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 17b9b978259f..7e6bc07dede9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -306,4 +306,6 @@ public interface CodegenConfig { Schema unaliasSchema(Schema schema, Map usedImportMappings); public String defaultTemplatingEngine(); + + public GeneratorLanguage generatorLanguage(); } 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 1a9d09441c02..1744cb317366 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 @@ -7361,4 +7361,7 @@ private List getComposedProperties(List xOfCollection, public String defaultTemplatingEngine() { return "mustache"; } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVA; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/GeneratorLanguage.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/GeneratorLanguage.java new file mode 100644 index 000000000000..b72483502539 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/GeneratorLanguage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen; + +public enum GeneratorLanguage { + /* + Not defined because they use the default Java language: + Android + + Note: all documentation generators have generatorLanguage set to null + */ + JAVA("Java"), ADA("Ada"), APEX("Apex"), BASH("Bash"), C("C"), + CLOJURE("Clojure"), C_PLUS_PLUS("C++"), CRYSTAL("Crystal"), C_SHARP("C#"), + DART("Dart"), EIFFEL("Eiffel"), ELIXIR("Elixir"), ELM("Elm"), + ERLANG("Erlang"), FLASH("Flash"), F_SHARP("F#"), GO("Go"), + JAVASCRIPT("Javascript"), GRAPH_QL("GraphQL"), GROOVY("Groovy"), + HASKELL("Haskell"), TYPESCRIPT("Typescript"), K_SIX("k6"), KOTLIN("Kotlin"), + KTORM("Ktorm"), LUA("Lua"), MYSQL("Mysql"), NIM("Nim"), + OBJECTIVE_C("Objective-C"), OCAML("OCaml"), PERL("Perl"), PHP("PHP"), + POWERSHELL("PowerShell"), PROTOBUF("Protocol Buffers (Protobuf)"), PYTHON("Python"), + R("R"), RUBY("Ruby"), RUST("Rust"), SCALA("Scala"), SWIFT("Swift"), + WSDL("Web Services Description Language (WSDL)"); + + private final String label; + + private GeneratorLanguage(String label) { + this.label = label; + } + + @Override + public String toString() { + return this.label; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java index 9670576e7dba..2473ebd97d1d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java @@ -820,4 +820,7 @@ private List postProcessAuthMethod(List authMe } return result; } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.ADA; } } 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 a42ee2dadabd..a294a59fb04f 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 @@ -1341,4 +1341,7 @@ public void postProcessFile(File file, String fileType) { } } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.C_SHARP; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java index 982980afbc84..fc4e37066f86 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java @@ -25,14 +25,9 @@ import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.servers.ServerVariables; import io.swagger.v3.oas.models.servers.ServerVariable; -import org.openapitools.codegen.CodegenServer; -import org.openapitools.codegen.CodegenServerVariable; +import org.openapitools.codegen.*; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.CodegenConfig; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.templating.mustache.IndentedLambda; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; @@ -439,4 +434,7 @@ private void addForwardDeclarations(CodegenModel parentModel, Map getTypesFromSchemas(List schemas) { return schemaType; }).distinct().collect(Collectors.toList()); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.TYPESCRIPT; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index 4c56b3c0eefb..f8d43504d27f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java @@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.GeneratorLanguage; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -326,5 +327,6 @@ private void generateSfdxSupportingFiles() { } - + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.APEX; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index 5ca5fbb156be..5cc50db1415a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -828,4 +828,6 @@ public String toOperationId(String operationId) { return camelize(sanitizeName(operationId), true); } + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.BASH; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index 788639ab1d77..e7aa24c603de 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -920,4 +920,7 @@ public void postProcess() { System.out.println("# > Niklas Werner - https://paypal.me/wernerdevelopment #"); System.out.println("################################################################################"); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.C; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java index df4a237bd85f..8527aba03f64 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java @@ -382,4 +382,7 @@ public String escapeUnsafeCharacters(String input) { // ref: https://clojurebridge.github.io/community-docs/docs/clojure/comment/ return input.replace("(comment", "(_comment"); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.CLOJURE; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java index edb5f81cd0d3..20c3fb253737 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java @@ -150,4 +150,7 @@ public String escapeText(String input) { // chomp tailing newline because it breaks the tables and keep all other sign to show documentation properly return StringUtils.chomp(input); } + + @Override + public GeneratorLanguage generatorLanguage() { return null; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java index 21b18e18154b..d4c83e5d5f01 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java @@ -898,4 +898,7 @@ public void postProcessFile(File file, String fileType) { } } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.CRYSTAL; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index 62c9d6dcc5f5..e3291df86114 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -915,4 +915,7 @@ public String escapeUnsafeCharacters(String input) { public void setModuleName(String moduleName) { this.moduleName = moduleName; } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.ELIXIR; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index 20b2ac0c944b..78241218e217 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -465,4 +465,7 @@ public void execute(final Template.Fragment fragment, final Writer writer) throw writer.write(fragment.execute().replaceAll("\\s+", "")); } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.ELM; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java index 541456a824e3..3ba5232be169 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java @@ -479,4 +479,7 @@ public void setReplacedPathName(String replacedPathName) { public String addRegularExpressionDelimiter(String pattern) { return pattern; } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.ERLANG; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java index aec986641490..e065ca217eea 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java @@ -573,4 +573,7 @@ public void setReplacedPathName(String replacedPathName) { public String addRegularExpressionDelimiter(String pattern) { return pattern; } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.ERLANG; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java index 0c9fc2dcc19f..05e488e5354a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java @@ -330,4 +330,7 @@ public String escapeUnsafeCharacters(String input) { public String addRegularExpressionDelimiter(String pattern) { return pattern; } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.ERLANG; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java index 2dfcbfcafbe8..2b89404ce7d2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java @@ -410,4 +410,7 @@ public String escapeQuotationMark(String input) { public String escapeUnsafeCharacters(String input) { return input.replace("*/", "*_/").replace("/*", "/_*"); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.FLASH; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java index edfe46026a27..fc68c05827a9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java @@ -166,4 +166,7 @@ public String toEnumName(CodegenProperty property) { return StringUtils.capitalize(enumName) + "Enum"; } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVASCRIPT; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java index 9835ee9d0e52..5215b9d3bed0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java @@ -16,10 +16,7 @@ package org.openapitools.codegen.languages; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.CodegenConfig; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -102,4 +99,7 @@ public void processOpts() { //supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")) //supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml")); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.GRAPH_QL; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java index 77844538e473..c12ce8393750 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java @@ -24,10 +24,7 @@ import java.util.List; import java.util.Map; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.CodegenType; -import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.ClientModificationFeature; import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.meta.features.GlobalFeature; @@ -157,4 +154,7 @@ public String escapeQuotationMark(String input) { public String escapeUnsafeCharacters(String input) { return input.replace("*/", "*_/").replace("/*", "/_*"); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.GROOVY; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 645069903b8e..3f7845bfa7c3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -1473,4 +1473,7 @@ public void postProcessFile(File file, String fileType) { static boolean ContainsJsonMimeType(String mime) { return mime != null && CONTAINS_JSON_MIME_PATTERN.matcher(mime).matches(); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.HASKELL; } } 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 9b44c0b2d680..477df4715077 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 @@ -701,4 +701,7 @@ public void postProcessFile(File file, String fileType) { } } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.HASKELL; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellYesodServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellYesodServerCodegen.java index 736b9d599b11..d30093ce7c93 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellYesodServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellYesodServerCodegen.java @@ -630,4 +630,7 @@ public void postProcessFile(File file, String fileType) { } } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.HASKELL; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 32b601491d37..276494953463 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -1143,4 +1143,7 @@ public void postProcessFile(File file, String fileType) { } } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVASCRIPT; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 4e9ddd2a007a..1f8f973e029c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -1240,4 +1240,7 @@ protected String getCollectionFormat(CodegenParameter codegenParameter) { } return super.getCollectionFormat(codegenParameter); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVASCRIPT; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java index edc3c21e4d5f..8744934020a6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java @@ -319,4 +319,7 @@ public String escapeUnsafeCharacters(String input) { public void setUseEs6(boolean useEs6) { this.useEs6 = useEs6; } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVASCRIPT; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index c82f5e1c68e4..cf344c8281c2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -223,4 +223,6 @@ public void setNpmRepository(String npmRepository) { this.npmRepository = npmRepository; } + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVASCRIPT; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java index 982a3fefbe03..05a9d1536d4d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/K6ClientCodegen.java @@ -46,16 +46,7 @@ import com.google.common.collect.ImmutableMap; import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.CodegenConfig; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.CodegenParameter; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.CodegenResponse; -import org.openapitools.codegen.CodegenType; -import org.openapitools.codegen.DefaultCodegen; -import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.utils.ModelUtils; @@ -1155,4 +1146,6 @@ private void initializeDataExtractSubstituteParameters( } } + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.K_SIX; } } 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 876a1b3b479e..d69af302d54e 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 @@ -1224,4 +1224,6 @@ public String toSrcPath(String packageName) { return StringUtils.removeEnd(packagePath, File.separator); } + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.KTORM; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index 795b829036a1..84af5454e0d6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -594,4 +594,7 @@ public void postProcess() { System.out.println("# Pls support his work directly via https://github.com/sponsors/daurnimator \uD83D\uDE4F #"); System.out.println("################################################################################"); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.LUA; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MarkdownDocumentationCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MarkdownDocumentationCodegen.java index 3a3e081f7b81..0e4ad861cb38 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MarkdownDocumentationCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MarkdownDocumentationCodegen.java @@ -1,11 +1,6 @@ package org.openapitools.codegen.languages; -import org.openapitools.codegen.CodegenConfig; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.CodegenType; -import org.openapitools.codegen.DefaultCodegen; -import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.slf4j.Logger; @@ -112,4 +107,7 @@ public String toModelName(final String name) { public String toModelFilename(String name) { return name; } + + @Override + public GeneratorLanguage generatorLanguage() { return null; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java index 97748d8d6db0..d1f958971358 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java @@ -1254,4 +1254,7 @@ public String toSrcPath(String packageName) { // Trim trailing file separators from the overall path return StringUtils.removeEnd(packagePath, File.separator); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.MYSQL; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java index 572cbacc66f8..4db55bcb17e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java @@ -368,4 +368,7 @@ public String toEnumVarName(String name, String datatype) { return name; } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.NIM; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java index 3af6d99b96ff..774df093e1d0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java @@ -455,4 +455,7 @@ public void postProcessFile(File file, String fileType) { } } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVASCRIPT; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index 3b62750ae02d..c9319b48ea43 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -828,4 +828,7 @@ public void postProcessFile(File file, String fileType) { } } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.OCAML; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index 0075bcb8a575..5667e3e29189 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -791,4 +791,6 @@ public String escapeUnsafeCharacters(String input) { return input.replace("*/", "*_/").replace("/*", "/_*"); } + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.OBJECTIVE_C; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java index ccd3ff685d61..8e65252b1a30 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java @@ -106,4 +106,7 @@ public String escapeUnsafeCharacters(String input) { // just return the original string return input; } + + @Override + public GeneratorLanguage generatorLanguage() { return null; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java index d697fe54fa1d..d60fa609d39c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java @@ -120,4 +120,6 @@ public String escapeUnsafeCharacters(String input) { return input; } + @Override + public GeneratorLanguage generatorLanguage() { return null; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index 2a4a8d1905ff..2f48cbc9b90a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -643,4 +643,7 @@ public void postProcess() { System.out.println("# - OpenAPI Generator for Perl Developers https://bit.ly/2OId6p3 #"); System.out.println("################################################################################"); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.PERL; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java index a6efee11fb18..212459d8d340 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java @@ -281,4 +281,6 @@ public Map postProcessOperationsWithModels(Map o return objs; } + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.PHP; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java index ad63034acbe6..8df3f2a3c4d2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java @@ -215,4 +215,7 @@ public String escapeUnsafeCharacters(String input) { // to suppress the warning message return input; } + + @Override + public GeneratorLanguage generatorLanguage() { return null; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java index c7d4028d84a0..fee739c2c820 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java @@ -1538,4 +1538,7 @@ public void postProcess() { System.out.println("# - OpenAPI Generator for PowerShell Developers https://bit.ly/3qBWfRJ #"); System.out.println("################################################################################"); } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.POWERSHELL; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java index 777f6fc51690..769d143091d3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java @@ -603,4 +603,7 @@ private boolean parentVarsContainsVar(List parentVars, CodegenP } return containsVar; } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.PROTOBUF; } } 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 b24d527646af..99294b06a150 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 @@ -796,4 +796,6 @@ public void postProcess() { System.out.println("################################################################################"); } + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.R; } } 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 265a9afc2080..5e8e5ac03080 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 @@ -690,4 +690,7 @@ public String toDefaultValue(Schema p) { return null; } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.RUST; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index 328e18387ead..e4eb0dc9d79d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -1742,4 +1742,7 @@ protected void updatePropertyForAnyType(CodegenProperty property, Schema p) { updatePropertyForMap(property, p); } } + + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.RUST; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java index 146ddf06ccf5..7aa5bfcce978 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java @@ -484,4 +484,6 @@ public void postProcess() { System.out.println("################################################################################"); } + @Override + public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.SCALA; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java index ce43779dfd74..7e2073888521 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java @@ -129,4 +129,7 @@ public String escapeUnsafeCharacters(String input) { // just return the original string return input; } + + @Override + public GeneratorLanguage generatorLanguage() { return null; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index 523c7de0d094..a6a2c81328f0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -286,4 +286,7 @@ public String escapeUnsafeCharacters(String input) { // just return the original string return input; } + + @Override + public GeneratorLanguage generatorLanguage() { return null; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java index 910528d74989..b3a34018238d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java @@ -229,4 +229,6 @@ public void postProcessModelProperty(CodegenModel model, property.unescapedDescription); } + @Override + public GeneratorLanguage generatorLanguage() { return null; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 0762835b4a58..5adc13172bf7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -1091,4 +1091,7 @@ public String constructExampleCode(CodegenModel codegenModel, HashMap Date: Mon, 10 Jan 2022 18:16:53 -0800 Subject: [PATCH 077/175] Improves generator docs: stability + language version added (#11270) * Adds generatorLanguageVersion and uses it in python generators * Regenerates docs * Adds stability to generator docs * Triple braces generatorLanguageVersion * Regenerates samples * Fixes the python-experimental setup.py file so it works with generatorLanguageVersion * Updates generators readme --- docs/generators.md | 2 +- docs/generators/ada-server.md | 1 + docs/generators/ada.md | 1 + docs/generators/android.md | 1 + docs/generators/apache2.md | 1 + docs/generators/apex.md | 1 + docs/generators/asciidoc.md | 1 + docs/generators/aspnetcore.md | 1 + docs/generators/avro-schema.md | 1 + docs/generators/bash.md | 1 + docs/generators/c.md | 1 + docs/generators/clojure.md | 1 + docs/generators/cpp-pistache-server.md | 1 + docs/generators/cpp-qt-client.md | 1 + docs/generators/cpp-qt-qhttpengine-server.md | 1 + docs/generators/cpp-restbed-server.md | 1 + docs/generators/cpp-restsdk.md | 1 + docs/generators/cpp-tiny.md | 1 + docs/generators/cpp-tizen.md | 1 + docs/generators/cpp-ue4.md | 1 + docs/generators/crystal.md | 1 + docs/generators/csharp-dotnet2.md | 1 + docs/generators/csharp-nancyfx.md | 1 + docs/generators/csharp-netcore-functions.md | 1 + docs/generators/csharp-netcore.md | 1 + docs/generators/csharp.md | 1 + docs/generators/cwiki.md | 1 + docs/generators/dart-dio-next.md | 1 + docs/generators/dart-dio.md | 1 + docs/generators/dart-jaguar.md | 1 + docs/generators/dart.md | 1 + docs/generators/dynamic-html.md | 1 + docs/generators/eiffel.md | 1 + docs/generators/elixir.md | 1 + docs/generators/elm.md | 1 + docs/generators/erlang-client.md | 1 + docs/generators/erlang-proper.md | 1 + docs/generators/erlang-server.md | 1 + docs/generators/flash-deprecated.md | 1 + docs/generators/fsharp-functions.md | 1 + docs/generators/fsharp-giraffe-server.md | 1 + docs/generators/go-deprecated.md | 1 + docs/generators/go-echo-server.md | 1 + docs/generators/go-gin-server.md | 1 + docs/generators/go-server.md | 1 + docs/generators/go.md | 1 + docs/generators/graphql-nodejs-express-server.md | 1 + docs/generators/graphql-schema.md | 1 + docs/generators/groovy.md | 1 + docs/generators/haskell-http-client.md | 1 + docs/generators/haskell-yesod.md | 1 + docs/generators/haskell.md | 1 + docs/generators/html.md | 1 + docs/generators/html2.md | 1 + docs/generators/java-inflector.md | 1 + docs/generators/java-micronaut-client.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/javascript-apollo.md | 1 + docs/generators/javascript-closure-angular.md | 1 + docs/generators/javascript-flowtyped.md | 1 + docs/generators/javascript.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/jmeter.md | 1 + docs/generators/k6.md | 1 + docs/generators/kotlin-server-deprecated.md | 1 + docs/generators/kotlin-server.md | 1 + docs/generators/kotlin-spring.md | 1 + docs/generators/kotlin-vertx.md | 1 + docs/generators/kotlin.md | 1 + docs/generators/ktorm-schema.md | 1 + docs/generators/lua.md | 1 + docs/generators/markdown.md | 1 + docs/generators/mysql-schema.md | 1 + docs/generators/nim.md | 1 + docs/generators/nodejs-express-server.md | 1 + docs/generators/objc.md | 1 + docs/generators/ocaml.md | 1 + docs/generators/openapi-yaml.md | 1 + docs/generators/openapi.md | 1 + docs/generators/perl.md | 1 + docs/generators/php-dt.md | 1 + docs/generators/php-laravel.md | 1 + docs/generators/php-lumen.md | 1 + docs/generators/php-mezzio-ph.md | 1 + docs/generators/php-silex-deprecated.md | 1 + docs/generators/php-slim-deprecated.md | 1 + docs/generators/php-slim4.md | 1 + docs/generators/php-symfony.md | 1 + docs/generators/php.md | 1 + docs/generators/plantuml.md | 1 + docs/generators/powershell.md | 1 + docs/generators/protobuf-schema.md | 1 + docs/generators/python-aiohttp.md | 2 ++ docs/generators/python-blueplanet.md | 2 ++ docs/generators/python-experimental.md | 2 ++ docs/generators/python-fastapi.md | 4 +++- docs/generators/python-flask.md | 2 ++ docs/generators/python-legacy.md | 2 ++ docs/generators/python.md | 2 ++ docs/generators/r.md | 1 + docs/generators/ruby-on-rails.md | 1 + docs/generators/ruby-sinatra.md | 1 + docs/generators/ruby.md | 1 + docs/generators/rust-server.md | 1 + docs/generators/rust.md | 1 + docs/generators/scala-akka-http-server.md | 1 + docs/generators/scala-akka.md | 1 + docs/generators/scala-finch.md | 1 + docs/generators/scala-gatling.md | 1 + docs/generators/scala-httpclient-deprecated.md | 1 + docs/generators/scala-lagom-server.md | 1 + docs/generators/scala-play-server.md | 1 + docs/generators/scala-sttp.md | 1 + docs/generators/scalatra.md | 1 + docs/generators/scalaz.md | 1 + docs/generators/spring.md | 1 + docs/generators/swift4-deprecated.md | 1 + docs/generators/swift5.md | 1 + docs/generators/typescript-angular.md | 1 + docs/generators/typescript-angularjs-deprecated.md | 1 + docs/generators/typescript-aurelia.md | 1 + docs/generators/typescript-axios.md | 1 + docs/generators/typescript-fetch.md | 1 + docs/generators/typescript-inversify.md | 1 + docs/generators/typescript-jquery.md | 1 + docs/generators/typescript-nestjs.md | 1 + docs/generators/typescript-node.md | 1 + docs/generators/typescript-redux-query.md | 1 + docs/generators/typescript-rxjs.md | 1 + docs/generators/typescript.md | 1 + docs/generators/wsdl-schema.md | 1 + .../main/java/org/openapitools/codegen/cmd/ConfigHelp.java | 4 ++++ .../main/java/org/openapitools/codegen/CodegenConfig.java | 6 ++++++ .../main/java/org/openapitools/codegen/DefaultCodegen.java | 3 +++ .../java/org/openapitools/codegen/DefaultGenerator.java | 1 + .../languages/PythonAiohttpConnexionServerCodegen.java | 3 +++ .../codegen/languages/PythonBluePlanetServerCodegen.java | 2 ++ .../openapitools/codegen/languages/PythonClientCodegen.java | 5 ++++- .../codegen/languages/PythonExperimentalClientCodegen.java | 3 +++ .../codegen/languages/PythonFastAPIServerCodegen.java | 5 ++++- .../languages/PythonFlaskConnexionServerCodegen.java | 3 +++ .../codegen/languages/PythonLegacyClientCodegen.java | 4 +++- .../src/main/resources/python-aiohttp/README.mustache | 2 +- .../main/resources/python-experimental/README.handlebars | 2 +- .../python-experimental/README_onlypackage.handlebars | 2 +- .../src/main/resources/python-experimental/setup.handlebars | 2 +- .../src/main/resources/python-fastapi/Dockerfile.mustache | 6 +++--- .../src/main/resources/python-fastapi/README.mustache | 2 +- .../src/main/resources/python-fastapi/setup_cfg.mustache | 4 ++-- .../src/main/resources/python-legacy/README.mustache | 2 +- .../resources/python-legacy/README_onlypackage.mustache | 2 +- .../src/main/resources/python/README.mustache | 2 +- .../src/main/resources/python/README_onlypackage.mustache | 2 +- .../src/main/resources/python/setup.mustache | 2 +- samples/client/petstore/python/README.md | 2 +- .../README.md | 2 +- .../client/extensions/x-auth-id-alias/python/README.md | 2 +- .../client/features/dynamic-servers/python/README.md | 2 +- .../openapi3/client/petstore/python-experimental/README.md | 2 +- samples/openapi3/client/petstore/python/README.md | 2 +- 173 files changed, 209 insertions(+), 26 deletions(-) diff --git a/docs/generators.md b/docs/generators.md index 2d8876879115..5bd6cadfa005 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -53,7 +53,7 @@ The following generators are available: * [php](generators/php.md) * [php-dt (beta)](generators/php-dt.md) * [powershell (beta)](generators/powershell.md) -* [python (experimental)](generators/python.md) +* [python](generators/python.md) * [python-experimental (experimental)](generators/python-experimental.md) * [python-legacy](generators/python-legacy.md) * [r](generators/r.md) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index bda2ebc4d610..4dcede68c0d5 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -7,6 +7,7 @@ title: Documentation for the ada-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | ada-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Ada | | | helpTxt | Generates an Ada server implementation (beta). | | diff --git a/docs/generators/ada.md b/docs/generators/ada.md index c7fc549290a9..12fd0187cfa2 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -7,6 +7,7 @@ title: Documentation for the ada Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | ada | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Ada | | | helpTxt | Generates an Ada client implementation (beta). | | diff --git a/docs/generators/android.md b/docs/generators/android.md index 78336829f034..36a0bc0406db 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -7,6 +7,7 @@ title: Documentation for the android Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | android | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Java | | | helpTxt | Generates an Android client library. | | diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 9f5cfa8ed6ca..5b8e5d4e4565 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -7,6 +7,7 @@ title: Documentation for the apache2 Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | apache2 | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CONFIG | | | generator language | Java | | | helpTxt | Generates an Apache2 Config file with the permissions | | diff --git a/docs/generators/apex.md b/docs/generators/apex.md index 7fc192390fa8..2c815c449601 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -7,6 +7,7 @@ title: Documentation for the apex Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | apex | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Apex | | | helpTxt | Generates an Apex API client library. | | diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index 815a5eea266b..b966cd6e179f 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -7,6 +7,7 @@ title: Documentation for the asciidoc Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | asciidoc | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | DOCUMENTATION | | | generator language | Java | | | helpTxt | Generates asciidoc markup based documentation. | | diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index f97033ac35a9..1488ec9672fd 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -7,6 +7,7 @@ title: Documentation for the aspnetcore Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | aspnetcore | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | C# | | | helpTxt | Generates an ASP.NET Core Web API server. | | diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index ce8261b07012..d8929e448ea3 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -7,6 +7,7 @@ title: Documentation for the avro-schema Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | avro-schema | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SCHEMA | | | generator language | Java | | | helpTxt | Generates a Avro model (beta). | | diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 3356189af73d..d7053aaa12ca 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -7,6 +7,7 @@ title: Documentation for the bash Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | bash | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Bash | | | helpTxt | Generates a Bash client script based on cURL. | | diff --git a/docs/generators/c.md b/docs/generators/c.md index d7006f36cc99..700b9c59efd4 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -7,6 +7,7 @@ title: Documentation for the c Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | c | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | C | | | helpTxt | Generates a C (libcurl) client library (beta). | | diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 7cc512620edc..512688ead462 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -7,6 +7,7 @@ title: Documentation for the clojure Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | clojure | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Clojure | | | helpTxt | Generates a Clojure client library. | | diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index f9c171feeebe..534d5a52f482 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -7,6 +7,7 @@ title: Documentation for the cpp-pistache-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cpp-pistache-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | C++ | | | helpTxt | Generates a C++ API server (based on Pistache) | | diff --git a/docs/generators/cpp-qt-client.md b/docs/generators/cpp-qt-client.md index f26b827b8d48..9ea981421a50 100644 --- a/docs/generators/cpp-qt-client.md +++ b/docs/generators/cpp-qt-client.md @@ -7,6 +7,7 @@ title: Documentation for the cpp-qt-client Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cpp-qt-client | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | C++ | | | helpTxt | Generates a Qt C++ client library. | | diff --git a/docs/generators/cpp-qt-qhttpengine-server.md b/docs/generators/cpp-qt-qhttpengine-server.md index 42d3f4c7e04b..12fd8dc3a638 100644 --- a/docs/generators/cpp-qt-qhttpengine-server.md +++ b/docs/generators/cpp-qt-qhttpengine-server.md @@ -7,6 +7,7 @@ title: Documentation for the cpp-qt-qhttpengine-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cpp-qt-qhttpengine-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | C++ | | | helpTxt | Generates a Qt C++ Server using the QHTTPEngine HTTP Library. | | diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index 065ead399b78..f5037c7ac5d8 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -7,6 +7,7 @@ title: Documentation for the cpp-restbed-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cpp-restbed-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | C++ | | | helpTxt | Generates a C++ API Server with Restbed (https://github.com/Corvusoft/restbed). | | diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index fa04e41dcd7e..700f1c657d19 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -7,6 +7,7 @@ title: Documentation for the cpp-restsdk Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cpp-restsdk | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | C++ | | | helpTxt | Generates a C++ API client with C++ REST SDK (https://github.com/Microsoft/cpprestsdk). | | diff --git a/docs/generators/cpp-tiny.md b/docs/generators/cpp-tiny.md index e669c1ad7c4d..08a7e4f69190 100644 --- a/docs/generators/cpp-tiny.md +++ b/docs/generators/cpp-tiny.md @@ -7,6 +7,7 @@ title: Documentation for the cpp-tiny Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cpp-tiny | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | C++ | | | helpTxt | Generates a C++ Arduino REST API client. | | diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index 0528620b7769..c81dec1d03a0 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -7,6 +7,7 @@ title: Documentation for the cpp-tizen Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cpp-tizen | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | C++ | | | helpTxt | Generates a Samsung Tizen C++ client library. | | diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md index 56eb1c967998..563f1325a4c1 100644 --- a/docs/generators/cpp-ue4.md +++ b/docs/generators/cpp-ue4.md @@ -7,6 +7,7 @@ title: Documentation for the cpp-ue4 Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cpp-ue4 | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | C++ | | | helpTxt | Generates a Unreal Engine 4 C++ Module (beta). | | diff --git a/docs/generators/crystal.md b/docs/generators/crystal.md index d44e727ddbb4..0961a1e05143 100644 --- a/docs/generators/crystal.md +++ b/docs/generators/crystal.md @@ -7,6 +7,7 @@ title: Documentation for the crystal Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | crystal | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | Crystal | | | helpTxt | Generates a Crystal client library (beta). | | diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index 22fbde9e287c..539eb8282e69 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -7,6 +7,7 @@ title: Documentation for the csharp-dotnet2 Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | csharp-dotnet2 | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | C# | | | helpTxt | Generates a C# .Net 2.0 client library (beta). | | diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index c20541a52f9a..076cf18395c9 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -7,6 +7,7 @@ title: Documentation for the csharp-nancyfx Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | csharp-nancyfx | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | C# | | | helpTxt | Generates a C# NancyFX Web API server. | | diff --git a/docs/generators/csharp-netcore-functions.md b/docs/generators/csharp-netcore-functions.md index 888ada381288..eca318215d87 100644 --- a/docs/generators/csharp-netcore-functions.md +++ b/docs/generators/csharp-netcore-functions.md @@ -7,6 +7,7 @@ title: Documentation for the csharp-netcore-functions Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | csharp-netcore-functions | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | C# | | | helpTxt | Generates a csharp server. | | diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 57d4e3ac2b6d..ad581afc56b7 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -7,6 +7,7 @@ title: Documentation for the csharp-netcore Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | csharp-netcore | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | C# | | | helpTxt | Generates a C# client library (.NET Standard, .NET Core). | | diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 2a61a6fa326a..656b537a2c08 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -7,6 +7,7 @@ title: Documentation for the csharp Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | csharp | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | C# | | | helpTxt | Generates a CSharp client library. | | diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 13a6eb489e34..19997fc3e8db 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -7,6 +7,7 @@ title: Documentation for the cwiki Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | cwiki | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | DOCUMENTATION | | | helpTxt | Generates confluence wiki markup. | | diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index 157fb47af537..0bb7adfd786a 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -7,6 +7,7 @@ title: Documentation for the dart-dio-next Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | dart-dio-next | pass this to the generate command after -g | +| generator stability | EXPERIMENTAL | | | generator type | CLIENT | | | generator language | Dart | | | helpTxt | Generates a Dart Dio client library with null-safety. | | diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 2ef52cbffe49..00aa3d7e8693 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -7,6 +7,7 @@ title: Documentation for the dart-dio Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | dart-dio | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Dart | | | helpTxt | Generates a Dart Dio client library. | | diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index 7bae4db6903e..aa68db809fec 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -7,6 +7,7 @@ title: Documentation for the dart-jaguar Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | dart-jaguar | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Dart | | | helpTxt | Generates a Dart Jaguar client library. | | diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 0193acff4a9c..190fd2cd8ae0 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -7,6 +7,7 @@ title: Documentation for the dart Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | dart | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Dart | | | helpTxt | Generates a Dart 2.x client library. | | diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index ff0c25132f5a..d7c58fc68690 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -7,6 +7,7 @@ title: Documentation for the dynamic-html Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | dynamic-html | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | DOCUMENTATION | | | helpTxt | Generates a dynamic HTML site. | | diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index b9406ac1f60e..c462e16da445 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -7,6 +7,7 @@ title: Documentation for the eiffel Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | eiffel | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Eiffel | | | helpTxt | Generates a Eiffel client library (beta). | | diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 744474108487..a71bf4df0a77 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -7,6 +7,7 @@ title: Documentation for the elixir Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | elixir | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Elixir | | | helpTxt | Generates an elixir client library (alpha). | | diff --git a/docs/generators/elm.md b/docs/generators/elm.md index c26c96f85ebf..99ddd6afb208 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -7,6 +7,7 @@ title: Documentation for the elm Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | elm | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Elm | | | helpTxt | Generates an Elm client library. | | diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index afa0291fd211..31c0a53e8050 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -7,6 +7,7 @@ title: Documentation for the erlang-client Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | erlang-client | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Erlang | | | helpTxt | Generates an Erlang client library (beta). | | diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 48571920cfd5..08ca60c92f17 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -7,6 +7,7 @@ title: Documentation for the erlang-proper Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | erlang-proper | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Erlang | | | helpTxt | Generates an Erlang library with PropEr generators (beta). | | diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index 15a38755f5a9..77677a3d6c1c 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -7,6 +7,7 @@ title: Documentation for the erlang-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | erlang-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Erlang | | | helpTxt | Generates an Erlang server library (beta) using OpenAPI Generator (https://openapi-generator.tech). By default, it will also generate service classes, which can be disabled with the `-Dnoservice` environment variable. | | diff --git a/docs/generators/flash-deprecated.md b/docs/generators/flash-deprecated.md index b5669b0e2ea7..1ac45d4a6d3b 100644 --- a/docs/generators/flash-deprecated.md +++ b/docs/generators/flash-deprecated.md @@ -7,6 +7,7 @@ title: Documentation for the flash-deprecated Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | flash-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Flash | | | helpTxt | Generates a Flash (ActionScript) client library (beta). IMPORTANT: this generator has been deprecated in v5.x | | diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 5d148d8fe2fb..80f49c5c4f46 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -7,6 +7,7 @@ title: Documentation for the fsharp-functions Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | fsharp-functions | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | F# | | | helpTxt | Generates a fsharp-functions server (beta). | | diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index 176603a31355..289cf42a68a5 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -7,6 +7,7 @@ title: Documentation for the fsharp-giraffe-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | fsharp-giraffe-server | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | F# | | | helpTxt | Generates a F# Giraffe server (beta). | | diff --git a/docs/generators/go-deprecated.md b/docs/generators/go-deprecated.md index fa44c2c81ad7..978447f56b93 100644 --- a/docs/generators/go-deprecated.md +++ b/docs/generators/go-deprecated.md @@ -7,6 +7,7 @@ title: Documentation for the go-deprecated Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | go-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Go | | | helpTxt | Generates a Go client library (beta). NOTE: this generator has been deprecated. Please use `go` client generator instead. | | diff --git a/docs/generators/go-echo-server.md b/docs/generators/go-echo-server.md index 9f4a8e2e2363..dc3fd01982d1 100644 --- a/docs/generators/go-echo-server.md +++ b/docs/generators/go-echo-server.md @@ -7,6 +7,7 @@ title: Documentation for the go-echo-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | go-echo-server | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | Go | | | helpTxt | Generates a go-echo server. (Beta) | | diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 86f6b26bdd87..d7989246b6bc 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -7,6 +7,7 @@ title: Documentation for the go-gin-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | go-gin-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Go | | | helpTxt | Generates a Go server library with the gin framework using OpenAPI-Generator.By default, it will also generate service classes. | | diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index 310a212a5049..f17d5eb11062 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -7,6 +7,7 @@ title: Documentation for the go-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | go-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Go | | | helpTxt | Generates a Go server library using OpenAPI-Generator. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | diff --git a/docs/generators/go.md b/docs/generators/go.md index 4a005d47ac0e..066b561c154b 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -7,6 +7,7 @@ title: Documentation for the go Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | go | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Go | | | helpTxt | Generates a Go client library. | | diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index 8d323b1b7bcd..593c0488ded2 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -7,6 +7,7 @@ title: Documentation for the graphql-nodejs-express-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | graphql-nodejs-express-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Javascript | | | helpTxt | Generates a GraphQL Node.js Express server (beta) including it's types, queries, mutations, (resolvers) | | diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index a5c60cf1a150..bb2fb9502653 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -7,6 +7,7 @@ title: Documentation for the graphql-schema Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | graphql-schema | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SCHEMA | | | generator language | GraphQL | | | helpTxt | Generates GraphQL schema files (beta) | | diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index a7d42bb7c05c..2b1aadd53986 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -7,6 +7,7 @@ title: Documentation for the groovy Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | groovy | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Groovy | | | helpTxt | Generates a Groovy API client. | | diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index 8ffbcdb5cfd0..13d7e7b478de 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -7,6 +7,7 @@ title: Documentation for the haskell-http-client Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | haskell-http-client | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Haskell | | | helpTxt | Generates a Haskell http-client library. | | diff --git a/docs/generators/haskell-yesod.md b/docs/generators/haskell-yesod.md index 3b472c8a28be..f1bc1a3e40e9 100644 --- a/docs/generators/haskell-yesod.md +++ b/docs/generators/haskell-yesod.md @@ -7,6 +7,7 @@ title: Documentation for the haskell-yesod Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | haskell-yesod | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | Haskell | | | helpTxt | Generates a haskell-yesod server. | | diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index b2ebcdaa6996..cd49e615f466 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -7,6 +7,7 @@ title: Documentation for the haskell Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | haskell | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Haskell | | | helpTxt | Generates a Haskell server and client library. | | diff --git a/docs/generators/html.md b/docs/generators/html.md index d597f69ce9e4..056f8ccb7bd4 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -7,6 +7,7 @@ title: Documentation for the html Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | html | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | DOCUMENTATION | | | helpTxt | Generates a static HTML file. | | diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 0e99b15a11e5..d4fa263b9799 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -7,6 +7,7 @@ title: Documentation for the html2 Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | html2 | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | DOCUMENTATION | | | helpTxt | Generates a static HTML file. | | diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index d397419112fc..45e001e20c15 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -7,6 +7,7 @@ title: Documentation for the java-inflector Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java-inflector | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java Inflector Server application. | | diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 75c961bcf92d..9c6ead8858d5 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -7,6 +7,7 @@ title: Documentation for the java-micronaut-client Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java-micronaut-client | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | Java | | | helpTxt | Generates a Java Micronaut Client. | | diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 7b92e9cad42f..ed4891108325 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -7,6 +7,7 @@ title: Documentation for the java-msf4j Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java-msf4j | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java Micro Service based on WSO2 Microservices Framework for Java (MSF4J) | | diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 18b27e77430a..d782f1bc594f 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -7,6 +7,7 @@ title: Documentation for the java-pkmst Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java-pkmst | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a PKMST SpringBoot Server application using the SpringFox integration. Also enables EurekaServerClient / Zipkin / Spring-Boot admin | | diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index abc3d0b4239d..fa402771d7b7 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -7,6 +7,7 @@ title: Documentation for the java-play-framework Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java-play-framework | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java Play Framework Server application. | | diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index b359cf88035c..dab7af6ab144 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -7,6 +7,7 @@ title: Documentation for the java-undertow-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java-undertow-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java Undertow Server application (beta). | | diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 4e599a29d086..f91bff636d7b 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -7,6 +7,7 @@ title: Documentation for the java-vertx-web Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java-vertx-web | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java Vert.x-Web Server (beta). | | diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 96ffc3ee9758..2efeb21b0429 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -7,6 +7,7 @@ title: Documentation for the java-vertx Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java-vertx | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a java-Vert.X Server library. | | diff --git a/docs/generators/java.md b/docs/generators/java.md index dae11b0a614d..7cc9a0694130 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -7,6 +7,7 @@ title: Documentation for the java Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | java | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Java | | | helpTxt | Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more. | | diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index 9d91580aba76..3e1091b4d654 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -7,6 +7,7 @@ title: Documentation for the javascript-apollo Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | javascript-apollo | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | Javascript | | | helpTxt | Generates a JavaScript client library (beta) using Apollo RESTDatasource. | | diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index aa2b36502f9d..054f051f2321 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -7,6 +7,7 @@ title: Documentation for the javascript-closure-angular Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | javascript-closure-angular | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Javascript | | | helpTxt | Generates a Javascript AngularJS client library (beta) annotated with Google Closure Compiler annotations(https://developers.google.com/closure/compiler/docs/js-for-compiler?hl=en) | | diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index e404f23e631d..0fb54da17cdd 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -7,6 +7,7 @@ title: Documentation for the javascript-flowtyped Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | javascript-flowtyped | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Javascript | | | helpTxt | Generates a Javascript client library (beta) using Flow types and Fetch API. | | diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index ce8123c03b29..f4d7273d1e8e 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -7,6 +7,7 @@ title: Documentation for the javascript Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | javascript | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Javascript | | | helpTxt | Generates a JavaScript client library. | | diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index b4f16bea4c96..cbaefddff3ef 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -7,6 +7,7 @@ title: Documentation for the jaxrs-cxf-cdi Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jaxrs-cxf-cdi | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java JAXRS Server according to JAXRS 2.0 specification, assuming an Apache CXF runtime and a Java EE runtime with CDI enabled. | | diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index a31c00fe6983..addca8b4687c 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -7,6 +7,7 @@ title: Documentation for the jaxrs-cxf-client Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jaxrs-cxf-client | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Java | | | helpTxt | Generates a Java JAXRS Client based on Apache CXF framework. | | diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 40fa6dfde174..35134cf1b80b 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -7,6 +7,7 @@ title: Documentation for the jaxrs-cxf-extended Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jaxrs-cxf-extended | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Extends jaxrs-cxf with options to generate a functional mock server. | | diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index ed251b835f0c..960649abf88a 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -7,6 +7,7 @@ title: Documentation for the jaxrs-cxf Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jaxrs-cxf | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java JAXRS Server application based on Apache CXF framework. | | diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index f82ae05541cd..2d34e322f497 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -7,6 +7,7 @@ title: Documentation for the jaxrs-jersey Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jaxrs-jersey | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java JAXRS Server application based on Jersey framework. | | diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 7dff1caf8c7e..491a91757a7d 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -7,6 +7,7 @@ title: Documentation for the jaxrs-resteasy-eap Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jaxrs-resteasy-eap | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java JAXRS-Resteasy Server application. | | diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 32fb664d902b..edf753705532 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -7,6 +7,7 @@ title: Documentation for the jaxrs-resteasy Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jaxrs-resteasy | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java JAXRS-Resteasy Server application. | | diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 91bfa156aea6..66492d46c034 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -7,6 +7,7 @@ title: Documentation for the jaxrs-spec Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jaxrs-spec | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java JAXRS Server according to JAXRS 2.0 specification. | | diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 426ed04b4ccc..3f3b35458624 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -7,6 +7,7 @@ title: Documentation for the jmeter Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | jmeter | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Java | | | helpTxt | Generates a JMeter .jmx file. | | diff --git a/docs/generators/k6.md b/docs/generators/k6.md index 0ab38225e03d..f26f01cfa31c 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -7,6 +7,7 @@ title: Documentation for the k6 Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | k6 | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | k6 | | | helpTxt | Generates a k6 script (beta). | | diff --git a/docs/generators/kotlin-server-deprecated.md b/docs/generators/kotlin-server-deprecated.md index 3c5c6ca448d1..d2d71faffd81 100644 --- a/docs/generators/kotlin-server-deprecated.md +++ b/docs/generators/kotlin-server-deprecated.md @@ -7,6 +7,7 @@ title: Documentation for the kotlin-server-deprecated Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | kotlin-server-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | Kotlin | | | helpTxt | Generates a Kotlin server (Ktor v1.1.3). IMPORTANT: this generator has been deprecated. Please migrate to `kotlin-server` which supports Ktor v1.5.2+. | | diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index c0a473d9fd81..8e48bda46da6 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -7,6 +7,7 @@ title: Documentation for the kotlin-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | kotlin-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Kotlin | | | helpTxt | Generates a Kotlin server. | | diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 8363a31d4bf5..a773df36b052 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -7,6 +7,7 @@ title: Documentation for the kotlin-spring Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | kotlin-spring | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Kotlin | | | helpTxt | Generates a Kotlin Spring application. | | diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 30c0474ca761..17c3415382cc 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -7,6 +7,7 @@ title: Documentation for the kotlin-vertx Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | kotlin-vertx | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | Kotlin | | | helpTxt | Generates a kotlin-vertx server. | | diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index d825664c0c83..a942e2e3f9b8 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -7,6 +7,7 @@ title: Documentation for the kotlin Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | kotlin | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Kotlin | | | helpTxt | Generates a Kotlin client. | | diff --git a/docs/generators/ktorm-schema.md b/docs/generators/ktorm-schema.md index b301b23a3bce..f7ff70e5590e 100644 --- a/docs/generators/ktorm-schema.md +++ b/docs/generators/ktorm-schema.md @@ -7,6 +7,7 @@ title: Documentation for the ktorm-schema Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | ktorm-schema | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SCHEMA | | | generator language | Ktorm | | | helpTxt | Generates a kotlin-ktorm schema (beta) | | diff --git a/docs/generators/lua.md b/docs/generators/lua.md index a890b08256f6..18ec54ad4c09 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -7,6 +7,7 @@ title: Documentation for the lua Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | lua | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | Lua | | | helpTxt | Generates a Lua client library (beta). | | diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 87e922f1b9d4..71e1e6ac51ac 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -7,6 +7,7 @@ title: Documentation for the markdown Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | markdown | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | DOCUMENTATION | | | helpTxt | Generates a markdown documentation. | | diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 0fa16e993281..1abe0062392e 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -7,6 +7,7 @@ title: Documentation for the mysql-schema Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | mysql-schema | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SCHEMA | | | generator language | Mysql | | | helpTxt | Generates a MySQL schema based on the model or schema defined in the OpenAPI specification (v2, v3). | | diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 669b310cd31f..fa5828934193 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -7,6 +7,7 @@ title: Documentation for the nim Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | nim | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | Nim | | | helpTxt | Generates a nim client (beta). | | diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index e530fd1a1b54..62d154361a4d 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -7,6 +7,7 @@ title: Documentation for the nodejs-express-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | nodejs-express-server | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | Javascript | | | helpTxt | Generates a NodeJS Express server (alpha). IMPORTANT: this generator may subject to breaking changes without further notice). | | diff --git a/docs/generators/objc.md b/docs/generators/objc.md index 11e1e4280bc5..f15b6bcb49f1 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -7,6 +7,7 @@ title: Documentation for the objc Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | objc | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Objective-C | | | helpTxt | Generates an Objective-C client library. | | diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index d1a5175be918..eaa087b13c63 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -7,6 +7,7 @@ title: Documentation for the ocaml Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | ocaml | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | OCaml | | | helpTxt | Generates an OCaml client library (beta). | | diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index db86e36ac3dd..c12743b43839 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -7,6 +7,7 @@ title: Documentation for the openapi-yaml Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | openapi-yaml | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | DOCUMENTATION | | | helpTxt | Creates a static openapi.yaml file (OpenAPI spec v3). | | diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index 754d65ebc264..f6ea2597cf0f 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -7,6 +7,7 @@ title: Documentation for the openapi Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | openapi | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | DOCUMENTATION | | | helpTxt | Creates a static openapi.json file (OpenAPI spec v3.0). | | diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 82bb14d553f7..8a2245c05dde 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -7,6 +7,7 @@ title: Documentation for the perl Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | perl | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Perl | | | helpTxt | Generates a Perl client library. | | diff --git a/docs/generators/php-dt.md b/docs/generators/php-dt.md index 9ee8556dc2b0..3642ebb5f0af 100644 --- a/docs/generators/php-dt.md +++ b/docs/generators/php-dt.md @@ -7,6 +7,7 @@ title: Documentation for the php-dt Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php-dt | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | PHP | | | helpTxt | Generates a PHP client relying on Data Transfer ( https://github.com/Articus/DataTransfer ) and compliant with PSR-7, PSR-11, PSR-17 and PSR-18. | | diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index 0f4c9b9b43a1..8a62c49894b1 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -7,6 +7,7 @@ title: Documentation for the php-laravel Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php-laravel | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | | helpTxt | Generates a PHP laravel server library. | | diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 44952212bd13..54148245f772 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -7,6 +7,7 @@ title: Documentation for the php-lumen Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php-lumen | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | | helpTxt | Generates a PHP Lumen server library. | | diff --git a/docs/generators/php-mezzio-ph.md b/docs/generators/php-mezzio-ph.md index 1060eb030ed7..3905506371fc 100644 --- a/docs/generators/php-mezzio-ph.md +++ b/docs/generators/php-mezzio-ph.md @@ -7,6 +7,7 @@ title: Documentation for the php-mezzio-ph Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php-mezzio-ph | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | | helpTxt | Generates PHP server stub using Mezzio ( https://docs.mezzio.dev/mezzio/ ) and Path Handler ( https://github.com/Articus/PathHandler ). | | diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md index df5ed167aecb..ed0b98d2907c 100644 --- a/docs/generators/php-silex-deprecated.md +++ b/docs/generators/php-silex-deprecated.md @@ -7,6 +7,7 @@ title: Documentation for the php-silex-deprecated Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php-silex-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | PHP | | | helpTxt | Generates a PHP Silex server library. IMPORTANT NOTE: this generator is no longer actively maintained. | | diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index 19fb25e9a978..a3f433a625b9 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -7,6 +7,7 @@ title: Documentation for the php-slim-deprecated Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php-slim-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | PHP | | | helpTxt | Generates a PHP Slim Framework server library. IMPORTANT NOTE: this generator (Slim 3.x) is no longer actively maintained so please use 'php-slim4' generator instead. | | diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index b021d9140773..cd8ab1f3468b 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -7,6 +7,7 @@ title: Documentation for the php-slim4 Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php-slim4 | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | | helpTxt | Generates a PHP Slim 4 Framework server library(with Mock server). | | diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index da7aac53103b..22184a49be2e 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -7,6 +7,7 @@ title: Documentation for the php-symfony Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php-symfony | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | | helpTxt | Generates a PHP Symfony server bundle. | | diff --git a/docs/generators/php.md b/docs/generators/php.md index 113eb3247552..fc04a4b5d813 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -7,6 +7,7 @@ title: Documentation for the php Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | php | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | PHP | | | helpTxt | Generates a PHP client library. | | diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md index b2c4c230c0b7..51dee6f7e470 100644 --- a/docs/generators/plantuml.md +++ b/docs/generators/plantuml.md @@ -7,6 +7,7 @@ title: Documentation for the plantuml Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | plantuml | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | DOCUMENTATION | | | helpTxt | Generates a plantuml documentation. | | diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index 7efbc46ff081..4c56c6e27fae 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -7,6 +7,7 @@ title: Documentation for the powershell Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | powershell | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | PowerShell | | | helpTxt | Generates a PowerShell API client (beta) | | diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index e8f8361bea03..913489defe97 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -7,6 +7,7 @@ title: Documentation for the protobuf-schema Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | protobuf-schema | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SCHEMA | | | generator language | Protocol Buffers (Protobuf) | | | helpTxt | Generates gRPC and protocol buffer schema files (beta) | | diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 79ee486c1ea8..7578a6be2901 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -7,8 +7,10 @@ title: Documentation for the python-aiohttp Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | python-aiohttp | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Python | | +| generator language version | 3.5.2+ | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index bd5d365f4fba..1759a675b6c2 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -7,8 +7,10 @@ title: Documentation for the python-blueplanet Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | python-blueplanet | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Python | | +| generator language version | 2.7+ and 3.5.2+ | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 49e06706d543..968f0d3fb2e3 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -7,8 +7,10 @@ title: Documentation for the python-experimental Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | python-experimental | pass this to the generate command after -g | +| generator stability | EXPERIMENTAL | | | generator type | CLIENT | | | generator language | Python | | +| generator language version | >=3.9 | | | helpTxt | Generates a Python client library

Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | ## CONFIG OPTIONS diff --git a/docs/generators/python-fastapi.md b/docs/generators/python-fastapi.md index 72a438df3712..2464a81f1bcf 100644 --- a/docs/generators/python-fastapi.md +++ b/docs/generators/python-fastapi.md @@ -7,9 +7,11 @@ title: Documentation for the python-fastapi Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | python-fastapi | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | Python | | -| helpTxt | Generates a Python FastAPI server (beta). | | +| generator language version | 3.7 | | +| helpTxt | Generates a Python FastAPI server (beta). Models are defined with the pydantic 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. diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 084f4723afc6..21e2ab52495f 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -7,8 +7,10 @@ title: Documentation for the python-flask Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | python-flask | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Python | | +| generator language version | 2.7 and 3.5.2+ | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-legacy.md b/docs/generators/python-legacy.md index 43d89e0b8447..8b4a7e2a9484 100644 --- a/docs/generators/python-legacy.md +++ b/docs/generators/python-legacy.md @@ -7,8 +7,10 @@ title: Documentation for the python-legacy Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | python-legacy | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Python | | +| generator language version | 2.7 and 3.4+ | | | helpTxt | Generates a Python client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/python.md b/docs/generators/python.md index 3db4f227b07b..b6a2df4f9c2b 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -7,8 +7,10 @@ title: Documentation for the python Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | python | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Python | | +| generator language version | >=3.6 | | | helpTxt | Generates a Python client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/r.md b/docs/generators/r.md index f2ab5c638328..b5eef889bfa2 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -7,6 +7,7 @@ title: Documentation for the r Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | r | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | R | | | helpTxt | Generates a R client library (beta). | | diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index 3473ee666cd7..84b67956163b 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -7,6 +7,7 @@ title: Documentation for the ruby-on-rails Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | ruby-on-rails | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Ruby | | | helpTxt | Generates a Ruby on Rails (v5) server library. | | diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index 981be7d3c327..56aff137de1d 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -7,6 +7,7 @@ title: Documentation for the ruby-sinatra Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | ruby-sinatra | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Ruby | | | helpTxt | Generates a Ruby Sinatra server library. | | diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 126d32b111b7..c635612e0909 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -7,6 +7,7 @@ title: Documentation for the ruby Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | ruby | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Ruby | | | helpTxt | Generates a Ruby client library. | | diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index b669ac3fae96..d894959db872 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -7,6 +7,7 @@ title: Documentation for the rust-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | rust-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Rust | | | helpTxt | Generates a Rust client/server library (beta) using the openapi-generator project. | | diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 6637bf69098a..cc2f93c4b89c 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -7,6 +7,7 @@ title: Documentation for the rust Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | rust | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Rust | | | helpTxt | Generates a Rust client library (beta). | | diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md index 33fa8817eb8d..172d71db74f1 100644 --- a/docs/generators/scala-akka-http-server.md +++ b/docs/generators/scala-akka-http-server.md @@ -7,6 +7,7 @@ title: Documentation for the scala-akka-http-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scala-akka-http-server | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SERVER | | | generator language | Scala | | | helpTxt | Generates a scala-akka-http server (beta). | | diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 9612a78014a3..b3a160f5dea3 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -7,6 +7,7 @@ title: Documentation for the scala-akka Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scala-akka | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Scala | | | helpTxt | Generates a Scala client library (beta) base on Akka/Spray. | | diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 02ebc385796f..2b732d98f070 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -7,6 +7,7 @@ title: Documentation for the scala-finch Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scala-finch | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Scala | | | helpTxt | Generates a Scala server application with Finch. | | diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index fc111db20025..51e3084079c3 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -7,6 +7,7 @@ title: Documentation for the scala-gatling Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scala-gatling | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Scala | | | helpTxt | Generates a gatling simulation library (beta). | | diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 6760f78c7760..3b7d7a9ef288 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -7,6 +7,7 @@ title: Documentation for the scala-httpclient-deprecated Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scala-httpclient-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Scala | | | helpTxt | Generates a Scala client library (beta). IMPORTANT: This generator is no longer actively maintained and will be deprecated. PLease use 'scala-akka' generator instead. | | diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index aae66c6de02a..bc8984497d14 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -7,6 +7,7 @@ title: Documentation for the scala-lagom-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scala-lagom-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Scala | | | helpTxt | Generates a Lagom API server (Beta) in scala | | diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index ebe594a10a95..4a78dfb82719 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -7,6 +7,7 @@ title: Documentation for the scala-play-server Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scala-play-server | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Scala | | | helpTxt | Generates a Scala server application (beta) with Play Framework. | | diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 7bd25ecef960..d1ef1d48cdc2 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -7,6 +7,7 @@ title: Documentation for the scala-sttp Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scala-sttp | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | CLIENT | | | generator language | Scala | | | helpTxt | Generates a Scala client library (beta) based on Sttp. | | diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 3e52e8e9f9ab..03a957f6ef8a 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -7,6 +7,7 @@ title: Documentation for the scalatra Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scalatra | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Scala | | | helpTxt | Generates a Scala server application with Scalatra. | | diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index 077d1d3d14fb..81af6b8eb8fb 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -7,6 +7,7 @@ title: Documentation for the scalaz Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | scalaz | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Scala | | | helpTxt | Generates a Scalaz client library (beta) that uses http4s | | diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 8dee03a692ae..bf67e6f53b93 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -7,6 +7,7 @@ title: Documentation for the spring Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | spring | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | | helpTxt | Generates a Java SpringBoot Server application using the SpringFox integration. | | diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index 26c3dbaf030d..f2eaf80a50bf 100644 --- a/docs/generators/swift4-deprecated.md +++ b/docs/generators/swift4-deprecated.md @@ -7,6 +7,7 @@ title: Documentation for the swift4-deprecated Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | swift4-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Swift | | | helpTxt | Generates a Swift 4.x client library (Deprecated and will be removed in 5.x releases. Please use `swift5` instead.) | | diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 2d9b0128973f..4183ade72155 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -7,6 +7,7 @@ title: Documentation for the swift5 Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | swift5 | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Swift | | | helpTxt | Generates a Swift 5.x client library. | | diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 112ec3f54da9..b92521c6a3e9 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-angular Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-angular | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript Angular (6.x - 13.x) client library. | | diff --git a/docs/generators/typescript-angularjs-deprecated.md b/docs/generators/typescript-angularjs-deprecated.md index 4490fc90ba64..5f9e08c77c46 100644 --- a/docs/generators/typescript-angularjs-deprecated.md +++ b/docs/generators/typescript-angularjs-deprecated.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-angularjs-deprecated Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-angularjs-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript AngularJS client library. This generator has been deprecated and will be removed in the future release. | | diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 6c2b5d91f999..eb24409651ac 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-aurelia Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-aurelia | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript client library for the Aurelia framework (beta). | | diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 244b5471e3d9..05e51236f5e8 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-axios Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-axios | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript client library using axios. | | diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 104a33cf7453..f548480236b8 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-fetch Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-fetch | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript client library using Fetch API (beta). | | diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index ceca00588a32..c79ad504731c 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-inversify Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-inversify | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates Typescript services using Inversify IOC | | diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 7f89c8e326d7..4cdac527636e 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-jquery Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-jquery | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript jquery client library. | | diff --git a/docs/generators/typescript-nestjs.md b/docs/generators/typescript-nestjs.md index f6cd75a328c5..bfab1479590e 100644 --- a/docs/generators/typescript-nestjs.md +++ b/docs/generators/typescript-nestjs.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-nestjs Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-nestjs | pass this to the generate command after -g | +| generator stability | EXPERIMENTAL | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript Nestjs 6.x client library. | | diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 03c988d6f259..f017b86055fc 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-node Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-node | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript NodeJS client library. | | diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 85fc2a548c77..c7d325a40fa1 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-redux-query Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-redux-query | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript client library using redux-query API (beta). | | diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 06ef6aa84b77..2e4febab52ac 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -7,6 +7,7 @@ title: Documentation for the typescript-rxjs Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript-rxjs | pass this to the generate command after -g | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript client library using Rxjs API. | | diff --git a/docs/generators/typescript.md b/docs/generators/typescript.md index 8659b4fbf96f..4172f40be71a 100644 --- a/docs/generators/typescript.md +++ b/docs/generators/typescript.md @@ -7,6 +7,7 @@ title: Documentation for the typescript Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | typescript | pass this to the generate command after -g | +| generator stability | EXPERIMENTAL | | | generator type | CLIENT | | | generator language | Typescript | | | helpTxt | Generates a TypeScript client library using Fetch API (beta). | | diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md index 131d78b443b8..b0ec68601925 100644 --- a/docs/generators/wsdl-schema.md +++ b/docs/generators/wsdl-schema.md @@ -7,6 +7,7 @@ title: Documentation for the wsdl-schema Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | wsdl-schema | pass this to the generate command after -g | +| generator stability | BETA | | | generator type | SCHEMA | | | generator language | Web Services Description Language (WSDL) | | | helpTxt | Generates WSDL files. | | diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index 35e16eaf0e3d..73858d84691d 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -303,10 +303,14 @@ private void generateMdMetadata(StringBuilder sb, CodegenConfig config) { sb.append("| Property | Value | Notes |").append(newline); sb.append("| -------- | ----- | ----- |").append(newline); sb.append("| generator name | "+config.getName()+" | pass this to the generate command after -g |").append(newline); + sb.append("| generator stability | "+config.getGeneratorMetadata().getStability()+" | |").append(newline); sb.append("| generator type | "+config.getTag()+" | |").append(newline); if (config.generatorLanguage() != null) { sb.append("| generator language | "+config.generatorLanguage().toString()+" | |").append(newline); } + if (config.generatorLanguageVersion() != null) { + sb.append("| generator language version | "+config.generatorLanguageVersion()+" | |").append(newline); + } sb.append("| helpTxt | "+config.getHelp()+" | |").append(newline); sb.append(newline); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 7e6bc07dede9..952d3a841f27 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -308,4 +308,10 @@ public interface CodegenConfig { public String defaultTemplatingEngine(); public GeneratorLanguage generatorLanguage(); + + /* + the version of the language that the generator implements + For python 3.9.0, generatorLanguageVersion would be "3.9.0" + */ + public String generatorLanguageVersion(); } 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 1744cb317366..d4c70494f97f 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 @@ -7364,4 +7364,7 @@ public String defaultTemplatingEngine() { @Override public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVA; } + + @Override + public String generatorLanguageVersion() { return null; }; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 8e3d27c6cd9c..b4c4296f1b15 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -788,6 +788,7 @@ Map buildSupportFileBundle(List allOperations, List getModelNameToSchemaCache() { } return modelNameToSchemaCache; } + + @Override + public String generatorLanguageVersion() { return ">=3.6"; }; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 6d1aebdac024..8c6529e99e03 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -2080,4 +2080,7 @@ public CodegenOperation fromOperation(String path, public String defaultTemplatingEngine() { return "handlebars"; } + + @Override + public String generatorLanguageVersion() { return ">=3.9"; }; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java index 6ee1131973e9..72001434c033 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java @@ -72,7 +72,7 @@ public CodegenType getTag() { @Override public String getHelp() { - return "Generates a Python FastAPI server (beta)."; + return "Generates a Python FastAPI server (beta). Models are defined with the pydantic library"; } public PythonFastAPIServerCodegen() { @@ -294,4 +294,7 @@ public String toRegularExpression(String pattern) { String regex = super.toRegularExpression(pattern); return StringUtils.substring(regex, 1, -1); } + + @Override + public String generatorLanguageVersion() { return "3.7"; }; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java index 79fa8885b2e2..a9358b4007ad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java @@ -54,4 +54,7 @@ protected void addSupportingFiles() { supportingFiles.add(new SupportingFile("__init__.mustache", packagePath(), "__init__.py")); testPackage = packageName + "." + testPackage; } + + @Override + public String generatorLanguageVersion() { return "2.7 and 3.5.2+"; }; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java index 05b5b92df39c..7fc09f0cbfad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java @@ -17,7 +17,6 @@ package org.openapitools.codegen.languages; -import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; @@ -435,4 +434,7 @@ public String packagePath() { public String generatePackageName(String packageName) { return underscore(packageName.replaceAll("[^\\w]+", "")); } + + @Override + public String generatorLanguageVersion() { return "2.7 and 3.4+"; }; } 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 a97304700938..42dd581c40e4 100644 --- a/modules/openapi-generator/src/main/resources/python-aiohttp/README.mustache +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/README.mustache @@ -8,7 +8,7 @@ is an example of building a OpenAPI-enabled aiohttp server. This example uses the [Connexion](https://github.com/zalando/connexion) library on top of aiohttp. ## Requirements -Python 3.5.2+ +Python {{{generatorLanguageVersion}}} ## Usage To run the server, please execute the following from the root directory: diff --git a/modules/openapi-generator/src/main/resources/python-experimental/README.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/README.handlebars index e03e96972ab3..aee6b66db62a 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/README.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/README.handlebars @@ -17,7 +17,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requirements. -Python >= 3.9 +Python {{generatorLanguageVersion}} v3.9 is needed so one can combine classmethod and property decorators to define object schema properties as classes diff --git a/modules/openapi-generator/src/main/resources/python-experimental/README_onlypackage.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/README_onlypackage.handlebars index f9fda7de212a..63f959375b0f 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/README_onlypackage.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/README_onlypackage.handlebars @@ -17,7 +17,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requirements. -Python >= 3.6 +Python {{generatorLanguageVersion}} ## Installation & Usage diff --git a/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars index 476157a0c5d2..7045d259412f 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/setup.handlebars @@ -39,7 +39,7 @@ setup( author_email="{{#if infoEmail}}{{infoEmail}}{{/if}}{{#unless infoEmail}}team@openapitools.org{{/unless}}", url="{{packageUrl}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], - python_requires=">=3.9", + python_requires="{{{generatorLanguageVersion}}}", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/Dockerfile.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/Dockerfile.mustache index b66458eb417f..2136eab06e53 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/Dockerfile.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/Dockerfile.mustache @@ -1,4 +1,4 @@ -FROM python:3.7 AS builder +FROM python:{{{generatorLanguageVersion}}} AS builder WORKDIR /usr/src/app @@ -11,7 +11,7 @@ COPY . . RUN pip install --no-cache-dir . -FROM python:3.7 AS test_runner +FROM python:{{{generatorLanguageVersion}}} AS test_runner WORKDIR /tmp COPY --from=builder /venv /venv COPY --from=builder /usr/src/app/tests tests @@ -24,7 +24,7 @@ RUN pip install pytest RUN pytest tests -FROM python:3.7 AS service +FROM python:{{{generatorLanguageVersion}}} AS service WORKDIR /root/app/site-packages COPY --from=test_runner /venv /venv ENV PATH=/venv/bin:$PATH diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/README.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/README.mustache index c426a965f0fc..8e6e65b7e8b1 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/README.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/README.mustache @@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: ## Requirements. -Python >= 3.7 +Python >= {{{generatorLanguageVersion}}} ## Installation & Usage diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/setup_cfg.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/setup_cfg.mustache index 2934cb8fc535..97721bdc4974 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/setup_cfg.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/setup_cfg.mustache @@ -4,11 +4,11 @@ version = {{appVersion}} description = {{appDescription}} long_description = file: README.md keywords = OpenAPI {{appName}} -python_requires = >= 3.7.* +python_requires = >= {{{generatorLanguageVersion}}}.* classifiers = Operating System :: OS Independent Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 + Programming Language :: Python :: {{{generatorLanguageVersion}}} [options] install_requires = diff --git a/modules/openapi-generator/src/main/resources/python-legacy/README.mustache b/modules/openapi-generator/src/main/resources/python-legacy/README.mustache index 71f0ef69bbda..ae4af162a148 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/README.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/README.mustache @@ -17,7 +17,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requirements. -Python 2.7 and 3.4+ +Python {{{generatorLanguageVersion}}} ## Installation & Usage ### pip install diff --git a/modules/openapi-generator/src/main/resources/python-legacy/README_onlypackage.mustache b/modules/openapi-generator/src/main/resources/python-legacy/README_onlypackage.mustache index 3f1d5b1fc645..3f7e0860de3d 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/README_onlypackage.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/README_onlypackage.mustache @@ -17,7 +17,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requirements. -Python 2.7 and 3.4+ +Python {{{generatorLanguageVersion}}} ## Installation & Usage diff --git a/modules/openapi-generator/src/main/resources/python/README.mustache b/modules/openapi-generator/src/main/resources/python/README.mustache index b066ed859613..b0d33e535ac3 100644 --- a/modules/openapi-generator/src/main/resources/python/README.mustache +++ b/modules/openapi-generator/src/main/resources/python/README.mustache @@ -17,7 +17,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requirements. -Python >= 3.6 +Python {{{generatorLanguageVersion}}} ## Installation & Usage ### pip install diff --git a/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache b/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache index 79457c4b59b9..ba08a3acfea3 100644 --- a/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache +++ b/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache @@ -17,7 +17,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requirements. -Python >= 3.6 +Python {{{generatorLanguageVersion}}} ## Installation & Usage diff --git a/modules/openapi-generator/src/main/resources/python/setup.mustache b/modules/openapi-generator/src/main/resources/python/setup.mustache index af494177549e..5f5578256381 100644 --- a/modules/openapi-generator/src/main/resources/python/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python/setup.mustache @@ -37,7 +37,7 @@ setup( author_email="{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", url="{{packageUrl}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], - python_requires=">=3.6", + python_requires="{{{generatorLanguageVersion}}}", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index 5f53c0f64235..8e57b995b3ec 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -9,7 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: ## Requirements. -Python >= 3.6 +Python >=3.6 ## Installation & Usage ### pip install diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md index 5f53c0f64235..8e57b995b3ec 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md @@ -9,7 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: ## Requirements. -Python >= 3.6 +Python >=3.6 ## Installation & Usage ### pip install diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/README.md b/samples/openapi3/client/extensions/x-auth-id-alias/python/README.md index 86eababfa80a..72ef1f59d6ca 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/README.md +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/README.md @@ -9,7 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: ## Requirements. -Python >= 3.6 +Python >=3.6 ## Installation & Usage ### pip install diff --git a/samples/openapi3/client/features/dynamic-servers/python/README.md b/samples/openapi3/client/features/dynamic-servers/python/README.md index df93218ea4b8..7d9ade3fca63 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/README.md +++ b/samples/openapi3/client/features/dynamic-servers/python/README.md @@ -9,7 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: ## Requirements. -Python >= 3.6 +Python >=3.6 ## Installation & Usage ### pip install diff --git a/samples/openapi3/client/petstore/python-experimental/README.md b/samples/openapi3/client/petstore/python-experimental/README.md index 5798de014b75..98ccaf5dbbc9 100644 --- a/samples/openapi3/client/petstore/python-experimental/README.md +++ b/samples/openapi3/client/petstore/python-experimental/README.md @@ -9,7 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: ## Requirements. -Python >= 3.9 +Python >=3.9 v3.9 is needed so one can combine classmethod and property decorators to define object schema properties as classes diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index f8ceed3eb8ef..2d83d666f8e2 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -9,7 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: ## Requirements. -Python >= 3.6 +Python >=3.6 ## Installation & Usage ### pip install From b05faefb9304839b6c0d1f1d5e56fcb82d2f2456 Mon Sep 17 00:00:00 2001 From: joaocmendes Date: Tue, 11 Jan 2022 03:02:39 +0000 Subject: [PATCH 078/175] [BUG][csharp-netcore] Fix Multi Files for the same FormField (#11132) (#11259) * [BUG][csharp-netcore] Fix Multi Files for the some FormField (#11132) Make FileParamerts a Multimap to enable sending more than one file with the same key. * update documentation for csharp-netcore --- .../resources/csharp-netcore/ApiClient.mustache | 15 +++++++++------ .../csharp-netcore/RequestOptions.mustache | 4 ++-- .../libraries/httpclient/ApiClient.mustache | 10 ++++++---- .../libraries/httpclient/RequestOptions.mustache | 4 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 15 +++++++++------ .../src/Org.OpenAPITools/Client/RequestOptions.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 15 +++++++++------ .../src/Org.OpenAPITools/Client/RequestOptions.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 10 ++++++---- .../src/Org.OpenAPITools/Client/RequestOptions.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 15 +++++++++------ .../src/Org.OpenAPITools/Client/RequestOptions.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 15 +++++++++------ .../src/Org.OpenAPITools/Client/RequestOptions.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 15 +++++++++------ .../src/Org.OpenAPITools/Client/RequestOptions.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 15 +++++++++------ .../src/Org.OpenAPITools/Client/RequestOptions.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ApiClient.cs | 15 +++++++++------ .../src/Org.OpenAPITools/Client/RequestOptions.cs | 4 ++-- 20 files changed, 104 insertions(+), 76 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache index d533d30f9017..e42b50fbd8bc 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache @@ -371,12 +371,15 @@ namespace {{packageName}}.Client { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } 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 dc924c733c1a..a3f9691b8d27 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache @@ -38,7 +38,7 @@ namespace {{packageName}}.Client /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -59,7 +59,7 @@ namespace {{packageName}}.Client QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache index bd7663012f12..f62f0e9423ff 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache @@ -278,10 +278,12 @@ namespace {{packageName}}.Client { foreach (var fileParam in options.FileParameters) { - var content = new StreamContent(fileParam.Value.Content); - content.Headers.ContentType = new MediaTypeHeaderValue(fileParam.Value.ContentType); - multipartContent.Add(content, fileParam.Key, - fileParam.Value.Name); + foreach (var file in fileParam.Value) + { + var content = new StreamContent(file.Content); + content.Headers.ContentType = new MediaTypeHeaderValue(file.ContentType); + multipartContent.Add(content, fileParam.Key, file.Name); + } } } return multipartContent; 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 bc5a8e348b8f..62859649ced3 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 @@ -38,7 +38,7 @@ namespace {{packageName}}.Client /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -59,7 +59,7 @@ namespace {{packageName}}.Client QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs index 11f158d6943c..3c817d1a646f 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs @@ -370,12 +370,15 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } 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 8cbf48a60320..6ebad92d9470 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 @@ -46,7 +46,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -67,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs index ab6f1f72507d..96ed4f895950 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs @@ -370,12 +370,15 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } 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 7a1d5b97a887..68cd16375903 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 @@ -46,7 +46,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -67,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs index b6d9195b3f6c..997930301f65 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -277,10 +277,12 @@ HttpContent PrepareMultipartFormDataContent(RequestOptions options) { foreach (var fileParam in options.FileParameters) { - var content = new StreamContent(fileParam.Value.Content); - content.Headers.ContentType = new MediaTypeHeaderValue(fileParam.Value.ContentType); - multipartContent.Add(content, fileParam.Key, - fileParam.Value.Name); + foreach (var file in fileParam.Value) + { + var content = new StreamContent(file.Content); + content.Headers.ContentType = new MediaTypeHeaderValue(file.ContentType); + multipartContent.Add(content, fileParam.Key, file.Name); + } } } return multipartContent; 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 91a5fbf28f3a..70b67cb25906 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 @@ -46,7 +46,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -67,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ApiClient.cs index 6f26226ea86b..ffb05840d5bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ApiClient.cs @@ -371,12 +371,15 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } 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 7a1d5b97a887..68cd16375903 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 @@ -46,7 +46,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -67,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs index 6f26226ea86b..ffb05840d5bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs @@ -371,12 +371,15 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } 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 7a1d5b97a887..68cd16375903 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 @@ -46,7 +46,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -67,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs index ab6f1f72507d..96ed4f895950 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -370,12 +370,15 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } 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 7a1d5b97a887..68cd16375903 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 @@ -46,7 +46,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -67,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs index 6f26226ea86b..ffb05840d5bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -371,12 +371,15 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } 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 7a1d5b97a887..68cd16375903 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 @@ -46,7 +46,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -67,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ApiClient.cs index 62f6adbb205e..bf0d74136153 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ApiClient.cs @@ -370,12 +370,15 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } 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 c6b3ccc38f22..b21e8c5ffcdd 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 @@ -46,7 +46,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -67,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } From f06e7c52f4aee6e6c53fe129e5f4f07161dcc660 Mon Sep 17 00:00:00 2001 From: Anakael Date: Tue, 11 Jan 2022 07:09:33 +0300 Subject: [PATCH 079/175] Add only one auth header (#11272) --- .../resources/csharp-netcore/api.mustache | 12 +++---- .../src/Org.OpenAPITools/Api/FakeApi.cs | 8 ++--- .../src/Org.OpenAPITools/Api/PetApi.cs | 32 +++++++++---------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 8 ++--- .../src/Org.OpenAPITools/Api/PetApi.cs | 32 +++++++++---------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 8 ++--- .../src/Org.OpenAPITools/Api/PetApi.cs | 32 +++++++++---------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 8 ++--- .../src/Org.OpenAPITools/Api/PetApi.cs | 32 +++++++++---------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 8 ++--- .../src/Org.OpenAPITools/Api/PetApi.cs | 32 +++++++++---------- .../src/Org.OpenAPITools/Api/PetApi.cs | 28 ++++++++-------- 12 files changed, 120 insertions(+), 120 deletions(-) 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 ce2000f63e97..c4824e8db8a8 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache @@ -415,21 +415,21 @@ namespace {{packageName}}.{{apiPackage}} {{/isApiKey}} {{#isBasicBasic}} // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } {{/isBasicBasic}} {{#isBasicBearer}} // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } {{/isBasicBearer}} {{#isOAuth}} // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -640,14 +640,14 @@ namespace {{packageName}}.{{apiPackage}} {{#isBasic}} {{#isBasicBasic}} // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } {{/isBasicBasic}} {{#isBasicBearer}} // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -655,7 +655,7 @@ namespace {{packageName}}.{{apiPackage}} {{/isBasic}} {{#isOAuth}} // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs index 57a99469634f..5f1dae74c24d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2188,7 +2188,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2336,7 +2336,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2634,7 +2634,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2724,7 +2724,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs index 39d2e425e630..b42f2c168bae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs @@ -633,7 +633,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -723,7 +723,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -793,7 +793,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -865,7 +865,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -954,7 +954,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1045,7 +1045,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1136,7 +1136,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1229,7 +1229,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1451,7 +1451,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1541,7 +1541,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1618,7 +1618,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1697,7 +1697,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1776,7 +1776,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1857,7 +1857,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1939,7 +1939,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2023,7 +2023,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs index 57a99469634f..5f1dae74c24d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2188,7 +2188,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2336,7 +2336,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2634,7 +2634,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2724,7 +2724,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs index 39d2e425e630..b42f2c168bae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs @@ -633,7 +633,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -723,7 +723,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -793,7 +793,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -865,7 +865,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -954,7 +954,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1045,7 +1045,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1136,7 +1136,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1229,7 +1229,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1451,7 +1451,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1541,7 +1541,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1618,7 +1618,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1697,7 +1697,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1776,7 +1776,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1857,7 +1857,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1939,7 +1939,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2023,7 +2023,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } 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 57a99469634f..5f1dae74c24d 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 @@ -2188,7 +2188,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2336,7 +2336,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2634,7 +2634,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2724,7 +2724,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } 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 39d2e425e630..b42f2c168bae 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 @@ -633,7 +633,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -723,7 +723,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -793,7 +793,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -865,7 +865,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -954,7 +954,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1045,7 +1045,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1136,7 +1136,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1229,7 +1229,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1451,7 +1451,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1541,7 +1541,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1618,7 +1618,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1697,7 +1697,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1776,7 +1776,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1857,7 +1857,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1939,7 +1939,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2023,7 +2023,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index 57a99469634f..5f1dae74c24d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2188,7 +2188,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2336,7 +2336,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2634,7 +2634,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2724,7 +2724,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index 39d2e425e630..b42f2c168bae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -633,7 +633,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -723,7 +723,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -793,7 +793,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -865,7 +865,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -954,7 +954,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1045,7 +1045,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1136,7 +1136,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1229,7 +1229,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1451,7 +1451,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1541,7 +1541,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1618,7 +1618,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1697,7 +1697,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1776,7 +1776,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1857,7 +1857,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1939,7 +1939,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2023,7 +2023,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs index 57a99469634f..5f1dae74c24d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2188,7 +2188,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2336,7 +2336,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2634,7 +2634,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2724,7 +2724,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs index 39d2e425e630..b42f2c168bae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs @@ -633,7 +633,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -723,7 +723,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -793,7 +793,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -865,7 +865,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -954,7 +954,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1045,7 +1045,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1136,7 +1136,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1229,7 +1229,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1451,7 +1451,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1541,7 +1541,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1618,7 +1618,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1697,7 +1697,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1776,7 +1776,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1857,7 +1857,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1939,7 +1939,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2023,7 +2023,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/PetApi.cs index 08b2900cec60..3912ab8d5f76 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/PetApi.cs @@ -571,7 +571,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -648,7 +648,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -718,7 +718,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -790,7 +790,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -863,7 +863,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -938,7 +938,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1013,7 +1013,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1090,7 +1090,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1299,7 +1299,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1376,7 +1376,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1453,7 +1453,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1532,7 +1532,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1611,7 +1611,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1692,7 +1692,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } From 1f7eebd52d495e1a9843467ab6046c2726358fec Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 10 Jan 2022 20:11:57 -0800 Subject: [PATCH 080/175] Fixes openapi-generator.tech content, python-exp documentation helpTxt updated (#11273) * Fixes python-exp line breaks * Docs updated --- docs/generators/python-experimental.md | 2 +- .../codegen/languages/PythonExperimentalClientCodegen.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 968f0d3fb2e3..00614e6ccb12 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -11,7 +11,7 @@ title: Documentation for the python-experimental Generator | generator type | CLIENT | | | generator language | Python | | | generator language version | >=3.9 | | -| helpTxt | Generates a Python client library

Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | +| helpTxt | Generates a Python client library

Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | ## 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. diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 8c6529e99e03..2bcbcef08d07 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -499,7 +499,7 @@ public String getName() { @Override public String getHelp() { String newLine = System.getProperty("line.separator"); - return String.join("
", + return String.join("
", "Generates a Python client library", "", "Features in this generator:", From 45b66d660a9c94e3fa420d9ecfd81b4e8d863b9d Mon Sep 17 00:00:00 2001 From: jiangyuan Date: Tue, 11 Jan 2022 15:21:29 +0800 Subject: [PATCH 081/175] [python] modify python import classVarName to classFileName (#11180) * fix python import classVarName to classFileName * add samples change --- .../resources/python-experimental/README_common.handlebars | 4 ++-- .../resources/python-experimental/__init__apis.handlebars | 4 ++-- .../resources/python-experimental/api_doc_example.handlebars | 4 ++-- .../src/main/resources/python-legacy/__init__api.mustache | 2 +- .../src/main/resources/python-legacy/__init__package.mustache | 2 +- .../src/main/resources/python-legacy/api_test.mustache | 4 ++-- .../src/main/resources/python/README_common.mustache | 4 ++-- .../src/main/resources/python/__init__apis.mustache | 4 ++-- .../src/main/resources/python/api_doc_example.mustache | 4 ++-- .../src/main/resources/python/api_test.mustache | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars index 17663663d7c1..5c57735164b4 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/README_common.handlebars @@ -6,7 +6,7 @@ from pprint import pprint {{#with apiInfo}} {{#each apis}} {{#if @first}} -from {{packageName}}.{{apiPackage}} import {{classVarName}} +from {{packageName}}.{{apiPackage}} import {{classFilename}} {{#each imports}} {{{import}}} {{/each}} @@ -18,7 +18,7 @@ from {{packageName}}.{{apiPackage}} import {{classVarName}} # Enter a context with an instance of the API client with {{{packageName}}}.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = {{classVarName}}.{{{classname}}}(api_client) + api_instance = {{classFilename}}.{{{classname}}}(api_client) {{#each allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{#unless required}} (optional){{/unless}}{{#if defaultValue}} (default to {{{.}}}){{/if}} {{/each}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars index c8466369da77..06fb33610b2a 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/__init__apis.handlebars @@ -10,7 +10,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from {{packagename}}.{{apiPackage}}.{{classVarName}} import {{classname}} +# from {{packagename}}.{{apiPackage}}.{{classFilename}} import {{classname}} # # or import this package, but before doing it, use: # @@ -19,6 +19,6 @@ # Import APIs into API package: {{/if}} -from {{packageName}}.{{apiPackage}}.{{classVarName}} import {{classname}} +from {{packageName}}.{{apiPackage}}.{{classFilename}} import {{classname}} {{/each}} {{/with}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_doc_example.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_doc_example.handlebars index eaa2260e3f05..e6fa0bd4edb8 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/api_doc_example.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_doc_example.handlebars @@ -1,6 +1,6 @@ ```python import {{{packageName}}} -from {{packageName}}.{{apiPackage}} import {{classVarName}} +from {{packageName}}.{{apiPackage}} import {{classFilename}} {{#each imports}} {{{.}}} {{/each}} @@ -9,7 +9,7 @@ from pprint import pprint # Enter a context with an instance of the API client with {{{packageName}}}.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = {{classVarName}}.{{{classname}}}(api_client) + api_instance = {{classFilename}}.{{{classname}}}(api_client) {{#if requiredParams}} # example passing only required values which don't have defaults set diff --git a/modules/openapi-generator/src/main/resources/python-legacy/__init__api.mustache b/modules/openapi-generator/src/main/resources/python-legacy/__init__api.mustache index db658a10fa89..c2232a92f4c1 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/__init__api.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/__init__api.mustache @@ -3,5 +3,5 @@ from __future__ import absolute_import # flake8: noqa # import apis into api package -{{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classVarName}} import {{classname}} +{{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classFilename}} import {{classname}} {{/apis}}{{/apiInfo}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-legacy/__init__package.mustache b/modules/openapi-generator/src/main/resources/python-legacy/__init__package.mustache index f81dd5735fa9..87a7f612d3ba 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/__init__package.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/__init__package.mustache @@ -9,7 +9,7 @@ from __future__ import absolute_import __version__ = "{{packageVersion}}" # import apis into sdk package -{{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classVarName}} import {{classname}} +{{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classFilename}} import {{classname}} {{/apis}}{{/apiInfo}} # import ApiClient from {{packageName}}.api_client import ApiClient diff --git a/modules/openapi-generator/src/main/resources/python-legacy/api_test.mustache b/modules/openapi-generator/src/main/resources/python-legacy/api_test.mustache index 6f8539bb0d61..a981c662a0d2 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/api_test.mustache @@ -7,7 +7,7 @@ from __future__ import absolute_import import unittest import {{packageName}} -from {{apiPackage}}.{{classVarName}} import {{classname}} # noqa: E501 +from {{apiPackage}}.{{classFilename}} import {{classname}} # noqa: E501 from {{packageName}}.rest import ApiException @@ -15,7 +15,7 @@ class {{#operations}}Test{{classname}}(unittest.TestCase): """{{classname}} unit test stubs""" def setUp(self): - self.api = {{apiPackage}}.{{classVarName}}.{{classname}}() # noqa: E501 + self.api = {{apiPackage}}.{{classFilename}}.{{classname}}() # noqa: E501 def tearDown(self): pass diff --git a/modules/openapi-generator/src/main/resources/python/README_common.mustache b/modules/openapi-generator/src/main/resources/python/README_common.mustache index 268d99beb5f4..614a9d0c62ed 100644 --- a/modules/openapi-generator/src/main/resources/python/README_common.mustache +++ b/modules/openapi-generator/src/main/resources/python/README_common.mustache @@ -6,7 +6,7 @@ from pprint import pprint {{#apiInfo}} {{#apis}} {{#-first}} -from {{apiPackage}} import {{classVarName}} +from {{apiPackage}} import {{classFilename}} {{#imports}} {{{import}}} {{/imports}} @@ -18,7 +18,7 @@ from {{apiPackage}} import {{classVarName}} # Enter a context with an instance of the API client with {{{packageName}}}.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = {{classVarName}}.{{{classname}}}(api_client) + api_instance = {{classFilename}}.{{{classname}}}(api_client) {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/python/__init__apis.mustache b/modules/openapi-generator/src/main/resources/python/__init__apis.mustache index b4ec8a9a4720..927bb6d52c43 100644 --- a/modules/openapi-generator/src/main/resources/python/__init__apis.mustache +++ b/modules/openapi-generator/src/main/resources/python/__init__apis.mustache @@ -9,7 +9,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from {{packagename}}.api.{{classVarName}} import {{classname}} +# from {{packagename}}.api.{{classFilename}} import {{classname}} # # or import this package, but before doing it, use: # @@ -18,6 +18,6 @@ # Import APIs into API package: {{/-first}} -from {{apiPackage}}.{{classVarName}} import {{classname}} +from {{apiPackage}}.{{classFilename}} import {{classname}} {{/apis}} {{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache index 6a08d7c660b1..4d6d7bf1dd22 100644 --- a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache @@ -1,7 +1,7 @@ ```python import time import {{{packageName}}} -from {{apiPackage}} import {{classVarName}} +from {{apiPackage}} import {{classFilename}} {{#imports}} {{{.}}} {{/imports}} @@ -15,7 +15,7 @@ with {{{packageName}}}.ApiClient(configuration) as api_client: with {{{packageName}}}.ApiClient() as api_client: {{/hasAuthMethods}} # Create an instance of the API class - api_instance = {{classVarName}}.{{{classname}}}(api_client) + api_instance = {{classFilename}}.{{{classname}}}(api_client) {{#requiredParams}} {{^defaultValue}} {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}} diff --git a/modules/openapi-generator/src/main/resources/python/api_test.mustache b/modules/openapi-generator/src/main/resources/python/api_test.mustache index 4b13fad2420a..8f3d764d0a5a 100644 --- a/modules/openapi-generator/src/main/resources/python/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_test.mustache @@ -3,7 +3,7 @@ import unittest import {{packageName}} -from {{apiPackage}}.{{classVarName}} import {{classname}} # noqa: E501 +from {{apiPackage}}.{{classFilename}} import {{classname}} # noqa: E501 class {{#operations}}Test{{classname}}(unittest.TestCase): From ce04e9b6a2db14d152f24870de28637ae41bc0fb Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 11 Jan 2022 09:31:25 -0800 Subject: [PATCH 082/175] python-experimental, redundant docstrings removed (#11281) * Removes docstrings drom models because type hints already includes this info * Samples updated --- .../schema_composed_or_anytype.handlebars | 19 -------------- .../model_templates/schema_dict.handlebars | 19 -------------- .../model_templates/schema_list.handlebars | 9 ------- .../model_templates/schema_simple.handlebars | 8 ------ .../model/additional_properties_class.py | 12 --------- ...ditional_properties_with_array_of_enums.py | 4 --- .../petstore_api/model/address.py | 4 --- .../petstore_api/model/animal.py | 8 ------ .../petstore_api/model/animal_farm.py | 3 --- .../petstore_api/model/api_response.py | 7 ------ .../petstore_api/model/apple.py | 6 ----- .../petstore_api/model/apple_req.py | 4 --- .../model/array_holding_any_type.py | 3 --- .../model/array_of_array_of_number_only.py | 5 ---- .../petstore_api/model/array_of_enums.py | 3 --- .../model/array_of_number_only.py | 5 ---- .../petstore_api/model/array_test.py | 7 ------ .../model/array_with_validations_in_items.py | 7 ------ .../petstore_api/model/banana.py | 5 ---- .../petstore_api/model/banana_req.py | 4 --- .../petstore_api/model/basque_pig.py | 5 ---- .../petstore_api/model/boolean_enum.py | 2 -- .../petstore_api/model/capitalization.py | 10 -------- .../petstore_api/model/cat.py | 4 --- .../petstore_api/model/cat_all_of.py | 5 ---- .../petstore_api/model/category.py | 6 ----- .../petstore_api/model/child_cat.py | 4 --- .../petstore_api/model/child_cat_all_of.py | 5 ---- .../petstore_api/model/class_model.py | 5 ---- .../petstore_api/model/client.py | 5 ---- .../model/complex_quadrilateral.py | 4 --- .../model/complex_quadrilateral_all_of.py | 5 ---- ...d_any_of_different_types_no_validations.py | 4 --- .../petstore_api/model/composed_array.py | 3 --- .../petstore_api/model/composed_bool.py | 2 -- .../petstore_api/model/composed_none.py | 2 -- .../petstore_api/model/composed_number.py | 2 -- .../petstore_api/model/composed_object.py | 4 --- .../model/composed_one_of_different_types.py | 4 --- .../petstore_api/model/composed_string.py | 2 -- .../petstore_api/model/danish_pig.py | 5 ---- .../model/date_time_with_validations.py | 6 ----- .../model/date_with_validations.py | 6 ----- .../petstore_api/model/dog.py | 4 --- .../petstore_api/model/dog_all_of.py | 5 ---- .../petstore_api/model/drawing.py | 8 ------ .../petstore_api/model/enum_arrays.py | 6 ----- .../petstore_api/model/enum_class.py | 2 -- .../petstore_api/model/enum_test.py | 13 ---------- .../model/equilateral_triangle.py | 4 --- .../model/equilateral_triangle_all_of.py | 5 ---- .../petstore_api/model/file.py | 5 ---- .../model/file_schema_test_class.py | 6 ----- .../petstore_api/model/foo.py | 5 ---- .../petstore_api/model/format_test.py | 25 ------------------- .../petstore_api/model/fruit.py | 5 ---- .../petstore_api/model/fruit_req.py | 4 --- .../petstore_api/model/gm_fruit.py | 5 ---- .../petstore_api/model/grandparent_animal.py | 7 ------ .../petstore_api/model/has_only_read_only.py | 6 ----- .../petstore_api/model/health_check_result.py | 5 ---- .../model/inline_response_default.py | 5 ---- .../petstore_api/model/integer_enum.py | 2 -- .../petstore_api/model/integer_enum_big.py | 2 -- .../model/integer_enum_one_value.py | 2 -- .../model/integer_enum_with_default_value.py | 2 -- .../petstore_api/model/integer_max10.py | 6 ----- .../petstore_api/model/integer_min15.py | 6 ----- .../petstore_api/model/isosceles_triangle.py | 4 --- .../model/isosceles_triangle_all_of.py | 5 ---- .../petstore_api/model/mammal.py | 6 ----- .../petstore_api/model/map_test.py | 8 ------ ...perties_and_additional_properties_class.py | 7 ------ .../petstore_api/model/model200_response.py | 6 ----- .../petstore_api/model/model_return.py | 5 ---- .../petstore_api/model/name.py | 7 ------ .../model/no_additional_properties.py | 4 --- .../petstore_api/model/nullable_class.py | 16 ------------ .../petstore_api/model/nullable_shape.py | 6 ----- .../petstore_api/model/nullable_string.py | 2 -- .../petstore_api/model/number_only.py | 5 ---- .../model/number_with_validations.py | 6 ----- .../model/object_model_with_ref_props.py | 7 ------ .../object_with_difficultly_named_props.py | 7 ------ .../model/object_with_validations.py | 8 ------ .../petstore_api/model/order.py | 10 -------- .../petstore_api/model/parent_pet.py | 6 ----- .../petstore_api/model/pet.py | 10 -------- .../petstore_api/model/pig.py | 6 ----- .../petstore_api/model/player.py | 6 ----- .../petstore_api/model/quadrilateral.py | 6 ----- .../model/quadrilateral_interface.py | 6 ----- .../petstore_api/model/read_only_first.py | 6 ----- .../petstore_api/model/scalene_triangle.py | 4 --- .../model/scalene_triangle_all_of.py | 5 ---- .../petstore_api/model/shape.py | 6 ----- .../petstore_api/model/shape_or_null.py | 6 ----- .../model/simple_quadrilateral.py | 4 --- .../model/simple_quadrilateral_all_of.py | 5 ---- .../petstore_api/model/some_object.py | 4 --- .../petstore_api/model/special_model_name.py | 5 ---- .../petstore_api/model/string_boolean_map.py | 4 --- .../petstore_api/model/string_enum.py | 2 -- .../model/string_enum_with_default_value.py | 2 -- .../model/string_with_validation.py | 6 ----- .../petstore_api/model/tag.py | 6 ----- .../petstore_api/model/triangle.py | 6 ----- .../petstore_api/model/triangle_interface.py | 6 ----- .../petstore_api/model/user.py | 16 ------------ .../petstore_api/model/whale.py | 7 ------ .../petstore_api/model/zebra.py | 6 ----- 111 files changed, 652 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars index 18527e02effd..2c9a6f469ba0 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars @@ -32,25 +32,6 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}} {{{unescapedDescription}}} {{/if}} - - Attributes: -{{#each vars}} - {{baseName}} ({{#if isArray}}tuple,{{/if}}{{#if isBoolean}}bool,{{/if}}{{#if isDate}}date,{{/if}}{{#if isDateTime}}datetime,{{/if}}{{#if isMap}}dict,{{/if}}{{#if isFloat}}float,{{/if}}{{#if isNumber}}float,{{/if}}{{#if isUnboundedInteger}}int,{{/if}}{{#if isShort}}int,{{/if}}{{#if isLong}}int,{{/if}}{{#if isString}}str,{{/if}}{{#if isByteArray}}str,{{/if}}{{#if isNull}} none_type,{{/if}}): {{#if description}}{{description}}{{/if}} -{{/each}} -{{#if hasValidation}} - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. -{{/if}} -{{#with additionalProperties}} - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties -{{/with}} -{{#if getHasDiscriminatorWithNonEmptyMapping}} - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class -{{/if}} """ {{/if}} {{#or isMap isAnyType}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_dict.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_dict.handlebars index f811b092e506..c17e0f5764c0 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_dict.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_dict.handlebars @@ -15,25 +15,6 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}} {{{unescapedDescription}}} {{/if}} - - Attributes: -{{#each vars}} - {{baseName}} ({{#if isArray}}tuple,{{/if}}{{#if isBoolean}}bool,{{/if}}{{#if isDate}}date,{{/if}}{{#if isDateTime}}datetime,{{/if}}{{#if isMap}}dict,{{/if}}{{#if isFloat}}float,{{/if}}{{#if isDouble}}float,{{/if}}{{#if isNumber}}int, float,{{/if}}{{#if isUnboundedInteger}}int,{{/if}}{{#if isShort}}int,{{/if}}{{#if isLong}}int,{{/if}}{{#if isString}}str,{{/if}}{{#if isByteArray}}str,{{/if}}{{#if isNull}} none_type,{{/if}}): {{#if description}}{{description}}{{/if}} -{{/each}} -{{#if hasValidation}} - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. -{{/if}} -{{#with additionalProperties}} - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties -{{/with}} -{{#if getHasDiscriminatorWithNonEmptyMapping}} - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class -{{/if}} """ {{/if}} {{> model_templates/dict_partial }} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_list.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_list.handlebars index 8617eeb0559e..542b486ab4c1 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_list.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_list.handlebars @@ -15,15 +15,6 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}} {{{unescapedDescription}}} {{/if}} - - Attributes: - _items (Schema): the schema definition of the array items -{{#if hasValidation}} - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. -{{/if}} """ {{/if}} {{#with items}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_simple.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_simple.handlebars index 06ba2af1917a..ea12a00ff406 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_simple.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_simple.handlebars @@ -18,14 +18,6 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}} {{{unescapedDescription}}} {{/if}} - - Attributes: -{{#if hasValidation}} - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. -{{/if}} """ {{/if}} {{#if isEnum}} diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py index a5e4f0a45d9b..a9dbd2396f09 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py @@ -65,18 +65,6 @@ class AdditionalPropertiesClass( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - map_property (dict,): - map_of_map_property (dict,): - anytype_1 (): - map_with_undeclared_properties_anytype_1 (dict,): - map_with_undeclared_properties_anytype_2 (dict,): - map_with_undeclared_properties_anytype_3 (dict,): - empty_map (dict,): an object with no declared properties and no undeclared properties, hence it's an empty map. - map_with_undeclared_properties_string (dict,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py index db4d01003d30..e6b66637e225 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py @@ -65,10 +65,6 @@ class AdditionalPropertiesWithArrayOfEnums( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py index d088fe451588..255e88d8f05b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py @@ -65,10 +65,6 @@ class Address( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _additional_properties = IntSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py index 783f9026bd5a..c5a1a74ddfe4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py @@ -65,14 +65,6 @@ class Animal( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - className (str,): - color (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ _required_property_names = set(( 'className', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py index 1868ee5ee69d..4a2b3dca68af 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py @@ -65,9 +65,6 @@ class AnimalFarm( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _items (Schema): the schema definition of the array items """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py index 505d16f177a1..b282cdccb5d7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py @@ -65,13 +65,6 @@ class ApiResponse( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - code (int,): - type (str,): - message (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ code = Int32Schema type = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py index 07991225ef50..eef32e7fc2c0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py @@ -68,12 +68,6 @@ class Apple( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - cultivar (str,): - origin (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'cultivar', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py index c94a177b0ac9..907e5332a513 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py @@ -65,10 +65,6 @@ class AppleReq( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - cultivar (str,): - mealy (bool,): """ _required_property_names = set(( 'cultivar', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py index 90f05d5eb124..a87a3963bf07 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py @@ -65,8 +65,5 @@ class ArrayHoldingAnyType( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _items (Schema): the schema definition of the array items """ _items = AnyTypeSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py index 6f9cd63088ba..0441017cce22 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py @@ -65,11 +65,6 @@ class ArrayOfArrayOfNumberOnly( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - ArrayArrayNumber (tuple,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py index ddb90807d27d..84a16a901f48 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py @@ -65,9 +65,6 @@ class ArrayOfEnums( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _items (Schema): the schema definition of the array items """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py index 1ee632533c37..befe0446d4a4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py @@ -65,11 +65,6 @@ class ArrayOfNumberOnly( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - ArrayNumber (tuple,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py index f69faad445ef..9d5ed1fe8f1c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py @@ -65,13 +65,6 @@ class ArrayTest( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - array_of_string (tuple,): - array_array_of_integer (tuple,): - array_array_of_model (tuple,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py index b34bcf6c27f5..0d8bd1f5f595 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py @@ -68,13 +68,6 @@ class ArrayWithValidationsInItems( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _items (Schema): the schema definition of the array items - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py index 9cdf3cd55c6b..2b745add0af0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py @@ -65,11 +65,6 @@ class Banana( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - lengthCm (int, float,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'lengthCm', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py index 1cf74f05e3e6..938ad1c8da9d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py @@ -65,10 +65,6 @@ class BananaReq( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - lengthCm (int, float,): - sweet (bool,): """ _required_property_names = set(( 'lengthCm', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py index c11f9ab4bf93..5470dcaa409f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py @@ -65,11 +65,6 @@ class BasquePig( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - className (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'className', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py index 50b7181cc7e5..26b0d6fb5d8a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py @@ -70,8 +70,6 @@ class BooleanEnum( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py index 8b508242ff2f..daef598fe3a6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py @@ -65,16 +65,6 @@ class Capitalization( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - smallCamel (str,): - CapitalCamel (str,): - small_Snake (str,): - Capital_Snake (str,): - SCA_ETH_Flow_Points (str,): - ATT_NAME (str,): Name of the pet - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ smallCamel = StrSchema CapitalCamel = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py index 080d2bde5b8c..7ac8563f7784 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py @@ -65,10 +65,6 @@ class Cat( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py index b08ff9b66f0b..ec36b96f9f8f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py @@ -65,11 +65,6 @@ class CatAllOf( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - declawed (bool,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ declawed = BoolSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py index abc7c3fc95ac..a3b9e2134d7b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py @@ -65,12 +65,6 @@ class Category( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - id (int,): - name (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'name', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py index e33b977dea1a..d165c485a8f7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py @@ -65,10 +65,6 @@ class ChildCat( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py index aadedf154812..108a5620181c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py @@ -65,11 +65,6 @@ class ChildCatAllOf( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - name (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ name = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py index 54118dfb5d64..432b40a385d2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py @@ -67,11 +67,6 @@ class ClassModel( Do not edit the class manually. Model for testing model with "_class" property - - Attributes: - _class (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _class = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py index 713b3156872c..372f5b8fe04e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py @@ -65,11 +65,6 @@ class Client( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - client (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ client = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py index 8a7f81af7539..ef414f33d685 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py @@ -65,10 +65,6 @@ class ComplexQuadrilateral( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py index 095c96095ac0..128d50c3f037 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py @@ -65,11 +65,6 @@ class ComplexQuadrilateralAllOf( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - quadrilateralType (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py index fb200660c6e2..67f71c767826 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py @@ -65,10 +65,6 @@ class ComposedAnyOfDifferentTypesNoValidations( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py index 6a9d0e19c3f9..197dc534477f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py @@ -65,8 +65,5 @@ class ComposedArray( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _items (Schema): the schema definition of the array items """ _items = AnyTypeSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py index b74990ba87a5..57d1a5862ee4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py @@ -66,8 +66,6 @@ class ComposedBool( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py index ac6f516344f4..7ba7de5a523d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py @@ -66,8 +66,6 @@ class ComposedNone( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py index e932e138bcc3..f6725565fc8d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py @@ -66,8 +66,6 @@ class ComposedNumber( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py index 92942e256c40..64435b685709 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py @@ -66,10 +66,6 @@ class ComposedObject( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py index 0a454dbceede..9f42e28f2fa8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py @@ -67,10 +67,6 @@ class ComposedOneOfDifferentTypes( Do not edit the class manually. this is a model that allows payloads of type object or number - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py index dec60c328efe..75a01e3dee82 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py @@ -66,8 +66,6 @@ class ComposedString( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py index d269be73d17d..559aefad1dcb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py @@ -65,11 +65,6 @@ class DanishPig( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - className (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'className', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py index d7bc79a11f95..800e2d5fa1d8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py @@ -70,11 +70,5 @@ class DateTimeWithValidations( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. """ pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py index a61d8da1b01f..5c2886e4968e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py @@ -70,11 +70,5 @@ class DateWithValidations( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. """ pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py index dbfc2b137707..2556f7bab696 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py @@ -65,10 +65,6 @@ class Dog( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py index 1767fc983aef..fac002ead0c3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py @@ -65,11 +65,6 @@ class DogAllOf( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - breed (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ breed = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py index 5196bd01cce1..fa243f3bdf16 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py @@ -65,14 +65,6 @@ class Drawing( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - mainShape (): - shapeOrNull (): - nullableShape (): - shapes (tuple,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py index 54d293edd166..c5adca615689 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py @@ -65,12 +65,6 @@ class EnumArrays( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - just_symbol (str,): - array_enum (tuple,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py index 475c1dd6ca26..371b78350623 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py @@ -72,8 +72,6 @@ class EnumClass( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py index 77769e3cd748..6c0dd1eb4f95 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py @@ -65,19 +65,6 @@ class EnumTest( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - enum_string (str,): - enum_string_required (str,): - enum_integer (int,): - enum_number (float,): - stringEnum (): - IntegerEnum (): - StringEnumWithDefaultValue (): - IntegerEnumWithDefaultValue (): - IntegerEnumOneValue (): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'enum_string_required', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py index 69bf6944cf7a..75d6046477f8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py @@ -65,10 +65,6 @@ class EquilateralTriangle( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py index fb6edf7c7490..a6a6e6a494d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py @@ -65,11 +65,6 @@ class EquilateralTriangleAllOf( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - triangleType (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py index 30ccd52a5f56..a93066658539 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py @@ -67,11 +67,6 @@ class File( Do not edit the class manually. Must be named `File` for test. - - Attributes: - sourceURI (str,): Test capitalization - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ sourceURI = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py index f0f6f4d9d83a..632b4be2e003 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py @@ -65,12 +65,6 @@ class FileSchemaTestClass( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - file (): - files (tuple,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py index 2160642188d6..8ad604af2b68 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py @@ -65,11 +65,6 @@ class Foo( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - bar (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ bar = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py index 913a2a90d1b3..e86ab8fc5da5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py @@ -65,31 +65,6 @@ class FormatTest( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - integer (int,): - int32 (int,): - int32withValidations (int,): - int64 (int,): - number (int, float,): - float (float,): this is a reserved python keyword - float32 (float,): - double (float,): - float64 (float,): - arrayWithUniqueItems (tuple,): - string (str,): - byte (str,): - binary (): - date (date,): - dateTime (datetime,): - uuid (str,): - uuidNoExample (str,): - password (str,): - pattern_with_digits (str,): A string that is a 10 digit number. Can have leading zeros. - pattern_with_digits_and_delimiter (str,): A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - noneProp ( none_type,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'number', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py index 77d38d632d42..c4d04e6f6fa4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py @@ -65,11 +65,6 @@ class Fruit( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - color (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ color = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py index 37fcf71a44b4..5170901cec31 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py @@ -65,10 +65,6 @@ class FruitReq( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py index ab342907147c..45a96f3718ec 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py @@ -65,11 +65,6 @@ class GmFruit( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - color (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ color = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py index f5625407bc7b..fce1e5b8a454 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py @@ -65,13 +65,6 @@ class GrandparentAnimal( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - pet_type (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ _required_property_names = set(( 'pet_type', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py index 3a84082bd471..35a721090940 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py @@ -65,12 +65,6 @@ class HasOnlyReadOnly( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - bar (str,): - foo (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ bar = StrSchema foo = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py index 9cf48be2b363..db0e35866717 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py @@ -67,11 +67,6 @@ class HealthCheckResult( Do not edit the class manually. Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - - Attributes: - NullableMessage (str, none_type,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py index 6b0f32db72ac..ae29e2cf1c77 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py @@ -65,11 +65,6 @@ class InlineResponseDefault( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - string (): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py index 02a228957b69..857b0cffa908 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py @@ -72,8 +72,6 @@ class IntegerEnum( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py index babc39df7d43..bcc9aa57f930 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py @@ -72,8 +72,6 @@ class IntegerEnumBig( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py index fa7e4258cbbb..17b1d5997795 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py @@ -70,8 +70,6 @@ class IntegerEnumOneValue( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py index cb5860a0bdbe..2916e4fcdfff 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py @@ -72,8 +72,6 @@ class IntegerEnumWithDefaultValue( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py index affe4283ac61..8a57a1cdd5e0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py @@ -68,11 +68,5 @@ class IntegerMax10( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. """ pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py index 6a6488136d16..18a76f8e6ff1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py @@ -68,11 +68,5 @@ class IntegerMin15( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. """ pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py index b8527d08df55..2f14974794eb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py @@ -65,10 +65,6 @@ class IsoscelesTriangle( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py index 8d9bc65556f3..96d8b286c0e7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py @@ -65,11 +65,6 @@ class IsoscelesTriangleAllOf( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - triangleType (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py index fd1784636b2b..6868e7e2a8b8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py @@ -65,12 +65,6 @@ class Mammal( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py index 90e2f053e683..9fca5b0310b1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py @@ -65,14 +65,6 @@ class MapTest( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - map_map_of_string (dict,): - map_of_enum_string (dict,): - direct_map (dict,): - indirect_map (): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py index e3a39533757c..fa0afeab0beb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -65,13 +65,6 @@ class MixedPropertiesAndAdditionalPropertiesClass( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - uuid (str,): - dateTime (datetime,): - map (dict,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ uuid = StrSchema dateTime = DateTimeSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py index c47980d5a7f4..a7fcdd30ad5b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py @@ -67,12 +67,6 @@ class Model200Response( Do not edit the class manually. model with an invalid class name for python, starts with a number - - Attributes: - name (int,): - class (str,): this is a reserved python keyword - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ name = Int32Schema _class = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py index 81116280224e..8ca497627cc0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py @@ -67,11 +67,6 @@ class ModelReturn( Do not edit the class manually. Model for testing reserved words - - Attributes: - return (int,): this is a reserved python keyword - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _return = Int32Schema locals()['return'] = _return diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py index 7343223c4d21..c5700c9b7634 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py @@ -67,13 +67,6 @@ class Name( Do not edit the class manually. Model for testing model name same as property name - - Attributes: - name (int,): - snake_case (int,): - property (str,): this is a reserved python keyword - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'name', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py index 910b8bc1f117..2ec538c5dae2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py @@ -65,10 +65,6 @@ class NoAdditionalProperties( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - id (int,): - petId (int,): """ _required_property_names = set(( 'id', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py index 45743da43945..329db7acc08b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py @@ -65,22 +65,6 @@ class NullableClass( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - integer_prop (int, none_type,): - number_prop (int, float, none_type,): - boolean_prop (bool, none_type,): - string_prop (str, none_type,): - date_prop (date, none_type,): - datetime_prop (datetime, none_type,): - array_nullable_prop (tuple, none_type,): - array_and_items_nullable_prop (tuple, none_type,): - array_items_nullable (tuple,): - object_nullable_prop (dict, none_type,): - object_and_items_nullable_prop (dict, none_type,): - object_items_nullable (dict,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py index 7c4e30792344..8bf418c14451 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py @@ -67,12 +67,6 @@ class NullableShape( Do not edit the class manually. 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. For a nullable composed schema to work, one of its chosen oneOf schemas must be type null - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py index 2386522587dc..db4a33d9be04 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py @@ -68,8 +68,6 @@ class NullableString( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py index ff476caf0321..d9e2b49aa814 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py @@ -65,11 +65,6 @@ class NumberOnly( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - JustNumber (int, float,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ JustNumber = NumberSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py index 25ec9cdf00fc..fa87e19d3a46 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py @@ -69,11 +69,5 @@ class NumberWithValidations( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. """ pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py index 99ca8288ee81..005497a8fa43 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py @@ -67,13 +67,6 @@ class ObjectModelWithRefProps( Do not edit the class manually. a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations - - Attributes: - myNumber (): - myString (str,): - myBoolean (bool,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py index 11c22fd99f75..2beb1a96edff 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py @@ -67,13 +67,6 @@ class ObjectWithDifficultlyNamedProps( Do not edit the class manually. model with properties that have invalid names for python - - Attributes: - $special[property.name] (int,): - 123-list (str,): - 123Number (int,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( '123-list', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py index c55d028c3744..ff52e9e6a072 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py @@ -68,14 +68,6 @@ class ObjectWithValidations( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py index b00c227a86c7..e272d48cf0dc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py @@ -65,16 +65,6 @@ class Order( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - id (int,): - petId (int,): - quantity (int,): - shipDate (datetime,): - status (str,): Order Status - complete (bool,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ id = Int64Schema petId = Int64Schema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py index b9066defb501..4946eb510ddc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py @@ -66,12 +66,6 @@ class ParentPet( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py index f602e6e722d6..3bd1fcadb75a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py @@ -67,16 +67,6 @@ class Pet( Do not edit the class manually. Pet object that needs to be added to the store - - Attributes: - id (int,): - category (): - name (str,): - photoUrls (tuple,): - tags (tuple,): - status (str,): pet status in the store - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'name', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py index 02ef6df613b5..e5dc2bb1710a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py @@ -65,12 +65,6 @@ class Pig( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py index b568eadf36e7..817770d4455e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py @@ -67,12 +67,6 @@ class Player( Do not edit the class manually. a model that includes a self reference this forces properties and additionalProperties to be lazy loaded in python models because the Player class has not fully loaded when defining properties - - Attributes: - name (str,): - enemyPlayer (): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ name = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py index e5e8dd8788af..85fa3e763349 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py @@ -65,12 +65,6 @@ class Quadrilateral( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py index 606805b40eee..52f17cf2ec81 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py @@ -65,12 +65,6 @@ class QuadrilateralInterface( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - shapeType (str,): - quadrilateralType (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'shapeType', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py index 136a772cd00d..ebc9b3b5662d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py @@ -65,12 +65,6 @@ class ReadOnlyFirst( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - bar (str,): - baz (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ bar = StrSchema baz = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py index 0639b5aeb3c1..9bddbc85da57 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py @@ -65,10 +65,6 @@ class ScaleneTriangle( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py index 9e031ca5a74d..f5c2edcb720c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py @@ -65,11 +65,6 @@ class ScaleneTriangleAllOf( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - triangleType (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py index 6142062fbc7e..4aaa6b6be132 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py @@ -65,12 +65,6 @@ class Shape( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py index b1a7ecd967d1..121988a3def9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py @@ -67,12 +67,6 @@ class ShapeOrNull( Do not edit the class manually. The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py index bc907bfb30b5..b326d1a58378 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py @@ -65,10 +65,6 @@ class SimpleQuadrilateral( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py index b6b63fb9ff04..ff52c0145319 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py @@ -65,11 +65,6 @@ class SimpleQuadrilateralAllOf( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - quadrilateralType (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py index c4fa2a0cff63..2b7e243a476b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py @@ -65,10 +65,6 @@ class SomeObject( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py index 47c8e538244d..967b02cb3d0c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py @@ -67,11 +67,6 @@ class SpecialModelName( Do not edit the class manually. model with an invalid class name for python - - Attributes: - a (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ a = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py index 8022c91ced12..14fb2216dad5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py @@ -65,10 +65,6 @@ class StringBooleanMap( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _additional_properties = BoolSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py index 0f803ec7d242..a8fa2a6c6bac 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py @@ -81,8 +81,6 @@ class StringEnum( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py index 7894c4093a43..52689f388b52 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py @@ -72,8 +72,6 @@ class StringEnumWithDefaultValue( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py index 135b181127db..7b41acff15d2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py @@ -68,11 +68,5 @@ class StringWithValidation( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _validations (dict): the validations which apply to the current Schema - The value is a dict that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. """ pass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py index 275974b2ecf3..0316fce5b92b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py @@ -65,12 +65,6 @@ class Tag( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - id (int,): - name (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ id = Int64Schema name = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py index a35af496f9c2..dae6c43d2130 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py @@ -65,12 +65,6 @@ class Triangle( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties - _discriminator(cls) -> dict: the key is the required discriminator propertyName - the value is a dict mapping from a string name to the corresponding Schema class """ @classmethod diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py index d21d93687c8e..db721a77afbf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py @@ -65,12 +65,6 @@ class TriangleInterface( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - shapeType (str,): - triangleType (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'shapeType', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py index dccbf4d2040e..c55c2e0e6878 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py @@ -65,22 +65,6 @@ class User( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - id (int,): - username (str,): - firstName (str,): - lastName (str,): - email (str,): - password (str,): - phone (str,): - userStatus (int,): User Status - objectWithNoDeclaredProps (dict,): test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - objectWithNoDeclaredPropsNullable (dict, none_type,): test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - anyTypeProp (): 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 - anyTypePropNullable (): 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. - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ id = Int64Schema username = StrSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py index 2018c62eb3c2..dabdd735658b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py @@ -65,13 +65,6 @@ class Whale( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - hasBaleen (bool,): - hasTeeth (bool,): - className (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'className', diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py index 8a5ef4550d78..17d8746ce705 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py @@ -65,12 +65,6 @@ class Zebra( Ref: https://openapi-generator.tech Do not edit the class manually. - - Attributes: - type (str,): - className (str,): - _additional_properties (Schema): the definition used for additional properties - that are not defined in _properties """ _required_property_names = set(( 'className', From 95a1154c20658e48af38d02aa08094064d27952c Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 11 Jan 2022 21:51:50 -0800 Subject: [PATCH 083/175] python-experimental adds DecimalSchema (#11282) * Fixes test * Adds decimal examples to the pythonExp generator * Adds isDecimal to CodegenModel, updates python-exp samples * Fixes decimal types in ObjectModelWIthDecimalProperties and DecimalPayload * Updates tests * Decimal feature added to python-exp docs * Samples and docs regenerated --- docs/generators/python-experimental.md | 2 +- .../openapitools/codegen/CodegenModel.java | 6 +- .../PythonExperimentalClientCodegen.java | 10 ++ .../python-experimental/api_client.handlebars | 1 - .../python-experimental/api_test.handlebars | 2 +- .../imports_schema_types.handlebars | 3 +- .../model_templates/new.handlebars | 4 +- .../schema_composed_or_anytype.handlebars | 2 +- .../model_templates/var_equals_cls.handlebars | 2 +- .../model_templates/xbase_schema.handlebars | 3 + .../python-experimental/model_test.handlebars | 3 +- .../python-experimental/schemas.handlebars | 137 ++++++++++++------ ...odels-for-testing-with-http-signature.yaml | 29 ++++ .../.openapi-generator/FILES | 8 + .../petstore/python-experimental/README.md | 4 + .../python-experimental/docs/Currency.md | 8 + .../docs/DecimalPayload.md | 8 + .../python-experimental/docs/Money.md | 11 ++ .../docs/ObjectWithDecimalProperties.md | 12 ++ .../call_123_test_special_tags.py | 3 +- .../api/default_api_endpoints/foo_get.py | 3 +- ...ditional_properties_with_array_of_enums.py | 3 +- .../api/fake_api_endpoints/array_model.py | 3 +- .../api/fake_api_endpoints/array_of_enums.py | 3 +- .../body_with_file_schema.py | 3 +- .../body_with_query_params.py | 3 +- .../api/fake_api_endpoints/boolean.py | 3 +- .../case_sensitive_params.py | 3 +- .../api/fake_api_endpoints/client_model.py | 3 +- .../composed_one_of_different_types.py | 3 +- .../fake_api_endpoints/endpoint_parameters.py | 5 +- .../api/fake_api_endpoints/enum_parameters.py | 5 +- .../api/fake_api_endpoints/fake_health_get.py | 3 +- .../fake_api_endpoints/group_parameters.py | 3 +- .../inline_additional_properties.py | 5 +- .../api/fake_api_endpoints/json_form_data.py | 5 +- .../api/fake_api_endpoints/mammal.py | 3 +- .../number_with_validations.py | 3 +- .../object_model_with_ref_props.py | 3 +- .../parameter_collisions.py | 3 +- .../query_parameter_collection_format.py | 3 +- .../api/fake_api_endpoints/string.py | 3 +- .../api/fake_api_endpoints/string_enum.py | 3 +- .../upload_download_file.py | 3 +- .../api/fake_api_endpoints/upload_file.py | 5 +- .../api/fake_api_endpoints/upload_files.py | 5 +- .../classname.py | 3 +- .../api/pet_api_endpoints/add_pet.py | 3 +- .../api/pet_api_endpoints/delete_pet.py | 3 +- .../pet_api_endpoints/find_pets_by_status.py | 3 +- .../pet_api_endpoints/find_pets_by_tags.py | 3 +- .../api/pet_api_endpoints/get_pet_by_id.py | 3 +- .../api/pet_api_endpoints/update_pet.py | 3 +- .../pet_api_endpoints/update_pet_with_form.py | 5 +- .../upload_file_with_required_file.py | 5 +- .../api/pet_api_endpoints/upload_image.py | 5 +- .../api/store_api_endpoints/delete_order.py | 3 +- .../api/store_api_endpoints/get_inventory.py | 5 +- .../store_api_endpoints/get_order_by_id.py | 3 +- .../api/store_api_endpoints/place_order.py | 3 +- .../api/user_api_endpoints/create_user.py | 3 +- .../create_users_with_array_input.py | 3 +- .../create_users_with_list_input.py | 3 +- .../api/user_api_endpoints/delete_user.py | 3 +- .../user_api_endpoints/get_user_by_name.py | 3 +- .../api/user_api_endpoints/login_user.py | 3 +- .../api/user_api_endpoints/logout_user.py | 3 +- .../api/user_api_endpoints/update_user.py | 3 +- .../petstore_api/api_client.py | 1 - .../model/additional_properties_class.py | 15 +- ...ditional_properties_with_array_of_enums.py | 5 +- .../petstore_api/model/address.py | 5 +- .../petstore_api/model/animal.py | 5 +- .../petstore_api/model/animal_farm.py | 3 +- .../petstore_api/model/api_response.py | 5 +- .../petstore_api/model/apple.py | 5 +- .../petstore_api/model/apple_req.py | 5 +- .../model/array_holding_any_type.py | 3 +- .../model/array_of_array_of_number_only.py | 5 +- .../petstore_api/model/array_of_enums.py | 3 +- .../model/array_of_number_only.py | 5 +- .../petstore_api/model/array_test.py | 5 +- .../model/array_with_validations_in_items.py | 3 +- .../petstore_api/model/banana.py | 5 +- .../petstore_api/model/banana_req.py | 5 +- .../petstore_api/model/bar.py | 3 +- .../petstore_api/model/basque_pig.py | 5 +- .../petstore_api/model/boolean.py | 3 +- .../petstore_api/model/boolean_enum.py | 3 +- .../petstore_api/model/capitalization.py | 5 +- .../petstore_api/model/cat.py | 7 +- .../petstore_api/model/cat_all_of.py | 5 +- .../petstore_api/model/category.py | 5 +- .../petstore_api/model/child_cat.py | 7 +- .../petstore_api/model/child_cat_all_of.py | 5 +- .../petstore_api/model/class_model.py | 7 +- .../petstore_api/model/client.py | 5 +- .../model/complex_quadrilateral.py | 7 +- .../model/complex_quadrilateral_all_of.py | 5 +- ...d_any_of_different_types_no_validations.py | 7 +- .../petstore_api/model/composed_array.py | 3 +- .../petstore_api/model/composed_bool.py | 5 +- .../petstore_api/model/composed_none.py | 5 +- .../petstore_api/model/composed_number.py | 5 +- .../petstore_api/model/composed_object.py | 5 +- .../model/composed_one_of_different_types.py | 9 +- .../petstore_api/model/composed_string.py | 5 +- .../petstore_api/model/currency.py | 85 +++++++++++ .../petstore_api/model/danish_pig.py | 5 +- .../petstore_api/model/date_time_test.py | 3 +- .../model/date_time_with_validations.py | 3 +- .../model/date_with_validations.py | 3 +- .../petstore_api/model/decimal_payload.py | 60 ++++++++ .../petstore_api/model/dog.py | 7 +- .../petstore_api/model/dog_all_of.py | 5 +- .../petstore_api/model/drawing.py | 5 +- .../petstore_api/model/enum_arrays.py | 5 +- .../petstore_api/model/enum_class.py | 3 +- .../petstore_api/model/enum_test.py | 5 +- .../model/equilateral_triangle.py | 7 +- .../model/equilateral_triangle_all_of.py | 5 +- .../petstore_api/model/file.py | 5 +- .../model/file_schema_test_class.py | 5 +- .../petstore_api/model/foo.py | 5 +- .../petstore_api/model/format_test.py | 5 +- .../petstore_api/model/fruit.py | 7 +- .../petstore_api/model/fruit_req.py | 7 +- .../petstore_api/model/gm_fruit.py | 7 +- .../petstore_api/model/grandparent_animal.py | 5 +- .../petstore_api/model/has_only_read_only.py | 5 +- .../petstore_api/model/health_check_result.py | 7 +- .../model/inline_response_default.py | 5 +- .../petstore_api/model/integer_enum.py | 3 +- .../petstore_api/model/integer_enum_big.py | 3 +- .../model/integer_enum_one_value.py | 3 +- .../model/integer_enum_with_default_value.py | 3 +- .../petstore_api/model/integer_max10.py | 3 +- .../petstore_api/model/integer_min15.py | 3 +- .../petstore_api/model/isosceles_triangle.py | 7 +- .../model/isosceles_triangle_all_of.py | 5 +- .../petstore_api/model/mammal.py | 7 +- .../petstore_api/model/map_test.py | 13 +- ...perties_and_additional_properties_class.py | 7 +- .../petstore_api/model/model200_response.py | 7 +- .../petstore_api/model/model_return.py | 7 +- .../petstore_api/model/money.py | 99 +++++++++++++ .../petstore_api/model/name.py | 7 +- .../model/no_additional_properties.py | 5 +- .../petstore_api/model/nullable_class.py | 39 ++--- .../petstore_api/model/nullable_shape.py | 7 +- .../petstore_api/model/nullable_string.py | 5 +- .../petstore_api/model/number.py | 3 +- .../petstore_api/model/number_only.py | 5 +- .../model/number_with_validations.py | 3 +- .../petstore_api/model/object_interface.py | 3 +- .../model/object_model_with_ref_props.py | 5 +- .../model/object_with_decimal_properties.py | 98 +++++++++++++ .../object_with_difficultly_named_props.py | 5 +- .../model/object_with_validations.py | 5 +- .../petstore_api/model/order.py | 5 +- .../petstore_api/model/parent_pet.py | 5 +- .../petstore_api/model/pet.py | 5 +- .../petstore_api/model/pig.py | 7 +- .../petstore_api/model/player.py | 5 +- .../petstore_api/model/quadrilateral.py | 7 +- .../model/quadrilateral_interface.py | 7 +- .../petstore_api/model/read_only_first.py | 5 +- .../petstore_api/model/scalene_triangle.py | 7 +- .../model/scalene_triangle_all_of.py | 5 +- .../petstore_api/model/shape.py | 7 +- .../petstore_api/model/shape_or_null.py | 7 +- .../model/simple_quadrilateral.py | 7 +- .../model/simple_quadrilateral_all_of.py | 5 +- .../petstore_api/model/some_object.py | 7 +- .../petstore_api/model/special_model_name.py | 5 +- .../petstore_api/model/string.py | 3 +- .../petstore_api/model/string_boolean_map.py | 5 +- .../petstore_api/model/string_enum.py | 5 +- .../model/string_enum_with_default_value.py | 3 +- .../model/string_with_validation.py | 3 +- .../petstore_api/model/tag.py | 5 +- .../petstore_api/model/triangle.py | 7 +- .../petstore_api/model/triangle_interface.py | 7 +- .../petstore_api/model/user.py | 7 +- .../petstore_api/model/whale.py | 5 +- .../petstore_api/model/zebra.py | 5 +- .../petstore_api/models/__init__.py | 4 + .../petstore_api/schemas.py | 137 ++++++++++++------ .../test/test_additional_properties_class.py | 2 - ...ditional_properties_with_array_of_enums.py | 2 - .../python-experimental/test/test_address.py | 2 - .../python-experimental/test/test_animal.py | 2 - .../test/test_animal_farm.py | 2 - .../test/test_another_fake_api.py | 1 - .../test/test_api_response.py | 2 - .../python-experimental/test/test_apple.py | 2 - .../test/test_apple_req.py | 2 - .../test/test_array_holding_any_type.py | 2 - .../test_array_of_array_of_number_only.py | 2 - .../test/test_array_of_enums.py | 2 - .../test/test_array_of_number_only.py | 2 - .../test/test_array_test.py | 2 - .../test_array_with_validations_in_items.py | 2 - .../python-experimental/test/test_banana.py | 2 - .../test/test_banana_req.py | 2 - .../python-experimental/test/test_bar.py | 2 - .../test/test_basque_pig.py | 2 - .../python-experimental/test/test_boolean.py | 2 - .../test/test_boolean_enum.py | 2 - .../test/test_capitalization.py | 2 - .../python-experimental/test/test_cat.py | 2 - .../test/test_cat_all_of.py | 2 - .../python-experimental/test/test_category.py | 2 - .../test/test_child_cat.py | 2 - .../test/test_child_cat_all_of.py | 2 - .../test/test_class_model.py | 2 - .../python-experimental/test/test_client.py | 2 - .../test/test_complex_quadrilateral.py | 2 - .../test/test_complex_quadrilateral_all_of.py | 2 - ...d_any_of_different_types_no_validations.py | 2 - .../test/test_composed_array.py | 2 - .../test/test_composed_bool.py | 2 - .../test/test_composed_none.py | 2 - .../test/test_composed_number.py | 2 - .../test/test_composed_object.py | 2 - .../test_composed_one_of_different_types.py | 2 - .../test/test_composed_string.py | 2 - .../python-experimental/test/test_currency.py | 35 +++++ .../test/test_danish_pig.py | 2 - .../test/test_date_time_test.py | 2 - .../test/test_date_time_with_validations.py | 2 - .../test/test_date_with_validations.py | 2 - .../test/test_decimal_payload.py | 35 +++++ .../test/test_default_api.py | 1 - .../python-experimental/test/test_dog.py | 2 - .../test/test_dog_all_of.py | 2 - .../python-experimental/test/test_drawing.py | 2 - .../test/test_enum_arrays.py | 2 - .../test/test_enum_class.py | 2 - .../test/test_enum_test.py | 2 - .../test/test_equilateral_triangle.py | 2 - .../test/test_equilateral_triangle_all_of.py | 2 - .../test/test_fake_classname_tags_123_api.py | 5 +- .../python-experimental/test/test_file.py | 2 - .../test/test_file_schema_test_class.py | 2 - .../python-experimental/test/test_foo.py | 2 - .../test/test_format_test.py | 2 - .../python-experimental/test/test_fruit.py | 2 - .../test/test_fruit_req.py | 2 - .../python-experimental/test/test_gm_fruit.py | 2 - .../test/test_grandparent_animal.py | 2 - .../test/test_has_only_read_only.py | 2 - .../test/test_health_check_result.py | 2 - .../test/test_inline_response_default.py | 2 - .../test/test_integer_enum.py | 2 - .../test/test_integer_enum_big.py | 2 - .../test/test_integer_enum_one_value.py | 2 - .../test_integer_enum_with_default_value.py | 2 - .../test/test_integer_max10.py | 2 - .../test/test_integer_min15.py | 2 - .../test/test_isosceles_triangle.py | 2 - .../test/test_isosceles_triangle_all_of.py | 2 - .../python-experimental/test/test_mammal.py | 2 - .../python-experimental/test/test_map_test.py | 2 - ...perties_and_additional_properties_class.py | 2 - .../test/test_model200_response.py | 2 - .../test/test_model_return.py | 2 - .../python-experimental/test/test_money.py | 35 +++++ .../python-experimental/test/test_name.py | 2 - .../test/test_no_additional_properties.py | 2 - .../test/test_nullable_class.py | 2 - .../test/test_nullable_shape.py | 2 - .../test/test_nullable_string.py | 2 - .../python-experimental/test/test_number.py | 2 - .../test/test_number_only.py | 2 - .../test/test_number_with_validations.py | 2 - .../test/test_object_interface.py | 2 - .../test/test_object_model_with_ref_props.py | 2 - .../test_object_with_decimal_properties.py | 35 +++++ ...est_object_with_difficultly_named_props.py | 26 +--- .../test/test_object_with_validations.py | 2 - .../python-experimental/test/test_order.py | 2 - .../test/test_parent_pet.py | 2 - .../python-experimental/test/test_pet.py | 2 - .../python-experimental/test/test_pet_api.py | 13 +- .../python-experimental/test/test_pig.py | 2 - .../python-experimental/test/test_player.py | 2 - .../test/test_quadrilateral.py | 2 - .../test/test_quadrilateral_interface.py | 2 - .../test/test_read_only_first.py | 2 - .../test/test_scalene_triangle.py | 2 - .../test/test_scalene_triangle_all_of.py | 2 - .../python-experimental/test/test_shape.py | 2 - .../test/test_shape_or_null.py | 2 - .../test/test_simple_quadrilateral.py | 2 - .../test/test_simple_quadrilateral_all_of.py | 2 - .../test/test_some_object.py | 2 - .../test/test_special_model_name.py | 2 - .../test/test_store_api.py | 1 - .../python-experimental/test/test_string.py | 2 - .../test/test_string_boolean_map.py | 2 - .../test/test_string_enum.py | 2 - .../test_string_enum_with_default_value.py | 2 - .../test/test_string_with_validation.py | 2 - .../python-experimental/test/test_tag.py | 2 - .../python-experimental/test/test_triangle.py | 2 - .../test/test_triangle_interface.py | 2 - .../python-experimental/test/test_user.py | 2 - .../python-experimental/test/test_user_api.py | 1 - .../python-experimental/test/test_whale.py | 2 - .../python-experimental/test/test_zebra.py | 2 - .../tests_manual/test_any_type_schema.py | 28 +++- .../tests_manual/test_decimal_payload.py | 46 ++++++ .../tests_manual/test_money.py | 34 +++++ 314 files changed, 1378 insertions(+), 679 deletions(-) create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Currency.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/DecimalPayload.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Money.md create mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDecimalProperties.md create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py create mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_currency.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_decimal_payload.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_money.py create mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_object_with_decimal_properties.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_decimal_payload.py create mode 100644 samples/openapi3/client/petstore/python-experimental/tests_manual/test_money.py diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 00614e6ccb12..0d46556daf7f 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -11,7 +11,7 @@ title: Documentation for the python-experimental Generator | generator type | CLIENT | | | generator language | Python | | | generator language version | >=3.9 | | -| helpTxt | Generates a Python client library

Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | +| helpTxt | Generates a Python client library

Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | ## 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. diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 91c8870774a7..00fa3cf7a5e8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -64,7 +64,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { public String defaultValue; public String arrayModelType; public boolean isAlias; // Is this effectively an alias of another simple type - public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, isShort, isUnboundedInteger, isBoolean; + public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, isDecimal, isShort, isUnboundedInteger, isBoolean; private boolean additionalPropertiesIsAnyType; public List vars = new ArrayList<>(); // all properties (without parent's properties) public List allVars = new ArrayList<>(); // all properties (with parent's properties) @@ -856,6 +856,7 @@ public boolean equals(Object o) { hasOnlyReadOnly == that.hasOnlyReadOnly && isNull == that.isNull && hasValidation == that.hasValidation && + isDecimal == that.isDecimal && hasMultipleTypes == that.getHasMultipleTypes() && hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() && getIsAnyType() == that.getIsAnyType() && @@ -934,7 +935,7 @@ hasChildren, isMap, isDeprecated, hasOnlyReadOnly, getExternalDocumentation(), g getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(), getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(), getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping, - isAnyType, getComposedSchemas(), hasMultipleTypes); + isAnyType, getComposedSchemas(), hasMultipleTypes, isDecimal); } @Override @@ -1028,6 +1029,7 @@ public String toString() { sb.append(", getIsAnyType=").append(getIsAnyType()); sb.append(", composedSchemas=").append(composedSchemas); sb.append(", hasMultipleTypes=").append(hasMultipleTypes); + sb.append(", isDecimal=").append(isDecimal); sb.append('}'); return sb.toString(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 2bcbcef08d07..5424080f0d7b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -198,6 +198,7 @@ public PythonExperimentalClientCodegen() { languageSpecificPrimitives.add("file_type"); languageSpecificPrimitives.add("none_type"); + typeMapping.put("decimal", "str"); generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.EXPERIMENTAL) @@ -510,6 +511,7 @@ public String getHelp() { "- inline schemas are supported at any location including composition", "- multiple content types supported in request body and response bodies", "- run time type checking", + "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", "- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed", "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", @@ -1053,6 +1055,14 @@ protected void addParentContainer(CodegenModel model, String name, Schema schema @Override public CodegenModel fromModel(String name, Schema sc) { CodegenModel cm = super.fromModel(name, sc); + Schema unaliasedSchema = unaliasSchema(sc, importMapping); + if (unaliasedSchema != null) { + if (ModelUtils.isDecimalSchema(unaliasedSchema)) { // type: string, format: number + cm.isString = false; + cm.isDecimal = true; + } + } + if (cm.isNullable) { cm.setIsNull(true); cm.isNullable = false; diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars index 47c28bff18d0..4dfc613aae22 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars @@ -25,7 +25,6 @@ from {{packageName}} import rest from {{packageName}}.configuration import Configuration from {{packageName}}.exceptions import ApiTypeError, ApiValueError from {{packageName}}.schemas import ( - Decimal, NoneClass, BoolClass, Schema, diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars index a999b4b16c90..2f52783c605d 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars @@ -5,7 +5,7 @@ import unittest import {{packageName}} -from {{packageName}}.api.{{classFilename}} import {{classname}} # noqa: E501 +from {{packageName}}.{{apiPackage}}.{{classFilename}} import {{classname}} # noqa: E501 class {{#with operations}}Test{{classname}}(unittest.TestCase): diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars index 0741ba482fe6..38015e350440 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars @@ -1,4 +1,4 @@ -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -16,6 +16,7 @@ from {{packageName}}.schemas import ( # noqa: F401 NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars index bb220e4b8f3a..e74461e8043e 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars @@ -1,6 +1,6 @@ def __new__( cls, - *args: typing.Union[{{#if isAnyType}}dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes{{/if}}{{#if isUnboundedInteger}}int, {{/if}}{{#if isNumber}}float, {{/if}}{{#if isBoolean}}bool, {{/if}}{{#if isArray}}list, tuple, {{/if}}{{#if isMap}}dict, frozendict, {{/if}}{{#if isString}}str, {{/if}}{{#if isNull}}None, {{/if}}], + *args: typing.Union[{{#if isAnyType}}dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes{{/if}}{{#if isUnboundedInteger}}int, {{/if}}{{#if isNumber}}float, {{/if}}{{#if isBoolean}}bool, {{/if}}{{#if isArray}}list, tuple, {{/if}}{{#if isMap}}dict, frozendict, {{/if}}{{#if isString}}str, {{/if}}{{#if isNull}}None, {{/if}}], {{#unless isNull}} {{#if getHasRequired}} {{#each requiredVars}} @@ -26,7 +26,7 @@ def __new__( {{#with additionalProperties}} **kwargs: typing.Type[Schema], {{/with}} -): +) -> '{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}': return super().__new__( cls, *args, diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars index 2c9a6f469ba0..763da96feeb2 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars @@ -12,7 +12,7 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}} {{/if}} {{else}} {{#if getHasMultipleTypes}} - _SchemaTypeChecker(typing.Union[{{#if isArray}}tuple, {{/if}}{{#if isMap}}frozendict, {{/if}}{{#if isNull}}none_type, {{/if}}{{#if isString}}str, {{/if}}{{#if isByteArray}}str, {{/if}}{{#if isUnboundedInteger}}Decimal, {{/if}}{{#if isShort}}Decimal, {{/if}}{{#if isLong}}Decimal, {{/if}}{{#if isFloat}}Decimal, {{/if}}{{#if isDouble}}Decimal, {{/if}}{{#if isNumber}}Decimal, {{/if}}{{#if isDate}}str, {{/if}}{{#if isDateTime}}str, {{/if}}{{#if isBoolean}}bool, {{/if}}]), + _SchemaTypeChecker(typing.Union[{{#if isArray}}tuple, {{/if}}{{#if isMap}}frozendict, {{/if}}{{#if isNull}}none_type, {{/if}}{{#if isString}}str, {{/if}}{{#if isByteArray}}str, {{/if}}{{#if isUnboundedInteger}}decimal.Decimal, {{/if}}{{#if isShort}}decimal.Decimal, {{/if}}{{#if isLong}}decimal.Decimal, {{/if}}{{#if isFloat}}decimal.Decimal, {{/if}}{{#if isDouble}}decimal.Decimal, {{/if}}{{#if isNumber}}decimal.Decimal, {{/if}}{{#if isDate}}str, {{/if}}{{#if isDateTime}}str, {{/if}}{{#if isDecimal}}str, {{/if}}{{#if isBoolean}}bool, {{/if}}]), {{/if}} {{#if composedSchemas}} ComposedBase, diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars index 14b4c5e0648f..24f52cac6ca5 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars @@ -1 +1 @@ -{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = {{#if complexType}}{{complexType}}{{else}}{{#if isNullable}}Nullable{{/if}}{{#if getIsNull}}None{{/if}}{{#if isAnyType}}AnyType{{/if}}{{#if isMap}}Dict{{/if}}{{#if isArray}}List{{/if}}{{#if isString}}Str{{/if}}{{#if isByteArray}}Str{{/if}}{{#if isUnboundedInteger}}Int{{/if}}{{#if isShort}}Int32{{/if}}{{#if isLong}}Int64{{/if}}{{#if isFloat}}Float32{{/if}}{{#if isDouble}}Float64{{/if}}{{#if isNumber}}Number{{/if}}{{#if isDate}}Date{{/if}}{{#if isDateTime}}DateTime{{/if}}{{#if isBoolean}}Bool{{/if}}{{#if isBinary}}Binary{{/if}}Schema{{/if}} +{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = {{#if complexType}}{{complexType}}{{else}}{{#if isNullable}}Nullable{{/if}}{{#if getIsNull}}None{{/if}}{{#if isAnyType}}AnyType{{/if}}{{#if isMap}}Dict{{/if}}{{#if isArray}}List{{/if}}{{#if isString}}Str{{/if}}{{#if isByteArray}}Str{{/if}}{{#if isDate}}Date{{/if}}{{#if isDateTime}}DateTime{{/if}}{{#if isDecimal}}Decimal{{/if}}{{#if isUnboundedInteger}}Int{{/if}}{{#if isShort}}Int32{{/if}}{{#if isLong}}Int64{{/if}}{{#if isFloat}}Float32{{/if}}{{#if isDouble}}Float64{{/if}}{{#if isNumber}}Number{{/if}}{{#if isBoolean}}Bool{{/if}}{{#if isBinary}}Binary{{/if}}Schema{{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars index 0b345344c432..87fe3d0b3244 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars @@ -34,6 +34,9 @@ Date{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} {{#if isDateTime}} DateTime{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} {{/if}} +{{#if isDecimal}} +Decimal{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} +{{/if}} {{#if isBoolean}} Bool{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}} {{/if}} diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars index 094d7f49b65d..48a4a7c85a12 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars @@ -2,13 +2,12 @@ {{>partial_header}} -import sys import unittest import {{packageName}} {{#each models}} {{#with model}} -from {{modelPackage}}.{{classFilename}} import {{classname}} +from {{packageName}}.{{modelPackage}}.{{classFilename}} import {{classname}} class Test{{classname}}(unittest.TestCase): diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars index b238468f73a0..9450487cb54b 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars @@ -6,7 +6,7 @@ from collections import defaultdict from datetime import date, datetime, timedelta # noqa: F401 from dataclasses import dataclass import functools -from decimal import Decimal +import decimal import io import os import re @@ -112,12 +112,12 @@ class ValidatorBase: """Returns true if JSON schema validation is enabled for the specified validation keyword. This can be used to skip JSON schema structural validation as requested in the configuration. - + Args: schema_keyword (string): the name of a JSON schema validation keyword. configuration (Configuration): the configuration class. """ - + return (configuration is None or not hasattr(configuration, '_disabled_client_side_validations') or schema_keyword not in configuration._disabled_client_side_validations) @@ -256,7 +256,7 @@ class ValidatorBase: _instantiation_metadata.configuration) and 'multiple_of' in validations: multiple_of_values = validations['multiple_of'] for multiple_of_value in multiple_of_values: - if (isinstance(input_values, Decimal) and + if (isinstance(input_values, decimal.Decimal) and not (float(input_values) / multiple_of_value).is_integer() ): # Note 'multipleOf' will be as good as the floating point arithmetic. @@ -327,7 +327,7 @@ class ValidatorBase: cls.__check_tuple_validations(validations, input_values, _instantiation_metadata) elif isinstance(input_values, frozendict): cls.__check_dict_validations(validations, input_values, _instantiation_metadata) - elif isinstance(input_values, Decimal): + elif isinstance(input_values, decimal.Decimal): cls.__check_numeric_validations(validations, input_values, _instantiation_metadata) try: return super()._validate_validations_pass(input_values, _instantiation_metadata) @@ -424,7 +424,7 @@ class EnumMakerInterface(typing.Protocol): @property def _enum_value_to_name( cls - ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]: + ) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]: pass @classmethod @@ -435,13 +435,13 @@ class EnumMakerInterface(typing.Protocol): pass -def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, Decimal, bool, none_type], str]) -> EnumMakerInterface: +def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]) -> EnumMakerInterface: class SchemaEnumMaker(EnumMakerBase): @classmethod @property def _enum_value_to_name( cls - ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]: + ) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]: pass try: super_enum_value_to_name = super()._enum_value_to_name @@ -538,6 +538,10 @@ class StrBase: def as_datetime(self) -> datetime: raise Exception('not implemented') + @property + def as_decimal(self) -> decimal.Decimal: + raise Exception('not implemented') + class CustomIsoparser(isoparser): @@ -629,6 +633,39 @@ class DateTimeBase: return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) +class DecimalBase(StrBase): + """ + A class for storing decimals that are sent over the wire as strings + These schemas must remain based on StrBase rather than NumberBase + because picking base classes must be deterministic + """ + + @property + @functools.cache + def as_decimal(self) -> decimal.Decimal: + return decimal.Decimal(self) + + @classmethod + def _validate_format(cls, arg: typing.Optional[str], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, str): + try: + decimal.Decimal(arg) + return True + except decimal.InvalidOperation: + raise ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DecimalBase _validate + """ + cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata) + return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + class NumberBase: @property def as_int(self) -> int: @@ -1038,7 +1075,7 @@ class DictBase(Discriminable): return super().__getattribute__(name) -inheritable_primitive_types_set = {Decimal, str, tuple, frozendict, FileIO, bytes} +inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict, FileIO, bytes} class Schema: @@ -1145,8 +1182,8 @@ class Schema: new_cls = get_new_class(cls_name, (cls, BoolBase, BoolClass)) elif base_cls is str: new_cls = get_new_class(cls_name, (cls, StrBase, str)) - elif base_cls is Decimal: - new_cls = get_new_class(cls_name, (cls, NumberBase, Decimal)) + elif base_cls is decimal.Decimal: + new_cls = get_new_class(cls_name, (cls, NumberBase, decimal.Decimal)) elif base_cls is tuple: new_cls = get_new_class(cls_name, (cls, ListBase, tuple)) elif base_cls is frozendict: @@ -1168,7 +1205,7 @@ class Schema: - the returned instance is a serializable type (except for None, True, and False) which are enums Use cases: - 1. inheritable type: string/Decimal/frozendict/tuple + 1. inheritable type: string/decimal.Decimal/frozendict/tuple 2. enum value cases: 'hi', 1 -> no base_class set because the enum includes the base class 3. uninheritable type: True/False/None -> no base_class because the base class is not inheritable _enum_by_value will handle this use case @@ -1308,7 +1345,7 @@ class Schema: return super(Schema, cls).__new__(cls, properties) """ str = openapi str, date, and datetime - Decimal = openapi int and float + decimal.Decimal = openapi int and float FileIO = openapi binary type and the user inputs a file bytes = openapi binary type and the user inputs bytes """ @@ -1323,7 +1360,7 @@ class Schema: datetime, int, float, - Decimal, + decimal.Decimal, bool, None, 'Schema', @@ -1360,13 +1397,13 @@ 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, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + def __new__(cls, *args: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): """ Schema __new__ Args: - args (int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): the value - kwargs (str, int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): dict values + args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): the value + kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): dict values _instantiation_metadata: contains the needed from_server, configuration, path_to_item """ kwargs = cls.__remove_unsets(kwargs) @@ -1390,10 +1427,10 @@ class Schema: def __init__( self, *args: typing.Union[ - dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], + dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[ - dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset + dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset ] ): """ @@ -1405,7 +1442,7 @@ class Schema: pass -def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, int, float, None, frozendict, tuple, Schema]: +def cast_to_allowed_types(arg: typing.Union[str, date, datetime, decimal.Decimal, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, decimal.Decimal, None, frozendict, tuple, Schema]: """ from_server=False date, datetime -> str int, float -> Decimal @@ -1422,16 +1459,16 @@ def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, Non because isinstance(True, int) is True """ return arg - elif isinstance(arg, Decimal): + elif isinstance(arg, decimal.Decimal): return arg elif isinstance(arg, int): - return Decimal(arg) + return decimal.Decimal(arg) elif isinstance(arg, float): - decimal_from_float = Decimal(arg) + decimal_from_float = decimal.Decimal(arg) if decimal_from_float.as_integer_ratio()[1] == 1: # 9.0 -> Decimal('9.0') # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return Decimal(str(decimal_from_float)+'.0') + return decimal.Decimal(str(decimal_from_float)+'.0') return decimal_from_float elif isinstance(arg, str): return arg @@ -1628,7 +1665,7 @@ class ComposedBase(Discriminable): # DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase class ComposedSchema( - _SchemaTypeChecker(typing.Union[none_type, str, Decimal, bool, tuple, frozendict]), + _SchemaTypeChecker(typing.Union[none_type, str, decimal.Decimal, bool, tuple, frozendict]), ComposedBase, DictBase, ListBase, @@ -1680,7 +1717,7 @@ class NoneSchema( class NumberSchema( - _SchemaTypeChecker(typing.Union[Decimal]), + _SchemaTypeChecker(typing.Union[decimal.Decimal]), NumberBase, Schema ): @@ -1690,10 +1727,10 @@ class NumberSchema( """ @classmethod - def _from_openapi_data(cls, arg: typing.Union[int, float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + def _from_openapi_data(cls, arg: typing.Union[int, float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) - def __new__(cls, arg: typing.Union[Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]): + def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]): return super().__new__(cls, arg, **kwargs) @@ -1707,8 +1744,8 @@ class IntBase(NumberBase): return self._as_int @classmethod - def _validate_format(cls, arg: typing.Optional[Decimal], _instantiation_metadata: InstantiationMetadata): - if isinstance(arg, Decimal): + def _validate_format(cls, arg: typing.Optional[decimal.Decimal], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, decimal.Decimal): exponent = arg.as_tuple().exponent if exponent != 0: raise ApiValueError( @@ -1731,14 +1768,14 @@ class IntSchema(IntBase, NumberSchema): def _from_openapi_data(cls, arg: int, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) - def __new__(cls, arg: typing.Union[Decimal, int], **kwargs: typing.Union[InstantiationMetadata]): + def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: typing.Union[InstantiationMetadata]): return super().__new__(cls, arg, **kwargs) class Int32Schema( _SchemaValidator( - inclusive_minimum=Decimal(-2147483648), - inclusive_maximum=Decimal(2147483647) + inclusive_minimum=decimal.Decimal(-2147483648), + inclusive_maximum=decimal.Decimal(2147483647) ), IntSchema ): @@ -1746,8 +1783,8 @@ class Int32Schema( class Int64Schema( _SchemaValidator( - inclusive_minimum=Decimal(-9223372036854775808), - inclusive_maximum=Decimal(9223372036854775807) + inclusive_minimum=decimal.Decimal(-9223372036854775808), + inclusive_maximum=decimal.Decimal(9223372036854775807) ), IntSchema ): @@ -1756,28 +1793,28 @@ class Int64Schema( class Float32Schema( _SchemaValidator( - inclusive_minimum=Decimal(-3.4028234663852886e+38), - inclusive_maximum=Decimal(3.4028234663852886e+38) + inclusive_minimum=decimal.Decimal(-3.4028234663852886e+38), + inclusive_maximum=decimal.Decimal(3.4028234663852886e+38) ), NumberSchema ): @classmethod - def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + def _from_openapi_data(cls, arg: typing.Union[float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): # todo check format return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) class Float64Schema( _SchemaValidator( - inclusive_minimum=Decimal(-1.7976931348623157E+308), - inclusive_maximum=Decimal(1.7976931348623157E+308) + inclusive_minimum=decimal.Decimal(-1.7976931348623157E+308), + inclusive_maximum=decimal.Decimal(1.7976931348623157E+308) ), NumberSchema ): @classmethod - def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + def _from_openapi_data(cls, arg: typing.Union[float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): # todo check format return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) @@ -1814,6 +1851,20 @@ class DateTimeSchema(DateTimeBase, StrSchema): return super().__new__(cls, arg, **kwargs) +class DecimalSchema(DecimalBase, StrSchema): + + def __new__(cls, arg: typing.Union[str], **kwargs: typing.Union[InstantiationMetadata]): + """ + 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) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + 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) + + class BytesSchema( _SchemaTypeChecker(typing.Union[bytes]), Schema, @@ -1901,7 +1952,7 @@ class BoolSchema( class AnyTypeSchema( _SchemaTypeChecker( - typing.Union[frozendict, tuple, Decimal, str, bool, none_type, bytes, FileIO] + typing.Union[frozendict, tuple, decimal.Decimal, str, bool, none_type, bytes, FileIO] ), DictBase, ListBase, @@ -1924,7 +1975,7 @@ class DictSchema( def _from_openapi_data(cls, arg: typing.Dict[str, typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) - def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]): + def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]): return super().__new__(cls, *args, **kwargs) diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index f149e72a898d..7fcdb42c7b39 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -2653,3 +2653,32 @@ components: type: 'null' allOf: - {} + Currency: + type: string + enum: + - eur + - usd + Money: + type: object + properties: + amount: + type: string + format: number + currency: + $ref: '#/components/schemas/Currency' + required: + - amount + - currency + DecimalPayload: + type: string + format: number + ObjectWithDecimalProperties: + type: object + properties: + length: + $ref: '#/components/schemas/DecimalPayload' + width: + type: string + format: number + cost: + $ref: '#/components/schemas/Money' \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES index ad8d63e86a68..fdc3984d899e 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES @@ -41,10 +41,12 @@ docs/ComposedNumber.md docs/ComposedObject.md docs/ComposedOneOfDifferentTypes.md docs/ComposedString.md +docs/Currency.md docs/DanishPig.md docs/DateTimeTest.md docs/DateTimeWithValidations.md docs/DateWithValidations.md +docs/DecimalPayload.md docs/DefaultApi.md docs/Dog.md docs/DogAllOf.md @@ -80,6 +82,7 @@ docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md docs/ModelReturn.md +docs/Money.md docs/Name.md docs/NoAdditionalProperties.md docs/NullableClass.md @@ -90,6 +93,7 @@ docs/NumberOnly.md docs/NumberWithValidations.md docs/ObjectInterface.md docs/ObjectModelWithRefProps.md +docs/ObjectWithDecimalProperties.md docs/ObjectWithDifficultlyNamedProps.md docs/ObjectWithValidations.md docs/Order.md @@ -175,10 +179,12 @@ petstore_api/model/composed_number.py petstore_api/model/composed_object.py petstore_api/model/composed_one_of_different_types.py petstore_api/model/composed_string.py +petstore_api/model/currency.py petstore_api/model/danish_pig.py petstore_api/model/date_time_test.py petstore_api/model/date_time_with_validations.py petstore_api/model/date_with_validations.py +petstore_api/model/decimal_payload.py petstore_api/model/dog.py petstore_api/model/dog_all_of.py petstore_api/model/drawing.py @@ -211,6 +217,7 @@ petstore_api/model/map_test.py petstore_api/model/mixed_properties_and_additional_properties_class.py petstore_api/model/model200_response.py petstore_api/model/model_return.py +petstore_api/model/money.py petstore_api/model/name.py petstore_api/model/no_additional_properties.py petstore_api/model/nullable_class.py @@ -221,6 +228,7 @@ petstore_api/model/number_only.py petstore_api/model/number_with_validations.py petstore_api/model/object_interface.py petstore_api/model/object_model_with_ref_props.py +petstore_api/model/object_with_decimal_properties.py petstore_api/model/object_with_difficultly_named_props.py petstore_api/model/object_with_validations.py petstore_api/model/order.py diff --git a/samples/openapi3/client/petstore/python-experimental/README.md b/samples/openapi3/client/petstore/python-experimental/README.md index 98ccaf5dbbc9..a849a36ae20c 100644 --- a/samples/openapi3/client/petstore/python-experimental/README.md +++ b/samples/openapi3/client/petstore/python-experimental/README.md @@ -172,10 +172,12 @@ Class | Method | HTTP request | Description - [ComposedObject](docs/ComposedObject.md) - [ComposedOneOfDifferentTypes](docs/ComposedOneOfDifferentTypes.md) - [ComposedString](docs/ComposedString.md) + - [Currency](docs/Currency.md) - [DanishPig](docs/DanishPig.md) - [DateTimeTest](docs/DateTimeTest.md) - [DateTimeWithValidations](docs/DateTimeWithValidations.md) - [DateWithValidations](docs/DateWithValidations.md) + - [DecimalPayload](docs/DecimalPayload.md) - [Dog](docs/Dog.md) - [DogAllOf](docs/DogAllOf.md) - [Drawing](docs/Drawing.md) @@ -208,6 +210,7 @@ Class | Method | HTTP request | Description - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) - [ModelReturn](docs/ModelReturn.md) + - [Money](docs/Money.md) - [Name](docs/Name.md) - [NoAdditionalProperties](docs/NoAdditionalProperties.md) - [NullableClass](docs/NullableClass.md) @@ -218,6 +221,7 @@ Class | Method | HTTP request | Description - [NumberWithValidations](docs/NumberWithValidations.md) - [ObjectInterface](docs/ObjectInterface.md) - [ObjectModelWithRefProps](docs/ObjectModelWithRefProps.md) + - [ObjectWithDecimalProperties](docs/ObjectWithDecimalProperties.md) - [ObjectWithDifficultlyNamedProps](docs/ObjectWithDifficultlyNamedProps.md) - [ObjectWithValidations](docs/ObjectWithValidations.md) - [Order](docs/Order.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Currency.md b/samples/openapi3/client/petstore/python-experimental/docs/Currency.md new file mode 100644 index 000000000000..9811a54c6e52 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Currency.md @@ -0,0 +1,8 @@ +# Currency + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | must be one of ["eur", "usd", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DecimalPayload.md b/samples/openapi3/client/petstore/python-experimental/docs/DecimalPayload.md new file mode 100644 index 000000000000..2e0821dd053a --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/DecimalPayload.md @@ -0,0 +1,8 @@ +# DecimalPayload + +Type | Description | Notes +------------- | ------------- | ------------- +**str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Money.md b/samples/openapi3/client/petstore/python-experimental/docs/Money.md new file mode 100644 index 000000000000..5deec5712ae0 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Money.md @@ -0,0 +1,11 @@ +# Money + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**currency** | [**Currency**](Currency.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDecimalProperties.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDecimalProperties.md new file mode 100644 index 000000000000..10bd9061c0d5 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDecimalProperties.md @@ -0,0 +1,12 @@ +# ObjectWithDecimalProperties + +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**length** | **str** | | [optional] +**width** | **str** | | [optional] +**cost** | [**Money**](Money.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py index b97333110467..eef7420a019a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py index b704f12197a0..c1a9e4213e08 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py index f0d07f512051..1958cd47e5fb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py index 9c44cbce5077..466bb6bdeac1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py index 83af2ce00ca8..30eb23e2260d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py index c46e584ab427..7d10197e7b97 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py index a99f338d61b7..185f737fd612 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py index 49566ef541d6..27c385cf6d8c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py index ac4d37279ebf..8d33047b77b3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py @@ -13,7 +13,7 @@ import urllib3 from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -31,6 +31,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py index d1812acdfb65..32c09a60148a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py index 7f3ecf420450..f18f635fbcba 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py index 63faaf2db9a6..5898d0608a23 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -172,7 +173,7 @@ def __new__( callback: typing.Union[callback, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py index 7d8e080429d0..9a0375a83d93 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -348,7 +349,7 @@ def __new__( enum_form_string: typing.Union[enum_form_string, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py index 831241cba68d..321959bf07e0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py index dc590cb91372..77bce3d6270a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py index 0acc3f4491e1..3dcf988a1b7f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -70,7 +71,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py index 591f9417e3b5..917d5c7b7d73 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -73,7 +74,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py index 4b402d4e9614..40880fd1b09c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py index ac82ec1bca53..e24811186515 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py index aaa919ec758e..6e72d45b78db 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py index c355d0e1183c..4ec604dd98c8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py index 14076fea22ba..8fd0b87cf6ca 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py @@ -13,7 +13,7 @@ import urllib3 from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -31,6 +31,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py index 000d30c64ef1..f1dda7d9754b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py index 51c9bd862e86..21d92e829df2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py index 87fa4f8dbcc7..73f707e268bf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py index 8fbdf9bbdb89..f39892210cbc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -76,7 +77,7 @@ def __new__( additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py index 19c7745793ae..6be2c17a026c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -78,7 +79,7 @@ def __new__( files: typing.Union[files, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py index d8157f7f4cfd..1ccf89e848c3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py index 7f04e4cc3c8d..802803633582 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py index de6d86ed2128..afb30b580480 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py index d6b31e361f56..ac4b7f3ad8c2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py index a4c39c6ae347..5496b92cd55e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py index 533b2ae23cfa..549fd2aa6fc2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py index 71bdf386bc91..fa1b5a1bb966 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py index 6535b584ac8e..798b70c896a9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -99,7 +100,7 @@ def __new__( status: typing.Union[status, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py index 214bf7a41b2e..c137418e02d8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -102,7 +103,7 @@ def __new__( additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py index d4f494e25be9..10c595a21abd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -100,7 +101,7 @@ def __new__( additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py index 9dbbf03607f9..1c4269d277bf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py @@ -13,7 +13,7 @@ import urllib3 from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -31,6 +31,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py index e5e5aca7eb05..9daf61b0c088 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -74,7 +75,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py index 11f819f27b32..99f9ecbb28f1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py index ef9f9c3ba631..ba961a9921ed 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py index 8627997a2fb5..7cc7494687db 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py index 8694e9582ffd..d3ae4f85df7c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py index d1c0a1e0e875..81553c66598f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py index 1d3b65308201..f337efa34803 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py @@ -13,7 +13,7 @@ import urllib3 from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -31,6 +31,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py index 2a2af60d64bd..fa01a3901198 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py index c63a4e482d14..47447322ff0d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py index 1e6f9443fcec..99bcba58663f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py @@ -13,7 +13,7 @@ import urllib3 from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -31,6 +31,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py index fcd3f6dcde43..472d3354b84e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py @@ -14,7 +14,7 @@ from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -32,6 +32,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py index 38220b88f5dc..adad78a8e847 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py @@ -29,7 +29,6 @@ from petstore_api.configuration import Configuration from petstore_api.exceptions import ApiTypeError, ApiValueError from petstore_api.schemas import ( - Decimal, NoneClass, BoolClass, Schema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py index a9dbd2396f09..8301d14cf869 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -79,7 +80,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'map_property': return super().__new__( cls, *args, @@ -104,7 +105,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> '_additional_properties': return super().__new__( cls, *args, @@ -118,7 +119,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'map_of_map_property': return super().__new__( cls, *args, @@ -141,7 +142,7 @@ def __new__( cls, *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'empty_map': return super().__new__( cls, *args, @@ -160,7 +161,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'map_with_undeclared_properties_string': return super().__new__( cls, *args, @@ -182,7 +183,7 @@ def __new__( map_with_undeclared_properties_string: typing.Union[map_with_undeclared_properties_string, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'AdditionalPropertiesClass': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py index e6b66637e225..90d612a857aa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -83,7 +84,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'AdditionalPropertiesWithArrayOfEnums': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py index 255e88d8f05b..95e55511dca4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -74,7 +75,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Address': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py index c5a1a74ddfe4..f0dc6441d3e2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,7 +91,7 @@ def __new__( color: typing.Union[color, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Animal': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py index 4a2b3dca68af..2bb3d0259c81 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py index b282cdccb5d7..41f336ea8bcf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -79,7 +80,7 @@ def __new__( message: typing.Union[message, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ApiResponse': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py index eef32e7fc2c0..05b8485a74d9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -104,7 +105,7 @@ def __new__( origin: typing.Union[origin, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Apple': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py index 907e5332a513..df315c8bf1c4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -80,7 +81,7 @@ def __new__( cultivar: cultivar, mealy: typing.Union[mealy, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'AppleReq': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py index a87a3963bf07..51e9aeeb603c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py index 0441017cce22..06912cc2194c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -85,7 +86,7 @@ def __new__( ArrayArrayNumber: typing.Union[ArrayArrayNumber, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ArrayOfArrayOfNumberOnly': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py index 84a16a901f48..19af3dc1e9fd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py index befe0446d4a4..c2d568e4b808 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -80,7 +81,7 @@ def __new__( ArrayNumber: typing.Union[ArrayNumber, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ArrayOfNumberOnly': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py index 9d5ed1fe8f1c..00d72319a69d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -108,7 +109,7 @@ def __new__( array_array_of_model: typing.Union[array_array_of_model, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ArrayTest': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py index 0d8bd1f5f595..07b32f95f673 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py index 2b745add0af0..4cb4561abe22 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -78,7 +79,7 @@ def __new__( lengthCm: lengthCm, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Banana': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py index 938ad1c8da9d..b7012234a08f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -80,7 +81,7 @@ def __new__( lengthCm: lengthCm, sweet: typing.Union[sweet, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'BananaReq': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py index afbf24b8a222..61b13533570b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py index 5470dcaa409f..f1e74bf1e463 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -92,7 +93,7 @@ def __new__( className: className, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'BasquePig': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py index e9f974616fcb..3f35ab6a6535 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py index 26b0d6fb5d8a..cf75f7c9445b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py index daef598fe3a6..e5987dc95595 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -85,7 +86,7 @@ def __new__( ATT_NAME: typing.Union[ATT_NAME, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Capitalization': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py index 7ac8563f7784..e0f0b0f20535 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,10 +91,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Cat': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py index ec36b96f9f8f..82c20ec0769e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -75,7 +76,7 @@ def __new__( declawed: typing.Union[declawed, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'CatAllOf': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py index a3b9e2134d7b..9f92d2b3a38f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -80,7 +81,7 @@ def __new__( id: typing.Union[id, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Category': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py index d165c485a8f7..114bd2832d23 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,10 +91,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ChildCat': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py index 108a5620181c..791f3793cb54 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -75,7 +76,7 @@ def __new__( name: typing.Union[name, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ChildCatAllOf': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py index 432b40a385d2..37c5b23285bb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -72,11 +73,11 @@ class ClassModel( def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _class: typing.Union[_class, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ClassModel': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py index 372f5b8fe04e..bc4ff7ffab38 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -75,7 +76,7 @@ def __new__( client: typing.Union[client, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Client': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py index ef414f33d685..422ae90d3b8b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,10 +91,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ComplexQuadrilateral': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py index 128d50c3f037..d24b43d5ed68 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,7 +90,7 @@ def __new__( quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ComplexQuadrilateralAllOf': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py index 67f71c767826..97f75c86ddac 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -125,10 +126,10 @@ class anyOf_9( def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ComposedAnyOfDifferentTypesNoValidations': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py index 197dc534477f..8b20d7f09415 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py index 57d1a5862ee4..5aa09239e140 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -93,7 +94,7 @@ def __new__( cls, *args: typing.Union[bool, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'ComposedBool': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py index 7ba7de5a523d..534e1ce01ca2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -93,7 +94,7 @@ def __new__( cls, *args: typing.Union[None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'ComposedNone': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py index f6725565fc8d..c4e879ae995b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -93,7 +94,7 @@ def __new__( cls, *args: typing.Union[float, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'ComposedNumber': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py index 64435b685709..f7ba1546f97f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -94,7 +95,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ComposedObject': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py index 9f42e28f2fa8..0adf69e676ec 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -97,7 +98,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'oneOf_4': return super().__new__( cls, *args, @@ -143,10 +144,10 @@ class oneOf_6( def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ComposedOneOfDifferentTypes': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py index 75a01e3dee82..6efeb9a7872f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -93,7 +94,7 @@ def __new__( cls, *args: typing.Union[str, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'ComposedString': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py new file mode 100644 index 000000000000..1fd715f3f145 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py @@ -0,0 +1,85 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Currency( + _SchemaEnumMaker( + enum_value_to_name={ + "eur": "EUR", + "usd": "USD", + } + ), + StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + @classmethod + @property + def EUR(cls): + return cls._enum_by_value["eur"]("eur") + + @classmethod + @property + def USD(cls): + return cls._enum_by_value["usd"]("usd") diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py index 559aefad1dcb..af29f5c9e7ab 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -92,7 +93,7 @@ def __new__( className: className, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'DanishPig': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py index 837edc52f030..8b05311d14d4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py index 800e2d5fa1d8..c4365f56e89c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py index 5c2886e4968e..364759f48e23 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py new file mode 100644 index 000000000000..99f1f2e47350 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py @@ -0,0 +1,60 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) +DecimalPayload = DecimalSchema diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py index 2556f7bab696..de0f9c174f33 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,10 +91,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Dog': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py index fac002ead0c3..b527aedf20b9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -75,7 +76,7 @@ def __new__( breed: typing.Union[breed, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'DogAllOf': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py index fa243f3bdf16..d61f6b07be1e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -107,7 +108,7 @@ def __new__( shapes: typing.Union[shapes, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Drawing': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py index c5adca615689..a3fb56284bdb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -122,7 +123,7 @@ def __new__( array_enum: typing.Union[array_enum, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'EnumArrays': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py index 371b78350623..45a9a512fc0e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py index 6c0dd1eb4f95..7204328fc893 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -206,7 +207,7 @@ def __new__( IntegerEnumOneValue: typing.Union['IntegerEnumOneValue', Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'EnumTest': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py index 75d6046477f8..9c433255529a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,10 +91,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'EquilateralTriangle': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py index a6a6e6a494d5..1e23482bd9c9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,7 +90,7 @@ def __new__( triangleType: typing.Union[triangleType, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'EquilateralTriangleAllOf': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py index a93066658539..3bb58da70670 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -77,7 +78,7 @@ def __new__( sourceURI: typing.Union[sourceURI, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'File': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py index 632b4be2e003..f55669e69938 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,7 +91,7 @@ def __new__( files: typing.Union[files, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'FileSchemaTestClass': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py index 8ad604af2b68..47357f615881 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -75,7 +76,7 @@ def __new__( bar: typing.Union[bar, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Foo': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py index e86ab8fc5da5..4560f080ddde 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -222,7 +223,7 @@ def __new__( noneProp: typing.Union[noneProp, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'FormatTest': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py index c4d04e6f6fa4..3fba42202fe8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -91,11 +92,11 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], color: typing.Union[color, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Fruit': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py index 5170901cec31..74414d77adde 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -92,10 +93,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'FruitReq': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py index 45a96f3718ec..59d81989169a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -91,11 +92,11 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], color: typing.Union[color, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'GmFruit': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py index fce1e5b8a454..47e282a63e8b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -88,7 +89,7 @@ def __new__( pet_type: pet_type, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'GrandparentAnimal': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py index 35a721090940..a0a1f019d819 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -77,7 +78,7 @@ def __new__( foo: typing.Union[foo, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'HasOnlyReadOnly': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py index db0e35866717..3ea543b00046 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -81,7 +82,7 @@ def __new__( cls, *args: typing.Union[str, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'NullableMessage': return super().__new__( cls, *args, @@ -95,7 +96,7 @@ def __new__( NullableMessage: typing.Union[NullableMessage, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'HealthCheckResult': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py index ae29e2cf1c77..146af3287ee1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -79,7 +80,7 @@ def __new__( string: typing.Union['Foo', Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'InlineResponseDefault': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py index 857b0cffa908..6227389dfb16 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py index bcc9aa57f930..d9132eb29978 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py index 17b1d5997795..bf6c94525020 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py index 2916e4fcdfff..48870526b658 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py index 8a57a1cdd5e0..087d6c07427a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py index 18a76f8e6ff1..ef06e4d9e73e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py index 2f14974794eb..fa8036ac0c71 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,10 +91,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'IsoscelesTriangle': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py index 96d8b286c0e7..98351c3eb9d4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,7 +90,7 @@ def __new__( triangleType: typing.Union[triangleType, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'IsoscelesTriangleAllOf': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py index 6868e7e2a8b8..c46a3dde4ad9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -102,10 +103,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Mammal': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py index 9fca5b0310b1..c8e7a591f8c4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -84,7 +85,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> '_additional_properties': return super().__new__( cls, *args, @@ -98,7 +99,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'map_map_of_string': return super().__new__( cls, *args, @@ -138,7 +139,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'map_of_enum_string': return super().__new__( cls, *args, @@ -158,7 +159,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'direct_map': return super().__new__( cls, *args, @@ -181,7 +182,7 @@ def __new__( indirect_map: typing.Union['StringBooleanMap', Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'MapTest': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py index fa0afeab0beb..e8bb843a7c89 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -85,7 +86,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'map': return super().__new__( cls, *args, @@ -102,7 +103,7 @@ def __new__( map: typing.Union[map, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'MixedPropertiesAndAdditionalPropertiesClass': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py index a7fcdd30ad5b..cf5dd3ae557b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -75,11 +76,11 @@ class Model200Response( def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], name: typing.Union[name, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Model200Response': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py index 8ca497627cc0..5a9f2f5bb082 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -74,10 +75,10 @@ class ModelReturn( def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ModelReturn': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py new file mode 100644 index 000000000000..603573e9f997 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py @@ -0,0 +1,99 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class Money( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + _required_property_names = set(( + 'amount', + 'currency', + )) + amount = DecimalSchema + + @classmethod + @property + def currency(cls) -> typing.Type['Currency']: + return Currency + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + amount: amount, + currency: currency, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ) -> 'Money': + return super().__new__( + cls, + *args, + amount=amount, + currency=currency, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.currency import Currency diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py index c5700c9b7634..08f1eacf23b6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -79,12 +80,12 @@ class Name( def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], name: name, snake_case: typing.Union[snake_case, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Name': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py index 2ec538c5dae2..4e7724357e8a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -80,7 +81,7 @@ def __new__( id: id, petId: typing.Union[petId, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'NoAdditionalProperties': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py index 329db7acc08b..d3a247432469 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -69,7 +70,7 @@ class NullableClass( class integer_prop( - _SchemaTypeChecker(typing.Union[none_type, Decimal, ]), + _SchemaTypeChecker(typing.Union[none_type, decimal.Decimal, ]), IntBase, NoneBase, Schema @@ -79,7 +80,7 @@ def __new__( cls, *args: typing.Union[int, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'integer_prop': return super().__new__( cls, *args, @@ -88,7 +89,7 @@ def __new__( class number_prop( - _SchemaTypeChecker(typing.Union[none_type, Decimal, ]), + _SchemaTypeChecker(typing.Union[none_type, decimal.Decimal, ]), NumberBase, NoneBase, Schema @@ -98,7 +99,7 @@ def __new__( cls, *args: typing.Union[float, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'number_prop': return super().__new__( cls, *args, @@ -117,7 +118,7 @@ def __new__( cls, *args: typing.Union[bool, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'boolean_prop': return super().__new__( cls, *args, @@ -136,7 +137,7 @@ def __new__( cls, *args: typing.Union[str, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'string_prop': return super().__new__( cls, *args, @@ -155,7 +156,7 @@ def __new__( cls, *args: typing.Union[None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'date_prop': return super().__new__( cls, *args, @@ -174,7 +175,7 @@ def __new__( cls, *args: typing.Union[None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'datetime_prop': return super().__new__( cls, *args, @@ -193,7 +194,7 @@ def __new__( cls, *args: typing.Union[list, tuple, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'array_nullable_prop': return super().__new__( cls, *args, @@ -212,7 +213,7 @@ def __new__( cls, *args: typing.Union[list, tuple, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'array_and_items_nullable_prop': return super().__new__( cls, *args, @@ -237,7 +238,7 @@ def __new__( *args: typing.Union[dict, frozendict, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> '_items': return super().__new__( cls, *args, @@ -259,7 +260,7 @@ def __new__( *args: typing.Union[dict, frozendict, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'object_nullable_prop': return super().__new__( cls, *args, @@ -288,7 +289,7 @@ def __new__( *args: typing.Union[dict, frozendict, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> '_additional_properties': return super().__new__( cls, *args, @@ -301,7 +302,7 @@ def __new__( *args: typing.Union[dict, frozendict, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'object_and_items_nullable_prop': return super().__new__( cls, *args, @@ -327,7 +328,7 @@ def __new__( *args: typing.Union[dict, frozendict, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> '_additional_properties': return super().__new__( cls, *args, @@ -341,7 +342,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'object_items_nullable': return super().__new__( cls, *args, @@ -362,7 +363,7 @@ def __new__( *args: typing.Union[dict, frozendict, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> '_additional_properties': return super().__new__( cls, *args, @@ -388,7 +389,7 @@ def __new__( object_items_nullable: typing.Union[object_items_nullable, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'NullableClass': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py index 8bf418c14451..2a0c429f54ef 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -104,10 +105,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'NullableShape': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py index db4a33d9be04..567a7fac1602 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -74,7 +75,7 @@ def __new__( cls, *args: typing.Union[str, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'NullableString': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py index c4c4695e8be8..19c1626f4875 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py index d9e2b49aa814..52533d39e49d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -75,7 +76,7 @@ def __new__( JustNumber: typing.Union[JustNumber, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'NumberOnly': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py index fa87e19d3a46..c8108d4a1075 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py index a5e32358a317..af87968d14a3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py index 005497a8fa43..14aeee17ba6c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -85,7 +86,7 @@ def __new__( myBoolean: typing.Union[myBoolean, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ObjectModelWithRefProps': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py new file mode 100644 index 000000000000..074cc52aaa43 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py @@ -0,0 +1,98 @@ +# 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 re # noqa: F401 +import sys # noqa: F401 +import typing # noqa: F401 + +from frozendict import frozendict # noqa: F401 + +import decimal # noqa: F401 +from datetime import date, datetime # noqa: F401 +from frozendict import frozendict # noqa: F401 + +from petstore_api.schemas import ( # noqa: F401 + AnyTypeSchema, + ComposedSchema, + DictSchema, + ListSchema, + StrSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + NumberSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BoolSchema, + BinarySchema, + NoneSchema, + none_type, + InstantiationMetadata, + Unset, + unset, + ComposedBase, + ListBase, + DictBase, + NoneBase, + StrBase, + IntBase, + NumberBase, + DateBase, + DateTimeBase, + BoolBase, + BinaryBase, + Schema, + _SchemaValidator, + _SchemaTypeChecker, + _SchemaEnumMaker +) + + +class ObjectWithDecimalProperties( + DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + length = DecimalSchema + width = DecimalSchema + + @classmethod + @property + def cost(cls) -> typing.Type['Money']: + return Money + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + length: typing.Union[length, Unset] = unset, + width: typing.Union[width, Unset] = unset, + cost: typing.Union['Money', Unset] = unset, + _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, + **kwargs: typing.Type[Schema], + ) -> 'ObjectWithDecimalProperties': + return super().__new__( + cls, + *args, + length=length, + width=width, + cost=cost, + _instantiation_metadata=_instantiation_metadata, + **kwargs, + ) + +from petstore_api.model.money import Money diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py index 2beb1a96edff..2429a2205a21 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -87,7 +88,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ObjectWithDifficultlyNamedProps': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py index ff52e9e6a072..b0b588d04a13 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -76,7 +77,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ObjectWithValidations': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py index e272d48cf0dc..294687560d50 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -111,7 +112,7 @@ def __new__( complete: typing.Union[complete, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Order': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py index 4946eb510ddc..2775c77d79c7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -102,7 +103,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ParentPet': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py index 3bd1fcadb75a..038a4c6f701f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -135,7 +136,7 @@ def __new__( status: typing.Union[status, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Pet': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py index e5dc2bb1710a..438831aac748 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -100,10 +101,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Pig': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py index 817770d4455e..e85504879aeb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -83,7 +84,7 @@ def __new__( enemyPlayer: typing.Union['Player', Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Player': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py index 85fa3e763349..7ce3ae227f97 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -100,10 +101,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Quadrilateral': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py index 52f17cf2ec81..ff7e85735b4a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,12 +90,12 @@ def QUADRILATERAL(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], shapeType: shapeType, quadrilateralType: quadrilateralType, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'QuadrilateralInterface': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py index ebc9b3b5662d..c3b568a7336c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -77,7 +78,7 @@ def __new__( baz: typing.Union[baz, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ReadOnlyFirst': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py index 9bddbc85da57..721c27153e57 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,10 +91,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ScaleneTriangle': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py index f5c2edcb720c..595525992640 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,7 +90,7 @@ def __new__( triangleType: typing.Union[triangleType, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ScaleneTriangleAllOf': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py index 4aaa6b6be132..f61207d5b578 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -100,10 +101,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Shape': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py index 121988a3def9..f78ed803a59c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -104,10 +105,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'ShapeOrNull': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py index b326d1a58378..f6bf08a97e50 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -90,10 +91,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SimpleQuadrilateral': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py index ff52c0145319..8e4bea9b30e3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,7 +90,7 @@ def __new__( quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SimpleQuadrilateralAllOf': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py index 2b7e243a476b..3efa9b66074e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,10 +90,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SomeObject': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py index 967b02cb3d0c..9a67034b34c1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -77,7 +78,7 @@ def __new__( a: typing.Union[a, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'SpecialModelName': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py index 9b51e661bfde..f2f4e22231e4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py index 14fb2216dad5..a42d77f660dc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -74,7 +75,7 @@ def __new__( *args: typing.Union[dict, frozendict, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'StringBooleanMap': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py index a8fa2a6c6bac..395d83d0f1e5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -126,7 +127,7 @@ def __new__( cls, *args: typing.Union[str, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, - ): + ) -> 'StringEnum': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py index 52689f388b52..c51fbf770135 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py index 7b41acff15d2..9eae261142d9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py index 0316fce5b92b..1b38c173ce0b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -77,7 +78,7 @@ def __new__( name: typing.Union[name, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Tag': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py index dae6c43d2130..c312855b6bb3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -102,10 +103,10 @@ def _composed_schemas(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Triangle': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py index db721a77afbf..a36fd79ef3ff 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,12 +90,12 @@ def TRIANGLE(cls): def __new__( cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes], + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], shapeType: shapeType, triangleType: triangleType, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'TriangleInterface': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py index c55c2e0e6878..cf29c50f64f3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -89,7 +90,7 @@ def __new__( *args: typing.Union[dict, frozendict, None, ], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'objectWithNoDeclaredPropsNullable': return super().__new__( cls, *args, @@ -117,7 +118,7 @@ def __new__( anyTypePropNullable: typing.Union[anyTypePropNullable, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'User': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py index dabdd735658b..8d6de64ab2c0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -96,7 +97,7 @@ def __new__( hasTeeth: typing.Union[hasTeeth, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Whale': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py index 17d8746ce705..15bbe41e9b44 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py @@ -15,7 +15,7 @@ from frozendict import frozendict # noqa: F401 -from decimal import Decimal # noqa: F401 +import decimal # noqa: F401 from datetime import date, datetime # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -33,6 +33,7 @@ NumberSchema, DateSchema, DateTimeSchema, + DecimalSchema, BoolSchema, BinarySchema, NoneSchema, @@ -120,7 +121,7 @@ def __new__( type: typing.Union[type, Unset] = unset, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Type[Schema], - ): + ) -> 'Zebra': return super().__new__( cls, *args, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py index 9d3b94558c88..07e026d2c2f0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py @@ -49,10 +49,12 @@ from petstore_api.model.composed_object import ComposedObject from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes from petstore_api.model.composed_string import ComposedString +from petstore_api.model.currency import Currency from petstore_api.model.danish_pig import DanishPig from petstore_api.model.date_time_test import DateTimeTest from petstore_api.model.date_time_with_validations import DateTimeWithValidations from petstore_api.model.date_with_validations import DateWithValidations +from petstore_api.model.decimal_payload import DecimalPayload from petstore_api.model.dog import Dog from petstore_api.model.dog_all_of import DogAllOf from petstore_api.model.drawing import Drawing @@ -85,6 +87,7 @@ from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass from petstore_api.model.model200_response import Model200Response from petstore_api.model.model_return import ModelReturn +from petstore_api.model.money import Money from petstore_api.model.name import Name from petstore_api.model.no_additional_properties import NoAdditionalProperties from petstore_api.model.nullable_class import NullableClass @@ -95,6 +98,7 @@ from petstore_api.model.number_with_validations import NumberWithValidations from petstore_api.model.object_interface import ObjectInterface from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps +from petstore_api.model.object_with_decimal_properties import ObjectWithDecimalProperties from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps from petstore_api.model.object_with_validations import ObjectWithValidations from petstore_api.model.order import Order diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py index e230675efaa9..b896e4ebe4fd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py @@ -13,7 +13,7 @@ from datetime import date, datetime, timedelta # noqa: F401 from dataclasses import dataclass import functools -from decimal import Decimal +import decimal import io import os import re @@ -119,12 +119,12 @@ def __is_json_validation_enabled(schema_keyword, configuration=None): """Returns true if JSON schema validation is enabled for the specified validation keyword. This can be used to skip JSON schema structural validation as requested in the configuration. - + Args: schema_keyword (string): the name of a JSON schema validation keyword. configuration (Configuration): the configuration class. """ - + return (configuration is None or not hasattr(configuration, '_disabled_client_side_validations') or schema_keyword not in configuration._disabled_client_side_validations) @@ -263,7 +263,7 @@ def __check_numeric_validations( _instantiation_metadata.configuration) and 'multiple_of' in validations: multiple_of_values = validations['multiple_of'] for multiple_of_value in multiple_of_values: - if (isinstance(input_values, Decimal) and + if (isinstance(input_values, decimal.Decimal) and not (float(input_values) / multiple_of_value).is_integer() ): # Note 'multipleOf' will be as good as the floating point arithmetic. @@ -334,7 +334,7 @@ def _check_validations_for_types( cls.__check_tuple_validations(validations, input_values, _instantiation_metadata) elif isinstance(input_values, frozendict): cls.__check_dict_validations(validations, input_values, _instantiation_metadata) - elif isinstance(input_values, Decimal): + elif isinstance(input_values, decimal.Decimal): cls.__check_numeric_validations(validations, input_values, _instantiation_metadata) try: return super()._validate_validations_pass(input_values, _instantiation_metadata) @@ -431,7 +431,7 @@ class EnumMakerInterface(typing.Protocol): @property def _enum_value_to_name( cls - ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]: + ) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]: pass @classmethod @@ -442,13 +442,13 @@ def _enum_by_value( pass -def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, Decimal, bool, none_type], str]) -> EnumMakerInterface: +def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]) -> EnumMakerInterface: class SchemaEnumMaker(EnumMakerBase): @classmethod @property def _enum_value_to_name( cls - ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]: + ) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]: pass try: super_enum_value_to_name = super()._enum_value_to_name @@ -545,6 +545,10 @@ def as_date(self) -> date: def as_datetime(self) -> datetime: raise Exception('not implemented') + @property + def as_decimal(self) -> decimal.Decimal: + raise Exception('not implemented') + class CustomIsoparser(isoparser): @@ -636,6 +640,39 @@ def _validate(cls, *args, _instantiation_metadata: typing.Optional[Instantiation return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) +class DecimalBase(StrBase): + """ + A class for storing decimals that are sent over the wire as strings + These schemas must remain based on StrBase rather than NumberBase + because picking base classes must be deterministic + """ + + @property + @functools.cache + def as_decimal(self) -> decimal.Decimal: + return decimal.Decimal(self) + + @classmethod + def _validate_format(cls, arg: typing.Optional[str], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, str): + try: + decimal.Decimal(arg) + return True + except decimal.InvalidOperation: + raise ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, _instantiation_metadata.path_to_item) + ) + + @classmethod + def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + """ + DecimalBase _validate + """ + cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata) + return super()._validate(*args, _instantiation_metadata=_instantiation_metadata) + + class NumberBase: @property def as_int(self) -> int: @@ -1045,7 +1082,7 @@ def __getattribute__(self, name): return super().__getattribute__(name) -inheritable_primitive_types_set = {Decimal, str, tuple, frozendict, FileIO, bytes} +inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict, FileIO, bytes} class Schema: @@ -1152,8 +1189,8 @@ def _class_by_base_class(cls, base_cls: type) -> type: new_cls = get_new_class(cls_name, (cls, BoolBase, BoolClass)) elif base_cls is str: new_cls = get_new_class(cls_name, (cls, StrBase, str)) - elif base_cls is Decimal: - new_cls = get_new_class(cls_name, (cls, NumberBase, Decimal)) + elif base_cls is decimal.Decimal: + new_cls = get_new_class(cls_name, (cls, NumberBase, decimal.Decimal)) elif base_cls is tuple: new_cls = get_new_class(cls_name, (cls, ListBase, tuple)) elif base_cls is frozendict: @@ -1175,7 +1212,7 @@ def _validate(cls, *args, _instantiation_metadata: typing.Optional[Instantiation - the returned instance is a serializable type (except for None, True, and False) which are enums Use cases: - 1. inheritable type: string/Decimal/frozendict/tuple + 1. inheritable type: string/decimal.Decimal/frozendict/tuple 2. enum value cases: 'hi', 1 -> no base_class set because the enum includes the base class 3. uninheritable type: True/False/None -> no base_class because the base class is not inheritable _enum_by_value will handle this use case @@ -1315,7 +1352,7 @@ def __get_new_instance_without_conversion(cls, arg, _instantiation_metadata): return super(Schema, cls).__new__(cls, properties) """ str = openapi str, date, and datetime - Decimal = openapi int and float + decimal.Decimal = openapi int and float FileIO = openapi binary type and the user inputs a file bytes = openapi binary type and the user inputs bytes """ @@ -1330,7 +1367,7 @@ def _from_openapi_data( datetime, int, float, - Decimal, + decimal.Decimal, bool, None, 'Schema', @@ -1367,13 +1404,13 @@ def __get_input_dict(*args, **kwargs) -> frozendict: 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, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + def __new__(cls, *args: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): """ Schema __new__ Args: - args (int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): the value - kwargs (str, int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): dict values + args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): the value + kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): dict values _instantiation_metadata: contains the needed from_server, configuration, path_to_item """ kwargs = cls.__remove_unsets(kwargs) @@ -1397,10 +1434,10 @@ def __new__(cls, *args: typing.Union[dict, frozendict, list, tuple, Decimal, flo def __init__( self, *args: typing.Union[ - dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], + dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[ - dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset + dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset ] ): """ @@ -1412,7 +1449,7 @@ def __init__( pass -def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, int, float, None, frozendict, tuple, Schema]: +def cast_to_allowed_types(arg: typing.Union[str, date, datetime, decimal.Decimal, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, decimal.Decimal, None, frozendict, tuple, Schema]: """ from_server=False date, datetime -> str int, float -> Decimal @@ -1429,16 +1466,16 @@ def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, Non because isinstance(True, int) is True """ return arg - elif isinstance(arg, Decimal): + elif isinstance(arg, decimal.Decimal): return arg elif isinstance(arg, int): - return Decimal(arg) + return decimal.Decimal(arg) elif isinstance(arg, float): - decimal_from_float = Decimal(arg) + decimal_from_float = decimal.Decimal(arg) if decimal_from_float.as_integer_ratio()[1] == 1: # 9.0 -> Decimal('9.0') # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return Decimal(str(decimal_from_float)+'.0') + return decimal.Decimal(str(decimal_from_float)+'.0') return decimal_from_float elif isinstance(arg, str): return arg @@ -1635,7 +1672,7 @@ def _validate(cls, *args, _instantiation_metadata: typing.Optional[Instantiation # DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase class ComposedSchema( - _SchemaTypeChecker(typing.Union[none_type, str, Decimal, bool, tuple, frozendict]), + _SchemaTypeChecker(typing.Union[none_type, str, decimal.Decimal, bool, tuple, frozendict]), ComposedBase, DictBase, ListBase, @@ -1687,7 +1724,7 @@ def __new__(cls, arg: None, **kwargs: typing.Union[InstantiationMetadata]): class NumberSchema( - _SchemaTypeChecker(typing.Union[Decimal]), + _SchemaTypeChecker(typing.Union[decimal.Decimal]), NumberBase, Schema ): @@ -1697,10 +1734,10 @@ class NumberSchema( """ @classmethod - def _from_openapi_data(cls, arg: typing.Union[int, float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + def _from_openapi_data(cls, arg: typing.Union[int, float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) - def __new__(cls, arg: typing.Union[Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]): + def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]): return super().__new__(cls, arg, **kwargs) @@ -1714,8 +1751,8 @@ def as_int(self) -> int: return self._as_int @classmethod - def _validate_format(cls, arg: typing.Optional[Decimal], _instantiation_metadata: InstantiationMetadata): - if isinstance(arg, Decimal): + def _validate_format(cls, arg: typing.Optional[decimal.Decimal], _instantiation_metadata: InstantiationMetadata): + if isinstance(arg, decimal.Decimal): exponent = arg.as_tuple().exponent if exponent != 0: raise ApiValueError( @@ -1738,14 +1775,14 @@ class IntSchema(IntBase, NumberSchema): def _from_openapi_data(cls, arg: int, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) - def __new__(cls, arg: typing.Union[Decimal, int], **kwargs: typing.Union[InstantiationMetadata]): + def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: typing.Union[InstantiationMetadata]): return super().__new__(cls, arg, **kwargs) class Int32Schema( _SchemaValidator( - inclusive_minimum=Decimal(-2147483648), - inclusive_maximum=Decimal(2147483647) + inclusive_minimum=decimal.Decimal(-2147483648), + inclusive_maximum=decimal.Decimal(2147483647) ), IntSchema ): @@ -1753,8 +1790,8 @@ class Int32Schema( class Int64Schema( _SchemaValidator( - inclusive_minimum=Decimal(-9223372036854775808), - inclusive_maximum=Decimal(9223372036854775807) + inclusive_minimum=decimal.Decimal(-9223372036854775808), + inclusive_maximum=decimal.Decimal(9223372036854775807) ), IntSchema ): @@ -1763,28 +1800,28 @@ class Int64Schema( class Float32Schema( _SchemaValidator( - inclusive_minimum=Decimal(-3.4028234663852886e+38), - inclusive_maximum=Decimal(3.4028234663852886e+38) + inclusive_minimum=decimal.Decimal(-3.4028234663852886e+38), + inclusive_maximum=decimal.Decimal(3.4028234663852886e+38) ), NumberSchema ): @classmethod - def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + def _from_openapi_data(cls, arg: typing.Union[float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): # todo check format return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) class Float64Schema( _SchemaValidator( - inclusive_minimum=Decimal(-1.7976931348623157E+308), - inclusive_maximum=Decimal(1.7976931348623157E+308) + inclusive_minimum=decimal.Decimal(-1.7976931348623157E+308), + inclusive_maximum=decimal.Decimal(1.7976931348623157E+308) ), NumberSchema ): @classmethod - def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): + def _from_openapi_data(cls, arg: typing.Union[float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): # todo check format return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) @@ -1821,6 +1858,20 @@ def __new__(cls, arg: typing.Union[str, datetime], **kwargs: typing.Union[Instan return super().__new__(cls, arg, **kwargs) +class DecimalSchema(DecimalBase, StrSchema): + + def __new__(cls, arg: typing.Union[str], **kwargs: typing.Union[InstantiationMetadata]): + """ + 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) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + 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) + + class BytesSchema( _SchemaTypeChecker(typing.Union[bytes]), Schema, @@ -1908,7 +1959,7 @@ def __new__(cls, arg: bool, **kwargs: typing.Union[InstantiationMetadata]): class AnyTypeSchema( _SchemaTypeChecker( - typing.Union[frozendict, tuple, Decimal, str, bool, none_type, bytes, FileIO] + typing.Union[frozendict, tuple, decimal.Decimal, str, bool, none_type, bytes, FileIO] ), DictBase, ListBase, @@ -1931,7 +1982,7 @@ class DictSchema( def _from_openapi_data(cls, arg: typing.Dict[str, typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None): return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata) - def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]): + def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]): return super().__new__(cls, *args, **kwargs) diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py index 442b5ed138a1..3e0f6a96aaa1 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py index 076df41d63fc..4e67ade9dde7 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_address.py b/samples/openapi3/client/petstore/python-experimental/test/test_address.py index 78d674007487..2890381c264e 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_address.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_address.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_animal.py b/samples/openapi3/client/petstore/python-experimental/test/test_animal.py index 572450a9704b..7e244b29bae1 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_animal.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py b/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py index 3ee8615f57c8..f3d8ff2fa8fe 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py index c58dfa6202bc..a2e3736712a3 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py @@ -9,7 +9,6 @@ Generated by: https://openapi-generator.tech """ - import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py index 63dc0ede9b2b..c75371329f05 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_apple.py b/samples/openapi3/client/petstore/python-experimental/test/test_apple.py index e8abc62ef046..32f95fa8345a 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_apple.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_apple.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py index 38edc7a55daf..767c88cd8a61 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py index cee2263dd67c..bcd5c9c3ec5c 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py index ebf1ad383672..2ac8010f06d1 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py index 44a59bb5263f..43e974c180d9 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py index 21bffad3329d..b0098336e219 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py index 4528c568690b..4efdf344f38d 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py index 95a19cba751e..ae9f92a9414c 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_banana.py b/samples/openapi3/client/petstore/python-experimental/test/test_banana.py index 77b1b2aaf304..693c03a89f40 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_banana.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_banana.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py index 2bfbb9edb4c3..683083c66cf0 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_bar.py b/samples/openapi3/client/petstore/python-experimental/test/test_bar.py index 3d9429384675..6c041955bb58 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_bar.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_bar.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py index 4af8d8947cab..21c243e7d971 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py b/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py index c2e2faab188a..2ae22b6a2bd4 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py index 2d73bc707f55..ea61d7186ae0 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py b/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py index 8cb68360735a..1b60714649f6 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_cat.py b/samples/openapi3/client/petstore/python-experimental/test/test_cat.py index 7c2b75fe8af8..571f3b9adca5 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_cat.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py index 84ebd083410a..fc203c2dbaad 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_category.py b/samples/openapi3/client/petstore/python-experimental/test/test_category.py index 8f19639fb516..a37846446aab 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_category.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_category.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py index f4be6a52a8d4..3537d0effcb4 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py index 410ac2772ab7..98839fa67486 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py b/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py index 6a472da41aeb..fdbf0e7ff7cd 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_client.py b/samples/openapi3/client/petstore/python-experimental/test/test_client.py index 70a26741f40f..0222983fc210 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_client.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_client.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py index 95c686785215..e31da4be7446 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py index 96fdc5103f31..d6d7fa4cba4f 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py index 92263d139452..96691e8f9e82 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py index 3e48ed79fe5a..a83aa868cdc2 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py index 790edcc16d39..8ccaed5ee13c 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py index 65c7dd5adb91..0669698ed2ba 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py index 66fdc3c591e0..162b7bcaf8df 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py index 6212b89f9bc1..a2d8b85a34fd 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py index b15712de301e..c33fd21e5e4d 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py index 2bfcf2f74d36..902d75278d4e 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_currency.py b/samples/openapi3/client/petstore/python-experimental/test/test_currency.py new file mode 100644 index 000000000000..06f8236b892e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_currency.py @@ -0,0 +1,35 @@ +# 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.currency import Currency + + +class TestCurrency(unittest.TestCase): + """Currency unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Currency(self): + """Test Currency""" + # FIXME: construct object with mandatory attributes with example values + # model = Currency() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py index 1a46253ed9f5..e1c66fdf6d2f 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py index 275b74c92a25..597abd5ba8cb 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py index 0edf5c5e85be..7f8c4c3bb460 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py index 866e5529225b..2656d3b91fc1 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/test/test_decimal_payload.py new file mode 100644 index 000000000000..b50d4fbc8a60 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_decimal_payload.py @@ -0,0 +1,35 @@ +# 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.decimal_payload import DecimalPayload + + +class TestDecimalPayload(unittest.TestCase): + """DecimalPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_DecimalPayload(self): + """Test DecimalPayload""" + # FIXME: construct object with mandatory attributes with example values + # model = DecimalPayload() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py index caf174d6d4ba..2af6b820e00a 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py @@ -9,7 +9,6 @@ Generated by: https://openapi-generator.tech """ - import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_dog.py b/samples/openapi3/client/petstore/python-experimental/test/test_dog.py index 4643c7af8353..4adcdd278cf3 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_dog.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_dog.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py index 89526f7051f0..3a11693e9b15 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py b/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py index 091d89c80e15..d08e8a6fbedd 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py index 0b7e553a7d16..55b12169e27f 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py index 298c740defab..18688309ecd0 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py index 2022b10d5d56..9952acb68206 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py index d85647271ce1..62308d48c8a1 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py index 9651e4efd43f..8ff85083ffde 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py index b7724aaed7d1..63c46155bd68 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py @@ -9,7 +9,6 @@ Generated by: https://openapi-generator.tech """ - import unittest import petstore_api @@ -25,8 +24,8 @@ def setUp(self): def tearDown(self): pass - def test_test_classname(self): - """Test case for test_classname + def test_classname(self): + """Test case for classname To test class name in snake case # noqa: E501 """ diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_file.py b/samples/openapi3/client/petstore/python-experimental/test/test_file.py index 7154338bc7a5..240760a67d37 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_file.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_file.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py index 0b56063d59f6..fc4828d0edb8 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_foo.py b/samples/openapi3/client/petstore/python-experimental/test/test_foo.py index 69fbc69ba9e5..4ee6344ea273 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_foo.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_foo.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py index e5d081ceaa48..46d4794bbe6e 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py index 43a58a870c30..490ce5cf9522 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py index 3745b38f17ea..ceae8a934240 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py index 487e5275516e..c924c45e5592 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py index 8820ad5f253f..34edef400637 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py index 0019338c2bc7..8ed163b7621c 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py b/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py index e654924727bc..2bf06af9a63b 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py index 98b9b31821a7..19408e88f662 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py index b94fef7543a3..abd3db17c9c0 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py index 61052164aee9..d905b1d6404a 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py index 9c94769ef704..f3dee3f395bf 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py index bcdd005b2fb5..48ffddb7b02c 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py index 9a982a0cb284..fd4a0d07930d 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py index b54a5c3e1a1f..05898df5126b 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py index 00a236f55444..c17549e2b1bf 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py index ec2e16403f70..a9a8903953b6 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py b/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py index 361f043de97d..df83e514618f 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py index 7239da64e296..21305dee99bd 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py index 8291a671896f..9f54921c6951 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py index 11caf2a0c0b5..48f8ea5e01c1 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py b/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py index 61841ab2acb6..79b04d0931d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_money.py b/samples/openapi3/client/petstore/python-experimental/test/test_money.py new file mode 100644 index 000000000000..2eb90df6644e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_money.py @@ -0,0 +1,35 @@ +# 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.money import Money + + +class TestMoney(unittest.TestCase): + """Money unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_Money(self): + """Test Money""" + # FIXME: construct object with mandatory attributes with example values + # model = Money() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_name.py b/samples/openapi3/client/petstore/python-experimental/test/test_name.py index 67b92d6ef0d3..ec115ac670e7 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_name.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_name.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py index a76654032454..59ccb034d648 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py index 8eeb087512f4..5b4cfeb945b5 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py index 7126a23ed427..697c8d663297 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py index fac8c8653bf2..38fcd7262bbe 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number.py b/samples/openapi3/client/petstore/python-experimental/test/test_number.py index 9dff8542047a..6f7f55b9402a 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_number.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_number.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py index a1572ab7f9e5..69073964b8e5 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py index 919d7c0d5a64..b7dbd3ba66d2 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py index 42994360b373..45cd46414d57 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py index 6c8aaa4c9cf9..0a1045ece2a9 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_decimal_properties.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_decimal_properties.py new file mode 100644 index 000000000000..f8c4ff1a6c9e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_decimal_properties.py @@ -0,0 +1,35 @@ +# 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_with_decimal_properties import ObjectWithDecimalProperties + + +class TestObjectWithDecimalProperties(unittest.TestCase): + """ObjectWithDecimalProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_ObjectWithDecimalProperties(self): + """Test ObjectWithDecimalProperties""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectWithDecimalProperties() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py index 6bd3ec317cd4..c59598309485 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api @@ -28,27 +26,9 @@ def tearDown(self): def test_ObjectWithDifficultlyNamedProps(self): """Test ObjectWithDifficultlyNamedProps""" - kwargs = { - '$special[property.name]': 1, - '123-list': '', - '123Number': 2, - } - model = ObjectWithDifficultlyNamedProps(**kwargs) - self.assertEqual(model['$special[property.name]'], 1) - self.assertEqual(model['123-list'], '') - self.assertEqual(model['123Number'], 2) - self.assertEqual(model, kwargs) - - # without the required argument, an exception is raised - optional_kwargs = { - '$special[property.name]': 1, - '123Number': 2, - } - with self.assertRaisesRegex( - petstore_api.ApiTypeError, - r"ObjectWithDifficultlyNamedProps is missing 1 required argument: ['123-list']" - ): - ObjectWithDifficultlyNamedProps(**optional_kwargs) + # FIXME: construct object with mandatory attributes with example values + # model = ObjectWithDifficultlyNamedProps() # noqa: E501 + pass if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py index cfe0400fcee9..128755642ee2 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_order.py b/samples/openapi3/client/petstore/python-experimental/test/test_order.py index 9463845b34a2..bfed83072aed 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_order.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_order.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py b/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py index d1507e114f0c..0c9d1876520c 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pet.py b/samples/openapi3/client/petstore/python-experimental/test/test_pet.py index dc34ae0012b9..133ae47f409d 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_pet.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py index d545f497297a..494be2ebd848 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py @@ -9,7 +9,6 @@ Generated by: https://openapi-generator.tech """ - import unittest import petstore_api @@ -74,17 +73,17 @@ def test_update_pet_with_form(self): """ pass - def test_upload_file(self): - """Test case for upload_file + def test_upload_file_with_required_file(self): + """Test case for upload_file_with_required_file - uploads an image # noqa: E501 + uploads an image (required) # noqa: E501 """ pass - def test_upload_file_with_required_file(self): - """Test case for upload_file_with_required_file + def test_upload_image(self): + """Test case for upload_image - uploads an image (required) # noqa: E501 + uploads an image # noqa: E501 """ pass diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_pig.py index 8c092a8465b1..547a45679b63 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_pig.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_player.py b/samples/openapi3/client/petstore/python-experimental/test/test_player.py index ba15e0f576a0..b3d3d685d65a 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_player.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_player.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py index cc0c203d2eaf..f21755a58ee9 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py index cec68e36cf53..e1d318d03114 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py b/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py index d447437eb165..ce3245015e5b 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py index 8df062169260..8e20abb64570 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py index f81248b1517a..8907e705a985 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_shape.py b/samples/openapi3/client/petstore/python-experimental/test/test_shape.py index f34053a9bcb8..ac59550d5393 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_shape.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py index ee182f6298cc..e014a9f0b159 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py index 8a6ce429abf5..a06f65e3f180 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py index ad9d92251b40..af618a805178 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py b/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py index f3b94113824d..f1fe6af15812 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py b/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py index b74b45db1224..bfc1af2691ca 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py index 3680a34b42a0..14918e6e47d6 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py @@ -9,7 +9,6 @@ Generated by: https://openapi-generator.tech """ - import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_string.py index 1c62f3606b8e..d3b7bff446ea 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_string.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py index bf39e456cf0c..d211c69d25db 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py index c63cb8cba8fe..9e464a1404d2 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py index 87073fe5be27..06aba4d70446 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py index 338768440244..df7fef9ecd2e 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_tag.py b/samples/openapi3/client/petstore/python-experimental/test/test_tag.py index a0325e55679f..3638a780a82a 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_tag.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_tag.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py index e7978b7d1bf2..5c51dc41ae82 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py index 9e498660c0b0..fa7414066b2b 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_user.py b/samples/openapi3/client/petstore/python-experimental/test/test_user.py index 8d6e394ecb3c..24ef5a009703 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_user.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_user.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py index abf57b0733da..3fa565f40fe2 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py @@ -9,7 +9,6 @@ Generated by: https://openapi-generator.tech """ - import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_whale.py b/samples/openapi3/client/petstore/python-experimental/test/test_whale.py index 16cfebae3379..e19eb56a55c2 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_whale.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_whale.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py b/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py index dc53745dea55..003ad25d8787 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py @@ -9,8 +9,6 @@ Generated by: https://openapi-generator.tech """ - -import sys import unittest import petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py index e10f99b44bca..059c5eaac60f 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py @@ -11,6 +11,7 @@ import unittest +from decimal import Decimal import petstore_api from petstore_api.schemas import ( @@ -24,9 +25,9 @@ NoneSchema, DateSchema, DateTimeSchema, + DecimalSchema, ComposedSchema, frozendict, - Decimal, NoneClass, BoolClass ) @@ -268,6 +269,31 @@ def _composed_schemas(cls): assert isinstance(m, str) assert m == '2020-01-01T00:00:00' + def testDecimalSchema(self): + class Model(ComposedSchema): + + @classmethod + @property + def _composed_schemas(cls): + return { + 'allOf': [ + AnyTypeSchema, + DecimalSchema, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + } + + m = Model('12.34') + assert isinstance(m, Model) + assert isinstance(m, AnyTypeSchema) + assert isinstance(m, DecimalSchema) + assert isinstance(m, str) + assert m == '12.34' + assert m.as_decimal == Decimal('12.34') + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_decimal_payload.py new file mode 100644 index 000000000000..25122fc35f43 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_decimal_payload.py @@ -0,0 +1,46 @@ +# 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 + +import petstore_api +from petstore_api.schemas import DecimalSchema +from petstore_api.model.decimal_payload import DecimalPayload + + +class TestDecimalPayload(unittest.TestCase): + """DecimalPayload unit test stubs""" + + def test_DecimalPayload(self): + """Test DecimalPayload""" + + m = DecimalPayload('12') + assert isinstance(m, DecimalPayload) + assert isinstance(m, DecimalSchema) + assert isinstance(m, str) + assert m == '12' + assert m.as_decimal == decimal.Decimal('12') + + m = DecimalPayload('12.34') + assert isinstance(m, DecimalPayload) + assert isinstance(m, DecimalSchema) + assert isinstance(m, str) + assert m == '12.34' + assert m.as_decimal == decimal.Decimal('12.34') + + # passing in a Decimal does not work + with self.assertRaises(petstore_api.ApiTypeError): + DecimalPayload(decimal.Decimal('12.34')) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_money.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_money.py new file mode 100644 index 000000000000..a4bd764cc87f --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_money.py @@ -0,0 +1,34 @@ +# 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.money import Money + + +class TestMoney(unittest.TestCase): + """Money unit test stubs""" + + def test_Money(self): + """Test Money""" + price = Money( + currency='usd', + amount='10.99' + ) + self.assertEqual(price.amount.as_decimal, decimal.Decimal('10.99')) + self.assertEqual( + price, + dict(currency='usd', amount='10.99') + ) + + +if __name__ == '__main__': + unittest.main() From 1bfed460c59814fc4a097a1064df9ef20939a419 Mon Sep 17 00:00:00 2001 From: Ashutosh Gangwar Date: Wed, 12 Jan 2022 16:52:24 +0530 Subject: [PATCH 084/175] Fix missing ApiKeyAuth import in 'jvm-retrofit2' Kotlin client template (#11286) * fix incorrect ApiKeyAuth import in jvm-retrofit2 kotlin-client template links to - https://github.com/OpenAPITools/openapi-generator/issues/10008 - https://github.com/OpenAPITools/openapi-generator/pull/10708 * update kotlin-retrofit2 samples --- .../jvm-retrofit2/infrastructure/ApiClient.kt.mustache | 4 +++- .../org/openapitools/client/infrastructure/ApiClient.kt | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/infrastructure/ApiClient.kt.mustache index 3d0c640bf6ab..248dc3718a41 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/infrastructure/ApiClient.kt.mustache @@ -3,7 +3,6 @@ package {{packageName}}.infrastructure {{#hasOAuthMethods}} import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder -import {{packageName}}.auth.ApiKeyAuth import {{packageName}}.auth.OAuth import {{packageName}}.auth.OAuth.AccessTokenListener import {{packageName}}.auth.OAuthFlow @@ -18,6 +17,9 @@ import {{packageName}}.auth.HttpBasicAuth import {{packageName}}.auth.HttpBearerAuth {{/isBasicBearer}} {{/isBasic}} +{{#isApiKey}} +import {{packageName}}.auth.ApiKeyAuth +{{/isApiKey}} {{/authMethods}} {{/hasAuthMethods}} diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 46bb56cee106..9898e6001fbc 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -2,10 +2,10 @@ package org.openapitools.client.infrastructure import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder -import org.openapitools.client.auth.ApiKeyAuth import org.openapitools.client.auth.OAuth import org.openapitools.client.auth.OAuth.AccessTokenListener import org.openapitools.client.auth.OAuthFlow +import org.openapitools.client.auth.ApiKeyAuth import okhttp3.Call import okhttp3.Interceptor diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 11032f9f16c3..ffc0e0eb58ca 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -2,10 +2,10 @@ package org.openapitools.client.infrastructure import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder -import org.openapitools.client.auth.ApiKeyAuth import org.openapitools.client.auth.OAuth import org.openapitools.client.auth.OAuth.AccessTokenListener import org.openapitools.client.auth.OAuthFlow +import org.openapitools.client.auth.ApiKeyAuth import okhttp3.Call import okhttp3.Interceptor diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 2197b6acb7a9..1ca402164816 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -2,10 +2,10 @@ package org.openapitools.client.infrastructure import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder -import org.openapitools.client.auth.ApiKeyAuth import org.openapitools.client.auth.OAuth import org.openapitools.client.auth.OAuth.AccessTokenListener import org.openapitools.client.auth.OAuthFlow +import org.openapitools.client.auth.ApiKeyAuth import okhttp3.Call import okhttp3.Interceptor From 69db8176b644ec469e66b21d2e4034e8c4a06e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=A9=EC=A7=84=EC=98=81?= Date: Thu, 13 Jan 2022 01:42:58 +0900 Subject: [PATCH 085/175] keyword conflict with zebos list_creat(), list_free() (#11190) * keyword conflict with zebos list_creat(), list_free() * keyword conflict in zebos list_create list_free --- .../languages/CLibcurlClientCodegen.java | 4 +- .../resources/C-libcurl/api-body.mustache | 34 +++++------ .../resources/C-libcurl/apiClient.c.mustache | 6 +- .../resources/C-libcurl/api_pet_test.mustache | 4 +- .../C-libcurl/api_store_test.mustache | 2 +- .../main/resources/C-libcurl/list.c.mustache | 6 +- .../main/resources/C-libcurl/list.h.mustache | 4 +- .../resources/C-libcurl/model-body.mustache | 12 ++-- .../cpp-tizen-client/api-body.mustache | 2 +- .../cpp-tizen-client/requestinfo.mustache | 2 +- samples/client/petstore/c/api/PetAPI.c | 56 +++++++++---------- samples/client/petstore/c/api/StoreAPI.c | 14 ++--- samples/client/petstore/c/api/UserAPI.c | 12 ++-- samples/client/petstore/c/include/list.h | 4 +- samples/client/petstore/c/model/pet.c | 8 +-- samples/client/petstore/c/src/apiClient.c | 6 +- samples/client/petstore/c/src/list.c | 6 +- .../client/petstore/c/unit-test/test_pet.c | 8 +-- .../petstore/c/unit-tests/manual-PetAPI.c | 4 +- .../petstore/c/unit-tests/manual-StoreAPI.c | 2 +- .../petstore/cpp-tizen/src/PetManager.cpp | 16 +++--- .../petstore/cpp-tizen/src/RequestInfo.h | 2 +- .../petstore/cpp-tizen/src/StoreManager.cpp | 8 +-- .../petstore/cpp-tizen/src/UserManager.cpp | 16 +++--- 24 files changed, 119 insertions(+), 119 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index e7aa24c603de..da9b8d200be5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -519,9 +519,9 @@ public String toExampleValue(Schema schema) { } else if (ModelUtils.isBooleanSchema(schema)) { example = "1"; } else if (ModelUtils.isArraySchema(schema)) { - example = "list_create()"; + example = "list_createList()"; } else if (ModelUtils.isMapSchema(schema)) { - example = "list_create()"; + example = "list_createList()"; } else if (ModelUtils.isObjectSchema(schema)) { return null; // models are managed at moustache level } else { 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 9d73ff5591a4..7ee11c71fbcd 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 @@ -101,11 +101,11 @@ end: {{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}} {{{classname}}}_{{{operationId}}}(apiClient_t *apiClient{{#allParams}}, {{#isPrimitiveType}}{{#isNumber}}{{{dataType}}}{{/isNumber}}{{#isLong}}{{{dataType}}}{{/isLong}}{{#isInteger}}{{{dataType}}}{{/isInteger}}{{#isDouble}}{{{dataType}}}{{/isDouble}}{{#isFloat}}{{{dataType}}}{{/isFloat}}{{#isBoolean}}{{dataType}}{{/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}}{{#isFreeFormObject}}{{dataType}}_t *{{/isFreeFormObject}}{{/isPrimitiveType}}{{^isArray}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{^isEnum}}{{{dataType}}}_t *{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{/isModel}}{{#isUuid}}{{dataType}} *{{/isUuid}}{{#isEmail}}{{dataType}}{{/isEmail}}{{/isPrimitiveType}}{{/isArray}}{{#isContainer}}{{#isArray}}{{dataType}}_t *{{/isArray}}{{#isMap}}{{dataType}}{{/isMap}}{{/isContainer}} {{{paramName}}} {{/allParams}}) { - list_t *localVarQueryParameters = {{#hasQueryParams}}list_create();{{/hasQueryParams}}{{^hasQueryParams}}NULL;{{/hasQueryParams}} - list_t *localVarHeaderParameters = {{#hasHeaderParams}}list_create();{{/hasHeaderParams}}{{^hasHeaderParams}}NULL;{{/hasHeaderParams}} - list_t *localVarFormParameters = {{#hasFormParams}}list_create();{{/hasFormParams}}{{^hasFormParams}}NULL;{{/hasFormParams}} - list_t *localVarHeaderType = {{#hasProduces}}list_create();{{/hasProduces}}{{^hasProduces}}NULL;{{/hasProduces}} - list_t *localVarContentType = {{#hasConsumes}}list_create();{{/hasConsumes}}{{^hasConsumes}}NULL;{{/hasConsumes}} + list_t *localVarQueryParameters = {{#hasQueryParams}}list_createList();{{/hasQueryParams}}{{^hasQueryParams}}NULL;{{/hasQueryParams}} + list_t *localVarHeaderParameters = {{#hasHeaderParams}}list_createList();{{/hasHeaderParams}}{{^hasHeaderParams}}NULL;{{/hasHeaderParams}} + list_t *localVarFormParameters = {{#hasFormParams}}list_createList();{{/hasFormParams}}{{^hasFormParams}}NULL;{{/hasFormParams}} + list_t *localVarHeaderType = {{#hasProduces}}list_createList();{{/hasProduces}}{{^hasProduces}}NULL;{{/hasProduces}} + list_t *localVarContentType = {{#hasConsumes}}list_createList();{{/hasConsumes}}{{^hasConsumes}}NULL;{{/hasConsumes}} char *localVarBodyParameters = NULL; // create the path @@ -341,7 +341,7 @@ end: //primitive return type not simple cJSON *{{paramName}}localVarJSON = cJSON_Parse(apiClient->dataReceived); cJSON *{{{paramName}}}VarJSON; - list_t *elementToReturn = list_create(); + list_t *elementToReturn = list_createList(); cJSON_ArrayForEach({{{paramName}}}VarJSON, {{paramName}}localVarJSON){ keyValuePair_t *keyPair = keyValuePair_create(strdup({{{paramName}}}VarJSON->string), cJSON_Print({{{paramName}}}VarJSON)); list_addElement(elementToReturn, keyPair); @@ -356,7 +356,7 @@ end: if(!cJSON_IsArray({{classname}}localVarJSON)) { return 0;//nonprimitive container } - list_t *elementToReturn = list_create(); + list_t *elementToReturn = list_createList(); cJSON *{{{paramName}}}VarJSON; cJSON_ArrayForEach({{{paramName}}}VarJSON, {{classname}}localVarJSON) { @@ -388,11 +388,11 @@ end: apiClient->dataReceived = NULL; apiClient->dataReceivedLen = 0; } - {{#hasQueryParams}}list_free(localVarQueryParameters);{{/hasQueryParams}} - {{#hasHeaderParams}}list_free(localVarHeaderParameters);{{/hasHeaderParams}} - {{#hasFormParams}}list_free(localVarFormParameters);{{/hasFormParams}} - {{#hasProduces}}list_free(localVarHeaderType);{{/hasProduces}} - {{#hasConsumes}}list_free(localVarContentType);{{/hasConsumes}} + {{#hasQueryParams}}list_freeList(localVarQueryParameters);{{/hasQueryParams}} + {{#hasHeaderParams}}list_freeList(localVarHeaderParameters);{{/hasHeaderParams}} + {{#hasFormParams}}list_freeList(localVarFormParameters);{{/hasFormParams}} + {{#hasProduces}}list_freeList(localVarHeaderType);{{/hasProduces}} + {{#hasConsumes}}list_freeList(localVarContentType);{{/hasConsumes}} free(localVarPath); {{#pathParams}} free(localVarToReplace_{{paramName}}); @@ -526,11 +526,11 @@ end: apiClient->dataReceived = NULL; apiClient->dataReceivedLen = 0; } - {{#hasQueryParams}}list_free(localVarQueryParameters);{{/hasQueryParams}} - {{#hasHeaderParams}}list_free(localVarHeaderParameters);{{/hasHeaderParams}} - {{#hasFormParams}}list_free(localVarFormParameters);{{/hasFormParams}} - {{#hasProduces}}list_free(localVarHeaderType);{{/hasProduces}} - {{#hasConsumes}}list_free(localVarContentType);{{/hasConsumes}} + {{#hasQueryParams}}list_freeList(localVarQueryParameters);{{/hasQueryParams}} + {{#hasHeaderParams}}list_freeList(localVarHeaderParameters);{{/hasHeaderParams}} + {{#hasFormParams}}list_freeList(localVarFormParameters);{{/hasFormParams}} + {{#hasProduces}}list_freeList(localVarHeaderType);{{/hasProduces}} + {{#hasConsumes}}list_freeList(localVarContentType);{{/hasConsumes}} free(localVarPath); {{#pathParams}} free(localVarToReplace_{{paramName}}); diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache index 38656a5615b3..e324c5f966cf 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache @@ -74,7 +74,7 @@ apiClient_t *apiClient_create_with_base_path(const char *basePath {{/isOAuth}} {{#isApiKey}} if(apiKeys_{{name}}!= NULL) { - apiClient->apiKeys_{{name}} = list_create(); + apiClient->apiKeys_{{name}} = list_createList(); listEntry_t *listEntry = NULL; list_ForEach(listEntry, apiKeys_{{name}}) { keyValuePair_t *pair = listEntry->data; @@ -126,7 +126,7 @@ void apiClient_free(apiClient_t *apiClient) { } keyValuePair_free(pair); } - list_free(apiClient->apiKeys_{{name}}); + list_freeList(apiClient->apiKeys_{{name}}); } {{/isApiKey}} {{/authMethods}} @@ -530,7 +530,7 @@ void apiClient_invoke(apiClient_t *apiClient, res = curl_easy_perform(handle); - curl_slist_free_all(headers); + curl_slist_freeList_all(headers); free(targetUrl); diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api_pet_test.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api_pet_test.mustache index 13014042f80b..ffdb0363e470 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api_pet_test.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api_pet_test.mustache @@ -42,7 +42,7 @@ int main() { char *exampleUrl2 = malloc(strlen(EXAMPLE_URL_2) + 1); strcpy(exampleUrl2, EXAMPLE_URL_2); - list_t *photoUrls = list_create(); + list_t *photoUrls = list_createList(); list_addElement(photoUrls, exampleUrl1); list_addElement(photoUrls, exampleUrl2); @@ -55,7 +55,7 @@ int main() { strcpy(exampleTag2Name, EXAMPLE_TAG_2_NAME); tag_t *exampleTag2 = tag_create(EXAMPLE_TAG_2_ID, exampleTag2Name); - list_t *tags = list_create(); + list_t *tags = list_createList(); list_addElement(tags, exampleTag1); list_addElement(tags, exampleTag2); diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api_store_test.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api_store_test.mustache index 159c02e59764..0f652aa09c0f 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api_store_test.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api_store_test.mustache @@ -89,6 +89,6 @@ int main() { list_ForEach(listEntry, elementToReturn) { keyValuePair_free(listEntry->data); } - list_free(elementToReturn); + list_freeList(elementToReturn); } diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache index dfa2e567501b..786812158a24 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache @@ -23,7 +23,7 @@ void listEntry_printAsInt(listEntry_t *listEntry, void *additionalData) { printf("%i\n", *((int *) (listEntry->data))); } -list_t *list_create() { +list_t *list_createList() { list_t *createdList = malloc(sizeof(list_t)); if(createdList == NULL) { // TODO Malloc Failure @@ -88,7 +88,7 @@ void list_iterateThroughListBackward(list_t *list, } } -void list_free(list_t *list) { +void list_freeList(list_t *list) { if(list){ list_iterateThroughListForward(list, listEntry_free, NULL); free(list); @@ -196,5 +196,5 @@ void clear_and_free_string_list(list_t *list) free(list_item); list_item = NULL; } - list_free(list); + list_freeList(list); } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/list.h.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/list.h.mustache index 4c613214094d..96c5832b02b4 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/list.h.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/list.h.mustache @@ -23,8 +23,8 @@ typedef struct list_t { #define list_ForEach(element, list) for(element = (list != NULL) ? (list)->firstEntry : NULL; element != NULL; element = element->nextListEntry) -list_t* list_create(); -void list_free(list_t* listToFree); +list_t* List(); +void list_freeListList(list_t* listToFree); void list_addElement(list_t* list, void* dataToAddInList); listEntry_t* list_getElementAt(list_t *list, long indexOfElement); diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache index 1f28e05e9099..18968d2c7c00 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache @@ -294,7 +294,7 @@ void {{classname}}_free({{classname}}_t *{{classname}}) { list_ForEach(listEntry, {{classname}}->{{name}}) { free(listEntry->data); } - list_free({{classname}}->{{name}}); + list_freeList({{classname}}->{{name}}); {{classname}}->{{name}} = NULL; } {{/isPrimitiveType}} @@ -303,7 +303,7 @@ void {{classname}}_free({{classname}}_t *{{classname}}) { list_ForEach(listEntry, {{classname}}->{{name}}) { {{complexType}}_free(listEntry->data); } - list_free({{classname}}->{{name}}); + list_freeList({{classname}}->{{name}}); {{classname}}->{{name}} = NULL; } {{/isPrimitiveType}} @@ -316,7 +316,7 @@ void {{classname}}_free({{classname}}_t *{{classname}}) { free (localKeyValue->value); keyValuePair_free(localKeyValue); } - list_free({{classname}}->{{name}}); + list_freeList({{classname}}->{{name}}); {{classname}}->{{name}} = NULL; } {{/isMap}} @@ -699,7 +699,7 @@ fail: if(!cJSON_IsArray({{{name}}})) { goto end;//primitive container } - {{{name}}}List = list_create(); + {{{name}}}List = list_createList(); cJSON_ArrayForEach({{{name}}}_local, {{{name}}}) { @@ -742,7 +742,7 @@ fail: goto end; //nonprimitive container } - {{{name}}}List = list_create(); + {{{name}}}List = list_createList(); cJSON_ArrayForEach({{{name}}}_local_nonprimitive,{{{name}}} ) { @@ -762,7 +762,7 @@ fail: if(!cJSON_IsObject({{{name}}})) { goto end;//primitive map container } - {{{name}}}List = list_create(); + {{{name}}}List = list_createList(); keyValuePair_t *localMapKeyPair; cJSON_ArrayForEach({{{name}}}_local_map, {{{name}}}) { diff --git a/modules/openapi-generator/src/main/resources/cpp-tizen-client/api-body.mustache b/modules/openapi-generator/src/main/resources/cpp-tizen-client/api-body.mustache index a9b960e76eb9..9239b3762f06 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tizen-client/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tizen-client/api-body.mustache @@ -299,7 +299,7 @@ static bool {{nickname}}Helper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = {{nickname}}Processor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); diff --git a/modules/openapi-generator/src/main/resources/cpp-tizen-client/requestinfo.mustache b/modules/openapi-generator/src/main/resources/cpp-tizen-client/requestinfo.mustache index eb47133b853d..5966669be454 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tizen-client/requestinfo.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tizen-client/requestinfo.mustache @@ -45,7 +45,7 @@ public: ~RequestInfo() { - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (this->p_chunk) { if((this->p_chunk)->memory) { free((this->p_chunk)->memory); diff --git a/samples/client/petstore/c/api/PetAPI.c b/samples/client/petstore/c/api/PetAPI.c index 28aab6c189db..b5d6f2d61806 100644 --- a/samples/client/petstore/c/api/PetAPI.c +++ b/samples/client/petstore/c/api/PetAPI.c @@ -64,7 +64,7 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t * body ) list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = NULL; - list_t *localVarContentType = list_create(); + list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; // create the path @@ -109,7 +109,7 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t * body ) - list_free(localVarContentType); + list_freeList(localVarContentType); free(localVarPath); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); @@ -125,7 +125,7 @@ void PetAPI_deletePet(apiClient_t *apiClient, long petId , char * api_key ) { list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = list_create(); + list_t *localVarHeaderParameters = list_createList(); list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = NULL; list_t *localVarContentType = NULL; @@ -185,7 +185,7 @@ PetAPI_deletePet(apiClient_t *apiClient, long petId , char * api_key ) apiClient->dataReceivedLen = 0; } - list_free(localVarHeaderParameters); + list_freeList(localVarHeaderParameters); @@ -210,10 +210,10 @@ PetAPI_deletePet(apiClient_t *apiClient, long petId , char * api_key ) list_t* PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t * status ) { - list_t *localVarQueryParameters = list_create(); + list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_create(); + list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; @@ -252,7 +252,7 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t * status ) if(!cJSON_IsArray(PetAPIlocalVarJSON)) { return 0;//nonprimitive container } - list_t *elementToReturn = list_create(); + list_t *elementToReturn = list_createList(); cJSON *VarJSON; cJSON_ArrayForEach(VarJSON, PetAPIlocalVarJSON) { @@ -272,10 +272,10 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t * status ) apiClient->dataReceived = NULL; apiClient->dataReceivedLen = 0; } - list_free(localVarQueryParameters); + list_freeList(localVarQueryParameters); - list_free(localVarHeaderType); + list_freeList(localVarHeaderType); free(localVarPath); return elementToReturn; @@ -292,10 +292,10 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t * status ) list_t* PetAPI_findPetsByTags(apiClient_t *apiClient, list_t * tags ) { - list_t *localVarQueryParameters = list_create(); + list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_create(); + list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; @@ -334,7 +334,7 @@ PetAPI_findPetsByTags(apiClient_t *apiClient, list_t * tags ) if(!cJSON_IsArray(PetAPIlocalVarJSON)) { return 0;//nonprimitive container } - list_t *elementToReturn = list_create(); + list_t *elementToReturn = list_createList(); cJSON *VarJSON; cJSON_ArrayForEach(VarJSON, PetAPIlocalVarJSON) { @@ -354,10 +354,10 @@ PetAPI_findPetsByTags(apiClient_t *apiClient, list_t * tags ) apiClient->dataReceived = NULL; apiClient->dataReceivedLen = 0; } - list_free(localVarQueryParameters); + list_freeList(localVarQueryParameters); - list_free(localVarHeaderType); + list_freeList(localVarHeaderType); free(localVarPath); return elementToReturn; @@ -377,7 +377,7 @@ PetAPI_getPetById(apiClient_t *apiClient, long petId ) list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_create(); + list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; @@ -440,7 +440,7 @@ PetAPI_getPetById(apiClient_t *apiClient, long petId ) - list_free(localVarHeaderType); + list_freeList(localVarHeaderType); free(localVarPath); free(localVarToReplace_petId); @@ -460,7 +460,7 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t * body ) list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = NULL; - list_t *localVarContentType = list_create(); + list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; // create the path @@ -511,7 +511,7 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t * body ) - list_free(localVarContentType); + list_freeList(localVarContentType); free(localVarPath); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); @@ -528,9 +528,9 @@ PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId , char * name , char { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = list_create(); + list_t *localVarFormParameters = list_createList(); list_t *localVarHeaderType = NULL; - list_t *localVarContentType = list_create(); + list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; // create the path @@ -601,9 +601,9 @@ PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId , char * name , char } - list_free(localVarFormParameters); + list_freeList(localVarFormParameters); - list_free(localVarContentType); + list_freeList(localVarContentType); free(localVarPath); free(localVarToReplace_petId); if (keyForm_name) { @@ -634,9 +634,9 @@ PetAPI_uploadFile(apiClient_t *apiClient, long petId , char * additionalMetadata { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = list_create(); - list_t *localVarHeaderType = list_create(); - list_t *localVarContentType = list_create(); + list_t *localVarFormParameters = list_createList(); + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; // create the path @@ -715,9 +715,9 @@ PetAPI_uploadFile(apiClient_t *apiClient, long petId , char * additionalMetadata } - list_free(localVarFormParameters); - list_free(localVarHeaderType); - list_free(localVarContentType); + list_freeList(localVarFormParameters); + list_freeList(localVarHeaderType); + list_freeList(localVarContentType); free(localVarPath); free(localVarToReplace_petId); if (keyForm_additionalMetadata) { diff --git a/samples/client/petstore/c/api/StoreAPI.c b/samples/client/petstore/c/api/StoreAPI.c index 80921ad0f07f..8086a57a64c2 100644 --- a/samples/client/petstore/c/api/StoreAPI.c +++ b/samples/client/petstore/c/api/StoreAPI.c @@ -86,7 +86,7 @@ StoreAPI_getInventory(apiClient_t *apiClient) list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_create(); + list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; @@ -114,7 +114,7 @@ StoreAPI_getInventory(apiClient_t *apiClient) //primitive return type not simple cJSON *localVarJSON = cJSON_Parse(apiClient->dataReceived); cJSON *VarJSON; - list_t *elementToReturn = list_create(); + list_t *elementToReturn = list_createList(); cJSON_ArrayForEach(VarJSON, localVarJSON){ keyValuePair_t *keyPair = keyValuePair_create(strdup(VarJSON->string), cJSON_Print(VarJSON)); list_addElement(elementToReturn, keyPair); @@ -129,7 +129,7 @@ StoreAPI_getInventory(apiClient_t *apiClient) - list_free(localVarHeaderType); + list_freeList(localVarHeaderType); free(localVarPath); return elementToReturn; @@ -149,7 +149,7 @@ StoreAPI_getOrderById(apiClient_t *apiClient, long orderId ) list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_create(); + list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; @@ -212,7 +212,7 @@ StoreAPI_getOrderById(apiClient_t *apiClient, long orderId ) - list_free(localVarHeaderType); + list_freeList(localVarHeaderType); free(localVarPath); free(localVarToReplace_orderId); @@ -231,7 +231,7 @@ StoreAPI_placeOrder(apiClient_t *apiClient, order_t * body ) list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_create(); + list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; @@ -286,7 +286,7 @@ StoreAPI_placeOrder(apiClient_t *apiClient, order_t * body ) - list_free(localVarHeaderType); + list_freeList(localVarHeaderType); free(localVarPath); if (localVarSingleItemJSON_body) { diff --git a/samples/client/petstore/c/api/UserAPI.c b/samples/client/petstore/c/api/UserAPI.c index 33e94203928d..de32d2eef0d6 100644 --- a/samples/client/petstore/c/api/UserAPI.c +++ b/samples/client/petstore/c/api/UserAPI.c @@ -328,7 +328,7 @@ UserAPI_getUserByName(apiClient_t *apiClient, char * username ) list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_create(); + list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; @@ -387,7 +387,7 @@ UserAPI_getUserByName(apiClient_t *apiClient, char * username ) - list_free(localVarHeaderType); + list_freeList(localVarHeaderType); free(localVarPath); free(localVarToReplace_username); @@ -403,10 +403,10 @@ UserAPI_getUserByName(apiClient_t *apiClient, char * username ) char* UserAPI_loginUser(apiClient_t *apiClient, char * username , char * password ) { - list_t *localVarQueryParameters = list_create(); + list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_create(); + list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; @@ -467,10 +467,10 @@ UserAPI_loginUser(apiClient_t *apiClient, char * username , char * password ) apiClient->dataReceived = NULL; apiClient->dataReceivedLen = 0; } - list_free(localVarQueryParameters); + list_freeList(localVarQueryParameters); - list_free(localVarHeaderType); + list_freeList(localVarHeaderType); free(localVarPath); if(keyQuery_username){ diff --git a/samples/client/petstore/c/include/list.h b/samples/client/petstore/c/include/list.h index 4c613214094d..06c1740dc119 100644 --- a/samples/client/petstore/c/include/list.h +++ b/samples/client/petstore/c/include/list.h @@ -23,8 +23,8 @@ typedef struct list_t { #define list_ForEach(element, list) for(element = (list != NULL) ? (list)->firstEntry : NULL; element != NULL; element = element->nextListEntry) -list_t* list_create(); -void list_free(list_t* listToFree); +list_t* list_creatList(); +void list_freeList(list_t* listToFree); void list_addElement(list_t* list, void* dataToAddInList); listEntry_t* list_getElementAt(list_t *list, long indexOfElement); diff --git a/samples/client/petstore/c/model/pet.c b/samples/client/petstore/c/model/pet.c index 73e4f3505f8e..a9f9c27ee472 100644 --- a/samples/client/petstore/c/model/pet.c +++ b/samples/client/petstore/c/model/pet.c @@ -62,14 +62,14 @@ void pet_free(pet_t *pet) { list_ForEach(listEntry, pet->photo_urls) { free(listEntry->data); } - list_free(pet->photo_urls); + list_freeList(pet->photo_urls); pet->photo_urls = NULL; } if (pet->tags) { list_ForEach(listEntry, pet->tags) { tag_free(listEntry->data); } - list_free(pet->tags); + list_freeList(pet->tags); pet->tags = NULL; } free(pet); @@ -210,7 +210,7 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){ if(!cJSON_IsArray(photo_urls)) { goto end;//primitive container } - photo_urlsList = list_create(); + photo_urlsList = list_createList(); cJSON_ArrayForEach(photo_urls_local, photo_urls) { @@ -230,7 +230,7 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){ goto end; //nonprimitive container } - tagsList = list_create(); + tagsList = list_createList(); cJSON_ArrayForEach(tags_local_nonprimitive,tags ) { diff --git a/samples/client/petstore/c/src/apiClient.c b/samples/client/petstore/c/src/apiClient.c index ce2f522cda28..4ecf10c2b8ea 100644 --- a/samples/client/petstore/c/src/apiClient.c +++ b/samples/client/petstore/c/src/apiClient.c @@ -46,7 +46,7 @@ apiClient_t *apiClient_create_with_base_path(const char *basePath apiClient->progress_data = NULL; apiClient->response_code = 0; if(apiKeys_api_key!= NULL) { - apiClient->apiKeys_api_key = list_create(); + apiClient->apiKeys_api_key = list_createList(); listEntry_t *listEntry = NULL; list_ForEach(listEntry, apiKeys_api_key) { keyValuePair_t *pair = listEntry->data; @@ -80,7 +80,7 @@ void apiClient_free(apiClient_t *apiClient) { } keyValuePair_free(pair); } - list_free(apiClient->apiKeys_api_key); + list_freeList(apiClient->apiKeys_api_key); } if(apiClient->accessToken) { free(apiClient->accessToken); @@ -447,7 +447,7 @@ void apiClient_invoke(apiClient_t *apiClient, res = curl_easy_perform(handle); - curl_slist_free_all(headers); + curl_slist_freeList_all(headers); free(targetUrl); diff --git a/samples/client/petstore/c/src/list.c b/samples/client/petstore/c/src/list.c index dfa2e567501b..786812158a24 100644 --- a/samples/client/petstore/c/src/list.c +++ b/samples/client/petstore/c/src/list.c @@ -23,7 +23,7 @@ void listEntry_printAsInt(listEntry_t *listEntry, void *additionalData) { printf("%i\n", *((int *) (listEntry->data))); } -list_t *list_create() { +list_t *list_createList() { list_t *createdList = malloc(sizeof(list_t)); if(createdList == NULL) { // TODO Malloc Failure @@ -88,7 +88,7 @@ void list_iterateThroughListBackward(list_t *list, } } -void list_free(list_t *list) { +void list_freeList(list_t *list) { if(list){ list_iterateThroughListForward(list, listEntry_free, NULL); free(list); @@ -196,5 +196,5 @@ void clear_and_free_string_list(list_t *list) free(list_item); list_item = NULL; } - list_free(list); + list_freeList(list); } \ No newline at end of file diff --git a/samples/client/petstore/c/unit-test/test_pet.c b/samples/client/petstore/c/unit-test/test_pet.c index ba45422f9123..1b4f548729a5 100644 --- a/samples/client/petstore/c/unit-test/test_pet.c +++ b/samples/client/petstore/c/unit-test/test_pet.c @@ -27,8 +27,8 @@ pet_t* instantiate_pet(int include_optional) { // false, not to have infinite recursion instantiate_category(0), "doggie", - list_create(), - list_create(), + list_createList(), + list_createList(), openapi_petstore_pet_STATUS_available ); } else { @@ -36,8 +36,8 @@ pet_t* instantiate_pet(int include_optional) { 56, NULL, "doggie", - list_create(), - list_create(), + list_createList(), + list_createList(), openapi_petstore_pet_STATUS_available ); } diff --git a/samples/client/petstore/c/unit-tests/manual-PetAPI.c b/samples/client/petstore/c/unit-tests/manual-PetAPI.c index f82c5353891d..3090521dc627 100644 --- a/samples/client/petstore/c/unit-tests/manual-PetAPI.c +++ b/samples/client/petstore/c/unit-tests/manual-PetAPI.c @@ -36,7 +36,7 @@ int main() { char *exampleUrl2 = malloc(strlen(EXAMPLE_URL_2) + 1); strcpy(exampleUrl2, EXAMPLE_URL_2); - list_t *photoUrls = list_create(); + list_t *photoUrls = list_createList(); list_addElement(photoUrls, exampleUrl1); list_addElement(photoUrls, exampleUrl2); @@ -49,7 +49,7 @@ int main() { strcpy(exampleTag2Name, EXAMPLE_TAG_2_NAME); tag_t *exampleTag2 = tag_create(EXAMPLE_TAG_2_ID, exampleTag2Name); - list_t *tags = list_create(); + list_t *tags = list_createList(); list_addElement(tags, exampleTag1); list_addElement(tags, exampleTag2); diff --git a/samples/client/petstore/c/unit-tests/manual-StoreAPI.c b/samples/client/petstore/c/unit-tests/manual-StoreAPI.c index ce29f77b9615..c6e3d3bacb42 100644 --- a/samples/client/petstore/c/unit-tests/manual-StoreAPI.c +++ b/samples/client/petstore/c/unit-tests/manual-StoreAPI.c @@ -98,7 +98,7 @@ int main() { free(pair->value); keyValuePair_free(pair); } - list_free(elementToReturn); + list_freeList(elementToReturn); apiClient_free(apiClient5); apiClient_unsetupGlobalEnv(); diff --git a/samples/client/petstore/cpp-tizen/src/PetManager.cpp b/samples/client/petstore/cpp-tizen/src/PetManager.cpp index 2f273a21e10d..01695962eebe 100644 --- a/samples/client/petstore/cpp-tizen/src/PetManager.cpp +++ b/samples/client/petstore/cpp-tizen/src/PetManager.cpp @@ -138,7 +138,7 @@ static bool addPetHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = addPetProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -274,7 +274,7 @@ static bool deletePetHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = deletePetProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -418,7 +418,7 @@ static bool findPetsByStatusHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = findPetsByStatusProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -562,7 +562,7 @@ static bool findPetsByTagsHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = findPetsByTagsProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -714,7 +714,7 @@ static bool getPetByIdHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = getPetByIdProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -852,7 +852,7 @@ static bool updatePetHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = updatePetProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -982,7 +982,7 @@ static bool updatePetWithFormHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = updatePetWithFormProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -1134,7 +1134,7 @@ static bool uploadFileHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = uploadFileProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); diff --git a/samples/client/petstore/cpp-tizen/src/RequestInfo.h b/samples/client/petstore/cpp-tizen/src/RequestInfo.h index 6424d6c856de..02b1f59df747 100644 --- a/samples/client/petstore/cpp-tizen/src/RequestInfo.h +++ b/samples/client/petstore/cpp-tizen/src/RequestInfo.h @@ -45,7 +45,7 @@ class RequestInfo { ~RequestInfo() { - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (this->p_chunk) { if((this->p_chunk)->memory) { free((this->p_chunk)->memory); diff --git a/samples/client/petstore/cpp-tizen/src/StoreManager.cpp b/samples/client/petstore/cpp-tizen/src/StoreManager.cpp index e107ff844349..0ae59157af1f 100644 --- a/samples/client/petstore/cpp-tizen/src/StoreManager.cpp +++ b/samples/client/petstore/cpp-tizen/src/StoreManager.cpp @@ -130,7 +130,7 @@ static bool deleteOrderHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = deleteOrderProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -254,7 +254,7 @@ static bool getInventoryHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = getInventoryProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -406,7 +406,7 @@ static bool getOrderByIdHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = getOrderByIdProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -565,7 +565,7 @@ static bool placeOrderHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = placeOrderProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); diff --git a/samples/client/petstore/cpp-tizen/src/UserManager.cpp b/samples/client/petstore/cpp-tizen/src/UserManager.cpp index ab3a7e40964f..12b3633f5d48 100644 --- a/samples/client/petstore/cpp-tizen/src/UserManager.cpp +++ b/samples/client/petstore/cpp-tizen/src/UserManager.cpp @@ -137,7 +137,7 @@ static bool createUserHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = createUserProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -286,7 +286,7 @@ static bool createUsersWithArrayInputHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = createUsersWithArrayInputProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -435,7 +435,7 @@ static bool createUsersWithListInputHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = createUsersWithListInputProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -565,7 +565,7 @@ static bool deleteUserHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = deleteUserProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -717,7 +717,7 @@ static bool getUserByNameHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = getUserByNameProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -866,7 +866,7 @@ static bool loginUserHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = loginUserProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -990,7 +990,7 @@ static bool logoutUserHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = logoutUserProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); @@ -1133,7 +1133,7 @@ static bool updateUserHelper(char * accessToken, mBody, headerList, p_chunk, &code, errormsg); bool retval = updateUserProcessor(*p_chunk, code, errormsg, userData,reinterpret_cast(handler)); - curl_slist_free_all(headerList); + curl_slist_freeList_all(headerList); if (p_chunk) { if(p_chunk->memory) { free(p_chunk->memory); From 3ed9a8e53c10510237e7c4a25106f3f3c1f21f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Sj=C3=B6blom?= Date: Wed, 12 Jan 2022 17:59:00 +0100 Subject: [PATCH 086/175] Make Kotlin client generate comma separated list for array path params (#11228) --- .../resources/kotlin-client/libraries/jvm-okhttp/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache index 7817289fa11a..d7948cf6a755 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache @@ -217,7 +217,7 @@ import {{packageName}}.infrastructure.toMultiValue return RequestConfig( method = RequestMethod.{{httpMethod}}, - path = "{{path}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", "${{{paramName}}}"){{/pathParams}}, + path = "{{path}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", {{#isContainer}}{{paramName}}.joinToString(","){{/isContainer}}{{^isContainer}}"${{{paramName}}}"{{/isContainer}}){{/pathParams}}, query = localVariableQuery, headers = localVariableHeaders, body = localVariableBody From 69b64ebb0e72f938cece06daca220e486efde24a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 13 Jan 2022 01:26:07 +0800 Subject: [PATCH 087/175] [kotlin][client] add tests for comma separated list in array path params (#11293) * add tests for kotlin-array-simple-string * add new files * remove build fies * clean up --- .github/workflows/samples-kotlin.yaml | 1 + .gitignore | 8 +- bin/configs/kotlin-array-simple-string.yaml | 6 + .../3_0/issue_7199_array_simple_string.yaml | 19 ++ .../.openapi-generator-ignore | 23 ++ .../.openapi-generator/FILES | 26 ++ .../.openapi-generator/VERSION | 1 + .../kotlin-array-simple-string/README.md | 49 ++++ .../kotlin-array-simple-string/build.gradle | 37 +++ .../docs/DefaultApi.md | 53 ++++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + .../kotlin-array-simple-string/gradlew | 185 +++++++++++++ .../kotlin-array-simple-string/gradlew.bat | 89 +++++++ .../settings.gradle | 2 + .../openapitools/client/apis/DefaultApi.kt | 116 +++++++++ .../client/infrastructure/ApiAbstractions.kt | 23 ++ .../client/infrastructure/ApiClient.kt | 245 ++++++++++++++++++ .../client/infrastructure/ApiResponse.kt | 43 +++ .../infrastructure/BigDecimalAdapter.kt | 17 ++ .../infrastructure/BigIntegerAdapter.kt | 17 ++ .../client/infrastructure/ByteArrayAdapter.kt | 12 + .../client/infrastructure/Errors.kt | 18 ++ .../client/infrastructure/LocalDateAdapter.kt | 19 ++ .../infrastructure/LocalDateTimeAdapter.kt | 19 ++ .../infrastructure/OffsetDateTimeAdapter.kt | 19 ++ .../client/infrastructure/RequestConfig.kt | 17 ++ .../client/infrastructure/RequestMethod.kt | 8 + .../infrastructure/ResponseExtensions.kt | 24 ++ .../client/infrastructure/Serializer.kt | 23 ++ .../client/infrastructure/URIAdapter.kt | 13 + .../client/infrastructure/UUIDAdapter.kt | 13 + 32 files changed, 1144 insertions(+), 6 deletions(-) create mode 100644 bin/configs/kotlin-array-simple-string.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue_7199_array_simple_string.yaml create mode 100644 samples/client/petstore/kotlin-array-simple-string/.openapi-generator-ignore create mode 100644 samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES create mode 100644 samples/client/petstore/kotlin-array-simple-string/.openapi-generator/VERSION create mode 100644 samples/client/petstore/kotlin-array-simple-string/README.md create mode 100644 samples/client/petstore/kotlin-array-simple-string/build.gradle create mode 100644 samples/client/petstore/kotlin-array-simple-string/docs/DefaultApi.md create mode 100644 samples/client/petstore/kotlin-array-simple-string/gradle/wrapper/gradle-wrapper.jar create mode 100644 samples/client/petstore/kotlin-array-simple-string/gradle/wrapper/gradle-wrapper.properties create mode 100644 samples/client/petstore/kotlin-array-simple-string/gradlew create mode 100644 samples/client/petstore/kotlin-array-simple-string/gradlew.bat create mode 100644 samples/client/petstore/kotlin-array-simple-string/settings.gradle create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt create mode 100644 samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt diff --git a/.github/workflows/samples-kotlin.yaml b/.github/workflows/samples-kotlin.yaml index 83d748e9f06e..ce20f98a3464 100644 --- a/.github/workflows/samples-kotlin.yaml +++ b/.github/workflows/samples-kotlin.yaml @@ -41,6 +41,7 @@ jobs: - samples/client/petstore/kotlin-string - samples/client/petstore/kotlin-threetenbp - samples/client/petstore/kotlin-uppercase-enum + - samples/client/petstore/kotlin-array-simple-string steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 diff --git a/.gitignore b/.gitignore index 728a1667834f..f04e4e087bfb 100644 --- a/.gitignore +++ b/.gitignore @@ -201,15 +201,11 @@ samples/server/petstore/aspnetcore/.vs/ effective.pom # kotlin -samples/client/petstore/kotlin/src/main/kotlin/test/ -samples/client/petstore/kotlin-threetenbp/build -samples/client/petstore/kotlin-string/build samples/openapi3/client/petstore/kotlin/build samples/server/petstore/kotlin-server/ktor/build samples/server/petstore/kotlin-springboot/build -samples/client/petstore/kotlin-multiplatform/build/ -samples/client/petstore/kotlin-okhttp3/build/ -\? +samples/client/petstore/kotlin*/src/main/kotlin/test/ +samples/client/petstore/kotlin*/build/ # haskell .stack-work diff --git a/bin/configs/kotlin-array-simple-string.yaml b/bin/configs/kotlin-array-simple-string.yaml new file mode 100644 index 000000000000..68cbd8c42ffb --- /dev/null +++ b/bin/configs/kotlin-array-simple-string.yaml @@ -0,0 +1,6 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-array-simple-string +inputSpec: modules/openapi-generator/src/test/resources/3_0/issue_7199_array_simple_string.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-array-simple-string diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_7199_array_simple_string.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_7199_array_simple_string.yaml new file mode 100644 index 000000000000..db0ee3463c3e --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue_7199_array_simple_string.yaml @@ -0,0 +1,19 @@ +openapi: 3.0.0 +info: + version: 1.0.0 + title: Demo +paths: + '/{ids}': + get: + parameters: + - name: ids + in: path + required: true + schema: + type: array + items: + type: string + style: simple + responses: + 200: + description: Successful operation diff --git a/samples/client/petstore/kotlin-array-simple-string/.openapi-generator-ignore b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/.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/kotlin-array-simple-string/.openapi-generator/FILES b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES new file mode 100644 index 000000000000..97e668afe5ff --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES @@ -0,0 +1,26 @@ +.openapi-generator-ignore +README.md +build.gradle +docs/DefaultApi.md +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +settings.gradle +src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt diff --git a/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string/README.md b/samples/client/petstore/kotlin-array-simple-string/README.md new file mode 100644 index 000000000000..833e3ab254fd --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/README.md @@ -0,0 +1,49 @@ +# org.openapitools.client - Kotlin client library for Demo + +## Requires + +* Kotlin 1.4.30 +* Gradle 6.8.3 + +## Build + +First, create the gradle wrapper script: + +``` +gradle wrapper +``` + +Then, run: + +``` +./gradlew check assemble +``` + +This runs all tests and packages the library. + +## Features/Implementation Notes + +* Supports JSON inputs/outputs, File inputs, and Form inputs. +* Supports collection formats for query parameters: csv, tsv, ssv, pipes. +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. +* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. + + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**idsGet**](docs/DefaultApi.md#idsget) | **GET** /{ids} | + + + +## Documentation for Models + + + + +## Documentation for Authorization + +All endpoints do not require authorization. diff --git a/samples/client/petstore/kotlin-array-simple-string/build.gradle b/samples/client/petstore/kotlin-array-simple-string/build.gradle new file mode 100644 index 000000000000..3de8b45b135e --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/build.gradle @@ -0,0 +1,37 @@ +group 'org.openapitools' +version '1.0.0' + +wrapper { + gradleVersion = '6.8.3' + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +buildscript { + ext.kotlin_version = '1.5.10' + + repositories { + maven { url "https://repo1.maven.org/maven2" } + } + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +apply plugin: 'kotlin' + +repositories { + maven { url "https://repo1.maven.org/maven2" } +} + +test { + useJUnitPlatform() +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + implementation "com.squareup.moshi:moshi-kotlin:1.12.0" + implementation "com.squareup.moshi:moshi-adapters:1.12.0" + implementation "com.squareup.okhttp3:okhttp:4.9.1" + testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" +} diff --git a/samples/client/petstore/kotlin-array-simple-string/docs/DefaultApi.md b/samples/client/petstore/kotlin-array-simple-string/docs/DefaultApi.md new file mode 100644 index 000000000000..45b43113f194 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/docs/DefaultApi.md @@ -0,0 +1,53 @@ +# DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**idsGet**](DefaultApi.md#idsGet) | **GET** /{ids} | + + + +# **idsGet** +> idsGet(ids) + + + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = DefaultApi() +val ids : kotlin.collections.List = // kotlin.collections.List | +try { + apiInstance.idsGet(ids) +} catch (e: ClientException) { + println("4xx response calling DefaultApi#idsGet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling DefaultApi#idsGet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ids** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/samples/client/petstore/kotlin-array-simple-string/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-array-simple-string/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e708b1c023ec8b20f512888fe07c5bd3ff77bb8f GIT binary patch literal 59203 zcma&O1CT9Y(k9%tZQHhO+qUh#ZQHhO+qmuS+qP|E@9xZO?0h@l{(r>DQ>P;GjjD{w zH}lENr;dU&FbEU?00aa80D$0M0RRB{U*7-#kbjS|qAG&4l5%47zyJ#WrfA#1$1Ctx zf&Z_d{GW=lf^w2#qRJ|CvSJUi(^E3iv~=^Z(zH}F)3Z%V3`@+rNB7gTVU{Bb~90p|f+0(v;nz01EG7yDMX9@S~__vVgv%rS$+?IH+oZ03D5zYrv|^ zC1J)SruYHmCki$jLBlTaE5&dFG9-kq3!^i>^UQL`%gn6)jz54$WDmeYdsBE9;PqZ_ zoGd=P4+|(-u4U1dbAVQrFWoNgNd;0nrghPFbQrJctO>nwDdI`Q^i0XJDUYm|T|RWc zZ3^Qgo_Qk$%Fvjj-G}1NB#ZJqIkh;kX%V{THPqOyiq)d)0+(r9o(qKlSp*hmK#iIY zA^)Vr$-Hz<#SF=0@tL@;dCQsm`V9s1vYNq}K1B)!XSK?=I1)tX+bUV52$YQu*0%fnWEukW>mxkz+%3-S!oguE8u#MGzST8_Dy^#U?fA@S#K$S@9msUiX!gd_ow>08w5)nX{-KxqMOo7d?k2&?Vf z&diGDtZr(0cwPe9z9FAUSD9KC)7(n^lMWuayCfxzy8EZsns%OEblHFSzP=cL6}?J| z0U$H!4S_TVjj<`6dy^2j`V`)mC;cB%* z8{>_%E1^FH!*{>4a7*C1v>~1*@TMcLK{7nEQ!_igZC}ikJ$*<$yHy>7)oy79A~#xE zWavoJOIOC$5b6*q*F_qN1>2#MY)AXVyr$6x4b=$x^*aqF*L?vmj>Mgv+|ITnw_BoW zO?jwHvNy^prH{9$rrik1#fhyU^MpFqF2fYEt(;4`Q&XWOGDH8k6M=%@fics4ajI;st# zCU^r1CK&|jzUhRMv;+W~6N;u<;#DI6cCw-otsc@IsN3MoSD^O`eNflIoR~l4*&-%RBYk@gb^|-JXs&~KuSEmMxB}xSb z@K76cXD=Y|=I&SNC2E+>Zg?R6E%DGCH5J1nU!A|@eX9oS(WPaMm==k2s_ueCqdZw| z&hqHp)47`c{BgwgvY2{xz%OIkY1xDwkw!<0veB#yF4ZKJyabhyyVS`gZepcFIk%e2 zTcrmt2@-8`7i-@5Nz>oQWFuMC_KlroCl(PLSodswHqJ3fn<;gxg9=}~3x_L3P`9Sn zChIf}8vCHvTriz~T2~FamRi?rh?>3bX1j}%bLH+uFX+p&+^aXbOK7clZxdU~6Uxgy z8R=obwO4dL%pmVo*Ktf=lH6hnlz_5k3cG;m8lgaPp~?eD!Yn2kf)tU6PF{kLyn|oI@eQ`F z3IF7~Blqg8-uwUuWZScRKn%c2_}dXB6Dx_&xR*n9M9LXasJhtZdr$vBY!rP{c@=)& z#!?L$2UrkvClwQO>U*fSMs67oSj2mxiJ$t;E|>q%Kh_GzzWWO&3;ufU%2z%ucBU8H z3WIwr$n)cfCXR&>tyB7BcSInK>=ByZA%;cVEJhcg<#6N{aZC4>K41XF>ZgjG`z_u& zGY?;Ad?-sgiOnI`oppF1o1Gurqbi*;#x2>+SSV6|1^G@ooVy@fg?wyf@0Y!UZ4!}nGuLeC^l)6pwkh|oRY`s1Pm$>zZ3u-83T|9 zGaKJIV3_x+u1>cRibsaJpJqhcm%?0-L;2 zitBrdRxNmb0OO2J%Y&Ym(6*`_P3&&5Bw157{o7LFguvxC$4&zTy#U=W*l&(Q2MNO} zfaUwYm{XtILD$3864IA_nn34oVa_g^FRuHL5wdUd)+W-p-iWCKe8m_cMHk+=? zeKX)M?Dt(|{r5t7IenkAXo%&EXIb-i^w+0CX0D=xApC=|Xy(`xy+QG^UyFe z+#J6h_&T5i#sV)hj3D4WN%z;2+jJcZxcI3*CHXGmOF3^)JD5j&wfX)e?-|V0GPuA+ zQFot%aEqGNJJHn$!_}#PaAvQ^{3-Ye7b}rWwrUmX53(|~i0v{}G_sI9uDch_brX&6 zWl5Ndj-AYg(W9CGfQf<6!YmY>Ey)+uYd_JNXH=>|`OH-CDCmcH(0%iD_aLlNHKH z7bcW-^5+QV$jK?R*)wZ>r9t}loM@XN&M-Pw=F#xn(;u3!(3SXXY^@=aoj70;_=QE9 zGghsG3ekq#N||u{4We_25U=y#T*S{4I{++Ku)> zQ!DZW;pVcn>b;&g2;YE#+V`v*Bl&Y-i@X6D*OpNA{G@JAXho&aOk(_j^weW{#3X5Y z%$q_wpb07EYPdmyH(1^09i$ca{O<}7) zRWncXdSPgBE%BM#by!E>tdnc$8RwUJg1*x($6$}ae$e9Knj8gvVZe#bLi!<+&BkFj zg@nOpDneyc+hU9P-;jmOSMN|*H#>^Ez#?;%C3hg_65leSUm;iz)UkW)jX#p)e&S&M z1|a?wDzV5NVnlhRBCd_;F87wp>6c<&nkgvC+!@KGiIqWY4l}=&1w7|r6{oBN8xyzh zG$b#2=RJp_iq6)#t5%yLkKx(0@D=C3w+oiXtSuaQ%I1WIb-eiE$d~!)b@|4XLy!CZ z9p=t=%3ad@Ep+<9003D2KZ5VyP~_n$=;~r&YUg5UZ0KVD&tR1DHy9x)qWtKJp#Kq# zP*8p#W(8JJ_*h_3W}FlvRam?<4Z+-H77^$Lvi+#vmhL9J zJ<1SV45xi;SrO2f=-OB(7#iNA5)x1uNC-yNxUw|!00vcW2PufRm>e~toH;M0Q85MQLWd?3O{i8H+5VkR@l9Dg-ma ze2fZ%>G(u5(k9EHj2L6!;(KZ8%8|*-1V|B#EagbF(rc+5iL_5;Eu)L4Z-V;0HfK4d z*{utLse_rvHZeQ>V5H=f78M3Ntg1BPxFCVD{HbNA6?9*^YIq;B-DJd{Ca2L#)qWP? zvX^NhFmX?CTWw&Ns}lgs;r3i+Bq@y}Ul+U%pzOS0Fcv9~aB(0!>GT0)NO?p=25LjN z2bh>6RhgqD7bQj#k-KOm@JLgMa6>%-ok1WpOe)FS^XOU{c?d5shG(lIn3GiVBxmg`u%-j=)^v&pX1JecJics3&jvPI)mDut52? z3jEA)DM%}BYbxxKrizVYwq?(P&19EXlwD9^-6J+4!}9{ywR9Gk42jjAURAF&EO|~N z)?s>$Da@ikI4|^z0e{r`J8zIs>SpM~Vn^{3fArRu;?+43>lD+^XtUcY1HidJwnR6+ z!;oG2=B6Z_=M%*{z-RaHc(n|1RTKQdNjjV!Pn9lFt^4w|AeN06*j}ZyhqZ^!-=cyGP_ShV1rGxkx8t zB;8`h!S{LD%ot``700d0@Grql(DTt4Awgmi+Yr0@#jbe=2#UkK%rv=OLqF)9D7D1j z!~McAwMYkeaL$~kI~90)5vBhBzWYc3Cj1WI0RS`z000R8-@ET0dA~*r(gSiCJmQMN&4%1D zyVNf0?}sBH8zNbBLn>~(W{d3%@kL_eQ6jEcR{l>C|JK z(R-fA!z|TTRG40|zv}7E@PqCAXP3n`;%|SCQ|ZS%ym$I{`}t3KPL&^l5`3>yah4*6 zifO#{VNz3)?ZL$be;NEaAk9b#{tV?V7 zP|wf5YA*1;s<)9A4~l3BHzG&HH`1xNr#%){4xZ!jq%o=7nN*wMuXlFV{HaiQLJ`5G zBhDi#D(m`Q1pLh@Tq+L;OwuC52RdW7b8}~60WCOK5iYMUad9}7aWBuILb({5=z~YF zt?*Jr5NG+WadM{mDL>GyiByCuR)hd zA=HM?J6l1Xv0Dl+LW@w$OTcEoOda^nFCw*Sy^I@$sSuneMl{4ys)|RY#9&NxW4S)9 zq|%83IpslTLoz~&vTo!Ga@?rj_kw{|k{nv+w&Ku?fyk4Ki4I?);M|5Axm)t+BaE)D zm(`AQ#k^DWrjbuXoJf2{Aj^KT zFb1zMSqxq|vceV+Mf-)$oPflsO$@*A0n0Z!R{&(xh8s}=;t(lIy zv$S8x>m;vQNHuRzoaOo?eiWFe{0;$s`Bc+Osz~}Van${u;g(su`3lJ^TEfo~nERfP z)?aFzpDgnLYiERsKPu|0tq4l2wT)Atr6Qb%m-AUn6HnCue*yWICp7TjW$@sO zm5rm4aTcPQ(rfi7a`xP7cKCFrJD}*&_~xgLyr^-bmsL}y;A5P|al8J3WUoBSjqu%v zxC;mK!g(7r6RRJ852Z~feoC&sD3(6}^5-uLK8o)9{8L_%%rItZK9C){UxB|;G>JbP zsRRtS4-3B*5c+K2kvmgZK8472%l>3cntWUOVHxB|{Ay~aOg5RN;{PJgeVD*H%ac+y!h#wi%o2bF2Ca8IyMyH{>4#{E_8u^@+l-+n=V}Sq?$O z{091@v%Bd*3pk0^2UtiF9Z+(a@wy6 zUdw8J*ze$K#=$48IBi1U%;hmhO>lu!uU;+RS}p&6@rQila7WftH->*A4=5W|Fmtze z)7E}jh@cbmr9iup^i%*(uF%LG&!+Fyl@LFA-}Ca#bxRfDJAiR2dt6644TaYw1Ma79 zt8&DYj31j^5WPNf5P&{)J?WlCe@<3u^78wnd(Ja4^a>{^Tw}W>|Cjt^If|7l^l)^Q zbz|7~CF(k_9~n|h;ysZ+jHzkXf(*O*@5m zLzUmbHp=x!Q|!9NVXyipZ3)^GuIG$k;D)EK!a5=8MFLI_lpf`HPKl=-Ww%z8H_0$j ztJ||IfFG1lE9nmQ0+jPQy zCBdKkjArH@K7jVcMNz);Q(Q^R{d5G?-kk;Uu_IXSyWB)~KGIizZL(^&qF;|1PI7!E zTP`%l)gpX|OFn&)M%txpQ2F!hdA~hX1Cm5)IrdljqzRg!f{mN%G~H1&oqe`5eJCIF zHdD7O;AX-{XEV(a`gBFJ9ews#CVS2y!&>Cm_dm3C8*n3MA*e67(WC?uP@8TXuMroq z{#w$%z@CBIkRM7?}Xib+>hRjy?%G!fiw8! z8(gB+8J~KOU}yO7UGm&1g_MDJ$IXS!`+*b*QW2x)9>K~Y*E&bYMnjl6h!{17_8d!%&9D`a7r&LKZjC<&XOvTRaKJ1 zUY@hl5^R&kZl3lU3njk`3dPzxj$2foOL26r(9zsVF3n_F#v)s5vv3@dgs|lP#eylq62{<-vczqP!RpVBTgI>@O6&sU>W|do17+#OzQ7o5A$ICH z?GqwqnK^n2%LR;$^oZM;)+>$X3s2n}2jZ7CdWIW0lnGK-b#EG01)P@aU`pg}th&J-TrU`tIpb5t((0eu|!u zQz+3ZiOQ^?RxxK4;zs=l8q!-n7X{@jSwK(iqNFiRColuEOg}!7cyZi`iBX4g1pNBj zAPzL?P^Ljhn;1$r8?bc=#n|Ed7wB&oHcw()&*k#SS#h}jO?ZB246EGItsz*;^&tzp zu^YJ0=lwsi`eP_pU8}6JA7MS;9pfD;DsSsLo~ogzMNP70@@;Fm8f0^;>$Z>~}GWRw!W5J3tNX*^2+1f3hz{~rIzJo z6W%J(H!g-eI_J1>0juX$X4Cl6i+3wbc~k146UIX&G22}WE>0ga#WLsn9tY(&29zBvH1$`iWtTe zG2jYl@P!P)eb<5DsR72BdI7-zP&cZNI{7q3e@?N8IKc4DE#UVr->|-ryuJXk^u^>4 z$3wE~=q390;XuOQP~TNoDR?#|NSPJ%sTMInA6*rJ%go|=YjGe!B>z6u$IhgQSwoV* zjy3F2#I>uK{42{&IqP59)Y(1*Z>>#W8rCf4_eVsH)`v!P#^;BgzKDR`ARGEZzkNX+ zJUQu=*-ol=Xqqt5=`=pA@BIn@6a9G8C{c&`i^(i+BxQO9?YZ3iu%$$da&Kb?2kCCo zo7t$UpSFWqmydXf@l3bVJ=%K?SSw)|?srhJ-1ZdFu*5QhL$~-IQS!K1s@XzAtv6*Y zl8@(5BlWYLt1yAWy?rMD&bwze8bC3-GfNH=p zynNFCdxyX?K&G(ZZ)afguQ2|r;XoV^=^(;Cku#qYn4Lus`UeKt6rAlFo_rU`|Rq z&G?~iWMBio<78of-2X(ZYHx~=U0Vz4btyXkctMKdc9UM!vYr~B-(>)(Hc|D zMzkN4!PBg%tZoh+=Gba!0++d193gbMk2&krfDgcbx0jI92cq?FFESVg0D$>F+bil} zY~$)|>1HZsX=5sAZ2WgPB5P=8X#TI+NQ(M~GqyVB53c6IdX=k>Wu@A0Svf5#?uHaF zsYn|koIi3$(%GZ2+G+7Fv^lHTb#5b8sAHSTnL^qWZLM<(1|9|QFw9pnRU{svj}_Al zL)b9>fN{QiA($8peNEJyy`(a{&uh-T4_kdZFIVsKKVM(?05}76EEz?#W za^fiZOAd14IJ4zLX-n7Lq0qlQ^lW8Cvz4UKkV9~P}>sq0?xD3vg+$4vLm~C(+ zM{-3Z#qnZ09bJ>}j?6ry^h+@PfaD7*jZxBEY4)UG&daWb??6)TP+|3#Z&?GL?1i+280CFsE|vIXQbm| zM}Pk!U`U5NsNbyKzkrul-DzwB{X?n3E6?TUHr{M&+R*2%yOiXdW-_2Yd6?38M9Vy^ z*lE%gA{wwoSR~vN0=no}tP2Ul5Gk5M(Xq`$nw#ndFk`tcpd5A=Idue`XZ!FS>Q zG^0w#>P4pPG+*NC9gLP4x2m=cKP}YuS!l^?sHSFftZy{4CoQrb_ z^20(NnG`wAhMI=eq)SsIE~&Gp9Ne0nD4%Xiu|0Fj1UFk?6avDqjdXz{O1nKao*46y zT8~iA%Exu=G#{x=KD;_C&M+Zx4+n`sHT>^>=-1YM;H<72k>$py1?F3#T1*ef9mLZw z5naLQr?n7K;2l+{_uIw*_1nsTn~I|kkCgrn;|G~##hM;9l7Jy$yJfmk+&}W@JeKcF zx@@Woiz8qdi|D%aH3XTx5*wDlbs?dC1_nrFpm^QbG@wM=i2?Zg;$VK!c^Dp8<}BTI zyRhAq@#%2pGV49*Y5_mV4+OICP|%I(dQ7x=6Ob}>EjnB_-_18*xrY?b%-yEDT(wrO z9RY2QT0`_OpGfMObKHV;QLVnrK%mc?$WAdIT`kJQT^n%GuzE7|9@k3ci5fYOh(287 zuIbg!GB3xLg$YN=n)^pHGB0jH+_iIiC=nUcD;G6LuJsjn2VI1cyZx=a?ShCsF==QK z;q~*m&}L<-cb+mDDXzvvrRsybcgQ;Vg21P(uLv5I+eGc7o7tc6`;OA9{soHFOz zT~2?>Ts}gprIX$wRBb4yE>ot<8+*Bv`qbSDv*VtRi|cyWS>)Fjs>fkNOH-+PX&4(~ z&)T8Zam2L6puQl?;5zg9h<}k4#|yH9czHw;1jw-pwBM*O2hUR6yvHATrI%^mvs9q_ z&ccT0>f#eDG<^WG^q@oVqlJrhxH)dcq2cty@l3~|5#UDdExyXUmLQ}f4#;6fI{f^t zDCsgIJ~0`af%YR%Ma5VQq-p21k`vaBu6WE?66+5=XUd%Ay%D$irN>5LhluRWt7 zov-=f>QbMk*G##&DTQyou$s7UqjjW@k6=!I@!k+S{pP8R(2=e@io;N8E`EOB;OGoI zw6Q+{X1_I{OO0HPpBz!X!@`5YQ2)t{+!?M_iH25X(d~-Zx~cXnS9z>u?+If|iNJbx zyFU2d1!ITX64D|lE0Z{dLRqL1Ajj=CCMfC4lD3&mYR_R_VZ>_7_~|<^o*%_&jevU+ zQ4|qzci=0}Jydw|LXLCrOl1_P6Xf@c0$ieK2^7@A9UbF{@V_0p%lqW|L?5k>bVM8|p5v&2g;~r>B8uo<4N+`B zH{J)h;SYiIVx@#jI&p-v3dwL5QNV1oxPr8J%ooezTnLW>i*3Isb49%5i!&ac_dEXv zvXmVUck^QHmyrF8>CGXijC_R-y(Qr{3Zt~EmW)-nC!tiH`wlw5D*W7Pip;T?&j%kX z6DkZX4&}iw>hE(boLyjOoupf6JpvBG8}jIh!!VhnD0>}KSMMo{1#uU6kiFcA04~|7 zVO8eI&x1`g4CZ<2cYUI(n#wz2MtVFHx47yE5eL~8bot~>EHbevSt}LLMQX?odD{Ux zJMnam{d)W4da{l7&y-JrgiU~qY3$~}_F#G7|MxT)e;G{U`In&?`j<5D->}cb{}{T(4DF0BOk-=1195KB-E*o@c?`>y#4=dMtYtSY=&L{!TAjFVcq0y@AH`vH! z$41+u!Ld&}F^COPgL(EE{0X7LY&%D7-(?!kjFF7=qw<;`V{nwWBq<)1QiGJgUc^Vz ztMUlq1bZqKn17|6x6iAHbWc~l1HcmAxr%$Puv!znW)!JiukwIrqQ00|H$Z)OmGG@= zv%A8*4cq}(?qn4rN6o`$Y))(MyXr8R<2S^J+v(wmFmtac!%VOfN?&(8Nr!T@kV`N; z*Q33V3t`^rN&aBiHet)18wy{*wi1=W!B%B-Q6}SCrUl$~Hl{@!95ydml@FK8P=u4s z4e*7gV2s=YxEvskw2Ju!2%{8h01rx-3`NCPc(O zH&J0VH5etNB2KY6k4R@2Wvl^Ck$MoR3=)|SEclT2ccJ!RI9Nuter7u9@;sWf-%um;GfI!=eEIQ2l2p_YWUd{|6EG ze{yO6;lMc>;2tPrsNdi@&1K6(1;|$xe8vLgiouj%QD%gYk`4p{Ktv9|j+!OF-P?@p z;}SV|oIK)iwlBs+`ROXkhd&NK zzo__r!B>tOXpBJMDcv!Mq54P+n4(@dijL^EpO1wdg~q+!DT3lB<>9AANSe!T1XgC=J^)IP0XEZ()_vpu!!3HQyJhwh?r`Ae%Yr~b% zO*NY9t9#qWa@GCPYOF9aron7thfWT`eujS4`t2uG6)~JRTI;f(ZuoRQwjZjp5Pg34 z)rp$)Kr?R+KdJ;IO;pM{$6|2y=k_siqvp%)2||cHTe|b5Ht8&A{wazGNca zX$Ol?H)E_R@SDi~4{d-|8nGFhZPW;Cts1;08TwUvLLv&_2$O6Vt=M)X;g%HUr$&06 zISZb(6)Q3%?;3r~*3~USIg=HcJhFtHhIV(siOwV&QkQe#J%H9&E21!C*d@ln3E@J* zVqRO^<)V^ky-R|%{(9`l-(JXq9J)1r$`uQ8a}$vr9E^nNiI*thK8=&UZ0dsFN_eSl z(q~lnD?EymWLsNa3|1{CRPW60>DSkY9YQ;$4o3W7Ms&@&lv9eH!tk~N&dhqX&>K@} zi1g~GqglxkZ5pEFkllJ)Ta1I^c&Bt6#r(QLQ02yHTaJB~- zCcE=5tmi`UA>@P=1LBfBiqk)HB4t8D?02;9eXj~kVPwv?m{5&!&TFYhu>3=_ zsGmYZ^mo*-j69-42y&Jj0cBLLEulNRZ9vXE)8~mt9C#;tZs;=#M=1*hebkS;7(aGf zcs7zH(I8Eui9UU4L--))yy`&d&$In&VA2?DAEss4LAPCLd>-$i?lpXvn!gu^JJ$(DoUlc6wE98VLZ*z`QGQov5l4Fm_h?V-;mHLYDVOwKz7>e4+%AzeO>P6v}ndPW| zM>m#6Tnp7K?0mbK=>gV}=@k*0Mr_PVAgGMu$j+pWxzq4MAa&jpCDU&-5eH27Iz>m^ zax1?*HhG%pJ((tkR(V(O(L%7v7L%!_X->IjS3H5kuXQT2!ow(;%FDE>16&3r){!ex zhf==oJ!}YU89C9@mfDq!P3S4yx$aGB?rbtVH?sHpg?J5C->!_FHM%Hl3#D4eplxzQ zRA+<@LD%LKSkTk2NyWCg7u=$%F#;SIL44~S_OGR}JqX}X+=bc@swpiClB`Zbz|f!4 z7Ysah7OkR8liXfI`}IIwtEoL}(URrGe;IM8%{>b1SsqXh)~w}P>yiFRaE>}rEnNkT z!HXZUtxUp1NmFm)Dm@-{FI^aRQqpSkz}ZSyKR%Y}YHNzBk)ZIp} zMtS=aMvkgWKm9&oTcU0?S|L~CDqA+sHpOxwnswF-fEG)cXCzUR?ps@tZa$=O)=L+5 zf%m58cq8g_o}3?Bhh+c!w4(7AjxwQ3>WnVi<{{38g7yFboo>q|+7qs<$8CPXUFAN< zG&}BHbbyQ5n|qqSr?U~GY{@GJ{(Jny{bMaOG{|IkUj7tj^9pa9|FB_<+KHLxSxR;@ zHpS$4V)PP+tx}22fWx(Ku9y+}Ap;VZqD0AZW4gCDTPCG=zgJmF{|x;(rvdM|2|9a}cex6xrMkERnkE;}jvU-kmzd%_J50$M`lIPCKf+^*zL=@LW`1SaEc%=m zQ+lT06Gw+wVwvQ9fZ~#qd430v2HndFsBa9WjD0P}K(rZYdAt^5WQIvb%D^Q|pkVE^ zte$&#~zmULFACGfS#g=2OLOnIf2Of-k!(BIHjs77nr!5Q1*I9 z1%?=~#Oss!rV~?-6Gm~BWJiA4mJ5TY&iPm_$)H1_rTltuU1F3I(qTQ^U$S>%$l z)Wx1}R?ij0idp@8w-p!Oz{&*W;v*IA;JFHA9%nUvVDy7Q8woheC#|8QuDZb-L_5@R zOqHwrh|mVL9b=+$nJxM`3eE{O$sCt$UK^2@L$R(r^-_+z?lOo+me-VW=Zw z-Bn>$4ovfWd%SPY`ab-u9{INc*k2h+yH%toDHIyqQ zO68=u`N}RIIs7lsn1D){)~%>ByF<>i@qFb<-axvu(Z+6t7v<^z&gm9McRB~BIaDn$ z#xSGT!rzgad8o>~kyj#h1?7g96tOcCJniQ+*#=b7wPio>|6a1Z?_(TS{)KrPe}(8j z!#&A=k(&Pj^F;r)CI=Z{LVu>uj!_W1q4b`N1}E(i%;BWjbEcnD=mv$FL$l?zS6bW!{$7j1GR5ocn94P2u{ z70tAAcpqtQo<@cXw~@i-@6B23;317|l~S>CB?hR5qJ%J3EFgyBdJd^fHZu7AzHF(BQ!tyAz^L0`X z23S4Fe{2X$W0$zu9gm%rg~A>ijaE#GlYlrF9$ds^QtaszE#4M(OLVP2O-;XdT(XIC zatwzF*)1c+t~c{L=fMG8Z=k5lv>U0;C{caN1NItnuSMp)6G3mbahu>E#sj&oy94KC zpH}8oEw{G@N3pvHhp{^-YaZeH;K+T_1AUv;IKD<=mv^&Ueegrb!yf`4VlRl$M?wsl zZyFol(2|_QM`e_2lYSABpKR{{NlxlDSYQNkS;J66aT#MSiTx~;tUmvs-b*CrR4w=f z8+0;*th6kfZ3|5!Icx3RV11sp=?`0Jy3Fs0N4GZQMN=8HmT6%x9@{Dza)k}UwL6JT zHRDh;%!XwXr6yuuy`4;Xsn0zlR$k%r%9abS1;_v?`HX_hI|+EibVnlyE@3aL5vhQq zlIG?tN^w@0(v9M*&L+{_+RQZw=o|&BRPGB>e5=ys7H`nc8nx)|-g;s7mRc7hg{GJC zAe^vCIJhajmm7C6g! zL&!WAQ~5d_5)00?w_*|*H>3$loHrvFbitw#WvLB!JASO?#5Ig5$Ys10n>e4|3d;tS zELJ0|R4n3Az(Fl3-r^QiV_C;)lQ1_CW{5bKS15U|E9?ZgLec@%kXr84>5jV2a5v=w z?pB1GPdxD$IQL4)G||B_lI+A=08MUFFR4MxfGOu07vfIm+j=z9tp~5i_6jb`tR>qV z$#`=BQ*jpCjm$F0+F)L%xRlnS%#&gro6PiRfu^l!EVan|r3y}AHJQOORGx4~ z&<)3=K-tx518DZyp%|!EqpU!+X3Et7n2AaC5(AtrkW>_57i}$eqs$rupubg0a1+WO zGHZKLN2L0D;ab%{_S1Plm|hx8R?O14*w*f&2&bB050n!R2by zw!@XOQx$SqZ5I<(Qu$V6g>o#A!JVwErWv#(Pjx=KeS0@hxr4?13zj#oWwPS(7Ro|v z>Mp@Kmxo79q|}!5qtX2-O@U&&@6s~!I&)1WQIl?lTnh6UdKT_1R640S4~f=_xoN3- zI+O)$R@RjV$F=>Ti7BlnG1-cFKCC(t|Qjm{SalS~V-tX#+2ekRhwmN zZr`8{QF6y~Z!D|{=1*2D-JUa<(1Z=;!Ei!KiRNH?o{p5o3crFF=_pX9O-YyJchr$~ zRC`+G+8kx~fD2k*ZIiiIGR<8r&M@3H?%JVOfE>)})7ScOd&?OjgAGT@WVNSCZ8N(p zuQG~76GE3%(%h1*vUXg$vH{ua0b`sQ4f0*y=u~lgyb^!#CcPJa2mkSEHGLsnO^kb$ zru5_l#nu=Y{rSMWiYx?nO{8I!gH+?wEj~UM?IrG}E|bRIBUM>UlY<`T1EHpRr36vv zBi&dG8oxS|J$!zoaq{+JpJy+O^W(nt*|#g32bd&K^w-t>!Vu9N!k9eA8r!Xc{utY> zg9aZ(D2E0gL#W0MdjwES-7~Wa8iubPrd?8-$C4BP?*wok&O8+ykOx{P=Izx+G~hM8 z*9?BYz!T8~dzcZr#ux8kS7u7r@A#DogBH8km8Ry4slyie^n|GrTbO|cLhpqgMdsjX zJ_LdmM#I&4LqqsOUIXK8gW;V0B(7^$y#h3h>J0k^WJfAMeYek%Y-Dcb_+0zPJez!GM zAmJ1u;*rK=FNM0Nf}Y!!P9c4)HIkMnq^b;JFd!S3?_Qi2G#LIQ)TF|iHl~WKK6JmK zbv7rPE6VkYr_%_BT}CK8h=?%pk@3cz(UrZ{@h40%XgThP*-Oeo`T0eq9 zA8BnWZKzCy5e&&_GEsU4*;_k}(8l_&al5K-V*BFM=O~;MgRkYsOs%9eOY6s6AtE*<7GQAR2ulC3RAJrG_P1iQK5Z~&B z&f8X<>yJV6)oDGIlS$Y*D^Rj(cszTy5c81a5IwBr`BtnC6_e`ArI8CaTX_%rx7;cn zR-0?J_LFg*?(#n~G8cXut(1nVF0Oka$A$1FGcERU<^ggx;p@CZc?3UB41RY+wLS`LWFNSs~YP zuw1@DNN3lTd|jDL7gjBsd9}wIw}4xT2+8dBQzI00m<@?c2L%>}QLfK5%r!a-iII`p zX@`VEUH)uj^$;7jVUYdADQ2k*!1O3WdfgF?OMtUXNpQ1}QINamBTKDuv19^{$`8A1 zeq%q*O0mi@(%sZU>Xdb0Ru96CFqk9-L3pzLVsMQ`Xpa~N6CR{9Rm2)A|CI21L(%GW zh&)Y$BNHa=FD+=mBw3{qTgw)j0b!Eahs!rZnpu)z!!E$*eXE~##yaXz`KE5(nQM`s zD!$vW9XH)iMxu9R>r$VlLk9oIR%HxpUiW=BK@4U)|1WNQ=mz9a z^!KkO=>GaJ!GBXm{KJj^;kh-MkUlEQ%lza`-G&}C5y1>La1sR6hT=d*NeCnuK%_LV zOXt$}iP6(YJKc9j-Fxq~*ItVUqljQ8?oaysB-EYtFQp9oxZ|5m0^Hq(qV!S+hq#g( z?|i*H2MIr^Kxgz+3vIljQ*Feejy6S4v~jKEPTF~Qhq!(ms5>NGtRgO5vfPPc4Z^AM zTj!`5xEreIN)vaNxa|q6qWdg>+T`Ol0Uz)ckXBXEGvPNEL3R8hB3=C5`@=SYgAju1 z!)UBr{2~=~xa{b8>x2@C7weRAEuatC)3pkRhT#pMPTpSbA|tan%U7NGMvzmF?c!V8 z=pEWxbdXbTAGtWTyI?Fml%lEr-^AE}w#l(<7OIw;ctw}imYax&vR4UYNJZK6P7ZOd zP87XfhnUHxCUHhM@b*NbTi#(-8|wcv%3BGNs#zRCVV(W?1Qj6^PPQa<{yaBwZ`+<`w|;rqUY_C z&AeyKwwf*q#OW-F()lir=T^<^wjK65Lif$puuU5+tk$;e_EJ;Lu+pH>=-8=PDhkBg z8cWt%@$Sc#C6F$Vd+0507;{OOyT7Hs%nKS88q-W!$f~9*WGBpHGgNp}=C*7!RiZ5s zn1L_DbKF@B8kwhDiLKRB@lsXVVLK|ph=w%_`#owlf@s@V(pa`GY$8h%;-#h@TsO|Y8V=n@*!Rog7<7Cid%apR|x zOjhHCyfbIt%+*PCveTEcuiDi%Wx;O;+K=W?OFUV%)%~6;gl?<0%)?snDDqIvkHF{ zyI02)+lI9ov42^hL>ZRrh*HhjF9B$A@=H94iaBESBF=eC_KT$8A@uB^6$~o?3Wm5t1OIaqF^~><2?4e3c&)@wKn9bD? zoeCs;H>b8DL^F&>Xw-xjZEUFFTv>JD^O#1E#)CMBaG4DX9bD(Wtc8Rzq}9soQ8`jf zeSnHOL}<+WVSKp4kkq&?SbETjq6yr@4%SAqOG=9E(3YeLG9dtV+8vmzq+6PFPk{L; z(&d++iu=^F%b+ea$i2UeTC{R*0Isk;vFK!no<;L+(`y`3&H-~VTdKROkdyowo1iqR zbVW(3`+(PQ2>TKY>N!jGmGo7oeoB8O|P_!Ic@ zZ^;3dnuXo;WJ?S+)%P>{Hcg!Jz#2SI(s&dY4QAy_vRlmOh)QHvs_7c&zkJCmJGVvV zX;Mtb>QE+xp`KyciG$Cn*0?AK%-a|=o!+7x&&yzHQOS>8=B*R=niSnta^Pxp1`=md z#;$pS$4WCT?mbiCYU?FcHGZ#)kHVJTTBt^%XE(Q};aaO=Zik0UgLcc0I(tUpt(>|& zcxB_|fxCF7>&~5eJ=Dpn&5Aj{A^cV^^}(7w#p;HG&Q)EaN~~EqrE1qKrMAc&WXIE;>@<&)5;gD2?={Xf@Mvn@OJKw=8Mgn z!JUFMwD+s==JpjhroT&d{$kQAy%+d`a*XxDEVxy3`NHzmITrE`o!;5ClXNPb4t*8P zzAivdr{j_v!=9!^?T3y?gzmqDWX6mkzhIzJ-3S{T5bcCFMr&RPDryMcdwbBuZbsgN zGrp@^i?rcfN7v0NKGzDPGE#4yszxu=I_`MI%Z|10nFjU-UjQXXA?k8Pk|OE<(?ae) zE%vG#eZAlj*E7_3dx#Zz4kMLj>H^;}33UAankJiDy5ZvEhrjr`!9eMD8COp}U*hP+ zF}KIYx@pkccIgyxFm#LNw~G&`;o&5)2`5aogs`1~7cMZQ7zj!%L4E`2yzlQN6REX20&O<9 zKV6fyr)TScJPPzNTC2gL+0x#=u>(({{D7j)c-%tvqls3#Y?Z1m zV5WUE)zdJ{$p>yX;^P!UcXP?UD~YM;IRa#Rs5~l+*$&nO(;Ers`G=0D!twR(0GF@c zHl9E5DQI}Oz74n zfKP>&$q0($T4y$6w(p=ERAFh+>n%iaeRA%!T%<^+pg?M)@ucY<&59$x9M#n+V&>}=nO9wCV{O~lg&v#+jcUj(tQ z`0u1YH)-`U$15a{pBkGyPL0THv1P|4e@pf@3IBZS4dVJPo#H>pWq%Lr0YS-SeWash z8R7=jb28KPMI|_lo#GEO|5B?N_e``H*23{~a!AmUJ+fb4HX-%QI@lSEUxKlGV7z7Q zSKw@-TR>@1RL%w{x}dW#k1NgW+q4yt2Xf1J62Bx*O^WG8OJ|FqI4&@d3_o8Id@*)4 zYrk=>@!wv~mh7YWv*bZhxqSmFh2Xq)o=m;%n$I?GSz49l1$xRpPu_^N(vZ>*>Z<04 z2+rP70oM=NDysd!@fQdM2OcyT?3T^Eb@lIC-UG=Bw{BjQ&P`KCv$AcJ;?`vdZ4){d z&gkoUK{$!$$K`3*O-jyM1~p-7T*qb)Ys>Myt^;#1&a%O@x8A+E>! zY8=eD`ZG)LVagDLBeHg>=atOG?Kr%h4B%E6m@J^C+U|y)XX@f z8oyJDW|9g=<#f<{JRr{y#~euMnv)`7j=%cHWLc}ngjq~7k**6%4u>Px&W%4D94(r* z+akunK}O0DC2A%Xo9jyF;DobX?!1I(7%}@7F>i%&nk*LMO)bMGg2N+1iqtg+r(70q zF5{Msgsm5GS7DT`kBsjMvOrkx&|EU!{{~gL4d2MWrAT=KBQ-^zQCUq{5PD1orxlIL zq;CvlWx#f1NWvh`hg011I%?T_s!e38l*lWVt|~z-PO4~~1g)SrJ|>*tXh=QfXT)%( z+ex+inPvD&O4Ur;JGz>$sUOnWdpSLcm1X%aQDw4{dB!cnj`^muI$CJ2%p&-kULVCE z>$eMR36kN$wCPR+OFDM3-U(VOrp9k3)lI&YVFqd;Kpz~K)@Fa&FRw}L(SoD z9B4a+hQzZT-BnVltst&=kq6Y(f^S4hIGNKYBgMxGJ^;2yrO}P3;r)(-I-CZ)26Y6? z&rzHI_1GCvGkgy-t1E;r^3Le30|%$ebDRu2+gdLG)r=A~Qz`}~&L@aGJ{}vVs_GE* zVUjFnzHiXfKQbpv&bR&}l2bzIjAooB)=-XNcYmrGmBh(&iu@o!^hn0^#}m2yZZUK8 zufVm7Gq0y`Mj;9b>`c?&PZkU0j4>IL=UL&-Lp3j&47B5pAW4JceG{!XCA)kT<%2nqCxj<)uy6XR_uws~>_MEKPOpAQ!H zkn>FKh)<9DwwS*|Y(q?$^N!6(51O0 z^JM~Ax{AI1Oj$fs-S5d4T7Z_i1?{%0SsIuQ&r8#(JA=2iLcTN+?>wOL532%&dMYkT z*T5xepC+V6zxhS@vNbMoi|i)=rpli@R9~P!39tWbSSb904ekv7D#quKbgFEMTb48P zuq(VJ+&L8aWU(_FCD$3^uD!YM%O^K(dvy~Wm2hUuh6bD|#(I39Xt>N1Y{ZqXL`Fg6 zKQ?T2htHN!(Bx;tV2bfTtIj7e)liN-29s1kew>v(D^@)#v;}C4-G=7x#;-dM4yRWm zyY`cS21ulzMK{PoaQ6xChEZ}o_#}X-o}<&0)$1#3we?+QeLt;aVCjeA)hn!}UaKt< zat1fHEx13y-rXNMvpUUmCVzocPmN~-Y4(YJvQ#db)4|%B!rBsgAe+*yor~}FrNH08 z3V!97S}D7d$zbSD{$z;@IYMxM6aHdypIuS*pr_U6;#Y!_?0i|&yU*@16l z*dcMqDQgfNBf}?quiu4e>H)yTVfsp#f+Du0@=Kc41QockXkCkvu>FBd6Q+@FL!(Yx z2`YuX#eMEiLEDhp+9uFqME_E^faV&~9qjBHJkIp~%$x^bN=N)K@kvSVEMdDuzA0sn z88CBG?`RX1@#hQNd`o^V{37)!w|nA)QfiYBE^m=yQKv-fQF+UCMcuEe1d4BH7$?>b zJl-r9@0^Ie=)guO1vOd=i$_4sz>y3x^R7n4ED!5oXL3@5**h(xr%Hv)_gILarO46q+MaDOF%ChaymKoI6JU5Pg;7#2n9-18|S1;AK+ zgsn6;k6-%!QD>D?cFy}8F;r@z8H9xN1jsOBw2vQONVqBVEbkiNUqgw~*!^##ht>w0 zUOykwH=$LwX2j&nLy=@{hr)2O&-wm-NyjW7n~Zs9UlH;P7iP3 zI}S(r0YFVYacnKH(+{*)Tbw)@;6>%=&Th=+Z6NHo_tR|JCI8TJiXv2N7ei7M^Q+RM z?9o`meH$5Yi;@9XaNR#jIK^&{N|DYNNbtdb)XW1Lv2k{E>;?F`#Pq|&_;gm~&~Zc9 zf+6ZE%{x4|{YdtE?a^gKyzr}dA>OxQv+pq|@IXL%WS0CiX!V zm$fCePA%lU{%pTKD7|5NJHeXg=I0jL@$tOF@K*MI$)f?om)D63K*M|r`gb9edD1~Y zc|w7N)Y%do7=0{RC|AziW7#am$)9jciRJ?IWl9PE{G3U+$%FcyKs_0Cgq`=K3@ttV z9g;M!3z~f_?P%y3-ph%vBMeS@p7P&Ea8M@97+%XEj*(1E6vHj==d zjsoviB>j^$_^OI_DEPvFkVo(BGRo%cJeD){6Uckei=~1}>sp299|IRjhXe)%?uP0I zF5+>?0#Ye}T^Y$u_rc4=lPcq4K^D(TZG-w30-YiEM=dcK+4#o*>lJ8&JLi+3UcpZk z!^?95S^C0ja^jwP`|{<+3cBVog$(mRdQmadS+Vh~z zS@|P}=|z3P6uS+&@QsMp0no9Od&27O&14zHXGAOEy zh~OKpymK5C%;LLb467@KgIiVwYbYd6wFxI{0-~MOGfTq$nBTB!{SrWmL9Hs}C&l&l#m?s*{tA?BHS4mVKHAVMqm63H<|c5n0~k)-kbg zXidai&9ZUy0~WFYYKT;oe~rytRk?)r8bptITsWj(@HLI;@=v5|XUnSls7$uaxFRL+ zRVMGuL3w}NbV1`^=Pw*0?>bm8+xfeY(1PikW*PB>>Tq(FR`91N0c2&>lL2sZo5=VD zQY{>7dh_TX98L2)n{2OV=T10~*YzX27i2Q7W86M4$?gZIXZaBq#sA*{PH8){|GUi;oM>e?ua7eF4WFuFYZSG| zze?srg|5Ti8Og{O zeFxuw9!U+zhyk?@w zjsA6(oKD=Ka;A>Ca)oPORxK+kxH#O@zhC!!XS4@=swnuMk>t+JmLmFiE^1aX3f<)D@`%K0FGK^gg1a1j>zi z2KhV>sjU7AX3F$SEqrXSC}fRx64GDoc%!u2Yag68Lw@w9v;xOONf@o)Lc|Uh3<21ctTYu-mFZuHk*+R{GjXHIGq3p)tFtQp%TYqD=j1&y)>@zxoxUJ!G@ zgI0XKmP6MNzw>nRxK$-Gbzs}dyfFzt>#5;f6oR27ql!%+{tr+(`(>%51|k`ML} zY4eE)Lxq|JMas(;JibNQds1bUB&r}ydMQXBY4x(^&fY_&LlQC)3hylc$~8&~|06-D z#T+%66rYbHX%^KuqJED_wuGB+=h`nWA!>1n0)3wZrBG3%`b^Ozv6__dNa@%V14|!D zQ?o$z5u0^8`giv%qE!BzZ!3j;BlDlJDk)h@9{nSQeEk!z9RGW) z${RSF3phEM*ce*>Xdp}585vj$|40=&S{S-GTiE?Op*vY&Lvr9}BO$XWy80IF+6@%n z5*2ueT_g@ofP#u5pxb7n*fv^Xtt7&?SRc{*2Ka-*!BuOpf}neHGCiHy$@Ka1^Dint z;DkmIL$-e)rj4o2WQV%Gy;Xg(_Bh#qeOsTM2f@KEe~4kJ8kNLQ+;(!j^bgJMcNhvklP5Z6I+9Fq@c&D~8Fb-4rmDT!MB5QC{Dsb;BharP*O;SF4& zc$wj-7Oep7#$WZN!1nznc@Vb<_Dn%ga-O#J(l=OGB`dy=Sy&$(5-n3zzu%d7E#^8`T@}V+5B;PP8J14#4cCPw-SQTdGa2gWL0*zKM z#DfSXs_iWOMt)0*+Y>Lkd=LlyoHjublNLefhKBv@JoC>P7N1_#> zv=mLWe96%EY;!ZGSQDbZWb#;tzqAGgx~uk+-$+2_8U`!ypbwXl z^2E-FkM1?lY@yt8=J3%QK+xaZ6ok=-y%=KXCD^0r!5vUneW>95PzCkOPO*t}p$;-> ze5j-BLT_;)cZQzR2CEsm@rU7GZfFtdp*a|g4wDr%8?2QkIGasRfDWT-Dvy*U{?IHT z*}wGnzdlSptl#ZF^sf)KT|BJs&kLG91^A6ls{CzFprZ6-Y!V0Xysh%9p%iMd7HLsS zN+^Un$tDV)T@i!v?3o0Fsx2qI(AX_$dDkBzQ@fRM%n zRXk6hb9Py#JXUs+7)w@eo;g%QQ95Yq!K_d=z{0dGS+pToEI6=Bo8+{k$7&Z zo4>PH(`ce8E-Ps&uv`NQ;U$%t;w~|@E3WVOCi~R4oj5wP?%<*1C%}Jq%a^q~T7u>K zML5AKfQDv6>PuT`{SrKHRAF+^&edg6+5R_#H?Lz3iGoWo#PCEd0DS;)2U({{X#zU^ zw_xv{4x7|t!S)>44J;KfA|DC?;uQ($l+5Vp7oeqf7{GBF9356nx|&B~gs+@N^gSdd zvb*>&W)|u#F{Z_b`f#GVtQ`pYv3#||N{xj1NgB<#=Odt6{eB%#9RLt5v zIi|0u70`#ai}9fJjKv7dE!9ZrOIX!3{$z_K5FBd-Kp-&e4(J$LD-)NMTp^_pB`RT; zftVVlK2g@+1Ahv2$D){@Y#cL#dUj9*&%#6 zd2m9{1NYp>)6=oAvqdCn5#cx{AJ%S8skUgMglu2*IAtd+z1>B&`MuEAS(D(<6X#Lj z?f4CFx$)M&$=7*>9v1ER4b6!SIz-m0e{o0BfkySREchp?WdVPpQCh!q$t>?rL!&Jg zd#heM;&~A}VEm8Dvy&P|J*eAV&w!&Nx6HFV&B8jJFVTmgLaswn!cx$&%JbTsloz!3 zMEz1d`k==`Ueub_JAy_&`!ogbwx27^ZXgFNAbx=g_I~5nO^r)}&myw~+yY*cJl4$I znNJ32M&K=0(2Dj_>@39`3=FX!v3nZHno_@q^!y}%(yw0PqOo=);6Y@&ylVe>nMOZ~ zd>j#QQSBn3oaWd;qy$&5(5H$Ayi)0haAYO6TH>FR?rhqHmNOO+(})NB zLI@B@v0)eq!ug`>G<@htRlp3n!EpU|n+G+AvXFrWSUsLMBfL*ZB`CRsIVHNTR&b?K zxBgsN0BjfB>UVcJ|x%=-zb%OV7lmZc& zxiupadZVF7)6QuhoY;;FK2b*qL0J-Rn-8!X4ZY$-ZSUXV5DFd7`T41c(#lAeLMoeT z4%g655v@7AqT!i@)Edt5JMbN(=Q-6{=L4iG8RA%}w;&pKmtWvI4?G9pVRp|RTw`g0 zD5c12B&A2&P6Ng~8WM2eIW=wxd?r7A*N+&!Be7PX3s|7~z=APxm=A?5 zt>xB4WG|*Td@VX{Rs)PV0|yK`oI3^xn(4c_j&vgxk_Y3o(-`_5o`V zRTghg6%l@(qodXN;dB#+OKJEEvhfcnc#BeO2|E(5df-!fKDZ!%9!^BJ_4)9P+9Dq5 zK1=(v?KmIp34r?z{NEWnLB3Px{XYwy-akun4F7xTRr2^zeYW{gcK9)>aJDdU5;w5@ zak=<+-PLH-|04pelTb%ULpuuuJC7DgyT@D|p{!V!0v3KpDnRjANN12q6SUR3mb9<- z>2r~IApQGhstZ!3*?5V z8#)hJ0TdZg0M-BK#nGFP>$i=qk82DO z7h;Ft!D5E15OgW)&%lej*?^1~2=*Z5$2VX>V{x8SC+{i10BbtUk9@I#Vi&hX)q
Q!LwySI{Bnv%Sm)yh{^sSVJ8&h_D-BJ_YZe5eCaAWU9b$O2c z$T|{vWVRtOL!xC0DTc(Qbe`ItNtt5hr<)VijD0{U;T#bUEp381_y`%ZIav?kuYG{iyYdEBPW=*xNSc;Rlt6~F4M`5G+VtOjc z*0qGzCb@gME5udTjJA-9O<&TWd~}ysBd(eVT1-H82-doyH9RST)|+Pb{o*;$j9Tjs zhU!IlsPsj8=(x3bAKJTopW3^6AKROHR^7wZ185wJGVhA~hEc|LP;k7NEz-@4p5o}F z`AD6naG3(n=NF9HTH81=F+Q|JOz$7wm9I<+#BSmB@o_cLt2GkW9|?7mM;r!JZp89l zbo!Hp8=n!XH1{GwaDU+k)pGp`C|cXkCU5%vcH)+v@0eK>%7gWxmuMu9YLlChA|_D@ zi#5zovN_!a-0?~pUV-Rj*1P)KwdU-LguR>YM&*Nen+ln8Q$?WFCJg%DY%K}2!!1FE zDv-A%Cbwo^p(lzac&_TZ-l#9kq`mhLcY3h9ZTUVCM(Ad&=EriQY5{jJv<5K&g|*Lk zgV%ILnf1%8V2B0E&;Sp4sYbYOvvMebLwYwzkRQ#F8GpTQq#uv=J`uaSJ34OWITeSGo6+-8Xw znCk*n{kdDEi)Hi&u^)~cs@iyCkFWB2SWZU|Uc%^43ZIZQ-vWNExCCtDWjqHs;;tWf$v{}0{p0Rvxkq``)*>+Akq%|Na zA`@~-Vfe|+(AIlqru+7Ceh4nsVmO9p9jc8}HX^W&ViBDXT+uXbT#R#idPn&L>+#b6 zflC-4C5-X;kUnR~L>PSLh*gvL68}RBsu#2l`s_9KjUWRhiqF`j)`y`2`YU(>3bdBj z?>iyjEhe-~$^I5!nn%B6Wh+I`FvLNvauve~eX<+Ipl&04 zT}};W&1a3%W?dJ2=N#0t?e+aK+%t}5q%jSLvp3jZ%?&F}nOOWr>+{GFIa%wO_2`et z=JzoRR~}iKuuR+azPI8;Gf9)z3kyA4EIOSl!sRR$DlW}0>&?GbgPojmjmnln;cTqCt=ADbE zZ8GAnoM+S1(5$i8^O4t`ue;vO4i}z0wz-QEIVe5_u03;}-!G1NyY8;h^}y;tzY}i5 zqQr#Ur3Fy8sSa$Q0ys+f`!`+>9WbvU_I`Sj;$4{S>O3?#inLHCrtLy~!s#WXV=oVP zeE93*Nc`PBi4q@%Ao$x4lw9vLHM!6mn3-b_cebF|n-2vt-zYVF_&sDE--J-P;2WHo z+@n2areE0o$LjvjlV2X7ZU@j+`{*8zq`JR3gKF#EW|#+{nMyo-a>nFFTg&vhyT=b} zDa8+v0(Dgx0yRL@ZXOYIlVSZ0|MFizy0VPW8;AfA5|pe!#j zX}Py^8fl5SyS4g1WSKKtnyP+_PoOwMMwu`(i@Z)diJp~U54*-miOchy7Z35eL>^M z4p<-aIxH4VUZgS783@H%M7P9hX>t{|RU7$n4T(brCG#h9e9p! z+o`i;EGGq3&pF;~5V~eBD}lC)>if$w%Vf}AFxGqO88|ApfHf&Bvu+xdG)@vuF}Yvk z)o;~k-%+0K0g+L`Wala!$=ZV|z$e%>f0%XoLib%)!R^RoS+{!#X?h-6uu zF&&KxORdZU&EwQFITIRLo(7TA3W}y6X{?Y%y2j0It!ekU#<)$qghZtpcS>L3uh`Uj z7GY;6f$9qKynP#oS3$$a{p^{D+0oJQ71`1?OAn_m8)UGZmj3l*ZI)`V-a>MKGGFG< z&^jg#Ok%(hhm>hSrZ5;Qga4u(?^i>GiW_j9%_7M>j(^|Om$#{k+^*ULnEgzW_1gCICtAD^WpC`A z{9&DXkG#01Xo)U$OC(L5Y$DQ|Q4C6CjUKk1UkPj$nXH##J{c8e#K|&{mA*;b$r0E4 zUNo0jthwA(c&N1l=PEe8Rw_8cEl|-eya9z&H3#n`B$t#+aJ03RFMzrV@gowbe8v(c zIFM60^0&lCFO10NU4w@|61xiZ4CVXeaKjd;d?sv52XM*lS8XiVjgWpRB;&U_C0g+`6B5V&w|O6B*_q zsATxL!M}+$He)1eOWECce#eS@2n^xhlB4<_Nn?yCVEQWDs(r`|@2GqLe<#(|&P0U? z$7V5IgpWf09uIf_RazRwC?qEqRaHyL?iiS05UiGesJy%^>-C{{ypTBI&B0-iUYhk> zIk<5xpsuV@g|z(AZD+C-;A!fTG=df1=<%nxy(a(IS+U{ME4ZbDEBtcD_3V=icT6*_ z)>|J?>&6%nvHhZERBtjK+s4xnut*@>GAmA5m*OTp$!^CHTr}vM4n(X1Q*;{e-Rd2BCF-u@1ZGm z!S8hJ6L=Gl4T_SDa7Xx|-{4mxveJg=ctf`BJ*fy!yF6Dz&?w(Q_6B}WQVtNI!BVBC zKfX<>7vd6C96}XAQmF-Jd?1Q4eTfRB3q7hCh0f!(JkdWT5<{iAE#dKy*Jxq&3a1@~ z8C||Dn2mFNyrUV|<-)C^_y7@8c2Fz+2jrae9deBDu;U}tJ{^xAdxCD248(k;dCJ%o z`y3sADe>U%suxwwv~8A1+R$VB=Q?%U?4joI$um;aH+eCrBqpn- z%79D_7rb;R-;-9RTrwi9dPlg8&@tfWhhZ(Vx&1PQ+6(huX`;M9x~LrW~~#3{j0Bh2kDU$}@!fFQej4VGkJv?M4rU^x!RU zEwhu$!CA_iDjFjrJa`aocySDX16?~;+wgav;}Zut6Mg%C4>}8FL?8)Kgwc(Qlj{@#2Pt0?G`$h7P#M+qoXtlV@d}%c&OzO+QYKK`kyXaK{U(O^2DyIXCZlNQjt0^8~8JzNGrIxhj}}M z&~QZlbx%t;MJ(Vux;2tgNKGlAqphLq%pd}JG9uoVHUo?|hN{pLQ6Em%r*+7t^<);X zm~6=qChlNAVXNN*Sow->*4;}T;l;D1I-5T{Bif@4_}=>l`tK;qqDdt5zvisCKhMAH z#r}`)7VW?LZqfdmXQ%zo5bJ00{Xb9^YKrk0Nf|oIW*K@(=`o2Vndz}ZDyk{!u}PVx zzd--+_WC*U{~DH3{?GI64IB+@On&@9X>EUAo&L+G{L^dozaI4C3G#2wr~hseW@K&g zKWs{uHu-9Je!3;4pE>eBltKUXb^*hG8I&413)$J&{D4N%7PcloU6bn%jPxJyQL?g* z9g+YFFEDiE`8rW^laCNzQmi7CTnPfwyg3VDHRAl>h=In6jeaVOP@!-CP60j3+#vpL zEYmh_oP0{-gTe7Or`L6x)6w?77QVi~jD8lWN@3RHcm80iV%M1A!+Y6iHM)05iC64tb$X2lV_%Txk@0l^hZqi^%Z?#- zE;LE0uFx)R08_S-#(wC=dS&}vj6P4>5ZWjhthP=*Hht&TdLtKDR;rXEX4*z0h74FA zMCINqrh3Vq;s%3MC1YL`{WjIAPkVL#3rj^9Pj9Ss7>7duy!9H0vYF%>1jh)EPqvlr6h%R%CxDsk| z!BACz7E%j?bm=pH6Eaw{+suniuY7C9Ut~1cWfOX9KW9=H><&kQlinPV3h9R>3nJvK z4L9(DRM=x;R&d#a@oFY7mB|m8h4692U5eYfcw|QKwqRsshN(q^v$4$)HgPpAJDJ`I zkqjq(8Cd!K!+wCd=d@w%~e$=gdUgD&wj$LQ1r>-E=O@c ze+Z$x{>6(JA-fNVr)X;*)40Eym1TtUZI1Pwwx1hUi+G1Jlk~vCYeXMNYtr)1?qwyg zsX_e*$h?380O00ou?0R@7-Fc59o$UvyVs4cUbujHUA>sH!}L54>`e` zHUx#Q+Hn&Og#YVOuo*niy*GU3rH;%f``nk#NN5-xrZ34NeH$l`4@t);4(+0|Z#I>Y z)~Kzs#exIAaf--65L0UHT_SvV8O2WYeD>Mq^Y6L!Xu8%vnpofG@w!}R7M28?i1*T&zp3X4^OMCY6(Dg<-! zXmcGQrRgHXGYre7GfTJ)rhl|rs%abKT_Nt24_Q``XH{88NVPW+`x4ZdrMuO0iZ0g` z%p}y};~T5gbb9SeL8BSc`SO#ixC$@QhXxZ=B}L`tP}&k?1oSPS=4%{UOHe0<_XWln zwbl5cn(j-qK`)vGHY5B5C|QZd5)W7c@{bNVXqJ!!n$^ufc?N9C-BF2QK1(kv++h!>$QbAjq)_b$$PcJdV+F7hz0Hu@ zqj+}m0qn{t^tD3DfBb~0B36|Q`bs*xs|$i^G4uNUEBl4g;op-;Wl~iThgga?+dL7s zUP(8lMO?g{GcYpDS{NM!UA8Hco?#}eNEioRBHy4`mq!Pd-9@-97|k$hpEX>xoX+dY zDr$wfm^P&}Wu{!%?)U_(%Mn79$(ywvu*kJ9r4u|MyYLI_67U7%6Gd_vb##Nerf@>& z8W11z$$~xEZt$dPG}+*IZky+os5Ju2eRi;1=rUEeIn>t-AzC_IGM-IXWK3^6QNU+2pe=MBn4I*R@A%-iLDCOHTE-O^wo$sL_h{dcPl=^muAQb`_BRm};=cy{qSkui;`WSsj9%c^+bIDQ z0`_?KX0<-=o!t{u(Ln)v>%VGL z0pC=GB7*AQ?N7N{ut*a%MH-tdtNmNC+Yf$|KS)BW(gQJ*z$d{+{j?(e&hgTy^2|AR9vx1Xre2fagGv0YXWqtNkg*v%40v?BJBt|f9wX5 z{QTlCM}b-0{mV?IG>TW_BdviUKhtosrBqdfq&Frdz>cF~yK{P@(w{Vr7z2qKFwLhc zQuogKO@~YwyS9%+d-zD7mJG~@?EFJLSn!a&mhE5$_4xBl&6QHMzL?CdzEnC~C3$X@ zvY!{_GR06ep5;<#cKCSJ%srxX=+pn?ywDwtJ2{TV;0DKBO2t++B(tIO4)Wh`rD13P z4fE$#%zkd=UzOB74gi=-*CuID&Z3zI^-`4U^S?dHxK8fP*;fE|a(KYMgMUo`THIS1f!*6dOI2 zFjC3O=-AL`6=9pp;`CYPTdVX z8(*?V&%QoipuH0>WKlL8A*zTKckD!paN@~hh zmXzm~qZhMGVdQGd=AG8&20HW0RGV8X{$9LldFZYm zE?}`Q3i?xJRz43S?VFMmqRyvWaS#(~Lempg9nTM$EFDP(Gzx#$r)W&lpFKqcAoJh-AxEw$-bjW>`_+gEi z2w`99#UbFZGiQjS8kj~@PGqpsPX`T{YOj`CaEqTFag;$jY z8_{Wzz>HXx&G*Dx<5skhpETxIdhKH?DtY@b9l8$l?UkM#J-Snmts7bd7xayKTFJ(u zyAT&@6cAYcs{PBfpqZa%sxhJ5nSZBPji?Zlf&}#L?t)vC4X5VLp%~fz2Sx<*oN<7` z?ge=k<=X7r<~F7Tvp9#HB{!mA!QWBOf%EiSJ6KIF8QZNjg&x~-%e*tflL(ji_S^sO ztmib1rp09uon}RcsFi#k)oLs@$?vs(i>5k3YN%$T(5Or(TZ5JW9mA6mIMD08=749$ z!d+l*iu{Il7^Yu}H;lgw=En1sJpCKPSqTCHy4(f&NPelr31^*l%KHq^QE>z>Ks_bH zjbD?({~8Din7IvZeJ>8Ey=e;I?thpzD=zE5UHeO|neioJwG;IyLk?xOz(yO&0DTU~ z^#)xcs|s>Flgmp;SmYJ4g(|HMu3v7#;c*Aa8iF#UZo7CvDq4>8#qLJ|YdZ!AsH%^_7N1IQjCro

K7UpUK$>l@ zw`1S}(D?mUXu_C{wupRS-jiX~w=Uqqhf|Vb3Cm9L=T+w91Cu^ z*&Ty%sN?x*h~mJc4g~k{xD4ZmF%FXZNC;oVDwLZ_WvrnzY|{v8hc1nmx4^}Z;yriXsAf+Lp+OFLbR!&Ox?xABwl zu8w&|5pCxmu#$?Cv2_-Vghl2LZ6m7}VLEfR5o2Ou$x02uA-%QB2$c(c1rH3R9hesc zfpn#oqpbKuVsdfV#cv@5pV4^f_!WS+F>SV6N0JQ9E!T90EX((_{bSSFv9ld%I0&}9 zH&Jd4MEX1e0iqDtq~h?DBrxQX1iI0lIs<|kB$Yrh&cpeK0-^K%=FBsCBT46@h#yi!AyDq1V(#V}^;{{V*@T4WJ&U-NTq43w=|K>z8%pr_nC>%C(Wa_l78Ufib$r8Od)IIN=u>417 z`Hl{9A$mI5A(;+-Q&$F&h-@;NR>Z<2U;Y21>>Z;s@0V@SbkMQQj%_;~+qTuQ?c|AV zcWm3XZQHhP&R%QWarS%mJ!9R^&!_)*s(v+VR@I#QrAT}`17Y+l<`b-nvmDNW`De%y zrwTZ9EJrj1AFA>B`1jYDow}~*dfPs}IZMO3=a{Fy#IOILc8F0;JS4x(k-NSpbN@qM z`@aE_e}5{!$v3+qVs7u?sOV(y@1Os*Fgu`fCW9=G@F_#VQ%xf$hj0~wnnP0$hFI+@ zkQj~v#V>xn)u??YutKsX>pxKCl^p!C-o?+9;!Nug^ z{rP!|+KsP5%uF;ZCa5F;O^9TGac=M|=V z_H(PfkV1rz4jl?gJ(ArXMyWT4y(86d3`$iI4^l9`vLdZkzpznSd5Ikfrs8qcSy&>z zTIZgWZGXw0n9ibQxYWE@gI0(3#KA-dAdPcsL_|hg2@~C!VZDM}5;v_Nykfq!*@*Zf zE_wVgx82GMDryKO{U{D>vSzSc%B~|cjDQrt5BN=Ugpsf8H8f1lR4SGo#hCuXPL;QQ z#~b?C4MoepT3X`qdW2dNn& zo8)K}%Lpu>0tQei+{>*VGErz|qjbK#9 zvtd8rcHplw%YyQCKR{kyo6fgg!)6tHUYT(L>B7er5)41iG`j$qe*kSh$fY!PehLcD zWeKZHn<492B34*JUQh=CY1R~jT9Jt=k=jCU2=SL&&y5QI2uAG2?L8qd2U(^AW#{(x zThSy=C#>k+QMo^7caQcpU?Qn}j-`s?1vXuzG#j8(A+RUAY})F@=r&F(8nI&HspAy4 z4>(M>hI9c7?DCW8rw6|23?qQMSq?*Vx?v30U%luBo)B-k2mkL)Ljk5xUha3pK>EEj z@(;tH|M@xkuN?gsz;*bygizwYR!6=(Xgcg^>WlGtRYCozY<rFX2E>kaZo)O<^J7a`MX8Pf`gBd4vrtD|qKn&B)C&wp0O-x*@-|m*0egT=-t@%dD zgP2D+#WPptnc;_ugD6%zN}Z+X4=c61XNLb7L1gWd8;NHrBXwJ7s0ce#lWnnFUMTR& z1_R9Fin4!d17d4jpKcfh?MKRxxQk$@)*hradH2$3)nyXep5Z;B z?yX+-Bd=TqO2!11?MDtG0n(*T^!CIiF@ZQymqq1wPM_X$Iu9-P=^}v7npvvPBu!d$ z7K?@CsA8H38+zjA@{;{kG)#AHME>Ix<711_iQ@WWMObXyVO)a&^qE1GqpP47Q|_AG zP`(AD&r!V^MXQ^e+*n5~Lp9!B+#y3#f8J^5!iC@3Y@P`;FoUH{G*pj*q7MVV)29+j z>BC`a|1@U_v%%o9VH_HsSnM`jZ-&CDvbiqDg)tQEnV>b%Ptm)T|1?TrpIl)Y$LnG_ zzKi5j2Fx^K^PG1=*?GhK;$(UCF-tM~^=Z*+Wp{FSuy7iHt9#4n(sUuHK??@v+6*|10Csdnyg9hAsC5_OrSL;jVkLlf zHXIPukLqbhs~-*oa^gqgvtpgTk_7GypwH><53riYYL*M=Q@F-yEPLqQ&1Sc zZB%w}T~RO|#jFjMWcKMZccxm-SL)s_ig?OC?y_~gLFj{n8D$J_Kw%{r0oB8?@dWzn zB528d-wUBQzrrSSLq?fR!K%59Zv9J4yCQhhDGwhptpA5O5U?Hjqt>8nOD zi{)0CI|&Gu%zunGI*XFZh(ix)q${jT8wnnzbBMPYVJc4HX*9d^mz|21$=R$J$(y7V zo0dxdbX3N#=F$zjstTf*t8vL)2*{XH!+<2IJ1VVFa67|{?LP&P41h$2i2;?N~RA30LV`BsUcj zfO9#Pg1$t}7zpv#&)8`mis3~o+P(DxOMgz-V*(?wWaxi?R=NhtW}<#^Z?(BhSwyar zG|A#Q7wh4OfK<|DAcl9THc-W4*>J4nTevsD%dkj`U~wSUCh15?_N@uMdF^Kw+{agk zJ`im^wDqj`Ev)W3k3stasP`88-M0ZBs7;B6{-tSm3>I@_e-QfT?7|n0D~0RRqDb^G zyHb=is;IwuQ&ITzL4KsP@Z`b$d%B0Wuhioo1CWttW8yhsER1ZUZzA{F*K=wmi-sb#Ju+j z-l@In^IKnb{bQG}Ps>+Vu_W#grNKNGto+yjA)?>0?~X`4I3T@5G1)RqGUZuP^NJCq&^HykuYtMDD8qq+l8RcZNJsvN(10{ zQ1$XcGt}QH-U^WU!-wRR1d--{B$%vY{JLWIV%P4-KQuxxDeJaF#{eu&&r!3Qu{w}0f--8^H|KwE>)ORrcR+2Qf zb})DRcH>k0zWK8@{RX}NYvTF;E~phK{+F;MkIP$)T$93Ba2R2TvKc>`D??#mv9wg$ zd~|-`Qx5LwwsZ2hb*Rt4S9dsF%Cny5<1fscy~)d;0m2r$f=83<->c~!GNyb!U)PA; zq^!`@@)UaG)Ew(9V?5ZBq#c%dCWZrplmuM`o~TyHjAIMh0*#1{B>K4po-dx$Tk-Cq z=WZDkP5x2W&Os`N8KiYHRH#UY*n|nvd(U>yO=MFI-2BEp?x@=N<~CbLJBf6P)}vLS?xJXYJ2^<3KJUdrwKnJnTp{ zjIi|R=L7rn9b*D#Xxr4*R<3T5AuOS+#U8hNlfo&^9JO{VbH!v9^JbK=TCGR-5EWR@ zN8T-_I|&@A}(hKeL4_*eb!1G8p~&_Im8|wc>Cdir+gg90n1dw?QaXcx6Op_W1r=axRw>4;rM*UOpT#Eb9xU1IiWo@h?|5uP zka>-XW0Ikp@dIe;MN8B01a7+5V@h3WN{J=HJ*pe0uwQ3S&MyWFni47X32Q7SyCTNQ z+sR!_9IZa5!>f&V$`q!%H8ci!a|RMx5}5MA_kr+bhtQy{-^)(hCVa@I!^TV4RBi zAFa!Nsi3y37I5EK;0cqu|9MRj<^r&h1lF}u0KpKQD^5Y+LvFEwM zLU@@v4_Na#Axy6tn3P%sD^5P#<7F;sd$f4a7LBMk zGU^RZHBcxSA%kCx*eH&wgA?Qwazm8>9SCSz_!;MqY-QX<1@p$*T8lc?@`ikEqJ>#w zcG``^CoFMAhdEXT9qt47g0IZkaU)4R7wkGs^Ax}usqJ5HfDYAV$!=6?>J6+Ha1I<5 z|6=9soU4>E))tW$<#>F ziZ$6>KJf0bPfbx_)7-}tMINlc=}|H+$uX)mhC6-Hz+XZxsKd^b?RFB6et}O#+>Wmw9Ec9) z{q}XFWp{3@qmyK*Jvzpyqv57LIR;hPXKsrh{G?&dRjF%Zt5&m20Ll?OyfUYC3WRn{cgQ?^V~UAv+5 z&_m#&nIwffgX1*Z2#5^Kl4DbE#NrD&Hi4|7SPqZ}(>_+JMz=s|k77aEL}<=0Zfb)a z%F(*L3zCA<=xO)2U3B|pcTqDbBoFp>QyAEU(jMu8(jLA61-H!ucI804+B!$E^cQQa z)_ERrW3g!B9iLb3nn3dlkvD7KsY?sRvls3QC0qPi>o<)GHx%4Xb$5a3GBTJ(k@`e@ z$RUa^%S15^1oLEmA=sayrP5;9qtf!Z1*?e$ORVPsXpL{jL<6E)0sj&swP3}NPmR%FM?O>SQgN5XfHE< zo(4#Cv11(%Nnw_{_Ro}r6=gKd{k?NebJ~<~Kv0r(r0qe4n3LFx$5%x(BKvrz$m?LG zjLIc;hbj0FMdb9aH9Lpsof#yG$(0sG2%RL;d(n>;#jb!R_+dad+K;Ccw!|RY?uS(a zj~?=&M!4C(5LnlH6k%aYvz@7?xRa^2gml%vn&eKl$R_lJ+e|xsNfXzr#xuh(>`}9g zLHSyiFwK^-p!;p$yt7$F|3*IfO3Mlu9e>Dpx8O`37?fA`cj`C0B-m9uRhJjs^mRp# zWB;Aj6|G^1V6`jg7#7V9UFvnB4((nIwG?k%c7h`?0tS8J3Bn0t#pb#SA}N-|45$-j z$R>%7cc2ebAClXc(&0UtHX<>pd)akR3Kx_cK+n<}FhzmTx!8e9^u2e4%x{>T6pQ`6 zO182bh$-W5A3^wos0SV_TgPmF4WUP-+D25KjbC{y_6W_9I2_vNKwU(^qSdn&>^=*t z&uvp*@c8#2*paD!ZMCi3;K{Na;I4Q35zw$YrW5U@Kk~)&rw;G?d7Q&c9|x<Hg|CNMsxovmfth*|E*GHezPTWa^Hd^F4!B3sF;)? z(NaPyAhocu1jUe(!5Cy|dh|W2=!@fNmuNOzxi^tE_jAtzNJ0JR-avc_H|ve#KO}#S z#a(8secu|^Tx553d4r@3#6^MHbH)vmiBpn0X^29xEv!Vuh1n(Sr5I0V&`jA2;WS|Y zbf0e}X|)wA-Pf5gBZ>r4YX3Mav1kKY(ulAJ0Q*jB)YhviHK)w!TJsi3^dMa$L@^{` z_De`fF4;M87vM3Ph9SzCoCi$#Fsd38u!^0#*sPful^p5oI(xGU?yeYjn;Hq1!wzFk zG&2w}W3`AX4bxoVm03y>ts{KaDf!}b&7$(P4KAMP=vK5?1In^-YYNtx1f#}+2QK@h zeSeAI@E6Z8a?)>sZ`fbq9_snl6LCu6g>o)rO;ijp3|$vig+4t} zylEo7$SEW<_U+qgVcaVhk+4k+C9THI5V10qV*dOV6pPtAI$)QN{!JRBKh-D zk2^{j@bZ}yqW?<#VVuI_27*cI-V~sJiqQv&m07+10XF+#ZnIJdr8t`9s_EE;T2V;B z4UnQUH9EdX%zwh-5&wflY#ve!IWt0UE-My3?L#^Bh%kcgP1q{&26eXLn zTkjJ*w+(|_>Pq0v8{%nX$QZbf)tbJaLY$03;MO=Ic-uqYUmUCuXD>J>o6BCRF=xa% z3R4SK9#t1!K4I_d>tZgE>&+kZ?Q}1qo4&h%U$GfY058s%*=!kac{0Z+4Hwm!)pFLR zJ+5*OpgWUrm0FPI2ib4NPJ+Sk07j(`diti^i#kh&f}i>P4~|d?RFb#!JN)~D@)beox}bw?4VCf^y*`2{4`-@%SFTry2h z>9VBc9#JxEs1+0i2^LR@B1J`B9Ac=#FW=(?2;5;#U$0E0UNag_!jY$&2diQk_n)bT zl5Me_SUvqUjwCqmVcyb`igygB_4YUB*m$h5oeKv3uIF0sk}~es!{D>4r%PC*F~FN3owq5e0|YeUTSG#Vq%&Gk7uwW z0lDo#_wvflqHeRm*}l?}o;EILszBt|EW*zNPmq#?4A+&i0xx^?9obLyY4xx=Y9&^G;xYXYPxG)DOpPg!i_Ccl#3L}6xAAZzNhPK1XaC_~ z!A|mlo?Be*8Nn=a+FhgpOj@G7yYs(Qk(8&|h@_>w8Y^r&5nCqe0V60rRz?b5%J;GYeBqSAjo|K692GxD4` zRZyM2FdI+-jK2}WAZTZ()w_)V{n5tEb@>+JYluDozCb$fA4H)$bzg(Ux{*hXurjO^ zwAxc+UXu=&JV*E59}h3kzQPG4M)X8E*}#_&}w*KEgtX)cU{vm9b$atHa;s>| z+L6&cn8xUL*OSjx4YGjf6{Eq+Q3{!ZyhrL&^6Vz@jGbI%cAM9GkmFlamTbcQGvOlL zmJ?(FI)c86=JEs|*;?h~o)88>12nXlpMR4@yh%qdwFNpct;vMlc=;{FSo*apJ;p}! zAX~t;3tb~VuP|ZW;z$=IHf->F@Ml)&-&Bnb{iQyE#;GZ@C$PzEf6~q}4D>9jic@mTO5x76ulDz@+XAcm35!VSu zT*Gs>;f0b2TNpjU_BjHZ&S6Sqk6V1370+!eppV2H+FY!q*n=GHQ!9Rn6MjY!Jc77A zG7Y!lFp8?TIHN!LXO?gCnsYM-gQxsm=Ek**VmZu7vnuufD7K~GIxfxbsQ@qv2T zPa`tvHB$fFCyZl>3oYg?_wW)C>^_iDOc^B7klnTOoytQH18WkOk)L2BSD0r%xgRSW zQS9elF^?O=_@|58zKLK;(f77l-Zzu}4{fXed2saq!5k#UZAoDBqYQS{sn@j@Vtp|$ zG%gnZ$U|9@u#w1@11Sjl8ze^Co=)7yS(}=;68a3~g;NDe_X^}yJj;~s8xq9ahQ5_r zxAlTMnep*)w1e(TG%tWsjo3RR;yVGPEO4V{Zp?=a_0R#=V^ioQu4YL=BO4r0$$XTX zZfnw#_$V}sDAIDrezGQ+h?q24St0QNug_?{s-pI(^jg`#JRxM1YBV;a@@JQvH8*>> zIJvku74E0NlXkYe_624>znU0J@L<-c=G#F3k4A_)*;ky!C(^uZfj%WB3-*{*B$?9+ zDm$WFp=0(xnt6`vDQV3Jl5f&R(Mp};;q8d3I%Kn>Kx=^;uSVCw0L=gw53%Bp==8Sw zxtx=cs!^-_+i{2OK`Q;913+AXc_&Z5$@z3<)So0CU3;JAv=H?@Zpi~riQ{z-zLtVL z!oF<}@IgJp)Iyz1zVJ42!SPHSkjYNS4%ulVVIXdRuiZ@5Mx8LJS}J#qD^Zi_xQ@>DKDr-_e#>5h3dtje*NcwH_h;i{Sx7}dkdpuW z(yUCjckQsagv*QGMSi9u1`Z|V^}Wjf7B@q%j2DQXyd0nOyqg%m{CK_lAoKlJ7#8M} z%IvR?Vh$6aDWK2W!=i?*<77q&B8O&3?zP(Cs@kapc)&p7En?J;t-TX9abGT#H?TW? ztO5(lPKRuC7fs}zwcUKbRh=7E8wzTsa#Z{a`WR}?UZ%!HohN}d&xJ=JQhpO1PI#>X zHkb>pW04pU%Bj_mf~U}1F1=wxdBZu1790>3Dm44bQ#F=T4V3&HlOLsGH)+AK$cHk6 zia$=$kog?)07HCL*PI6}DRhpM^*%I*kHM<#1Se+AQ!!xyhcy6j7`iDX7Z-2i73_n# zas*?7LkxS-XSqv;YBa zW_n*32D(HTYQ0$feV_Fru1ZxW0g&iwqixPX3=9t4o)o|kOo79V$?$uh?#8Q8e>4e)V6;_(x&ViUVxma+i25qea;d-oK7ouuDsB^ab{ zu1qjQ%`n56VtxBE#0qAzb7lph`Eb-}TYpXB!H-}3Ykqyp`otprp7{VEuW*^IR2n$Fb99*nAtqT&oOFIf z@w*6>YvOGw@Ja?Pp1=whZqydzx@9X4n^2!n83C5{C?G@|E?&$?p*g68)kNvUTJ)I6 z1Q|(#UuP6pj78GUxq11m-GSszc+)X{C2eo-?8ud9sB=3(D47v?`JAa{V(IF zPZQ_0AY*9M97>Jf<o%#O_%Wq}8>YM=q0|tGY+hlXcpE=Z4Od z`NT7Hu2hnvRoqOw@g1f=bv`+nba{GwA$Ak0INlqI1k<9!x_!sL()h?hEWoWrdU3w` zZ%%)VR+Bc@_v!C#koM1p-3v_^L6)_Ktj4HE>aUh%2XZE@JFMOn)J~c`_7VWNb9c-N z2b|SZMR4Z@E7j&q&9(6H3yjEu6HV7{2!1t0lgizD;mZ9$r(r7W5G$ky@w(T_dFnOD z*p#+z$@pKE+>o@%eT(2-p_C}wbQ5s(%Sn_{$HDN@MB+Ev?t@3dPy`%TZ!z}AThZSu zN<1i$siJhXFdjV zP*y|V<`V8t=h#XTRUR~5`c`Z9^-`*BZf?WAehGdg)E2Je)hqFa!k{V(u+(hTf^Yq& zoruUh2(^3pe)2{bvt4&4Y9CY3js)PUHtd4rVG57}uFJL)D(JfSIo^{P=7liFXG zq5yqgof0V8paQcP!gy+;^pp-DA5pj=gbMN0eW=-eY+N8~y+G>t+x}oa!5r>tW$xhI zPQSv=pi;~653Gvf6~*JcQ%t1xOrH2l3Zy@8AoJ+wz@daW@m7?%LXkr!bw9GY@ns3e zSfuWF_gkWnesv?s3I`@}NgE2xwgs&rj?kH-FEy82=O8`+szN ziHch`vvS`zNfap14!&#i9H@wF7}yIPm=UB%(o(}F{wsZ(wA0nJ2aD^@B41>>o-_U6 zUqD~vdo48S8~FTb^+%#zcbQiiYoDKYcj&$#^;Smmb+Ljp(L=1Kt_J!;0s%1|JK}Wi z;={~oL!foo5n8=}rs6MmUW~R&;SIJO3TL4Ky?kh+b2rT9B1Jl4>#Uh-Bec z`Hsp<==#UEW6pGPhNk8H!!DUQR~#F9jEMI6T*OWfN^Ze&X(4nV$wa8QUJ>oTkruH# zm~O<`J7Wxseo@FqaZMl#Y(mrFW9AHM9Kb|XBMqaZ2a)DvJgYipkDD_VUF_PKd~dT7 z#02}bBfPn9a!X!O#83=lbJSK#E}K&yx-HI#T6ua)6o0{|={*HFusCkHzs|Fn&|C3H zBck1cmfcWVUN&i>X$YU^Sn6k2H;r3zuXbJFz)r5~3$d$tUj(l1?o={MM){kjgqXRO zc5R*#{;V7AQh|G|)jLM@wGAK&rm2~@{Pewv#06pHbKn#wL0P6F1!^qw9g&cW3Z=9} zj)POhOlwsh@eF=>z?#sIs*C-Nl(yU!#DaiaxhEs#iJqQ8w%(?+6lU02MYSeDkr!B- zPjMv+on6OLXgGnAtl(ao>|X2Y8*Hb}GRW5}-IzXnoo-d0!m4Vy$GS!XOLy>3_+UGs z2D|YcQx@M#M|}TDOetGi{9lGo9m-=0-^+nKE^*?$^uHkxZh}I{#UTQd;X!L+W@jm( zDg@N4+lUqI92o_rNk{3P>1gxAL=&O;x)ZT=q1mk0kLlE$WeWuY_$0`0jY-Kkt zP*|m3AF}Ubd=`<>(Xg0har*_@x2YH}bn0Wk*OZz3*e5;Zc;2uBdnl8?&XjupbkOeNZsNh6pvsq_ydmJI+*z**{I{0K)-;p1~k8cpJXL$^t!-`E}=*4G^-E8>H!LjTPxSx zcF+cS`ommfKMhNSbas^@YbTpH1*RFrBuATUR zt{oFWSk^$xU&kbFQ;MCX22RAN5F6eq9UfR$ut`Jw--p2YX)A*J69m^!oYfj2y7NYcH6&r+0~_sH^c^nzeN1AU4Ga7=FlR{S|Mm~MpzY0$Z+p2W(a={b-pR9EO1Rs zB%KY|@wLcAA@)KXi!d2_BxrkhDn`DT1=Dec}V!okd{$+wK z4E{n8R*xKyci1(CnNdhf$Dp2(Jpof0-0%-38X=Dd9PQgT+w%Lshx9+loPS~MOm%ZT zt%2B2iL_KU_ita%N>xjB!#71_3=3c}o zgeW~^U_ZTJQ2!PqXulQd=3b=XOQhwATK$y(9$#1jOQ4}4?~l#&nek)H(04f(Sr=s| zWv7Lu1=%WGk4FSw^;;!8&YPM)pQDCY9DhU`hMty1@sq1=Tj7bFsOOBZOFlpR`W>-J$-(kezWJj;`?x-v>ev{*8V z8p|KXJPV$HyQr1A(9LVrM47u-XpcrIyO`yWvx1pVYc&?154aneRpLqgx)EMvRaa#|9?Wwqs2+W8n5~79G z(}iCiLk;?enn}ew`HzhG+tu+Ru@T+K5juvZN)wY;x6HjvqD!&!)$$;1VAh~7fg0K| zEha#aN=Yv|3^~YFH}cc38ovVb%L|g@9W6fo(JtT6$fa?zf@Ct88e}m?i)b*Jgc{fl zExfdvw-BYDmH6>(4QMt#p0;FUIQqkhD}aH?a7)_%JtA~soqj{ppP_82yi9kaxuK>~ ze_)Zt>1?q=ZH*kF{1iq9sr*tVuy=u>Zev}!gEZx@O6-fjyu9X00gpIl-fS_pzjpqJ z1yqBmf9NF!jaF<+YxgH6oXBdK)sH(>VZ)1siyA$P<#KDt;8NT*l_0{xit~5j1P)FN zI8hhYKhQ)i z37^aP13B~u65?sg+_@2Kr^iWHN=U;EDSZ@2W2!5ALhGNWXnFBY%7W?1 z=HI9JzQ-pLKZDYTv<0-lt|6c-RwhxZ)mU2Os{bsX_i^@*fKUj8*aDO5pks=qn3Dv6 zwggpKLuyRCTVPwmw1r}B#AS}?X7b837UlXwp~E2|PJw2SGVueL7){Y&z!jL!XN=0i zU^Eig`S2`{+gU$68aRdWx?BZ{sU_f=8sn~>s~M?GU~`fH5kCc; z8ICp+INM3(3{#k32RZdv6b9MQYdZXNuk7ed8;G?S2nT+NZBG=Tar^KFl2SvhW$bGW#kdWL-I)s_IqVnCDDM9fm8g;P;8 z7t4yZn3^*NQfx7SwmkzP$=fwdC}bafQSEF@pd&P8@H#`swGy_rz;Z?Ty5mkS%>m#% zp_!m9e<()sfKiY(nF<1zBz&&`ZlJf6QLvLhl`_``%RW&{+O>Xhp;lwSsyRqGf=RWd zpftiR`={2(siiPAS|p}@q=NhVc0ELprt%=fMXO3B)4ryC2LT(o=sLM7hJC!}T1@)E zA3^J$3&1*M6Xq>03FX`R&w*NkrZE?FwU+Muut;>qNhj@bX17ZJxnOlPSZ=Zeiz~T_ zOu#yc3t6ONHB;?|r4w+pI)~KGN;HOGC)txxiUN8#mexj+W(cz%9a4sx|IRG=}ia zuEBuba3AHsV2feqw-3MvuL`I+2|`Ud4~7ZkN=JZ;L20|Oxna5vx1qbIh#k2O4$RQF zo`tL()zxaqibg^GbB+BS5#U{@K;WWQj~GcB1zb}zJkPwH|5hZ9iH2308!>_;%msji zJHSL~s)YHBR=Koa1mLEOHos*`gp=s8KA-C zu0aE+W!#iJ*0xqKm3A`fUGy#O+X+5W36myS>Uh2!R*s$aCU^`K&KKLCCDkejX2p=5 z%o7-fl03x`gaSNyr?3_JLv?2RLS3F*8ub>Jd@^Cc17)v8vYEK4aqo?OS@W9mt%ITJ z9=S2%R8M){CugT@k~~0x`}Vl!svYqX=E)c_oU6o}#Hb^%G1l3BudxA{F*tbjG;W_>=xV73pKY53v%>I)@D36I_@&p$h|Aw zonQS`07z_F#@T-%@-Tb|)7;;anoD_WH>9ewFy(ZcEOM$#Y)8>qi7rCnsH9GO-_7zF zu*C87{Df1P4TEOsnzZ@H%&lvV(3V@;Q!%+OYRp`g05PjY^gL$^$-t0Y>H*CDDs?FZly*oZ&dxvsxaUWF!{em4{A>n@vpXg$dwvt@_rgmHF z-MER`ABa8R-t_H*kv>}CzOpz;!>p^^9ztHMsHL|SRnS<-y5Z*r(_}c4=fXF`l^-i}>e7v!qs_jv zqvWhX^F=2sDNWA9c@P0?lUlr6ecrTKM%pNQ^?*Lq?p-0~?_j50xV%^(+H>sMul#Tw zeciF*1=?a7cI(}352%>LO96pD+?9!fNyl^9v3^v&Y4L)mNGK0FN43&Xf8jUlxW1Bw zyiu2;qW-aGNhs=zbuoxnxiwZ3{PFZM#Kw)9H@(hgX23h(`Wm~m4&TvoZoYp{plb^> z_#?vXcxd>r7K+1HKJvhed>gtK`TAbJUazUWQY6T~t2af%#<+Veyr%7-#*A#@&*;@g58{i|E%6yC_InGXCOd{L0;$)z#?n7M`re zh!kO{6=>7I?*}czyF7_frt#)s1CFJ_XE&VrDA?Dp3XbvF{qsEJgb&OLSNz_5g?HpK z9)8rsr4JN!Af3G9!#Qn(6zaUDqLN(g2g8*M)Djap?WMK9NKlkC)E2|-g|#-rp%!Gz zAHd%`iq|81efi93m3yTBw3g0j#;Yb2X{mhRAI?&KDmbGqou(2xiRNb^sV}%%Wu0?< z?($L>(#BO*)^)rSgyNRni$i`R4v;GhlCZ8$@e^ROX(p=2_v6Y!%^As zu022)fHdv_-~Yu_H6WVPLpHQx!W%^6j)cBhS`O3QBW#x(eX54d&I22op(N59b*&$v zFiSRY6rOc^(dgSV1>a7-5C;(5S5MvKcM2Jm-LD9TGqDpP097%52V+0>Xqq!! zq4e3vj53SE6i8J`XcQB|MZPP8j;PAOnpGnllH6#Ku~vS42xP*Nz@~y%db7Xi8s09P z1)e%8ys6&M8D=Dt6&t`iKG_4X=!kgRQoh%Z`dc&mlOUqXk-k`jKv9@(a^2-Upw>?< zt5*^DV~6Zedbec4NVl($2T{&b)zA@b#dUyd>`2JC0=xa_fIm8{5um zr-!ApXZhC8@=vC2WyxO|!@0Km)h8ep*`^he92$@YwP>VcdoS5OC^s38e#7RPsg4j+ zbVGG}WRSET&ZfrcR(x~k8n1rTP%CnfUNKUonD$P?FtNFF#cn!wEIab-;jU=B1dHK@ z(;(yAQJ`O$sMn>h;pf^8{JISW%d+@v6@CnXh9n5TXGC}?FI9i-D0OMaIg&mAg=0Kn zNJ7oz5*ReJukD55fUsMuaP+H4tDN&V9zfqF@ zr=#ecUk9wu{0;!+gl;3Bw=Vn^)z$ahVhhw)io!na&9}LmWurLb0zubxK=UEnU*{5P z+SP}&*(iBKSO4{alBHaY^)5Q=mZ+2OwIooJ7*Q5XJ+2|q`9#f?6myq!&oz?klihLq z4C)$XP!BNS0G_Z1&TM>?Jk{S~{F3n83ioli=IO6f%wkvCl(RFFw~j0tb{GvXTx>*sB0McY0s&SNvj4+^h`9nJ_wM>F!Uc>X}9PifQekn0sKI2SAJP!a4h z5cyGTuCj3ZBM^&{dRelIlT^9zcfaAuL5Y~bl!ppSf`wZbK$z#6U~rdclk``e+!qhe z6Qspo*%<)eu6?C;Bp<^VuW6JI|Ncvyn+LlSl;Mp22Bl7ARQ0Xc24%29(ZrdsIPw&-=yHQ7_Vle|5h>AST0 zUGX2Zk34vp?U~IHT|;$U86T+UUHl_NE4m|}>E~6q``7hccCaT^#y+?wD##Q%HwPd8 zV3x4L4|qqu`B$4(LXqDJngNy-{&@aFBvVsywt@X^}iH7P%>bR?ciC$I^U-4Foa`YKI^qDyGK7k%E%c_P=yzAi`YnxGA%DeNd++j3*h^ z=rn>oBd0|~lZ<6YvmkKY*ZJlJ;Im0tqgWu&E92eqt;+NYdxx`eS(4Hw_Jb5|yVvBg z*tbdY^!AN;luEyN4VRhS@-_DC{({ziH{&Z}iGElSV~qvT>L-8G%+yEL zX#MFOhj{InyKG=mvW-<1B@c-}x$vA(nU?>S>0*eN#!SLzQ)Ex7fvQ)S4D<8|I#N$3 zT5Ei`Z?cxBODHX8(Xp73v`IsAYC@9b;t}z0wxVuQSY1J^GRwDPN@qbM-ZF48T$GZ< z8WU+;Pqo?{ghI-KZ-i*ydXu`Ep0Xw^McH_KE9J0S7G;x8Fe`DVG?j3Pv=0YzJ}yZR z%2=oqHiUjvuk0~Ca>Kol4CFi0_xQT~;_F?=u+!kIDl-9g`#ZNZ9HCy17Ga1v^Jv9# z{T4Kb1-AzUxq*MutfOWWZgD*HnFfyYg0&e9f(5tZ>krPF6{VikNeHoc{linPPt#Si z&*g>(c54V8rT_AX!J&bNm-!umPvOR}vDai#`CX___J#=zeB*{4<&2WpaDncZsOkp* zsg<%@@rbrMkR_ux9?LsQxzoBa1s%$BBn6vk#{&&zUwcfzeCBJUwFYSF$08qDsB;gWQN*g!p8pxjofWbqNSZOEKOaTx@+* zwdt5*Q47@EOZ~EZL9s?1o?A%9TJT=Ob_13yyugvPg*e&ZU(r6^k4=2+D-@n=Hv5vu zSXG|hM(>h9^zn=eQ=$6`JO&70&2|%V5Lsx>)(%#;pcOfu>*nk_3HB_BNaH$`jM<^S zcSftDU1?nL;jy)+sfonQN}(}gUW?d_ikr*3=^{G)=tjBtEPe>TO|0ddVB zTklrSHiW+!#26frPXQQ(YN8DG$PZo?(po(QUCCf_OJC`pw*uey00%gmH!`WJkrKXj2!#6?`T25mTu9OJp2L8z3! z=arrL$ZqxuE{%yV)14Kd>k}j7pxZ6#$Dz8$@WV5p8kTqN<-7W)Q7Gt2{KoOPK_tZ| zf2WG~O5@{qPI+W<4f_;reuFVdO^5`ADC1!JQE|N`s3cq@(0WB!n0uh@*c{=LAd;~} zyGK@hbF-Oo+!nN)@i*O(`@FA#u?o=~e{`4O#5}z&=UkU*50fOrzi11D^&FOqe>wii z?*k+2|EcUs;Gx{!@KBT~>PAwLrIDT7Th=Utu?~?np@t^gFs?zgX=D${RwOY^WGh-+ z+#4$066ISh8eYW#FXWp~S`<*%O^ZuItL1Tyqt8#tZ zY120E;^VG`!lZn&3sPd$RkdHpU#|w+bYV)pJC|SH9g%|5IkxVTQcBA4CL0}$&}ef@ zW^Vtj%M;;_1xxP9x#ex17&4N*{ksO*_4O}xYu(p*JkL#yr}@7b)t5X?%CY<+s5_MJ zuiqt+N_;A(_)%lumoyRFixWa-M7qK_9s6<1X?JDa9fP!+_6u~~M$5L=ipB=7(j#f< zZ34J%=bs549%~_mA(|={uZNs_0?o7;-LBP(ZRnkd{-^|2|=4vUTmtByHL8 zEph`(LSEzQj68a+`d$V<45J7cyv^#|^|%fD#si1Nx!4NW*`l*{->HEWNh6-|g>-=r zXmQ|-i}Ku$ndUeHQ^&ieT!Lf}vf6GaqW9$DJ2NWrqwPY%%4nip$@vK$nRp*_C-v<| zuKz~ZyN&<%!NS26&x?jhy+@awJipMQ-8(X4#Ae5??U<1QMt1l9R=w9fAnEF}NYu$2 z>6}Vkc zIb*A?G*z8^IvibmBKn_u^5&T_1oey0gZS2~obf(#xk=erZGTEdQnt3DMGM+0oPwss zj5zXD;(oWhB_T@~Ig#9@v)AKtXu3>Inmgf@A|-lD-1U>cNyl3h?ADD9)GG4}zUGPk zZzaXe!~Kf?<~@$G?Uql3t8jy9{2!doq4=J}j9ktTxss{p6!9UdjyDERlA*xZ!=Q)KDs5O)phz>Vq3BNGoM(H|=1*Q4$^2fTZw z(%nq1P|5Rt81}SYJpEEzMPl5VJsV5&4e)ZWKDyoZ>1EwpkHx-AQVQc8%JMz;{H~p{=FXV>jIxvm4X*qv52e?Y-f%DJ zxEA165GikEASQ^fH6K#d!Tpu2HP{sFs%E=e$gYd$aj$+xue6N+Wc(rAz~wUsk2`(b z8Kvmyz%bKQxpP}~baG-rwYcYCvkHOi zlkR<=>ZBTU*8RF_d#Bl@zZsRIhx<%~Z@Z=ik z>adw3!DK(8R|q$vy{FTxw%#xliD~6qXmY^7_9kthVPTF~Xy1CfBqbU~?1QmxmU=+k z(ggxvEuA;0e&+ci-zQR{-f7aO{O(Pz_OsEjLh_K>MbvoZ4nxtk5u{g@nPv)cgW_R} z9}EA4K4@z0?7ue}Z(o~R(X&FjejUI2g~08PH1E4w>9o{)S(?1>Z0XMvTb|;&EuyOE zGvWNpYX)Nv<8|a^;1>bh#&znEcl-r!T#pn= z4$?Yudha6F%4b>*8@=BdtXXY4N+`U4Dmx$}>HeVJk-QdTG@t!tVT#0(LeV0gvqyyw z2sEp^9eY0N`u10Tm4n8No&A=)IeEC|gnmEXoNSzu!1<4R<%-9kY_8~5Ej?zRegMn78wuMs#;i&eUA0Zk_RXQ3b&TT} z;SCI=7-FUB@*&;8|n>(_g^HGf3@QODE3LpmX~ELnymQm{Sx9xrKS zK29p~?v@R$0=v6Dr5aW>-!{+h@?Q58|Kz8{{W`%J+lDAdb&M5VHrX_mDY;1-JLnf)ezmPau$)1;=`-FU=-r-83tX=C`S#}GZufju zQ>sXNT0Ny=k@nc%cFnvA_i4SC)?_ORXHq8B4D%el1uPX`c~uG#S1M7C+*MMqLw78E zhY2dI8@+N^qrMI1+;TUda(vGqGSRyU{Fnm`aqrr7bz42c5xsOO-~oZpkzorD1g}Y<6rk&3>PsSGy}W?MtqFky@A(X# zIuNZK0cK?^=;PUAu>j0#HtjbHCV*6?jzA&OoE$*Jlga*}LF`SF?WLhv1O|zqC<>*> zYB;#lsYKx0&kH@BFpW8n*yDcc6?;_zaJs<-jPSkCsSX-!aV=P5kUgF@Nu<{a%#K*F z134Q{9|YX7X(v$62_cY3^G%t~rD>Q0z@)1|zs)vjJ6Jq9;7#Ki`w+eS**En?7;n&7 zu==V3T&eFboN3ZiMx3D8qYc;VjFUk_H-WWCau(VFXSQf~viH0L$gwD$UfFHqNcgN`x}M+YQ6RnN<+@t>JUp#)9YOkqst-Ga?{FsDpEeX0(5v{0J~SEbWiL zXC2}M4?UH@u&|;%0y`eb33ldo4~z-x8zY!oVmV=c+f$m?RfDC35mdQ2E>Pze7KWP- z>!Bh<&57I+O_^s}9Tg^k)h7{xx@0a0IA~GAOt2yy!X%Q$1rt~LbTB6@Du!_0%HV>N zlf)QI1&gvERKwso23mJ!Ou6ZS#zCS5W`gxE5T>C#E|{i<1D35C222I33?Njaz`On7 zi<+VWFP6D{e-{yiN#M|Jgk<44u1TiMI78S5W`Sdb5f+{zu34s{CfWN7a3Cf^@L%!& zN$?|!!9j2c)j$~+R6n#891w-z8(!oBpL2K=+%a$r2|~8-(vQj5_XT`<0Ksf;oP+tz z9CObS!0m)Tgg`K#xBM8B(|Z)Wb&DYL{WTYv`;A=q6~Nnx2+!lTIXtj8J7dZE!P_{z z#f8w6F}^!?^KE#+ZDv+xd5O&3EmomZzsv?>E-~ygGum45fk!SBN&|eo1rKw^?aZJ4 E2O(~oYXATM literal 0 HcmV?d00001 diff --git a/samples/client/petstore/kotlin-array-simple-string/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-array-simple-string/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000000..8cf6eb5ad222 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/petstore/kotlin-array-simple-string/gradlew b/samples/client/petstore/kotlin-array-simple-string/gradlew new file mode 100644 index 000000000000..4f906e0c811f --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/samples/client/petstore/kotlin-array-simple-string/gradlew.bat b/samples/client/petstore/kotlin-array-simple-string/gradlew.bat new file mode 100644 index 000000000000..107acd32c4e6 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/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="-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/petstore/kotlin-array-simple-string/settings.gradle b/samples/client/petstore/kotlin-array-simple-string/settings.gradle new file mode 100644 index 000000000000..646809e89a5a --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/settings.gradle @@ -0,0 +1,2 @@ + +rootProject.name = 'kotlin-array-simple-string' \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt new file mode 100644 index 000000000000..3a6862048908 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt @@ -0,0 +1,116 @@ +/** + * Demo + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.apis + +import java.io.IOException + + +import com.squareup.moshi.Json + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ApiResponse +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") + } + } + + /** + * + * + * @param ids + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun idsGet(ids: kotlin.collections.List) : Unit { + val localVarResponse = idsGetWithHttpInfo(ids = ids) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * + * + * @param ids + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun idsGetWithHttpInfo(ids: kotlin.collections.List) : ApiResponse { + val localVariableConfig = idsGetRequestConfig(ids = ids) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation idsGet + * + * @param ids + * @return RequestConfig + */ + fun idsGetRequestConfig(ids: kotlin.collections.List) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + return RequestConfig( + method = RequestMethod.GET, + path = "/{ids}".replace("{"+"ids"+"}", ids.joinToString(",")), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + +} diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt new file mode 100644 index 000000000000..ef7a8f1e1a62 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -0,0 +1,23 @@ +package org.openapitools.client.infrastructure + +typealias MultiValueMap = MutableMap> + +fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { + "csv" -> "," + "tsv" -> "\t" + "pipe" -> "|" + "space" -> " " + else -> "" +} + +val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } + +fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) + = toMultiValue(items.asIterable(), collectionFormat, map) + +fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { + return when(collectionFormat) { + "multi" -> items.map(map) + else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt new file mode 100644 index 000000000000..dc423d8a17df --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -0,0 +1,245 @@ +package org.openapitools.client.infrastructure + +import okhttp3.OkHttpClient +import okhttp3.RequestBody +import okhttp3.RequestBody.Companion.asRequestBody +import okhttp3.RequestBody.Companion.toRequestBody +import okhttp3.FormBody +import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.ResponseBody +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.Request +import okhttp3.Headers +import okhttp3.MultipartBody +import okhttp3.Call +import okhttp3.Callback +import okhttp3.Response +import okhttp3.internal.EMPTY_REQUEST +import java.io.BufferedWriter +import java.io.File +import java.io.FileWriter +import java.io.IOException +import java.net.URLConnection +import java.time.LocalDate +import java.time.LocalDateTime +import java.time.LocalTime +import java.time.OffsetDateTime +import java.time.OffsetTime +import java.util.Locale +import com.squareup.moshi.adapter + +open class ApiClient(val baseUrl: String) { + companion object { + protected const val ContentType = "Content-Type" + protected const val Accept = "Accept" + protected const val Authorization = "Authorization" + protected const val JsonMediaType = "application/json" + protected const val FormDataMediaType = "multipart/form-data" + protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" + protected const val XmlMediaType = "application/xml" + + val apiKey: MutableMap = mutableMapOf() + val apiKeyPrefix: MutableMap = mutableMapOf() + var username: String? = null + var password: String? = null + var accessToken: String? = null + const val baseUrlKey = "org.openapitools.client.baseUrl" + + @JvmStatic + val client: OkHttpClient by lazy { + builder.build() + } + + @JvmStatic + val builder: OkHttpClient.Builder = OkHttpClient.Builder() + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + protected fun guessContentTypeFromFile(file: File): String { + val contentType = URLConnection.guessContentTypeFromName(file.name) + return contentType ?: "application/octet-stream" + } + + protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + when { + content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) + mediaType == FormDataMediaType -> { + MultipartBody.Builder() + .setType(MultipartBody.FORM) + .apply { + // content's type *must* be Map + @Suppress("UNCHECKED_CAST") + (content as Map).forEach { (key, value) -> + if (value is File) { + val partHeaders = Headers.headersOf( + "Content-Disposition", + "form-data; name=\"$key\"; filename=\"${value.name}\"" + ) + val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() + addPart(partHeaders, value.asRequestBody(fileMediaType)) + } else { + val partHeaders = Headers.headersOf( + "Content-Disposition", + "form-data; name=\"$key\"" + ) + addPart( + partHeaders, + parameterToString(value).toRequestBody(null) + ) + } + } + }.build() + } + mediaType == FormUrlEncMediaType -> { + FormBody.Builder().apply { + // content's type *must* be Map + @Suppress("UNCHECKED_CAST") + (content as Map).forEach { (key, value) -> + add(key, parameterToString(value)) + } + }.build() + } + mediaType.startsWith("application/") && mediaType.endsWith("json") -> + if (content == null) { + EMPTY_REQUEST + } else { + Serializer.moshi.adapter(T::class.java).toJson(content) + .toRequestBody( + mediaType.toMediaTypeOrNull() + ) + } + mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") + // TODO: this should be extended with other serializers + else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") + } + + @OptIn(ExperimentalStdlibApi::class) + protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { + if(body == null) { + return null + } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } + if (T::class.java == File::class.java) { + // return tempfile + val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() + f.deleteOnExit() + val out = BufferedWriter(FileWriter(f)) + out.write(bodyContent) + out.close() + return f as T + } + return when { + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + Serializer.moshi.adapter().fromJson(bodyContent) + else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") + } + } + + + protected inline fun request(requestConfig: RequestConfig): ApiResponse { + val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") + + val url = httpUrl.newBuilder() + .addPathSegments(requestConfig.path.trimStart('/')) + .apply { + requestConfig.query.forEach { query -> + query.value.forEach { queryValue -> + addQueryParameter(query.key, queryValue) + } + } + }.build() + + // take content-type/accept from spec or set to default (application/json) if not defined + if (requestConfig.headers[ContentType].isNullOrEmpty()) { + requestConfig.headers[ContentType] = JsonMediaType + } + if (requestConfig.headers[Accept].isNullOrEmpty()) { + requestConfig.headers[Accept] = JsonMediaType + } + val headers = requestConfig.headers + + if(headers[ContentType].isNullOrEmpty()) { + throw kotlin.IllegalStateException("Missing Content-Type header. This is required.") + } + + if(headers[Accept].isNullOrEmpty()) { + throw kotlin.IllegalStateException("Missing Accept header. This is required.") + } + + // TODO: support multiple contentType options here. + val contentType = (headers[ContentType] as String).substringBefore(";").lowercase(Locale.getDefault()) + + val request = when (requestConfig.method) { + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) + RequestMethod.GET -> Request.Builder().url(url) + RequestMethod.HEAD -> Request.Builder().url(url).head() + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) + RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) + }.apply { + headers.forEach { header -> addHeader(header.key, header.value) } + }.build() + + val response = client.newCall(request).execute() + + val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.getDefault()) + + // TODO: handle specific mapping types. e.g. Map> + return when { + response.isRedirect -> Redirection( + response.code, + response.headers.toMultimap() + ) + response.isInformational -> Informational( + response.message, + response.code, + response.headers.toMultimap() + ) + response.isSuccessful -> Success( + responseBody(response.body, accept), + response.code, + response.headers.toMultimap() + ) + response.isClientError -> ClientError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + else -> ServerError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + } + } + + protected fun parameterToString(value: Any?): String = when (value) { + null -> "" + is Array<*> -> toMultiValue(value, "csv").toString() + is Iterable<*> -> toMultiValue(value, "csv").toString() + is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> + parseDateToQueryString(value) + else -> value.toString() + } + + protected inline fun parseDateToQueryString(value : T): String { + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + } +} diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt new file mode 100644 index 000000000000..cf2cfaa95d91 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt @@ -0,0 +1,43 @@ +package org.openapitools.client.infrastructure + +enum class ResponseType { + Success, Informational, Redirection, ClientError, ServerError +} + +interface Response + +abstract class ApiResponse(val responseType: ResponseType): Response { + abstract val statusCode: Int + abstract val headers: Map> +} + +class Success( + val data: T, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +): ApiResponse(ResponseType.Success) + +class Informational( + val statusText: String, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Informational) + +class Redirection( + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Redirection) + +class ClientError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.ClientError) + +class ServerError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> +): ApiResponse(ResponseType.ServerError) diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt new file mode 100644 index 000000000000..fb2c972cf8d4 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt @@ -0,0 +1,17 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigDecimal + +class BigDecimalAdapter { + @ToJson + fun toJson(value: BigDecimal): String { + return value.toPlainString() + } + + @FromJson + fun fromJson(value: String): BigDecimal { + return BigDecimal(value) + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt new file mode 100644 index 000000000000..4b6963110c9e --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt @@ -0,0 +1,17 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigInteger + +class BigIntegerAdapter { + @ToJson + fun toJson(value: BigInteger): String { + return value.toString() + } + + @FromJson + fun fromJson(value: String): BigInteger { + return BigInteger(value) + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt new file mode 100644 index 000000000000..ff5e2a81ee8c --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt @@ -0,0 +1,12 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson + +class ByteArrayAdapter { + @ToJson + fun toJson(data: ByteArray): String = String(data) + + @FromJson + fun fromJson(data: String): ByteArray = data.toByteArray() +} diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt new file mode 100644 index 000000000000..b5310e71f13c --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt @@ -0,0 +1,18 @@ +@file:Suppress("unused") +package org.openapitools.client.infrastructure + +import java.lang.RuntimeException + +open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 123L + } +} + +open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 456L + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt new file mode 100644 index 000000000000..b2e1654479a0 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class LocalDateAdapter { + @ToJson + fun toJson(value: LocalDate): String { + return DateTimeFormatter.ISO_LOCAL_DATE.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDate { + return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) + } + +} diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt new file mode 100644 index 000000000000..e082db94811d --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +class LocalDateTimeAdapter { + @ToJson + fun toJson(value: LocalDateTime): String { + return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDateTime { + return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } + +} diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt new file mode 100644 index 000000000000..87437871a31e --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.OffsetDateTime +import java.time.format.DateTimeFormatter + +class OffsetDateTimeAdapter { + @ToJson + fun toJson(value: OffsetDateTime): String { + return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): OffsetDateTime { + return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) + } + +} diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt new file mode 100644 index 000000000000..7e948e1dd071 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -0,0 +1,17 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given request. + * NOTE: This object doesn't include 'body' because it + * allows for caching of the constructed object + * for many request definitions. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class RequestConfig( + val method: RequestMethod, + val path: String, + val headers: MutableMap = mutableMapOf(), + val query: MutableMap> = mutableMapOf(), + val body: T? = null +) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt new file mode 100644 index 000000000000..931b12b8bd7a --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt @@ -0,0 +1,8 @@ +package org.openapitools.client.infrastructure + +/** + * Provides enumerated HTTP verbs + */ +enum class RequestMethod { + GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt new file mode 100644 index 000000000000..9bd2790dc144 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -0,0 +1,24 @@ +package org.openapitools.client.infrastructure + +import okhttp3.Response + +/** + * Provides an extension to evaluation whether the response is a 1xx code + */ +val Response.isInformational : Boolean get() = this.code in 100..199 + +/** + * Provides an extension to evaluation whether the response is a 3xx code + */ +@Suppress("EXTENSION_SHADOWED_BY_MEMBER") +val Response.isRedirect : Boolean get() = this.code in 300..399 + +/** + * Provides an extension to evaluation whether the response is a 4xx code + */ +val Response.isClientError : Boolean get() = this.code in 400..499 + +/** + * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code + */ +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt new file mode 100644 index 000000000000..e22592e47d74 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -0,0 +1,23 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.Moshi +import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory + +object Serializer { + @JvmStatic + val moshiBuilder: Moshi.Builder = Moshi.Builder() + .add(OffsetDateTimeAdapter()) + .add(LocalDateTimeAdapter()) + .add(LocalDateAdapter()) + .add(UUIDAdapter()) + .add(ByteArrayAdapter()) + .add(URIAdapter()) + .add(KotlinJsonAdapterFactory()) + .add(BigDecimalAdapter()) + .add(BigIntegerAdapter()) + + @JvmStatic + val moshi: Moshi by lazy { + moshiBuilder.build() + } +} diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt new file mode 100644 index 000000000000..927522757da9 --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt @@ -0,0 +1,13 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.net.URI + +class URIAdapter { + @ToJson + fun toJson(uri: URI) = uri.toString() + + @FromJson + fun fromJson(s: String): URI = URI.create(s) +} diff --git a/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt new file mode 100644 index 000000000000..7ccf7dc25d2d --- /dev/null +++ b/samples/client/petstore/kotlin-array-simple-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt @@ -0,0 +1,13 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.util.UUID + +class UUIDAdapter { + @ToJson + fun toJson(uuid: UUID) = uuid.toString() + + @FromJson + fun fromJson(s: String): UUID = UUID.fromString(s) +} From 2e6e82161fcd3a13832d8194e80b5ceeff427397 Mon Sep 17 00:00:00 2001 From: Giacomo Date: Wed, 12 Jan 2022 18:28:02 +0100 Subject: [PATCH 088/175] Apache Camel Server Generator (#11162) * Created Apache Camel language * Added unit test * Fix template dir * Fix description api * Camel Dataformat Properties * Apache Camel Doc * Apache Camel Doc * Apache Camel Doc * Apache Camel maven plugin example * Fix LOGGER * Samples * Camel 3.14 * Samples * samples * up to date * Rename camel to java-camel * up to date * Fix SerializedName in modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache --- bin/configs/java-camel-petstore-new.yaml | 17 + docs/generators.md | 1 + docs/generators/java-camel.md | 314 ++++++++++++++++++ .../examples/camel.xml | 198 +++++++++++ .../languages/JavaCamelServerCodegen.java | 186 +++++++++++ .../org.openapitools.codegen.CodegenConfig | 2 + .../java-camel-server/README.mustache | 7 + .../resources/java-camel-server/api.mustache | 95 ++++++ .../java-camel-server/application.mustache | 8 + .../java-camel-server/errorProcessor.mustache | 33 ++ .../java-camel-server/exampleString.mustache | 1 + .../exampleStringArray.mustache | 1 + .../resources/java-camel-server/pom.mustache | 193 +++++++++++ .../restConfiguration.mustache | 22 ++ .../java-camel-server/routesImpl.mustache | 34 ++ .../resources/java-camel-server/test.mustache | 63 ++++ .../java-camel-server/validation.mustache | 28 ++ .../java-camel/.openapi-generator-ignore | 23 ++ .../java-camel/.openapi-generator/FILES | 22 ++ .../java-camel/.openapi-generator/VERSION | 1 + samples/server/petstore/java-camel/README.md | 7 + samples/server/petstore/java-camel/pom.xml | 185 +++++++++++ .../org/openapitools/OpenAPI2SpringBoot.java | 64 ++++ .../org/openapitools/RFC3339DateFormat.java | 38 +++ .../org/openapitools/RestConfiguration.java | 22 ++ .../ValidationErrorProcessor.java | 30 ++ .../java/org/openapitools/api/PetApi.java | 268 +++++++++++++++ .../openapitools/api/PetApiRoutesImpl.java | 112 +++++++ .../org/openapitools/api/PetApiValidator.java | 64 ++++ .../java/org/openapitools/api/StoreApi.java | 97 ++++++ .../openapitools/api/StoreApiRoutesImpl.java | 64 ++++ .../openapitools/api/StoreApiValidator.java | 42 +++ .../java/org/openapitools/api/UserApi.java | 206 ++++++++++++ .../openapitools/api/UserApiRoutesImpl.java | 102 ++++++ .../openapitools/api/UserApiValidator.java | 60 ++++ .../java/org/openapitools/model/Category.java | 117 +++++++ .../openapitools/model/ModelApiResponse.java | 143 ++++++++ .../java/org/openapitools/model/Order.java | 262 +++++++++++++++ .../main/java/org/openapitools/model/Pet.java | 282 ++++++++++++++++ .../main/java/org/openapitools/model/Tag.java | 117 +++++++ .../java/org/openapitools/model/User.java | 273 +++++++++++++++ .../src/main/resources/application.properties | 8 + .../java/org/openapitools/api/PetApiTest.java | 145 ++++++++ .../org/openapitools/api/StoreApiTest.java | 84 +++++ .../org/openapitools/api/UserApiTest.java | 51 +++ 45 files changed, 4092 insertions(+) create mode 100644 bin/configs/java-camel-petstore-new.yaml create mode 100644 docs/generators/java-camel.md create mode 100644 modules/openapi-generator-maven-plugin/examples/camel.xml create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/README.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/application.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/errorProcessor.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/exampleString.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/exampleStringArray.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/restConfiguration.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/routesImpl.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/test.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-camel-server/validation.mustache create mode 100644 samples/server/petstore/java-camel/.openapi-generator-ignore create mode 100644 samples/server/petstore/java-camel/.openapi-generator/FILES create mode 100644 samples/server/petstore/java-camel/.openapi-generator/VERSION create mode 100644 samples/server/petstore/java-camel/README.md create mode 100644 samples/server/petstore/java-camel/pom.xml create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/OpenAPI2SpringBoot.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java create mode 100644 samples/server/petstore/java-camel/src/main/resources/application.properties create mode 100644 samples/server/petstore/java-camel/src/test/java/org/openapitools/api/PetApiTest.java create mode 100644 samples/server/petstore/java-camel/src/test/java/org/openapitools/api/StoreApiTest.java create mode 100644 samples/server/petstore/java-camel/src/test/java/org/openapitools/api/UserApiTest.java diff --git a/bin/configs/java-camel-petstore-new.yaml b/bin/configs/java-camel-petstore-new.yaml new file mode 100644 index 000000000000..51f66553da7f --- /dev/null +++ b/bin/configs/java-camel-petstore-new.yaml @@ -0,0 +1,17 @@ +generatorName: java-camel +outputDir: samples/server/petstore/java-camel +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/java-camel-server +additionalProperties: + oas3: "true" + hideGenerationTimestamp: true + camelRestBindingMode: "auto" + performBeanValidation: true + #dateLibrary: "java8-localdatetime" + camelDataformatProperties: "json.out.disableFeatures=WRITE_DATES_AS_TIMESTAMPS" + library: "spring-boot" + withXml: true + jackson: true + camelUseDefaulValidationtErrorProcessor: true + camelRestClientRequestValidation: true + camelSecurityDefinitions: true diff --git a/docs/generators.md b/docs/generators.md index 5bd6cadfa005..dc04b6f7452c 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -97,6 +97,7 @@ The following generators are available: * [graphql-nodejs-express-server](generators/graphql-nodejs-express-server.md) * [haskell](generators/haskell.md) * [haskell-yesod (beta)](generators/haskell-yesod.md) +* [java-camel](generators/java-camel.md) * [java-inflector](generators/java-inflector.md) * [java-msf4j](generators/java-msf4j.md) * [java-pkmst](generators/java-pkmst.md) diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md new file mode 100644 index 000000000000..0f2631991b6b --- /dev/null +++ b/docs/generators/java-camel.md @@ -0,0 +1,314 @@ +--- +title: Config Options for java-camel +sidebar_label: java-camel +--- + +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. + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|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| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false| +|apiPackage|package for generated api classes| |org.openapitools.api| +|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-spring| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|async|use async Callable controllers| |false| +|basePackage|base package (invokerPackage) for generated code| |org.openapitools| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|camelDataformatProperties|list of dataformat properties separated by comma (propertyName1=propertyValue2,...| || +|camelRestBindingMode|binding mode to be used by the REST consumer| |auto| +|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| +|camelUseDefaulValidationtErrorProcessor|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 (if you really have a good reason not to use threetenbp
**java8-localdatetime**
Java 8 using LocalDateTime (for legacy app only)
**java8**
Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
**threetenbp**
Backport of JSR310 (preferred for jdk < 1.8)
|threetenbp| +|delegatePattern|Whether to generate the server files using the delegate pattern| |false| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|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| +|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|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| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used. IMPORTANT: This option has been deprecated as Java 8 is the default.
**false**
Various third party libraries as needed
|true| +|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)|
**spring-boot**
Spring-boot Server application using the SpringFox integration.
**spring-mvc**
Spring-MVC Server application using the SpringFox integration.
**spring-cloud**
Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
|spring-boot| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|oas3|Use OAS 3 Swagger annotations instead of OAS 2 annotations| |false| +|openApiNullable|Enable OpenAPI Jackson Nullable library| |true| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|performBeanValidation|Use Bean Validation Impl. to perform BeanValidation| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|reactive|wrap responses in Mono/Flux Reactor types (spring-boot only)| |false| +|responseWrapper|wrap the responses in given type (Future, Callable, CompletableFuture,ListenableFuture, DeferredResult, RxObservable, RxSingle or fully qualified type)| |null| +|returnSuccessCode|Generated server returns 2xx code| |false| +|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| +|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| +|singleContentTypes|Whether to select only one produces/consumes content-type by operation.| |false| +|skipDefaultInterface|Whether to generate default implementations for java8 interfaces| |false| +|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| +|sourceFolder|source folder for generated code| |src/main/java| +|swaggerDocketConfig|Generate Spring OpenAPI Docket configuration class.| |false| +|title|server title name or client service name| |OpenAPI Spring| +|unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| +|useBeanValidation|Use BeanValidation API annotations| |true| +|useOptional|Use Optional container for optional parameters| |false| +|useSpringController|Annotate the generated API as a Spring Controller| |false| +|useTags|use tags for creating interface and controller classnames| |false| +|virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |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| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|LinkedHashSet|java.util.LinkedHashSet| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| +|set|LinkedHashSet| + + +## LANGUAGE PRIMITIVES + +
    +
  • Boolean
  • +
  • Double
  • +
  • Float
  • +
  • Integer
  • +
  • Long
  • +
  • Object
  • +
  • String
  • +
  • boolean
  • +
  • byte[]
  • +
+ +## RESERVED WORDS + +
    +
  • abstract
  • +
  • apiclient
  • +
  • apiexception
  • +
  • apiresponse
  • +
  • assert
  • +
  • boolean
  • +
  • break
  • +
  • byte
  • +
  • case
  • +
  • catch
  • +
  • char
  • +
  • class
  • +
  • configuration
  • +
  • const
  • +
  • continue
  • +
  • default
  • +
  • do
  • +
  • double
  • +
  • else
  • +
  • enum
  • +
  • extends
  • +
  • final
  • +
  • finally
  • +
  • float
  • +
  • for
  • +
  • goto
  • +
  • if
  • +
  • implements
  • +
  • import
  • +
  • instanceof
  • +
  • int
  • +
  • interface
  • +
  • localreturntype
  • +
  • localvaraccept
  • +
  • localvaraccepts
  • +
  • localvarauthnames
  • +
  • localvarcollectionqueryparams
  • +
  • localvarcontenttype
  • +
  • localvarcontenttypes
  • +
  • localvarcookieparams
  • +
  • localvarformparams
  • +
  • localvarheaderparams
  • +
  • localvarpath
  • +
  • localvarpostbody
  • +
  • localvarqueryparams
  • +
  • long
  • +
  • native
  • +
  • new
  • +
  • null
  • +
  • object
  • +
  • package
  • +
  • private
  • +
  • protected
  • +
  • public
  • +
  • return
  • +
  • short
  • +
  • static
  • +
  • strictfp
  • +
  • stringutil
  • +
  • super
  • +
  • switch
  • +
  • synchronized
  • +
  • this
  • +
  • throw
  • +
  • throws
  • +
  • transient
  • +
  • try
  • +
  • void
  • +
  • volatile
  • +
  • while
  • +
+ +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension +|MockServer|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✓|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/modules/openapi-generator-maven-plugin/examples/camel.xml b/modules/openapi-generator-maven-plugin/examples/camel.xml new file mode 100644 index 000000000000..afcc2632bc39 --- /dev/null +++ b/modules/openapi-generator-maven-plugin/examples/camel.xml @@ -0,0 +1,198 @@ + + 4.0.0 + org.openapitools + sample-project + jar + 1.0-SNAPSHOT + sample-project + https://maven.apache.org + + + + + + + org.openapitools + openapi-generator-maven-plugin + + 5.3.1-SNAPSHOT + + + + camel-server + + generate + + + + ${project.basedir}/swagger.yaml + + + camel + + + + + + auto + true + true + json.out.disableFeatures=WRITE_DATES_AS_TIMESTAMPS + true + true + true + + true + true + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + none + + + + + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + + + + + org.apache.camel + camel-bom + 3.13.0 + pom + import + + + org.apache.camel.springboot + camel-spring-boot-bom + 3.13.0 + pom + import + + + org.springframework.boot + spring-boot-dependencies + 2.6.1 + pom + import + + + + + + + org.apache.camel.springboot + camel-spring-boot-starter + + + + org.apache.camel.springboot + camel-servlet-starter + + + + org.springframework.boot + spring-boot-starter-web + + + + org.openapitools + jackson-databind-nullable + 0.2.1 + + + io.swagger + swagger-annotations + 1.6.3 + + + io.swagger.core.v3 + swagger-annotations + 2.1.11 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + 2.13.0 + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + 2.13.0 + + + org.apache.camel + camel-jackson + + + org.apache.camel + camel-jacksonxml + + + + org.apache.camel + camel-jaxb + + + org.apache.camel + camel-direct + + + + org.apache.camel + camel-bean-validator + + + + + com.mashape.unirest + unirest-java + 1.4.9 + test + + + + org.apache.camel + camel-test-spring-junit5 + test + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + 1.5.8 + + 2.2.1.RELEASE + 2.8.0 + + 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 new file mode 100644 index 000000000000..39240ff329e6 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java @@ -0,0 +1,186 @@ +package org.openapitools.codegen.languages; + +import io.swagger.v3.oas.models.Operation; +import org.openapitools.codegen.CliOption; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.languages.features.OptionalFeatures; +import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidationFeatures, PerformBeanValidationFeatures, OptionalFeatures { + private static final String APPLICATION_JSON = "application/json"; + private static final String APPLICATION_XML = "application/xml"; + + public static final String PROJECT_NAME = "projectName"; + 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 = "camelUseDefaulValidationtErrorProcessor"; + 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"; + + private String camelRestComponent = "servlet"; + private String camelRestBindingMode = "auto"; + private boolean camelRestClientRequestValidation = false; + private boolean camelUseDefaulValidationtErrorProcessor = true; + private String camelValidationErrorProcessor = "validationErrorProcessor"; + private boolean camelSecurityDefinitions = true; + private String camelDataformatProperties = ""; + + private final Logger LOGGER = LoggerFactory.getLogger(JavaCamelServerCodegen.class); + + public CodegenType getTag() { + return CodegenType.SERVER; + } + + public String getName() { + return "java-camel"; + } + + public String getHelp() { + return "Generates a camel server."; + } + + public JavaCamelServerCodegen() { + super(); + templateDir = "java-camel-server"; + addCliOptions(); + artifactId = "openapi-camel"; + super.library = ""; + } + + @Override + public void processOpts() { + if (!additionalProperties.containsKey(DATE_LIBRARY)) { + additionalProperties.put(DATE_LIBRARY, "legacy"); + } + super.processOpts(); + super.apiTemplateFiles.remove("apiController.mustache"); + LOGGER.info("***** Java Apache Camel Server Generator *****"); + supportingFiles.clear(); + manageAdditionalProperties(); + + Map dataFormatProperties = new HashMap<>(); + if (!"off".equals(camelRestBindingMode)) { + Arrays.stream(camelDataformatProperties.split(",")).forEach(property -> { + String[] dataFormatProperty = property.split("="); + if (dataFormatProperty.length == 2) { + dataFormatProperties.put(dataFormatProperty[0].trim(), dataFormatProperty[1].trim()); + } + }); + } + additionalProperties.put(CAMEL_DATAFORMAT_PROPERTIES, dataFormatProperties.entrySet()); + + supportingFiles.add(new SupportingFile("restConfiguration.mustache", + (sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator), + "RestConfiguration.java")); + if (performBeanValidation) { + apiTemplateFiles.put("validation.mustache", "Validator.java"); + if (camelUseDefaulValidationtErrorProcessor) { + supportingFiles.add(new SupportingFile("errorProcessor.mustache", + (sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator), + "ValidationErrorProcessor.java")); + } + } + if (SPRING_BOOT.equals(library)) { + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + supportingFiles.add(new SupportingFile("openapi2SpringBoot.mustache", + (sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator), + "OpenAPI2SpringBoot.java")); + + if (!interfaceOnly) { + apiTemplateFiles.put("routesImpl.mustache", "RoutesImpl.java"); + } + + supportingFiles.add(new SupportingFile("application.mustache", + ("src.main.resources").replace(".", java.io.File.separator), "application.properties")); + supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml")); + supportingFiles.add(new SupportingFile("RFC3339DateFormat.mustache", + (sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator), + "RFC3339DateFormat.java")); + apiTestTemplateFiles.put("test.mustache", ".java"); + } + } + + @Override + public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map> operations) { + boolean bindingModeOff = false; + if (co.hasProduces) { + for (Map produces : co.produces) { + String mediaType = produces.get("mediaType"); + if (!APPLICATION_JSON.equals(mediaType) && !APPLICATION_XML.equals(mediaType)) { + bindingModeOff = true; + } + if (APPLICATION_JSON.equals(mediaType)) { + produces.put("isJson", "true"); + } + if (APPLICATION_XML.equals(mediaType)) { + produces.put("isXml", "true"); + } + } + } + if (co.hasConsumes) { + for (Map consumes : co.consumes) { + String mediaType = consumes.get("mediaType"); + if (!APPLICATION_JSON.equals(mediaType) && !APPLICATION_XML.equals(mediaType)) { + bindingModeOff = true; + } + if (APPLICATION_JSON.equals(mediaType)) { + consumes.put("isJson", "true"); + } + if (APPLICATION_XML.equals(mediaType)) { + consumes.put("isXml", "true"); + } + } + } + co.vendorExtensions.put(CAMEL_REST_BINDING_MODE, bindingModeOff); + super.addOperationToGroup(tag, resourcePath, operation, co, operations); + } + + private void addCliOptions() { + 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", camelUseDefaulValidationtErrorProcessor)); + 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)); + } + + private void manageAdditionalProperties() { + camelRestComponent = manageAdditionalProperty(CAMEL_REST_COMPONENT, camelRestComponent); + camelRestBindingMode = manageAdditionalProperty(CAMEL_REST_BINDING_MODE, camelRestBindingMode); + camelRestClientRequestValidation = manageAdditionalProperty(CAMEL_REST_CLIENT_REQUEST_VALIDATION, camelRestClientRequestValidation); + camelUseDefaulValidationtErrorProcessor = manageAdditionalProperty(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, camelUseDefaulValidationtErrorProcessor); + camelValidationErrorProcessor = manageAdditionalProperty(CAMEL_VALIDATION_ERROR_PROCESSOR, camelValidationErrorProcessor); + camelSecurityDefinitions = manageAdditionalProperty(CAMEL_SECURITY_DEFINITIONS, camelSecurityDefinitions); + camelDataformatProperties = manageAdditionalProperty(CAMEL_DATAFORMAT_PROPERTIES, camelDataformatProperties); + } + + private T manageAdditionalProperty(String propertyName, T defaultValue) { + if (additionalProperties.containsKey(propertyName)) { + Object propertyValue = additionalProperties.get(propertyName); + if (defaultValue instanceof Boolean && !(propertyValue instanceof Boolean)) { + return (T) manageBooleanAdditionalProperty((String) propertyValue); + } + return (T) additionalProperties.get(propertyName); + } + additionalProperties.put(propertyName, defaultValue); + return defaultValue; + } + + private Boolean manageBooleanAdditionalProperty(String propertyValue) { + return Boolean.parseBoolean(propertyValue); + } +} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index c353b2a28464..d5911a2139bd 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -141,3 +141,5 @@ org.openapitools.codegen.languages.TypeScriptNodeClientCodegen org.openapitools.codegen.languages.TypeScriptReduxQueryClientCodegen org.openapitools.codegen.languages.TypeScriptRxjsClientCodegen org.openapitools.codegen.languages.WsdlSchemaCodegen + +org.openapitools.codegen.languages.JavaCamelServerCodegen diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/README.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/README.mustache new file mode 100644 index 000000000000..e20452e84920 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/README.mustache @@ -0,0 +1,7 @@ +# OpenAPI generated server + +Apache Camel Server + +```bash +mvn clean test +``` \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/api.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/api.mustache new file mode 100644 index 000000000000..6e6e769904fb --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/api.mustache @@ -0,0 +1,95 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package {{apiPackage}}; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.model.rest.RestParamType; +import org.springframework.stereotype.Component; +import {{modelPackage}}.*; +import org.apache.camel.model.rest.RestBindingMode; +import org.apache.camel.LoggingLevel; + +@Component +public class {{classname}} extends RouteBuilder { + + @Override + public void configure() throws Exception { + {{#performBeanValidation}} + onException(Exception.class) + .log(LoggingLevel.ERROR, "${exception.message}: ${exception.stacktrace}") + .handled(true) + .process("{{camelValidationErrorProcessor}}"); + {{/performBeanValidation}} + {{#operations}}{{#operation}} + + /** + {{httpMethod}} {{{path}}}{{#summary}} : {{.}}{{/summary}} + **/ + rest(){{#camelSecurityDefinitions}}{{#hasAuthMethods}} + .securityDefinitions(){{#authMethods}}{{#isOAuth}} + .oauth2("{{name}}"){{#flow}} + .flow("{{flow}}"){{/flow}}{{#tokenUrl}} + .tokenUrl("{{tokenUrl}}"){{/tokenUrl}}{{#authorizationUrl}} + .authorizationUrl("{{authorizationUrl}}"){{/authorizationUrl}}{{#refreshUrl}} + .refreshUrl("{{refreshUrl}}"){{/refreshUrl}}{{#scopes}} + .withScope("{{scope}}"{{#description}},"{{{.}}}"{{/description}}){{/scopes}} + {{^-last}}.end(){{/-last}}{{#-last}} + .endSecurityDefinition(){{/-last}}{{/isOAuth}}{{#isApiKey}} + .apiKey("{{name}}"){{#isKeyInHeader}} + .withHeader("{{name}}"){{/isKeyInHeader}}{{#isKeyInQuery}} + .withQuery("{{name}}").{{/isKeyInQuery}}{{#isKeyInCookie}} + .withCookie("{{name}}").{{/isKeyInCookie}} + {{^-last}}.end(){{/-last}}{{#-last}} + .endSecurityDefinition(){{/-last}}{{/isApiKey}}{{#isBasic}}{{#isBasicBasic}} + .basicAuth("{{name}}"){{#-last}}.end(){{/-last}}{{/isBasicBasic}}{{#isBasicBearer}} + .bearerToken("{{name}}"{{#bearerFormat}}, "{{bearerFormat}}"{{/bearerFormat}}){{#-last}}.end(){{/-last}}{{/isBasicBearer}}{{/isBasic}}{{/authMethods}}{{/hasAuthMethods}}{{/camelSecurityDefinitions}} + .{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}("{{path}}") + .description("{{#summary}}{{{.}}}{{/summary}}") + .id("{{operationId}}Api"){{#vendorExtensions}}{{#camelRestBindingMode}} + .clientRequestValidation(false) + .bindingMode(RestBindingMode.off){{/camelRestBindingMode}}{{/vendorExtensions}}{{#hasProduces}} + .produces("{{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}"){{^isArray}}{{^isMap}}{{^isPrimitiveType}} + .outType({{returnType}}.class){{/isPrimitiveType}}{{/isMap}}{{/isArray}}{{#isArray}} + .outType({{returnBaseType}}[].class){{/isArray}}{{/hasProduces}}{{#hasConsumes}} + .consumes("{{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}"){{#bodyParams}}{{^isArray}}{{^isMap}}{{^isPrimitiveType}} + .type({{baseType}}.class){{/isPrimitiveType}}{{/isMap}}{{/isArray}}{{#isArray}} + .type({{baseType}}[].class){{/isArray}}{{/bodyParams}} + {{/hasConsumes}}{{#pathParams}} + .param() + .name("{{paramName}}") + .type(RestParamType.path) + .required({{required}}){{#description}} + .description("{{{.}}}"){{/description}} + .endParam(){{/pathParams}}{{#queryParams}} + .param() + .name("{{paramName}}") + .type(RestParamType.query) + .required({{required}}){{#description}} + .description("{{{.}}}"){{/description}} + .endParam(){{/queryParams}}{{#headerParams}} + .param() + .name("{{paramName}}") + .type(RestParamType.header) + .required({{required}}){{#description}} + .description("{{{.}}}"){{/description}} + .endParam(){{/headerParams}}{{#bodyParams}} + .param() + .name("{{paramName}}") + .type(RestParamType.body) + .required({{required}}){{#description}} + .description("{{{.}}}"){{/description}} + .endParam(){{/bodyParams}}{{#formParams}} + .param() + .name("{{paramName}}") + .type(RestParamType.formData) + .required({{required}}){{#description}} + .description("{{{.}}}"){{/description}} + .endParam(){{/formParams}}{{#performBeanValidation}} + .to("direct:validate-{{operationId}}");{{/performBeanValidation}}{{^performBeanValidation}} + .to("direct:{{operationId}}");{{/performBeanValidation}} + {{/operation}}{{/operations}} + } +} diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/application.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/application.mustache new file mode 100644 index 000000000000..1975bd195307 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/application.mustache @@ -0,0 +1,8 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +# https://openapi-generator.tech +# Do not edit the class manually. + +camel.springboot.name=camel-{{artifactId}} +camel.servlet.mapping.context-path=/api/v1/* + +server.port=8080 \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/errorProcessor.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/errorProcessor.mustache new file mode 100644 index 000000000000..0df67de43bb7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/errorProcessor.mustache @@ -0,0 +1,33 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package {{basePackage}}; + +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.apache.camel.component.bean.validator.BeanValidationException; +import org.springframework.stereotype.Component; +{{#jackson}} +import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException;{{/jackson}} + +@Component("{{camelValidationErrorProcessor}}") +public class ValidationErrorProcessor implements Processor { + + @Override + public void process(Exchange exchange) throws Exception { + Exception fault = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); + int httpStatusCode = 500; + if (fault instanceof BeanValidationException) { + httpStatusCode = 400; + } + {{#jackson}} + if (fault instanceof UnrecognizedPropertyException) { + httpStatusCode = 400; + } + {{/jackson}} + exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, httpStatusCode); + exchange.getIn().setBody(fault.getMessage()); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/exampleString.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/exampleString.mustache new file mode 100644 index 000000000000..1f72a330ef62 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/exampleString.mustache @@ -0,0 +1 @@ +{{#lambdaSplitString}}{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{#lambdaTrimWhitespace}}{{{example}}}{{/lambdaTrimWhitespace}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}{{/lambdaSplitString}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/exampleStringArray.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/exampleStringArray.mustache new file mode 100644 index 000000000000..99e5f81bdb8f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/exampleStringArray.mustache @@ -0,0 +1 @@ +{{#lambdaSplitString}}{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{#lambdaTrimWhitespace}}[{{{example}}}]{{/lambdaTrimWhitespace}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}{{/lambdaSplitString}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache new file mode 100644 index 000000000000..d7c006cc40c1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache @@ -0,0 +1,193 @@ + + + + 4.0.0 + + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + 2.6.2 + 3.14.0 + + + + + + org.apache.camel + camel-bom + ${org.apache.camel.version} + pom + import + + + org.apache.camel.springboot + camel-spring-boot-bom + ${org.apache.camel.version} + pom + import + + + org.springframework.boot + spring-boot-dependencies + ${org.springframework.boot.version} + pom + import + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 1.8 + 1.8 + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + maven-surefire-plugin + 2.22.2 + + + + + + + org.apache.camel.springboot + camel-spring-boot-starter + + + + org.apache.camel.springboot + camel-servlet-starter + + + + org.springframework.boot + spring-boot-starter-web + + + + org.openapitools + jackson-databind-nullable + 0.2.1 + + + io.swagger + swagger-annotations + 1.6.3 + + {{#oas3}} + + io.swagger.core.v3 + swagger-annotations + 2.1.11 + + {{/oas3}} + {{#jackson}} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + 2.13.0 + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + 2.13.0 + + + org.apache.camel + camel-jackson + + {{#withXml}} + + org.apache.camel + camel-jacksonxml + + {{/withXml}}{{/jackson}} + {{#withXml}} + + org.apache.camel + camel-jaxb + + {{/withXml}} + + org.apache.camel + camel-direct + + + {{#useBeanValidation}} + + org.apache.camel + camel-bean-validator + + {{/useBeanValidation}} + + + + com.mashape.unirest + unirest-java + 1.4.9 + test + + + + org.apache.camel + camel-test-spring-junit5 + test + + + + org.springframework.boot + spring-boot-starter-test + test + + + + \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/restConfiguration.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/restConfiguration.mustache new file mode 100644 index 000000000000..44af274af40a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/restConfiguration.mustache @@ -0,0 +1,22 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package {{apiPackage}}; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.model.rest.RestBindingMode; + +@Component +public class RestConfiguration extends RouteBuilder { + @Override + public void configure() throws Exception { + restConfiguration() + .component("{{camelRestComponent}}") + .bindingMode(RestBindingMode.{{camelRestBindingMode}}){{#camelDataformatProperties}} + .dataFormatProperty("{{key}}", "{{value}}"){{/camelDataformatProperties}} + .clientRequestValidation({{camelRestClientRequestValidation}}); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/routesImpl.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/routesImpl.mustache new file mode 100644 index 000000000000..427aa3021d71 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/routesImpl.mustache @@ -0,0 +1,34 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package {{apiPackage}}; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.LoggingLevel; +import {{modelPackage}}.*; +import org.apache.camel.model.dataformat.JsonLibrary; + +@Component +public class {{classname}}RoutesImpl extends RouteBuilder { + @Override + public void configure() throws Exception { + {{#operations}}{{#operation}} + /** + {{httpMethod}} {{{path}}}{{#summary}} : {{.}}{{/summary}} + **/ + from("direct:{{operationId}}") + .id("{{operationId}}") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"){{#hasProduces}}{{#examples}}{{#-first}}{{^isArray}}{{^isMap}}{{^isPrimitiveType}} + .setBody(constant({{>exampleString}})) + .unmarshal().json(JsonLibrary.Jackson, {{returnType}}.class){{/isPrimitiveType}}{{/isMap}}{{/isArray}}{{#isArray}} + .setBody(constant({{>exampleStringArray}})) + .unmarshal().json(JsonLibrary.Jackson, {{returnBaseType}}[].class){{/isArray}}{{/-first}}{{/examples}}{{/hasProduces}};{{/operation}}{{/operations}} + } +} diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/test.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/test.mustache new file mode 100644 index 000000000000..677f0e522ac0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/test.mustache @@ -0,0 +1,63 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package {{apiPackage}}; + +import org.junit.jupiter.api.Test; +import org.apache.camel.test.spring.junit5.CamelSpringBootTest; +import org.springframework.boot.test.context.SpringBootTest; +import com.mashape.unirest.request.HttpRequest; +import com.mashape.unirest.request.HttpRequestWithBody; +import com.mashape.unirest.http.Unirest; +import com.mashape.unirest.http.JsonNode; +import com.mashape.unirest.http.HttpResponse; +import java.io.InputStream; +import org.junit.jupiter.api.Assertions; + +@CamelSpringBootTest +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +public class {{classname}}Test { + private static final String API_URL = "http://127.0.0.1:8080/api/v1"; +{{#operations}}{{#operation}}{{#examples}}{{#-first}}{{#vendorExtensions}}{{^camelRestBindingMode}} + @Test + public void {{operationId}}TestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "{{path}}"; + HttpRequest httpRequest = Unirest.{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}(url);{{#hasConsumes}} + httpRequest = httpRequest.header("Content-Type", contentType);{{/hasConsumes}}{{#hasProduces}} + httpRequest = httpRequest.header("Accept", accept);{{/hasProduces}}{{#pathParams}} + httpRequest = httpRequest.routeParam("{{paramName}}", "1");{{/pathParams}}{{#queryParams}} + httpRequest = httpRequest.queryString("{{paramName}}", "1");{{/queryParams}} + {{#hasConsumes}}{{#examples}}{{#-first}} + String requestBody = {{>exampleString}}; + httpRequest = ((HttpRequestWithBody) httpRequest).body(requestBody).getHttpRequest(); + {{/-first}}{{/examples}}{{/hasConsumes}} + {{#hasProduces}}{{#produces}}{{#isJson}} + HttpResponse httpResponse = httpRequest.asJson();{{/isJson}}{{/produces}}{{/hasProduces}}{{^hasProduces}} + HttpResponse httpResponse = httpRequest.asBinary();{{/hasProduces}} + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + {{#examples}}{{#-last}}{{^isArray}} + @Test + public void {{operationId}}TestXml() throws Exception { + String contentType = "application/xml"; + String accept = "application/xml"; + String url = API_URL + "{{path}}"; + HttpRequest httpRequest = Unirest.{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}(url);{{#hasConsumes}} + httpRequest = httpRequest.header("Content-Type", contentType);{{/hasConsumes}}{{#hasProduces}} + httpRequest = httpRequest.header("Accept", accept);{{/hasProduces}}{{#pathParams}} + httpRequest = httpRequest.routeParam("{{paramName}}", "1");{{/pathParams}}{{#queryParams}} + httpRequest = httpRequest.queryString("{{paramName}}", "1");{{/queryParams}} + {{#hasConsumes}}{{#examples}}{{^-first}} + String requestBody = {{>exampleString}}; + httpRequest = ((HttpRequestWithBody) httpRequest).body(requestBody).getHttpRequest(); + {{/-first}}{{/examples}}{{/hasConsumes}} + {{#hasProduces}}{{#produces}}{{#isXml}} + HttpResponse httpResponse = httpRequest.asString();{{/isXml}}{{/produces}}{{/hasProduces}}{{^hasProduces}} + HttpResponse httpResponse = httpRequest.asBinary();{{/hasProduces}} + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + }{{/isArray}}{{/-last}}{{/examples}}{{/camelRestBindingMode}}{{/vendorExtensions}}{{/-first}}{{/examples}}{{/operation}}{{/operations}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-camel-server/validation.mustache b/modules/openapi-generator/src/main/resources/java-camel-server/validation.mustache new file mode 100644 index 000000000000..27aa2ce4ec70 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-camel-server/validation.mustache @@ -0,0 +1,28 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package {{apiPackage}}; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.LoggingLevel; + +@Component +public class {{classname}}Validator extends RouteBuilder { + @Override + public void configure() throws Exception { + onException(Exception.class) + .log(LoggingLevel.ERROR, "${exception.message}: ${exception.stacktrace}") + .handled(true) + .process("{{camelValidationErrorProcessor}}"); + {{#operations}}{{#operation}} + from("direct:validate-{{operationId}}") + .id("validate-{{operationId}}"){{#hasConsumes}} + .to("bean-validator://validate-request"){{/hasConsumes}} + .to("direct:{{operationId}}"){{^hasProduces}};{{/hasProduces}}{{#hasProduces}} + .to("bean-validator://validate-response");{{/hasProduces}} + {{/operation}}{{/operations}} + } +} diff --git a/samples/server/petstore/java-camel/.openapi-generator-ignore b/samples/server/petstore/java-camel/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/java-camel/.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/server/petstore/java-camel/.openapi-generator/FILES b/samples/server/petstore/java-camel/.openapi-generator/FILES new file mode 100644 index 000000000000..4c9d78d30ebe --- /dev/null +++ b/samples/server/petstore/java-camel/.openapi-generator/FILES @@ -0,0 +1,22 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenAPI2SpringBoot.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/RestConfiguration.java +src/main/java/org/openapitools/ValidationErrorProcessor.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiRoutesImpl.java +src/main/java/org/openapitools/api/PetApiValidator.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiRoutesImpl.java +src/main/java/org/openapitools/api/StoreApiValidator.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiRoutesImpl.java +src/main/java/org/openapitools/api/UserApiValidator.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java +src/main/resources/application.properties diff --git a/samples/server/petstore/java-camel/.openapi-generator/VERSION b/samples/server/petstore/java-camel/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/server/petstore/java-camel/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-camel/README.md b/samples/server/petstore/java-camel/README.md new file mode 100644 index 000000000000..e20452e84920 --- /dev/null +++ b/samples/server/petstore/java-camel/README.md @@ -0,0 +1,7 @@ +# OpenAPI generated server + +Apache Camel Server + +```bash +mvn clean test +``` \ No newline at end of file diff --git a/samples/server/petstore/java-camel/pom.xml b/samples/server/petstore/java-camel/pom.xml new file mode 100644 index 000000000000..8391657c52fc --- /dev/null +++ b/samples/server/petstore/java-camel/pom.xml @@ -0,0 +1,185 @@ + + + + 4.0.0 + + org.openapitools + openapi-camel + jar + openapi-camel + 1.0.0 + + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + https://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + 2.6.2 + 3.14.0 + + + + + + org.apache.camel + camel-bom + ${org.apache.camel.version} + pom + import + + + org.apache.camel.springboot + camel-spring-boot-bom + ${org.apache.camel.version} + pom + import + + + org.springframework.boot + spring-boot-dependencies + ${org.springframework.boot.version} + pom + import + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 1.8 + 1.8 + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + maven-surefire-plugin + 2.22.2 + + + + + + + org.apache.camel.springboot + camel-spring-boot-starter + + + + org.apache.camel.springboot + camel-servlet-starter + + + + org.springframework.boot + spring-boot-starter-web + + + + org.openapitools + jackson-databind-nullable + 0.2.1 + + + io.swagger + swagger-annotations + 1.6.3 + + + io.swagger.core.v3 + swagger-annotations + 2.1.11 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + 2.13.0 + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + 2.13.0 + + + org.apache.camel + camel-jackson + + + org.apache.camel + camel-jacksonxml + + + + org.apache.camel + camel-jaxb + + + org.apache.camel + camel-direct + + + + org.apache.camel + camel-bean-validator + + + + + com.mashape.unirest + unirest-java + 1.4.9 + test + + + + org.apache.camel + camel-test-spring-junit5 + test + + + + org.springframework.boot + spring-boot-starter-test + test + + + + \ No newline at end of file diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/OpenAPI2SpringBoot.java new file mode 100644 index 000000000000..7caef40973ef --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -0,0 +1,64 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebMvcConfigurer webConfigurer() { + return new WebMvcConfigurerAdapter() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); + } + }; + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +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.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(); + } + + @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 this; + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java new file mode 100644 index 000000000000..f9273736a2f3 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java @@ -0,0 +1,22 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.model.rest.RestBindingMode; + +@Component +public class RestConfiguration extends RouteBuilder { + @Override + public void configure() throws Exception { + restConfiguration() + .component("servlet") + .bindingMode(RestBindingMode.auto) + .dataFormatProperty("json.out.disableFeatures", "WRITE_DATES_AS_TIMESTAMPS") + .clientRequestValidation(true); + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java new file mode 100644 index 000000000000..d74fcf78d216 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java @@ -0,0 +1,30 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools; + +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.apache.camel.component.bean.validator.BeanValidationException; +import org.springframework.stereotype.Component; +import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; + +@Component("validationErrorProcessor") +public class ValidationErrorProcessor implements Processor { + + @Override + public void process(Exchange exchange) throws Exception { + Exception fault = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); + int httpStatusCode = 500; + if (fault instanceof BeanValidationException) { + httpStatusCode = 400; + } + if (fault instanceof UnrecognizedPropertyException) { + httpStatusCode = 400; + } + exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, httpStatusCode); + exchange.getIn().setBody(fault.getMessage()); + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..01d874fca95f --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,268 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.model.rest.RestParamType; +import org.springframework.stereotype.Component; +import org.openapitools.model.*; +import org.apache.camel.model.rest.RestBindingMode; +import org.apache.camel.LoggingLevel; + +@Component +public class PetApi extends RouteBuilder { + + @Override + public void configure() throws Exception { + onException(Exception.class) + .log(LoggingLevel.ERROR, "${exception.message}: ${exception.stacktrace}") + .handled(true) + .process("validationErrorProcessor"); + + + /** + POST /pet : Add a new pet to the store + **/ + rest() + .securityDefinitions() + .oauth2("petstore_auth") + .flow("implicit") + .authorizationUrl("http://petstore.swagger.io/api/oauth/dialog") + .withScope("write:pets","modify pets in your account") + .withScope("read:pets","read your pets") + + .endSecurityDefinition() + .post("/pet") + .description("Add a new pet to the store") + .id("addPetApi") + .produces("application/xml, application/json") + .outType(Pet.class) + .consumes("application/json, application/xml") + .type(Pet.class) + + .param() + .name("pet") + .type(RestParamType.body) + .required(true) + .description("Pet object that needs to be added to the store") + .endParam() + .to("direct:validate-addPet"); + + + /** + DELETE /pet/{petId} : Deletes a pet + **/ + rest() + .securityDefinitions() + .oauth2("petstore_auth") + .flow("implicit") + .authorizationUrl("http://petstore.swagger.io/api/oauth/dialog") + .withScope("write:pets","modify pets in your account") + .withScope("read:pets","read your pets") + + .endSecurityDefinition() + .delete("/pet/{petId}") + .description("Deletes a pet") + .id("deletePetApi") + .param() + .name("petId") + .type(RestParamType.path) + .required(true) + .description("Pet id to delete") + .endParam() + .param() + .name("apiKey") + .type(RestParamType.header) + .required(false) + .endParam() + .to("direct:validate-deletePet"); + + + /** + GET /pet/findByStatus : Finds Pets by status + **/ + rest() + .securityDefinitions() + .oauth2("petstore_auth") + .flow("implicit") + .authorizationUrl("http://petstore.swagger.io/api/oauth/dialog") + .withScope("read:pets","read your pets") + + .endSecurityDefinition() + .get("/pet/findByStatus") + .description("Finds Pets by status") + .id("findPetsByStatusApi") + .produces("application/xml, application/json") + .outType(Pet[].class) + .param() + .name("status") + .type(RestParamType.query) + .required(true) + .description("Status values that need to be considered for filter") + .endParam() + .to("direct:validate-findPetsByStatus"); + + + /** + GET /pet/findByTags : Finds Pets by tags + **/ + rest() + .securityDefinitions() + .oauth2("petstore_auth") + .flow("implicit") + .authorizationUrl("http://petstore.swagger.io/api/oauth/dialog") + .withScope("read:pets","read your pets") + + .endSecurityDefinition() + .get("/pet/findByTags") + .description("Finds Pets by tags") + .id("findPetsByTagsApi") + .produces("application/xml, application/json") + .outType(Pet[].class) + .param() + .name("tags") + .type(RestParamType.query) + .required(true) + .description("Tags to filter by") + .endParam() + .to("direct:validate-findPetsByTags"); + + + /** + GET /pet/{petId} : Find pet by ID + **/ + rest() + .securityDefinitions() + .apiKey("api_key") + .withHeader("api_key") + + .endSecurityDefinition() + .get("/pet/{petId}") + .description("Find pet by ID") + .id("getPetByIdApi") + .produces("application/xml, application/json") + .outType(Pet.class) + .param() + .name("petId") + .type(RestParamType.path) + .required(true) + .description("ID of pet to return") + .endParam() + .to("direct:validate-getPetById"); + + + /** + PUT /pet : Update an existing pet + **/ + rest() + .securityDefinitions() + .oauth2("petstore_auth") + .flow("implicit") + .authorizationUrl("http://petstore.swagger.io/api/oauth/dialog") + .withScope("write:pets","modify pets in your account") + .withScope("read:pets","read your pets") + + .endSecurityDefinition() + .put("/pet") + .description("Update an existing pet") + .id("updatePetApi") + .produces("application/xml, application/json") + .outType(Pet.class) + .consumes("application/json, application/xml") + .type(Pet.class) + + .param() + .name("pet") + .type(RestParamType.body) + .required(true) + .description("Pet object that needs to be added to the store") + .endParam() + .to("direct:validate-updatePet"); + + + /** + POST /pet/{petId} : Updates a pet in the store with form data + **/ + rest() + .securityDefinitions() + .oauth2("petstore_auth") + .flow("implicit") + .authorizationUrl("http://petstore.swagger.io/api/oauth/dialog") + .withScope("write:pets","modify pets in your account") + .withScope("read:pets","read your pets") + + .endSecurityDefinition() + .post("/pet/{petId}") + .description("Updates a pet in the store with form data") + .id("updatePetWithFormApi") + .clientRequestValidation(false) + .bindingMode(RestBindingMode.off) + .consumes("application/x-www-form-urlencoded") + + .param() + .name("petId") + .type(RestParamType.path) + .required(true) + .description("ID of pet that needs to be updated") + .endParam() + .param() + .name("name") + .type(RestParamType.formData) + .required(false) + .description("Updated name of the pet") + .endParam() + .param() + .name("status") + .type(RestParamType.formData) + .required(false) + .description("Updated status of the pet") + .endParam() + .to("direct:validate-updatePetWithForm"); + + + /** + POST /pet/{petId}/uploadImage : uploads an image + **/ + rest() + .securityDefinitions() + .oauth2("petstore_auth") + .flow("implicit") + .authorizationUrl("http://petstore.swagger.io/api/oauth/dialog") + .withScope("write:pets","modify pets in your account") + .withScope("read:pets","read your pets") + + .endSecurityDefinition() + .post("/pet/{petId}/uploadImage") + .description("uploads an image") + .id("uploadFileApi") + .clientRequestValidation(false) + .bindingMode(RestBindingMode.off) + .produces("application/json") + .outType(ModelApiResponse.class) + .consumes("multipart/form-data") + + .param() + .name("petId") + .type(RestParamType.path) + .required(true) + .description("ID of pet to update") + .endParam() + .param() + .name("additionalMetadata") + .type(RestParamType.formData) + .required(false) + .description("Additional data to pass to server") + .endParam() + .param() + .name("file") + .type(RestParamType.formData) + .required(false) + .description("file to upload") + .endParam() + .to("direct:validate-uploadFile"); + + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java new file mode 100644 index 000000000000..65de1c7c3d5b --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java @@ -0,0 +1,112 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.LoggingLevel; +import org.openapitools.model.*; +import org.apache.camel.model.dataformat.JsonLibrary; + +@Component +public class PetApiRoutesImpl extends RouteBuilder { + @Override + public void configure() throws Exception { + + /** + POST /pet : Add a new pet to the store + **/ + from("direct:addPet") + .id("addPet") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }")) + .unmarshal().json(JsonLibrary.Jackson, Pet.class); + /** + DELETE /pet/{petId} : Deletes a pet + **/ + from("direct:deletePet") + .id("deletePet") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + GET /pet/findByStatus : Finds Pets by status + **/ + from("direct:findPetsByStatus") + .id("findPetsByStatus") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("[{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }]")) + .unmarshal().json(JsonLibrary.Jackson, Pet[].class); + /** + GET /pet/findByTags : Finds Pets by tags + **/ + from("direct:findPetsByTags") + .id("findPetsByTags") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("[{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }]")) + .unmarshal().json(JsonLibrary.Jackson, Pet[].class); + /** + GET /pet/{petId} : Find pet by ID + **/ + from("direct:getPetById") + .id("getPetById") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }")) + .unmarshal().json(JsonLibrary.Jackson, Pet.class); + /** + PUT /pet : Update an existing pet + **/ + from("direct:updatePet") + .id("updatePet") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }")) + .unmarshal().json(JsonLibrary.Jackson, Pet.class); + /** + POST /pet/{petId} : Updates a pet in the store with form data + **/ + from("direct:updatePetWithForm") + .id("updatePetWithForm") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + POST /pet/{petId}/uploadImage : uploads an image + **/ + from("direct:uploadFile") + .id("uploadFile") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }")) + .unmarshal().json(JsonLibrary.Jackson, ModelApiResponse.class); + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java new file mode 100644 index 000000000000..f32d4c7d2d85 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java @@ -0,0 +1,64 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.LoggingLevel; + +@Component +public class PetApiValidator extends RouteBuilder { + @Override + public void configure() throws Exception { + onException(Exception.class) + .log(LoggingLevel.ERROR, "${exception.message}: ${exception.stacktrace}") + .handled(true) + .process("validationErrorProcessor"); + + from("direct:validate-addPet") + .id("validate-addPet") + .to("bean-validator://validate-request") + .to("direct:addPet") + .to("bean-validator://validate-response"); + + from("direct:validate-deletePet") + .id("validate-deletePet") + .to("direct:deletePet"); + + from("direct:validate-findPetsByStatus") + .id("validate-findPetsByStatus") + .to("direct:findPetsByStatus") + .to("bean-validator://validate-response"); + + from("direct:validate-findPetsByTags") + .id("validate-findPetsByTags") + .to("direct:findPetsByTags") + .to("bean-validator://validate-response"); + + from("direct:validate-getPetById") + .id("validate-getPetById") + .to("direct:getPetById") + .to("bean-validator://validate-response"); + + from("direct:validate-updatePet") + .id("validate-updatePet") + .to("bean-validator://validate-request") + .to("direct:updatePet") + .to("bean-validator://validate-response"); + + from("direct:validate-updatePetWithForm") + .id("validate-updatePetWithForm") + .to("bean-validator://validate-request") + .to("direct:updatePetWithForm"); + + from("direct:validate-uploadFile") + .id("validate-uploadFile") + .to("bean-validator://validate-request") + .to("direct:uploadFile") + .to("bean-validator://validate-response"); + + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..55d8651439e3 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,97 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.model.rest.RestParamType; +import org.springframework.stereotype.Component; +import org.openapitools.model.*; +import org.apache.camel.model.rest.RestBindingMode; +import org.apache.camel.LoggingLevel; + +@Component +public class StoreApi extends RouteBuilder { + + @Override + public void configure() throws Exception { + onException(Exception.class) + .log(LoggingLevel.ERROR, "${exception.message}: ${exception.stacktrace}") + .handled(true) + .process("validationErrorProcessor"); + + + /** + DELETE /store/order/{orderId} : Delete purchase order by ID + **/ + rest() + .delete("/store/order/{orderId}") + .description("Delete purchase order by ID") + .id("deleteOrderApi") + .param() + .name("orderId") + .type(RestParamType.path) + .required(true) + .description("ID of the order that needs to be deleted") + .endParam() + .to("direct:validate-deleteOrder"); + + + /** + GET /store/inventory : Returns pet inventories by status + **/ + rest() + .securityDefinitions() + .apiKey("api_key") + .withHeader("api_key") + + .endSecurityDefinition() + .get("/store/inventory") + .description("Returns pet inventories by status") + .id("getInventoryApi") + .produces("application/json") + .to("direct:validate-getInventory"); + + + /** + GET /store/order/{orderId} : Find purchase order by ID + **/ + rest() + .get("/store/order/{orderId}") + .description("Find purchase order by ID") + .id("getOrderByIdApi") + .produces("application/xml, application/json") + .outType(Order.class) + .param() + .name("orderId") + .type(RestParamType.path) + .required(true) + .description("ID of pet that needs to be fetched") + .endParam() + .to("direct:validate-getOrderById"); + + + /** + POST /store/order : Place an order for a pet + **/ + rest() + .post("/store/order") + .description("Place an order for a pet") + .id("placeOrderApi") + .produces("application/xml, application/json") + .outType(Order.class) + .consumes("application/json") + .type(Order.class) + + .param() + .name("order") + .type(RestParamType.body) + .required(true) + .description("order placed for purchasing the pet") + .endParam() + .to("direct:validate-placeOrder"); + + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java new file mode 100644 index 000000000000..c9fd610e3f2f --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java @@ -0,0 +1,64 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.LoggingLevel; +import org.openapitools.model.*; +import org.apache.camel.model.dataformat.JsonLibrary; + +@Component +public class StoreApiRoutesImpl extends RouteBuilder { + @Override + public void configure() throws Exception { + + /** + DELETE /store/order/{orderId} : Delete purchase order by ID + **/ + from("direct:deleteOrder") + .id("deleteOrder") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + GET /store/inventory : Returns pet inventories by status + **/ + from("direct:getInventory") + .id("getInventory") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + GET /store/order/{orderId} : Find purchase order by ID + **/ + from("direct:getOrderById") + .id("getOrderById") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }")) + .unmarshal().json(JsonLibrary.Jackson, Order.class); + /** + POST /store/order : Place an order for a pet + **/ + from("direct:placeOrder") + .id("placeOrder") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }")) + .unmarshal().json(JsonLibrary.Jackson, Order.class); + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java new file mode 100644 index 000000000000..ce6ad8207104 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java @@ -0,0 +1,42 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.LoggingLevel; + +@Component +public class StoreApiValidator extends RouteBuilder { + @Override + public void configure() throws Exception { + onException(Exception.class) + .log(LoggingLevel.ERROR, "${exception.message}: ${exception.stacktrace}") + .handled(true) + .process("validationErrorProcessor"); + + from("direct:validate-deleteOrder") + .id("validate-deleteOrder") + .to("direct:deleteOrder"); + + from("direct:validate-getInventory") + .id("validate-getInventory") + .to("direct:getInventory") + .to("bean-validator://validate-response"); + + from("direct:validate-getOrderById") + .id("validate-getOrderById") + .to("direct:getOrderById") + .to("bean-validator://validate-response"); + + from("direct:validate-placeOrder") + .id("validate-placeOrder") + .to("bean-validator://validate-request") + .to("direct:placeOrder") + .to("bean-validator://validate-response"); + + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..3babbf719cc2 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,206 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.model.rest.RestParamType; +import org.springframework.stereotype.Component; +import org.openapitools.model.*; +import org.apache.camel.model.rest.RestBindingMode; +import org.apache.camel.LoggingLevel; + +@Component +public class UserApi extends RouteBuilder { + + @Override + public void configure() throws Exception { + onException(Exception.class) + .log(LoggingLevel.ERROR, "${exception.message}: ${exception.stacktrace}") + .handled(true) + .process("validationErrorProcessor"); + + + /** + POST /user : Create user + **/ + rest() + .securityDefinitions() + .apiKey("api_key") + .withHeader("api_key") + + .endSecurityDefinition() + .post("/user") + .description("Create user") + .id("createUserApi") + .consumes("application/json") + .type(User.class) + + .param() + .name("user") + .type(RestParamType.body) + .required(true) + .description("Created user object") + .endParam() + .to("direct:validate-createUser"); + + + /** + POST /user/createWithArray : Creates list of users with given input array + **/ + rest() + .securityDefinitions() + .apiKey("api_key") + .withHeader("api_key") + + .endSecurityDefinition() + .post("/user/createWithArray") + .description("Creates list of users with given input array") + .id("createUsersWithArrayInputApi") + .consumes("application/json") + .type(User[].class) + + .param() + .name("user") + .type(RestParamType.body) + .required(true) + .description("List of user object") + .endParam() + .to("direct:validate-createUsersWithArrayInput"); + + + /** + POST /user/createWithList : Creates list of users with given input array + **/ + rest() + .securityDefinitions() + .apiKey("api_key") + .withHeader("api_key") + + .endSecurityDefinition() + .post("/user/createWithList") + .description("Creates list of users with given input array") + .id("createUsersWithListInputApi") + .consumes("application/json") + .type(User[].class) + + .param() + .name("user") + .type(RestParamType.body) + .required(true) + .description("List of user object") + .endParam() + .to("direct:validate-createUsersWithListInput"); + + + /** + DELETE /user/{username} : Delete user + **/ + rest() + .securityDefinitions() + .apiKey("api_key") + .withHeader("api_key") + + .endSecurityDefinition() + .delete("/user/{username}") + .description("Delete user") + .id("deleteUserApi") + .param() + .name("username") + .type(RestParamType.path) + .required(true) + .description("The name that needs to be deleted") + .endParam() + .to("direct:validate-deleteUser"); + + + /** + GET /user/{username} : Get user by user name + **/ + rest() + .get("/user/{username}") + .description("Get user by user name") + .id("getUserByNameApi") + .produces("application/xml, application/json") + .outType(User.class) + .param() + .name("username") + .type(RestParamType.path) + .required(true) + .description("The name that needs to be fetched. Use user1 for testing.") + .endParam() + .to("direct:validate-getUserByName"); + + + /** + GET /user/login : Logs user into the system + **/ + rest() + .get("/user/login") + .description("Logs user into the system") + .id("loginUserApi") + .produces("application/xml, application/json") + .outType(String.class) + .param() + .name("username") + .type(RestParamType.query) + .required(true) + .description("The user name for login") + .endParam() + .param() + .name("password") + .type(RestParamType.query) + .required(true) + .description("The password for login in clear text") + .endParam() + .to("direct:validate-loginUser"); + + + /** + GET /user/logout : Logs out current logged in user session + **/ + rest() + .securityDefinitions() + .apiKey("api_key") + .withHeader("api_key") + + .endSecurityDefinition() + .get("/user/logout") + .description("Logs out current logged in user session") + .id("logoutUserApi") + .to("direct:validate-logoutUser"); + + + /** + PUT /user/{username} : Updated user + **/ + rest() + .securityDefinitions() + .apiKey("api_key") + .withHeader("api_key") + + .endSecurityDefinition() + .put("/user/{username}") + .description("Updated user") + .id("updateUserApi") + .consumes("application/json") + .type(User.class) + + .param() + .name("username") + .type(RestParamType.path) + .required(true) + .description("name that need to be deleted") + .endParam() + .param() + .name("user") + .type(RestParamType.body) + .required(true) + .description("Updated user object") + .endParam() + .to("direct:validate-updateUser"); + + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java new file mode 100644 index 000000000000..b2fd13058a0a --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java @@ -0,0 +1,102 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.LoggingLevel; +import org.openapitools.model.*; +import org.apache.camel.model.dataformat.JsonLibrary; + +@Component +public class UserApiRoutesImpl extends RouteBuilder { + @Override + public void configure() throws Exception { + + /** + POST /user : Create user + **/ + from("direct:createUser") + .id("createUser") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + POST /user/createWithArray : Creates list of users with given input array + **/ + from("direct:createUsersWithArrayInput") + .id("createUsersWithArrayInput") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + POST /user/createWithList : Creates list of users with given input array + **/ + from("direct:createUsersWithListInput") + .id("createUsersWithListInput") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + DELETE /user/{username} : Delete user + **/ + from("direct:deleteUser") + .id("deleteUser") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + GET /user/{username} : Get user by user name + **/ + from("direct:getUserByName") + .id("getUserByName") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}") + .setBody(constant("{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }")) + .unmarshal().json(JsonLibrary.Jackson, User.class); + /** + GET /user/login : Logs user into the system + **/ + from("direct:loginUser") + .id("loginUser") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + GET /user/logout : Logs out current logged in user session + **/ + from("direct:logoutUser") + .id("logoutUser") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + /** + PUT /user/{username} : Updated user + **/ + from("direct:updateUser") + .id("updateUser") + .choice() + .when(simple("${body} != null")) + .log(LoggingLevel.INFO, "BODY TYPE: ${body.getClass().getName()}") + .end() + .log(LoggingLevel.INFO, "HEADERS: ${headers}"); + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java new file mode 100644 index 000000000000..da259ae0c537 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java @@ -0,0 +1,60 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; +import org.apache.camel.LoggingLevel; + +@Component +public class UserApiValidator extends RouteBuilder { + @Override + public void configure() throws Exception { + onException(Exception.class) + .log(LoggingLevel.ERROR, "${exception.message}: ${exception.stacktrace}") + .handled(true) + .process("validationErrorProcessor"); + + from("direct:validate-createUser") + .id("validate-createUser") + .to("bean-validator://validate-request") + .to("direct:createUser"); + + from("direct:validate-createUsersWithArrayInput") + .id("validate-createUsersWithArrayInput") + .to("bean-validator://validate-request") + .to("direct:createUsersWithArrayInput"); + + from("direct:validate-createUsersWithListInput") + .id("validate-createUsersWithListInput") + .to("bean-validator://validate-request") + .to("direct:createUsersWithListInput"); + + from("direct:validate-deleteUser") + .id("validate-deleteUser") + .to("direct:deleteUser"); + + from("direct:validate-getUserByName") + .id("validate-getUserByName") + .to("direct:getUserByName") + .to("bean-validator://validate-response"); + + from("direct:validate-loginUser") + .id("validate-loginUser") + .to("direct:loginUser") + .to("bean-validator://validate-response"); + + from("direct:validate-logoutUser") + .id("validate-logoutUser") + .to("direct:logoutUser"); + + from("direct:validate-updateUser") + .id("validate-updateUser") + .to("bean-validator://validate-request") + .to("direct:updateUser"); + + } +} diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..b5835986beca --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,117 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import org.hibernate.validator.constraints.*; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.*; + +import java.util.*; + +/** + * A category for a pet + */ +@Schema(name = "Category",description = "A category for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Category") +@XmlRootElement(name = "Category") +@XmlAccessorType(XmlAccessType.FIELD) +public class Category { + @JsonProperty("id") + @JacksonXmlProperty(localName = "id") + private Long id; + + @JsonProperty("name") + @JacksonXmlProperty(localName = "name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + +@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + 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/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..4029a7a8be32 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,143 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import org.hibernate.validator.constraints.*; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.*; + +import java.util.*; + +/** + * Describes the result of uploading an image resource + */ +@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "ModelApiResponse") +@XmlRootElement(name = "ModelApiResponse") +@XmlAccessorType(XmlAccessType.FIELD) +public class ModelApiResponse { + @JsonProperty("code") + @JacksonXmlProperty(localName = "code") + private Integer code; + + @JsonProperty("type") + @JacksonXmlProperty(localName = "type") + private String type; + + @JsonProperty("message") + @JacksonXmlProperty(localName = "message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @Schema(name = "code", defaultValue = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Schema(name = "type", defaultValue = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @Schema(name = "message", defaultValue = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..50fc948d4d59 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,262 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Date; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import org.hibernate.validator.constraints.*; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.*; + +import java.util.*; + +/** + * An order for a pets from the pet store + */ +@Schema(name = "Order",description = "An order for a pets from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Order") +@XmlRootElement(name = "Order") +@XmlAccessorType(XmlAccessType.FIELD) +public class Order { + @JsonProperty("id") + @JacksonXmlProperty(localName = "id") + private Long id; + + @JsonProperty("petId") + @JacksonXmlProperty(localName = "petId") + private Long petId; + + @JsonProperty("quantity") + @JacksonXmlProperty(localName = "quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @JacksonXmlProperty(localName = "shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private Date shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private StatusEnum status; + + @JsonProperty("complete") + @JacksonXmlProperty(localName = "complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @Schema(name = "petId", defaultValue = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @Schema(name = "quantity", defaultValue = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(Date shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Schema(name = "shipDate", defaultValue = "") + + @Valid + + public Date getShipDate() { + return shipDate; + } + + public void setShipDate(Date shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @Schema(name = "status", defaultValue = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @Schema(name = "complete", defaultValue = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..04fe97643f6e --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,282 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import org.hibernate.validator.constraints.*; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.*; + +import java.util.*; + +/** + * A pet for sale in the pet store + */ +@Schema(name = "Pet",description = "A pet for sale in the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Pet") +@XmlRootElement(name = "Pet") +@XmlAccessorType(XmlAccessType.FIELD) +public class Pet { + @JsonProperty("id") + @JacksonXmlProperty(localName = "id") + private Long id; + + @JsonProperty("category") + @JacksonXmlProperty(localName = "category") + private Category category; + + @JsonProperty("name") + @JacksonXmlProperty(localName = "name") + private String name; + + @JsonProperty("photoUrls") + @JacksonXmlProperty(localName = "photoUrl") + @Valid + private List photoUrls = new ArrayList(); + + @JsonProperty("tags") + @JacksonXmlProperty(localName = "tag") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Schema(name = "category", defaultValue = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Schema(name = "name", example = "doggie", required = true, defaultValue = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + 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 + */ + @Schema(name = "photoUrls", required = true, defaultValue = "") + @NotNull + + + 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 + */ + @Schema(name = "tags", defaultValue = "") + + @Valid + + 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 + */ + @Schema(name = "status", defaultValue = "pet status in the store") + + + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..1c26d8799952 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,117 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import org.hibernate.validator.constraints.*; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.*; + +import java.util.*; + +/** + * A tag for a pet + */ +@Schema(name = "Tag",description = "A tag for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Tag") +@XmlRootElement(name = "Tag") +@XmlAccessorType(XmlAccessType.FIELD) +public class Tag { + @JsonProperty("id") + @JacksonXmlProperty(localName = "id") + private Long id; + + @JsonProperty("name") + @JacksonXmlProperty(localName = "name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + 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 + */ + @Schema(name = "name", defaultValue = "") + + + 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/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..e6943a48f328 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,273 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import org.hibernate.validator.constraints.*; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.xml.bind.annotation.*; + +import java.util.*; + +/** + * A User who is purchasing from the pet store + */ +@Schema(name = "User",description = "A User who is purchasing from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "User") +@XmlRootElement(name = "User") +@XmlAccessorType(XmlAccessType.FIELD) +public class User { + @JsonProperty("id") + @JacksonXmlProperty(localName = "id") + private Long id; + + @JsonProperty("username") + @JacksonXmlProperty(localName = "username") + private String username; + + @JsonProperty("firstName") + @JacksonXmlProperty(localName = "firstName") + private String firstName; + + @JsonProperty("lastName") + @JacksonXmlProperty(localName = "lastName") + private String lastName; + + @JsonProperty("email") + @JacksonXmlProperty(localName = "email") + private String email; + + @JsonProperty("password") + @JacksonXmlProperty(localName = "password") + private String password; + + @JsonProperty("phone") + @JacksonXmlProperty(localName = "phone") + private String phone; + + @JsonProperty("userStatus") + @JacksonXmlProperty(localName = "userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @Schema(name = "id", defaultValue = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @Schema(name = "username", defaultValue = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @Schema(name = "firstName", defaultValue = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @Schema(name = "lastName", defaultValue = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @Schema(name = "email", defaultValue = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @Schema(name = "password", defaultValue = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @Schema(name = "phone", defaultValue = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @Schema(name = "userStatus", defaultValue = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-camel/src/main/resources/application.properties b/samples/server/petstore/java-camel/src/main/resources/application.properties new file mode 100644 index 000000000000..36cdb9894176 --- /dev/null +++ b/samples/server/petstore/java-camel/src/main/resources/application.properties @@ -0,0 +1,8 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +# https://openapi-generator.tech +# Do not edit the class manually. + +camel.springboot.name=camel-openapi-camel +camel.servlet.mapping.context-path=/api/v1/* + +server.port=8080 \ No newline at end of file diff --git a/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/PetApiTest.java b/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/PetApiTest.java new file mode 100644 index 000000000000..d02598dd1cc6 --- /dev/null +++ b/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/PetApiTest.java @@ -0,0 +1,145 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.junit.jupiter.api.Test; +import org.apache.camel.test.spring.junit5.CamelSpringBootTest; +import org.springframework.boot.test.context.SpringBootTest; +import com.mashape.unirest.request.HttpRequest; +import com.mashape.unirest.request.HttpRequestWithBody; +import com.mashape.unirest.http.Unirest; +import com.mashape.unirest.http.JsonNode; +import com.mashape.unirest.http.HttpResponse; +import java.io.InputStream; +import org.junit.jupiter.api.Assertions; + +@CamelSpringBootTest +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +public class PetApiTest { + private static final String API_URL = "http://127.0.0.1:8080/api/v1"; + + @Test + public void addPetTestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "/pet"; + HttpRequest httpRequest = Unirest.post(url); + httpRequest = httpRequest.header("Content-Type", contentType); + httpRequest = httpRequest.header("Accept", accept); + + String requestBody = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + httpRequest = ((HttpRequestWithBody) httpRequest).body(requestBody).getHttpRequest(); + + + HttpResponse httpResponse = httpRequest.asJson(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + + @Test + public void addPetTestXml() throws Exception { + String contentType = "application/xml"; + String accept = "application/xml"; + String url = API_URL + "/pet"; + HttpRequest httpRequest = Unirest.post(url); + httpRequest = httpRequest.header("Content-Type", contentType); + httpRequest = httpRequest.header("Accept", accept); + + String requestBody = " 123456789 doggie aeiou aeiou "; + httpRequest = ((HttpRequestWithBody) httpRequest).body(requestBody).getHttpRequest(); + + + HttpResponse httpResponse = httpRequest.asString(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + @Test + public void findPetsByStatusTestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "/pet/findByStatus"; + HttpRequest httpRequest = Unirest.get(url); + httpRequest = httpRequest.header("Accept", accept); + httpRequest = httpRequest.queryString("status", "1"); + + + HttpResponse httpResponse = httpRequest.asJson(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + + @Test + public void findPetsByTagsTestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "/pet/findByTags"; + HttpRequest httpRequest = Unirest.get(url); + httpRequest = httpRequest.header("Accept", accept); + httpRequest = httpRequest.queryString("tags", "1"); + + + HttpResponse httpResponse = httpRequest.asJson(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + + @Test + public void getPetByIdTestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "/pet/{petId}"; + HttpRequest httpRequest = Unirest.get(url); + httpRequest = httpRequest.header("Accept", accept); + httpRequest = httpRequest.routeParam("petId", "1"); + + + HttpResponse httpResponse = httpRequest.asJson(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + + @Test + public void getPetByIdTestXml() throws Exception { + String contentType = "application/xml"; + String accept = "application/xml"; + String url = API_URL + "/pet/{petId}"; + HttpRequest httpRequest = Unirest.get(url); + httpRequest = httpRequest.header("Accept", accept); + httpRequest = httpRequest.routeParam("petId", "1"); + + + HttpResponse httpResponse = httpRequest.asString(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + @Test + public void updatePetTestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "/pet"; + HttpRequest httpRequest = Unirest.put(url); + httpRequest = httpRequest.header("Content-Type", contentType); + httpRequest = httpRequest.header("Accept", accept); + + String requestBody = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + httpRequest = ((HttpRequestWithBody) httpRequest).body(requestBody).getHttpRequest(); + + + HttpResponse httpResponse = httpRequest.asJson(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + + @Test + public void updatePetTestXml() throws Exception { + String contentType = "application/xml"; + String accept = "application/xml"; + String url = API_URL + "/pet"; + HttpRequest httpRequest = Unirest.put(url); + httpRequest = httpRequest.header("Content-Type", contentType); + httpRequest = httpRequest.header("Accept", accept); + + String requestBody = " 123456789 doggie aeiou aeiou "; + httpRequest = ((HttpRequestWithBody) httpRequest).body(requestBody).getHttpRequest(); + + + HttpResponse httpResponse = httpRequest.asString(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/StoreApiTest.java new file mode 100644 index 000000000000..f2d137065b79 --- /dev/null +++ b/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/StoreApiTest.java @@ -0,0 +1,84 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.junit.jupiter.api.Test; +import org.apache.camel.test.spring.junit5.CamelSpringBootTest; +import org.springframework.boot.test.context.SpringBootTest; +import com.mashape.unirest.request.HttpRequest; +import com.mashape.unirest.request.HttpRequestWithBody; +import com.mashape.unirest.http.Unirest; +import com.mashape.unirest.http.JsonNode; +import com.mashape.unirest.http.HttpResponse; +import java.io.InputStream; +import org.junit.jupiter.api.Assertions; + +@CamelSpringBootTest +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +public class StoreApiTest { + private static final String API_URL = "http://127.0.0.1:8080/api/v1"; + + @Test + public void getOrderByIdTestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "/store/order/{orderId}"; + HttpRequest httpRequest = Unirest.get(url); + httpRequest = httpRequest.header("Accept", accept); + httpRequest = httpRequest.routeParam("orderId", "1"); + + + HttpResponse httpResponse = httpRequest.asJson(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + + @Test + public void getOrderByIdTestXml() throws Exception { + String contentType = "application/xml"; + String accept = "application/xml"; + String url = API_URL + "/store/order/{orderId}"; + HttpRequest httpRequest = Unirest.get(url); + httpRequest = httpRequest.header("Accept", accept); + httpRequest = httpRequest.routeParam("orderId", "1"); + + + HttpResponse httpResponse = httpRequest.asString(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + @Test + public void placeOrderTestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "/store/order"; + HttpRequest httpRequest = Unirest.post(url); + httpRequest = httpRequest.header("Content-Type", contentType); + httpRequest = httpRequest.header("Accept", accept); + + String requestBody = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + httpRequest = ((HttpRequestWithBody) httpRequest).body(requestBody).getHttpRequest(); + + + HttpResponse httpResponse = httpRequest.asJson(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + + @Test + public void placeOrderTestXml() throws Exception { + String contentType = "application/xml"; + String accept = "application/xml"; + String url = API_URL + "/store/order"; + HttpRequest httpRequest = Unirest.post(url); + httpRequest = httpRequest.header("Content-Type", contentType); + httpRequest = httpRequest.header("Accept", accept); + + String requestBody = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + httpRequest = ((HttpRequestWithBody) httpRequest).body(requestBody).getHttpRequest(); + + + HttpResponse httpResponse = httpRequest.asString(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/UserApiTest.java b/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/UserApiTest.java new file mode 100644 index 000000000000..c278b12de3b1 --- /dev/null +++ b/samples/server/petstore/java-camel/src/test/java/org/openapitools/api/UserApiTest.java @@ -0,0 +1,51 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.api; + +import org.junit.jupiter.api.Test; +import org.apache.camel.test.spring.junit5.CamelSpringBootTest; +import org.springframework.boot.test.context.SpringBootTest; +import com.mashape.unirest.request.HttpRequest; +import com.mashape.unirest.request.HttpRequestWithBody; +import com.mashape.unirest.http.Unirest; +import com.mashape.unirest.http.JsonNode; +import com.mashape.unirest.http.HttpResponse; +import java.io.InputStream; +import org.junit.jupiter.api.Assertions; + +@CamelSpringBootTest +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +public class UserApiTest { + private static final String API_URL = "http://127.0.0.1:8080/api/v1"; + + @Test + public void getUserByNameTestJson() throws Exception { + String contentType = "application/json"; + String accept = "application/json"; + String url = API_URL + "/user/{username}"; + HttpRequest httpRequest = Unirest.get(url); + httpRequest = httpRequest.header("Accept", accept); + httpRequest = httpRequest.routeParam("username", "1"); + + + HttpResponse httpResponse = httpRequest.asJson(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } + + @Test + public void getUserByNameTestXml() throws Exception { + String contentType = "application/xml"; + String accept = "application/xml"; + String url = API_URL + "/user/{username}"; + HttpRequest httpRequest = Unirest.get(url); + httpRequest = httpRequest.header("Accept", accept); + httpRequest = httpRequest.routeParam("username", "1"); + + + HttpResponse httpResponse = httpRequest.asString(); + Assertions.assertTrue(httpResponse.getStatus() < 400 || httpResponse.getStatus() == 415); + } +} \ No newline at end of file From 3e8dc31ec5a2590ab348e801f2d386c7f398fcb2 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 13 Jan 2022 01:49:52 +0800 Subject: [PATCH 089/175] update samples --- samples/client/petstore/c/include/list.h | 4 ++-- .../kotlin-array-simple-string/.openapi-generator/FILES | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/c/include/list.h b/samples/client/petstore/c/include/list.h index 06c1740dc119..96c5832b02b4 100644 --- a/samples/client/petstore/c/include/list.h +++ b/samples/client/petstore/c/include/list.h @@ -23,8 +23,8 @@ typedef struct list_t { #define list_ForEach(element, list) for(element = (list != NULL) ? (list)->firstEntry : NULL; element != NULL; element = element->nextListEntry) -list_t* list_creatList(); -void list_freeList(list_t* listToFree); +list_t* List(); +void list_freeListList(list_t* listToFree); void list_addElement(list_t* list, void* dataToAddInList); listEntry_t* list_getElementAt(list_t *list, long indexOfElement); diff --git a/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES index 97e668afe5ff..d731beb9d87a 100644 --- a/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md build.gradle docs/DefaultApi.md From dff3944d19a3f409680d2c61c235b7a0803fdb81 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 13 Jan 2022 18:16:48 +0800 Subject: [PATCH 090/175] update doc --- docs/generators/java-camel.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 0f2631991b6b..8d50c8799385 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -1,8 +1,18 @@ --- -title: Config Options for java-camel -sidebar_label: java-camel +title: Documentation for the java-camel Generator --- +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-camel | pass this to the generate command after -g | +| generator stability | STABLE | | +| generator type | SERVER | | +| generator language | Java | | +| helpTxt | Generates a camel server. | | + +## 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. | Option | Description | Values | Default | From 7129cdebc5524fb2516822d33b4d2000096cb72b Mon Sep 17 00:00:00 2001 From: Bodo Graumann Date: Thu, 13 Jan 2022 17:06:04 +0100 Subject: [PATCH 091/175] [typescript] Make module usable with esbuild (#11298) * Use default import from url-parse * Update samples * Fix typo in readme --- README.md | 2 +- .../src/main/resources/typescript/http/http.mustache | 4 +--- .../src/main/resources/typescript/package.mustache | 3 ++- .../src/main/resources/typescript/tsconfig.mustache | 3 +++ .../petstore/typescript/builds/composed-schemas/http/http.ts | 4 +--- .../petstore/typescript/builds/composed-schemas/package.json | 3 ++- .../petstore/typescript/builds/composed-schemas/tsconfig.json | 3 +++ .../client/petstore/typescript/builds/default/http/http.ts | 4 +--- .../client/petstore/typescript/builds/default/package.json | 3 ++- .../client/petstore/typescript/builds/default/tsconfig.json | 3 +++ .../client/petstore/typescript/builds/inversify/http/http.ts | 4 +--- .../client/petstore/typescript/builds/inversify/package.json | 3 ++- .../client/petstore/typescript/builds/inversify/tsconfig.json | 3 +++ .../client/petstore/typescript/builds/jquery/http/http.ts | 4 +--- .../client/petstore/typescript/builds/jquery/package.json | 3 ++- .../client/petstore/typescript/builds/jquery/tsconfig.json | 3 +++ .../petstore/typescript/builds/object_params/http/http.ts | 4 +--- .../petstore/typescript/builds/object_params/package.json | 3 ++- .../petstore/typescript/builds/object_params/tsconfig.json | 3 +++ 19 files changed, 37 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index e526479d1275..87f37c8ca490 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
-[![Stable releaases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) [![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator) +[![Stable releases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) [![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
diff --git a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache index 2f71d86109f2..c3a83a84d6e5 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache @@ -7,9 +7,7 @@ import { URLSearchParams } from 'url'; {{/platforms}} {{#platforms}} {{^deno}} -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; {{/deno}} {{/platforms}} import { Observable, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{extensionForDeno}}'{{/useRxJS}}; diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index 807989026b14..e775b345eeef 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -51,7 +51,8 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig":{ diff --git a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache index 011a217eb063..6e3bd9bb349e 100644 --- a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts index f19e206b19ff..4a69a7f7f184 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts @@ -1,6 +1,4 @@ -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './isomorphic-fetch'; diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json index 1605e85eb131..78d313bd12e5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json @@ -22,6 +22,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json index 6576215ef877..68bff46d308f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts index a623aef12789..a380003eb6df 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts @@ -1,9 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './isomorphic-fetch'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/package.json b/samples/openapi3/client/petstore/typescript/builds/default/package.json index f26767636102..830fc2abb289 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/package.json @@ -26,6 +26,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json index 3ada5c62a9f2..1fd524c47e3a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts index a623aef12789..a380003eb6df 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts @@ -1,9 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './isomorphic-fetch'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json index 71908ad48cae..4102c747f786 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json @@ -27,6 +27,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json index c09901ad10fb..ec234242c2e6 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts index 4b9ef54beeb5..d48c69e9781c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts @@ -1,6 +1,4 @@ -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './jquery'; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json index 7c35bc6c6dd3..aed6c6e9f952 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json @@ -23,6 +23,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json index 6576215ef877..68bff46d308f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts index a623aef12789..a380003eb6df 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts @@ -1,9 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './isomorphic-fetch'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json index f26767636102..830fc2abb289 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json @@ -26,6 +26,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json index 3ada5c62a9f2..1fd524c47e3a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", From 759883f804f0da49855f39b65e892fa6cf918e0e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 14 Jan 2022 01:08:22 +0800 Subject: [PATCH 092/175] minor enhancements to java camel generator (#11296) --- README.md | 3 ++- docs/generators/java-camel.md | 2 +- .../languages/JavaCamelServerCodegen.java | 24 ++++++++++++++++++- pom.xml | 11 +++++---- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 87f37c8ca490..24298b5ab1a4 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0, .NET 5.0. Libraries: RestSharp, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) | -| **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) | +| **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) | | **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** | | **Configuration files** | [**Apache2**](https://httpd.apache.org/) | | **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** | @@ -964,6 +964,7 @@ Here is a list of template creators: * GraphQL Express Server: @renepardon * Haskell Servant: @algas * Haskell Yesod: @yotsuya + * Java Camel: @carnevalegiacomo * Java MSF4J: @sanjeewa-malalgoda * Java Spring Boot: @diyfr * Java Undertow: @stevehu diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 8d50c8799385..09185f35308e 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -10,7 +10,7 @@ title: Documentation for the java-camel Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | -| helpTxt | Generates a camel server. | | +| helpTxt | Generates a Java Camel server (beta). | | ## 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. 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 39240ff329e6..40d17458e1f4 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 @@ -1,3 +1,19 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.Operation; @@ -8,6 +24,8 @@ import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.OptionalFeatures; import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,7 +67,7 @@ public String getName() { } public String getHelp() { - return "Generates a camel server."; + return "Generates a Java Camel server (beta)."; } public JavaCamelServerCodegen() { @@ -62,6 +80,10 @@ public JavaCamelServerCodegen() { @Override public void processOpts() { + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.BETA) + .build(); + if (!additionalProperties.containsKey(DATE_LIBRARY)) { additionalProperties.put(DATE_LIBRARY, "legacy"); } diff --git a/pom.xml b/pom.xml index 81e5c5c2b2a7..318bf21f0dcd 100644 --- a/pom.xml +++ b/pom.xml @@ -1246,15 +1246,16 @@ - samples/server/petstore/spring-mvc - samples/server/petstore/spring-mvc-default-value - samples/server/petstore/spring-mvc-j8-async - samples/server/petstore/spring-mvc-j8-localdatetime - samples/client/petstore/spring-cloud samples/openapi3/client/petstore/spring-cloud samples/client/petstore/spring-cloud-date-time samples/openapi3/client/petstore/spring-cloud-date-time + + samples/server/petstore/java-camel + samples/server/petstore/spring-mvc + samples/server/petstore/spring-mvc-default-value + samples/server/petstore/spring-mvc-j8-async + samples/server/petstore/spring-mvc-j8-localdatetime samples/server/petstore/springboot samples/openapi3/server/petstore/springboot samples/server/petstore/springboot-beanvalidation From 0323708b978be7943d0e8be213ee2343df131faf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 01:08:40 +0800 Subject: [PATCH 093/175] Bump follow-redirects from 1.10.0 to 1.14.7 in /website (#11300) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.10.0 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.10.0...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- website/yarn.lock | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index 23846922dea9..15489b0fce1a 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -2944,7 +2944,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@^3.0.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: +debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -3815,11 +3815,9 @@ flush-write-stream@^1.0.0: readable-stream "^2.3.6" follow-redirects@^1.0.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.10.0.tgz#01f5263aee921c6a54fb91667f08f4155ce169eb" - integrity sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ== - dependencies: - debug "^3.0.0" + version "1.14.7" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" + integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== for-in@^1.0.2: version "1.0.2" From d8cb6bd894962f37e76c38d2a3b0eed97bf84e99 Mon Sep 17 00:00:00 2001 From: Amelia Raia <63364513+Amelia0193@users.noreply.github.com> Date: Thu, 13 Jan 2022 23:25:40 +0000 Subject: [PATCH 094/175] Allow the user to pass in any headers per request. #11139 (#11140) * [Python] Allow the user to pass in any headers per request * Update docs * Update docs Update Docs _headers * Add test Co-authored-by: Rizwan Saeed --- .../main/resources/python-legacy/api.mustache | 5 +- .../petstore_api/api/another_fake_api.py | 5 +- .../petstore_api/api/fake_api.py | 70 +++++++++------ .../api/fake_classname_tags_123_api.py | 5 +- .../petstore_api/api/pet_api.py | 45 ++++++---- .../petstore_api/api/store_api.py | 20 +++-- .../petstore_api/api/user_api.py | 40 +++++---- .../petstore_api/api/another_fake_api.py | 5 +- .../petstore_api/api/fake_api.py | 70 +++++++++------ .../api/fake_classname_tags_123_api.py | 5 +- .../python-legacy/petstore_api/api/pet_api.py | 45 ++++++---- .../petstore_api/api/store_api.py | 20 +++-- .../petstore_api/api/user_api.py | 40 +++++---- .../petstore_api/api/another_fake_api.py | 5 +- .../petstore_api/api/fake_api.py | 70 +++++++++------ .../api/fake_classname_tags_123_api.py | 5 +- .../petstore_api/api/pet_api.py | 45 ++++++---- .../petstore_api/api/store_api.py | 20 +++-- .../petstore_api/api/user_api.py | 40 +++++---- .../petstore_api/api/another_fake_api.py | 5 +- .../petstore_api/api/default_api.py | 5 +- .../petstore_api/api/fake_api.py | 85 +++++++++++-------- .../api/fake_classname_tags_123_api.py | 5 +- .../python-legacy/petstore_api/api/pet_api.py | 45 ++++++---- .../petstore_api/api/store_api.py | 20 +++-- .../petstore_api/api/user_api.py | 40 +++++---- .../python-legacy/test/test_fake_api.py | 14 ++- 27 files changed, 472 insertions(+), 307 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-legacy/api.mustache b/modules/openapi-generator/src/main/resources/python-legacy/api.mustache index afde9560aa9a..723033609f98 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/api.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/api.mustache @@ -144,7 +144,8 @@ class {{classname}}(object): '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -221,7 +222,7 @@ class {{classname}}(object): collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isArray}} # noqa: E501 {{/queryParams}} - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) {{#headerParams}} if '{{paramName}}' in local_var_params: header_params['{{baseName}}'] = local_var_params['{{paramName}}']{{#isArray}} # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py index b76ee3b916cd..17c46b6ac4c1 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py @@ -114,7 +114,8 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py index b97f43f60f93..44636a1a022d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py @@ -114,7 +114,8 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -251,7 +252,8 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -270,7 +272,7 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -384,7 +386,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -403,7 +406,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -517,7 +520,8 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -536,7 +540,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -650,7 +654,8 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -669,7 +674,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -783,7 +788,8 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -806,7 +812,7 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -923,7 +929,8 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -952,7 +959,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1066,7 +1073,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1089,7 +1097,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1274,7 +1282,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1337,7 +1346,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1512,7 +1521,8 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1540,7 +1550,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'enum_header_string_array' in local_var_params: header_params['enum_header_string_array'] = local_var_params['enum_header_string_array'] # noqa: E501 collection_formats['enum_header_string_array'] = 'csv' # noqa: E501 @@ -1687,7 +1697,8 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1726,7 +1737,7 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'required_boolean_group' in local_var_params: header_params['required_boolean_group'] = local_var_params['required_boolean_group'] # noqa: E501 if 'boolean_group' in local_var_params: @@ -1834,7 +1845,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1857,7 +1869,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1974,7 +1986,8 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2001,7 +2014,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2137,7 +2150,8 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2191,7 +2205,7 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py index 2b46147fed58..b5cd8cd22c94 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py @@ -114,7 +114,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index e20e57a7f865..59c3b238c1c8 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -112,7 +112,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -135,7 +136,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -252,7 +253,8 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -277,7 +279,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'api_key' in local_var_params: header_params['api_key'] = local_var_params['api_key'] # noqa: E501 @@ -385,7 +387,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -411,7 +414,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -524,7 +527,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -550,7 +554,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -663,7 +667,8 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -688,7 +693,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -800,7 +805,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -823,7 +829,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -945,7 +951,8 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -970,7 +977,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1094,7 +1101,8 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1119,7 +1127,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1249,7 +1257,8 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1278,7 +1287,7 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} 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 4425692aec0d..93566fdb1d6e 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 @@ -114,7 +114,8 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -139,7 +140,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -240,7 +241,8 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -259,7 +261,7 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -371,7 +373,8 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -400,7 +403,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -512,7 +515,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -535,7 +539,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py index 593e5e5856ba..550d852e0c2d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py @@ -114,7 +114,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -243,7 +244,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -266,7 +268,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -372,7 +374,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -395,7 +398,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -503,7 +506,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -528,7 +532,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -632,7 +636,8 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -657,7 +662,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -774,7 +779,8 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -805,7 +811,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -911,7 +917,8 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -930,7 +937,7 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1041,7 +1048,8 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1070,7 +1078,7 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py index b76ee3b916cd..17c46b6ac4c1 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py @@ -114,7 +114,8 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py b/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py index b97f43f60f93..44636a1a022d 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py @@ -114,7 +114,8 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -251,7 +252,8 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -270,7 +272,7 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -384,7 +386,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -403,7 +406,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -517,7 +520,8 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -536,7 +540,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -650,7 +654,8 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -669,7 +674,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -783,7 +788,8 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -806,7 +812,7 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -923,7 +929,8 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -952,7 +959,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1066,7 +1073,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1089,7 +1097,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1274,7 +1282,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1337,7 +1346,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1512,7 +1521,8 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1540,7 +1550,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'enum_header_string_array' in local_var_params: header_params['enum_header_string_array'] = local_var_params['enum_header_string_array'] # noqa: E501 collection_formats['enum_header_string_array'] = 'csv' # noqa: E501 @@ -1687,7 +1697,8 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1726,7 +1737,7 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'required_boolean_group' in local_var_params: header_params['required_boolean_group'] = local_var_params['required_boolean_group'] # noqa: E501 if 'boolean_group' in local_var_params: @@ -1834,7 +1845,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1857,7 +1869,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1974,7 +1986,8 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2001,7 +2014,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2137,7 +2150,8 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2191,7 +2205,7 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py index 2b46147fed58..b5cd8cd22c94 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py @@ -114,7 +114,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py b/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py index e20e57a7f865..59c3b238c1c8 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py @@ -112,7 +112,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -135,7 +136,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -252,7 +253,8 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -277,7 +279,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'api_key' in local_var_params: header_params['api_key'] = local_var_params['api_key'] # noqa: E501 @@ -385,7 +387,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -411,7 +414,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -524,7 +527,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -550,7 +554,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -663,7 +667,8 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -688,7 +693,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -800,7 +805,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -823,7 +829,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -945,7 +951,8 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -970,7 +977,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1094,7 +1101,8 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1119,7 +1127,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1249,7 +1257,8 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1278,7 +1287,7 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} 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 4425692aec0d..93566fdb1d6e 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 @@ -114,7 +114,8 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -139,7 +140,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -240,7 +241,8 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -259,7 +261,7 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -371,7 +373,8 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -400,7 +403,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -512,7 +515,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -535,7 +539,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-legacy/petstore_api/api/user_api.py b/samples/client/petstore/python-legacy/petstore_api/api/user_api.py index 593e5e5856ba..550d852e0c2d 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/user_api.py @@ -114,7 +114,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -243,7 +244,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -266,7 +268,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -372,7 +374,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -395,7 +398,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -503,7 +506,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -528,7 +532,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -632,7 +636,8 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -657,7 +662,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -774,7 +779,8 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -805,7 +811,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -911,7 +917,8 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -930,7 +937,7 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1041,7 +1048,8 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1070,7 +1078,7 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py index b76ee3b916cd..17c46b6ac4c1 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py @@ -114,7 +114,8 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py index b97f43f60f93..44636a1a022d 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py @@ -114,7 +114,8 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -251,7 +252,8 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -270,7 +272,7 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -384,7 +386,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -403,7 +406,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -517,7 +520,8 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -536,7 +540,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -650,7 +654,8 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -669,7 +674,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -783,7 +788,8 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -806,7 +812,7 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -923,7 +929,8 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -952,7 +959,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1066,7 +1073,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1089,7 +1097,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1274,7 +1282,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1337,7 +1346,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1512,7 +1521,8 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1540,7 +1550,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'enum_header_string_array' in local_var_params: header_params['enum_header_string_array'] = local_var_params['enum_header_string_array'] # noqa: E501 collection_formats['enum_header_string_array'] = 'csv' # noqa: E501 @@ -1687,7 +1697,8 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1726,7 +1737,7 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'required_boolean_group' in local_var_params: header_params['required_boolean_group'] = local_var_params['required_boolean_group'] # noqa: E501 if 'boolean_group' in local_var_params: @@ -1834,7 +1845,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1857,7 +1869,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1974,7 +1986,8 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2001,7 +2014,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2137,7 +2150,8 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2191,7 +2205,7 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py index 2b46147fed58..b5cd8cd22c94 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py @@ -114,7 +114,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index e20e57a7f865..59c3b238c1c8 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -112,7 +112,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -135,7 +136,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -252,7 +253,8 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -277,7 +279,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'api_key' in local_var_params: header_params['api_key'] = local_var_params['api_key'] # noqa: E501 @@ -385,7 +387,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -411,7 +414,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -524,7 +527,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -550,7 +554,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -663,7 +667,8 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -688,7 +693,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -800,7 +805,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -823,7 +829,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -945,7 +951,8 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -970,7 +977,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1094,7 +1101,8 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1119,7 +1127,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1249,7 +1257,8 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1278,7 +1287,7 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} 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 4425692aec0d..93566fdb1d6e 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 @@ -114,7 +114,8 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -139,7 +140,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -240,7 +241,8 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -259,7 +261,7 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -371,7 +373,8 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -400,7 +403,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -512,7 +515,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -535,7 +539,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py index 593e5e5856ba..550d852e0c2d 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py @@ -114,7 +114,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -243,7 +244,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -266,7 +268,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -372,7 +374,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -395,7 +398,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -503,7 +506,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -528,7 +532,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -632,7 +636,8 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -657,7 +662,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -774,7 +779,8 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -805,7 +811,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -911,7 +917,8 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -930,7 +937,7 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1041,7 +1048,8 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1070,7 +1078,7 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py index 43e5339dcc96..bbebcdf743f1 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py @@ -114,7 +114,8 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/default_api.py index d3be5ae092aa..c626466b75d4 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/default_api.py @@ -107,7 +107,8 @@ def foo_get_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -126,7 +127,7 @@ def foo_get_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py index a08aee25453d..91d684ae47f3 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py @@ -107,7 +107,8 @@ def fake_health_get_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -126,7 +127,7 @@ def fake_health_get_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -246,7 +247,8 @@ def fake_http_signature_test_with_http_info(self, pet, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -271,7 +273,7 @@ def fake_http_signature_test_with_http_info(self, pet, **kwargs): # noqa: E501 if 'query_1' in local_var_params and local_var_params['query_1'] is not None: # noqa: E501 query_params.append(('query_1', local_var_params['query_1'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'header_1' in local_var_params: header_params['header_1'] = local_var_params['header_1'] # noqa: E501 @@ -387,7 +389,8 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -406,7 +409,7 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -526,7 +529,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -545,7 +549,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -665,7 +669,8 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -684,7 +689,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -804,7 +809,8 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -823,7 +829,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -943,7 +949,8 @@ def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_ '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -966,7 +973,7 @@ def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_ query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1086,7 +1093,8 @@ def test_body_with_binary_with_http_info(self, body, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1105,7 +1113,7 @@ def test_body_with_binary_with_http_info(self, body, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1219,7 +1227,8 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1242,7 +1251,7 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1359,7 +1368,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1388,7 +1398,7 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1502,7 +1512,8 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1525,7 +1536,7 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1710,7 +1721,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1773,7 +1785,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1948,7 +1960,8 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1976,7 +1989,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'enum_header_string_array' in local_var_params: header_params['enum_header_string_array'] = local_var_params['enum_header_string_array'] # noqa: E501 collection_formats['enum_header_string_array'] = 'csv' # noqa: E501 @@ -2123,7 +2136,8 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2162,7 +2176,7 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'required_boolean_group' in local_var_params: header_params['required_boolean_group'] = local_var_params['required_boolean_group'] # noqa: E501 if 'boolean_group' in local_var_params: @@ -2270,7 +2284,8 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2293,7 +2308,7 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2410,7 +2425,8 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2437,7 +2453,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2583,7 +2599,8 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -2645,7 +2662,7 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht if 'allow_empty' in local_var_params and local_var_params['allow_empty'] is not None: # noqa: E501 query_params.append(('allowEmpty', local_var_params['allow_empty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py index 1dd90624e719..05c1c8a0e4ff 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py @@ -114,7 +114,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py index 5f4bcb8888b9..2fda30914a7f 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py @@ -125,7 +125,8 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -148,7 +149,7 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -266,7 +267,8 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -291,7 +293,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) if 'api_key' in local_var_params: header_params['api_key'] = local_var_params['api_key'] # noqa: E501 @@ -399,7 +401,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -425,7 +428,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -538,7 +541,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -564,7 +568,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -677,7 +681,8 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -702,7 +707,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -827,7 +832,8 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -850,7 +856,7 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -973,7 +979,8 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -998,7 +1005,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1122,7 +1129,8 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1147,7 +1155,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1277,7 +1285,8 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1306,7 +1315,7 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} 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 48c85b36d7b8..5b8296dfbeb0 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 @@ -114,7 +114,8 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -139,7 +140,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -240,7 +241,8 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -259,7 +261,7 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -371,7 +373,8 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -400,7 +403,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -512,7 +515,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -535,7 +539,7 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py index 89fd46adef9e..d634bad956b9 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py @@ -114,7 +114,8 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -137,7 +138,7 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -249,7 +250,8 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -272,7 +274,7 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -384,7 +386,8 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -407,7 +410,7 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -521,7 +524,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -546,7 +550,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -650,7 +654,8 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -675,7 +680,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -792,7 +797,8 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -823,7 +829,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -929,7 +935,8 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -948,7 +955,7 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1059,7 +1066,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 '_preload_content', '_request_timeout', '_request_auth', - '_content_type' + '_content_type', + '_headers' ] ) @@ -1088,7 +1096,7 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} diff --git a/samples/openapi3/client/petstore/python-legacy/test/test_fake_api.py b/samples/openapi3/client/petstore/python-legacy/test/test_fake_api.py index 0f4028bc96b0..b7f113488979 100644 --- a/samples/openapi3/client/petstore/python-legacy/test/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-legacy/test/test_fake_api.py @@ -13,10 +13,10 @@ from __future__ import absolute_import import unittest +from unittest.mock import patch import petstore_api from petstore_api.api.fake_api import FakeApi # noqa: E501 -from petstore_api.rest import ApiException class TestFakeApi(unittest.TestCase): @@ -126,6 +126,18 @@ def test_test_query_parameter_collection_format(self): """ pass + def test_headers_parameter(self): + """Test case for the _headers are passed by the user + + To test any optional parameter # noqa: E501 + """ + api = petstore_api.api.PetApi() + with patch("petstore_api.api_client.ApiClient.call_api") as mock_method: + value_headers = {"Header1": "value1"} + api.find_pets_by_status(["Cat"], _headers=value_headers) + args, _ = mock_method.call_args + self.assertEqual(args, ('/pet/findByStatus', 'GET', {}, [('status', ['Cat'])], {'Accept': 'application/json', 'Header1': 'value1'}) +) if __name__ == '__main__': unittest.main() From 57987424a4eaa22d73337388489cd86d7f42a023 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 14 Jan 2022 10:52:36 -0800 Subject: [PATCH 095/175] Revert "Has generators set default template engine (#11245)" (#11316) This reverts commit dd3bba8c9442f2ee40d6ea8f0872ab0be43714b9. Because it broke peoples builds per this issue https://github.com/OpenAPITools/openapi-generator/issues/11276 --- bin/configs/python-experimental.yaml | 1 + .../codegen/config/WorkflowSettings.java | 2 +- .../org/openapitools/codegen/CodegenConfig.java | 2 -- .../openapitools/codegen/DefaultCodegen.java | 5 ----- .../codegen/config/CodegenConfigurator.java | 17 ++++------------- .../PythonExperimentalClientCodegen.java | 5 ----- 6 files changed, 6 insertions(+), 26 deletions(-) diff --git a/bin/configs/python-experimental.yaml b/bin/configs/python-experimental.yaml index dd204f44938d..1a8ea6e002c2 100644 --- a/bin/configs/python-experimental.yaml +++ b/bin/configs/python-experimental.yaml @@ -2,6 +2,7 @@ generatorName: python-experimental outputDir: samples/openapi3/client/petstore/python-experimental inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/python-experimental +templatingEngineName: handlebars additionalProperties: packageName: petstore_api recursionLimit: "1234" diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java index 64e426fa68a3..e2feddb98222 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java @@ -46,7 +46,7 @@ public class WorkflowSettings { public static final boolean DEFAULT_ENABLE_MINIMAL_UPDATE = false; public static final boolean DEFAULT_STRICT_SPEC_BEHAVIOR = true; public static final boolean DEFAULT_GENERATE_ALIAS_AS_MODEL = false; - public static final String DEFAULT_TEMPLATING_ENGINE_NAME = null; // this is set by the generator + public static final String DEFAULT_TEMPLATING_ENGINE_NAME = "mustache"; public static final Map DEFAULT_GLOBAL_PROPERTIES = Collections.unmodifiableMap(new HashMap<>()); private String inputSpec; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 952d3a841f27..2207e3170fbf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -305,8 +305,6 @@ public interface CodegenConfig { Schema unaliasSchema(Schema schema, Map usedImportMappings); - public String defaultTemplatingEngine(); - public GeneratorLanguage generatorLanguage(); /* 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 d4c70494f97f..95df82d2ddf6 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 @@ -7357,11 +7357,6 @@ private List getComposedProperties(List xOfCollection, return xOf; } - @Override - public String defaultTemplatingEngine() { - return "mustache"; - } - @Override public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVA; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 9eb6f558ef7f..b5bd0b23c332 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -91,18 +91,11 @@ public static CodegenConfigurator fromFile(String configFile, Module... modules) WorkflowSettings workflowSettings = settings.getWorkflowSettings(); List userDefinedTemplateSettings = settings.getFiles(); - CodegenConfig config = CodegenConfigLoader.forName(generatorSettings.getGeneratorName()); - String templatingEngineName = workflowSettings.getTemplatingEngineName(); - if (isEmpty(templatingEngineName)) { - // if templatingEngineName is empty check the config for a default - templatingEngineName = config.defaultTemplatingEngine(); - } - // We copy "cached" properties into configurator so it is appropriately configured with all settings in external files. // FIXME: target is to eventually move away from CodegenConfigurator properties except gen/workflow settings. configurator.generatorName = generatorSettings.getGeneratorName(); configurator.inputSpec = workflowSettings.getInputSpec(); - configurator.templatingEngineName = templatingEngineName; + configurator.templatingEngineName = workflowSettings.getTemplatingEngineName(); if (workflowSettings.getGlobalProperties() != null) { configurator.globalProperties.putAll(workflowSettings.getGlobalProperties()); } @@ -489,17 +482,15 @@ public Context toContext() { Validate.notEmpty(generatorName, "generator name must be specified"); Validate.notEmpty(inputSpec, "input spec must be specified"); - GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); - CodegenConfig config = CodegenConfigLoader.forName(generatorSettings.getGeneratorName()); if (isEmpty(templatingEngineName)) { - // if templatingEngineName is empty check the config for a default - String defaultTemplatingEngine = config.defaultTemplatingEngine(); - workflowSettingsBuilder.withTemplatingEngineName(defaultTemplatingEngine); + // Built-in templates are mustache, but allow users to use a simplified handlebars engine for their custom templates. + workflowSettingsBuilder.withTemplatingEngineName("mustache"); } else { workflowSettingsBuilder.withTemplatingEngineName(templatingEngineName); } // at this point, all "additionalProperties" are set, and are now immutable per GeneratorSettings instance. + GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); WorkflowSettings workflowSettings = workflowSettingsBuilder.build(); if (workflowSettings.isVerbose()) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 5424080f0d7b..ca237e47ecab 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -2086,11 +2086,6 @@ public CodegenOperation fromOperation(String path, return co; } - @Override - public String defaultTemplatingEngine() { - return "handlebars"; - } - @Override public String generatorLanguageVersion() { return ">=3.9"; }; } From 6430aaf3b1b2a6bafc67d5342f9e3703ada1a671 Mon Sep 17 00:00:00 2001 From: Ethan Keller Date: Fri, 14 Jan 2022 15:39:22 -0500 Subject: [PATCH 096/175] =?UTF-8?q?recursively=20search=20for=20types=20du?= =?UTF-8?q?ring=20import=20type=20collection=20in=20deeply=20=E2=80=A6=20(?= =?UTF-8?q?#11221)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * recursively search for types during import type collection in deeply nested schemas #11220 * composed schema recursive type import handling * change Importable to ComplexType to modularize related type-wrangling. * Problems... * Revert "Problems..." This reverts commit 6154f202a0f4db7a706fe3d61b45573581d164d4. * Reverted attempts to reuse recursive type-finding code. * add javadoc comments * fix javadoc warning. * fix NPE * PR feedback incorporation * Include additionalProperties recursion. * More feedback * More feedback * Add comments from feedback --- .../codegen/CodegenParameter.java | 5 ++ .../openapitools/codegen/CodegenResponse.java | 5 ++ .../openapitools/codegen/DefaultCodegen.java | 38 ++++++++++---- .../IJsonSchemaValidationProperties.java | 51 +++++++++++++++++++ .../codegen/DefaultCodegenTest.java | 10 ++++ .../TypeScriptClientCodegenTest.java | 13 +++++ .../additional-properties-deeply-nested.yaml | 32 ++++++++++++ ...perties_and_additional_properties_class.py | 2 + 8 files changed, 145 insertions(+), 11 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/additional-properties-deeply-nested.yaml 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 dba1721fbca2..6d00e02103e2 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 @@ -756,5 +756,10 @@ public LinkedHashMap getContent() { public void setContent(LinkedHashMap content) { this.content = content; } + + @Override + public String getBaseType() { + return baseType; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index 7a23b3ab7267..33fcf0afa520 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -614,4 +614,9 @@ public CodegenComposedSchemas getComposedSchemas() { @Override public void setHasMultipleTypes(boolean hasMultipleTypes) { this.hasMultipleTypes = hasMultipleTypes; } + + @Override + public String getBaseType() { + return baseType; + } } 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 95df82d2ddf6..307507729514 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 @@ -5120,12 +5120,32 @@ private static String generateNextName(String name) { } } + protected void addImports(CodegenModel m, IJsonSchemaValidationProperties type) { + addImports(m.imports, type); + } + + protected void addImports(Set importsToBeAddedTo, IJsonSchemaValidationProperties type) { + addImports(importsToBeAddedTo, type.getImports(true)); + } + + protected void addImports(Set importsToBeAddedTo, Set importsToAdd) { + importsToAdd.stream().forEach(i -> addImport(importsToBeAddedTo, i)); + } + protected void addImport(CodegenModel m, String type) { - if (type != null && needToImport(type)) { - m.imports.add(type); + addImport(m.imports, type); + } + + private void addImport(Set importsToBeAddedTo, String type) { + if (shouldAddImport(type)) { + importsToBeAddedTo.add(type); } } + private boolean shouldAddImport(String type) { + return type != null && needToImport(type); + } + /** * Loop through properties and unalias the reference if $ref (reference) is defined * @@ -5262,17 +5282,10 @@ protected void addVars(IJsonSchemaValidationProperties m, List * @param property The codegen representation of the OAS schema's property. */ protected void addImportsForPropertyType(CodegenModel model, CodegenProperty property) { - // TODO revise the logic to include map if (property.isContainer) { - addImport(model, typeMapping.get("array")); - } - - addImport(model, property.baseType); - CodegenProperty innerCp = property; - while (innerCp != null) { - addImport(model, innerCp.complexType); - innerCp = innerCp.items; + addImport(model.imports, typeMapping.get("array")); } + addImports(model, property); } /** @@ -6727,6 +6740,9 @@ protected LinkedHashMap getContent(Content content, Se CodegenProperty schemaProp = fromProperty(toMediaTypeSchemaName(contentType, mediaTypeSchemaSuffix), mt.getSchema()); CodegenMediaType codegenMt = new CodegenMediaType(schemaProp, ceMap); cmtContent.put(contentType, codegenMt); + if (schemaProp != null) { + addImports(imports, schemaProp.getImports(false)); + } } return cmtContent; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java index eb95821d6f3c..187e3f5a14a1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java @@ -1,6 +1,10 @@ package org.openapitools.codegen; +import java.util.Collections; +import java.util.HashSet; import java.util.List; +import java.util.Set; +import java.util.stream.Stream; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.utils.ModelUtils; @@ -213,4 +217,51 @@ default void setTypeProperties(Schema p) { setIsAnyType(true); } } + + /** + * @return basic type - no generics supported. + */ + default String getBaseType() { + return null; + }; + + /** + * @return complex type that can contain type parameters - like {@code List} for Java + */ + default String getComplexType() { + return getBaseType(); + }; + + /** + * Recursively collect all necessary imports to include so that the type may be resolved. + * + * @param includeContainerTypes whether or not to include the container types in the returned imports. + * @return all of the imports + */ + default Set getImports(boolean includeContainerTypes) { + Set imports = new HashSet<>(); + if (this.getComposedSchemas() != null) { + CodegenComposedSchemas composed = (CodegenComposedSchemas) this.getComposedSchemas(); + List allOfs = composed.getAllOf() == null ? Collections.emptyList() : composed.getAllOf(); + List oneOfs = composed.getOneOf() == null ? Collections.emptyList() : composed.getOneOf(); + Stream innerTypes = Stream.concat(allOfs.stream(), oneOfs.stream()); + innerTypes.flatMap(cp -> cp.getImports(includeContainerTypes).stream()).forEach(s -> imports.add(s)); + } else if (includeContainerTypes || !(this.getIsArray() || this.getIsMap())) { + // this is our base case, add imports for referenced schemas + // this can't be broken out as a separate if block because Typescript only generates union types as A | B + // and would need to handle this differently + imports.add(this.getComplexType()); + imports.add(this.getBaseType()); + } + if (this.getItems() !=null && this.getIsArray()) { + imports.addAll(this.getItems().getImports(includeContainerTypes)); + } + if (this.getAdditionalProperties() != null) { + imports.addAll(this.getAdditionalProperties().getImports(includeContainerTypes)); + } + if (this.getVars() != null && !this.getVars().isEmpty()) { + this.getVars().stream().flatMap(v -> v.getImports(includeContainerTypes).stream()).forEach(s -> imports.add(s)); + } + return imports; + } } \ No newline at end of file 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 54a2b0d20530..4e9fcd6397b4 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 @@ -56,6 +56,16 @@ public class DefaultCodegenTest { + @Test + public void testDeeplyNestedAdditionalPropertiesImports() { + final DefaultCodegen codegen = new DefaultCodegen(); + final OpenAPI openApi = TestUtils.parseFlattenSpec("src/test/resources/3_0/additional-properties-deeply-nested.yaml"); + codegen.setOpenAPI(openApi); + PathItem path = openApi.getPaths().get("/ping"); + CodegenOperation operation = codegen.fromOperation("/ping", "post", path.getPost(), path.getServers()); + Assert.assertEquals(Sets.intersection(operation.imports, Sets.newHashSet("Person")).size(), 1); + } + @Test public void testHasBodyParameter() { final Schema refSchema = new Schema<>().$ref("#/components/schemas/Pet"); 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 350af16ebb80..55c7b3b5efaa 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 @@ -1,7 +1,10 @@ package org.openapitools.codegen.typescript; +import com.google.common.collect.Sets; import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.PathItem; import io.swagger.v3.oas.models.media.*; +import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.TypeScriptClientCodegen; import org.openapitools.codegen.utils.ModelUtils; @@ -41,4 +44,14 @@ public void getTypeDeclarationTest() { Assert.assertEquals(codegen.getTypeDeclaration(parentSchema), "{ [key: string]: Child; }"); } + @Test + public void testComposedSchemasImportTypesIndividually() { + final TypeScriptClientCodegen codegen = new TypeScriptClientCodegen(); + final OpenAPI openApi = TestUtils.parseFlattenSpec("src/test/resources/3_0/composed-schemas.yaml"); + codegen.setOpenAPI(openApi); + PathItem path = openApi.getPaths().get("/pets"); + CodegenOperation operation = codegen.fromOperation("/pets", "patch", path.getPatch(), path.getServers()); + Assert.assertEquals(operation.imports, Sets.newHashSet("Cat", "Dog")); + } + } diff --git a/modules/openapi-generator/src/test/resources/3_0/additional-properties-deeply-nested.yaml b/modules/openapi-generator/src/test/resources/3_0/additional-properties-deeply-nested.yaml new file mode 100644 index 000000000000..78d9c95b54a3 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/additional-properties-deeply-nested.yaml @@ -0,0 +1,32 @@ +openapi: 3.0.1 +info: + title: Test additional properties with ref + version: '1.0' +servers: + - url: 'http://localhost:8000/' +paths: + /ping: + post: + operationId: pingGet + responses: + default: + description: default response + content: + application/json: + schema: + type: object + additionalProperties: + type: object + additionalProperties: + type: object + additionalProperties: + "$ref": "#/components/schemas/Person" +components: + schemas: + Person: + type: object + properties: + lastName: + type: string + firstName: + type: string \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py index e8bb843a7c89..6f95ff0eaaf1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -113,3 +113,5 @@ def __new__( _instantiation_metadata=_instantiation_metadata, **kwargs, ) + +from petstore_api.model.animal import Animal From 692a4db9642a4468540e09c40d8ab089de30fd90 Mon Sep 17 00:00:00 2001 From: Knut Johannes Dahle Date: Sat, 15 Jan 2022 16:59:42 +0100 Subject: [PATCH 097/175] Added fix for wrongly encoded backticks when generating kotlin client with reserved words as part of the parameters. Wrote a test verifying that the method signatures is without html encoding for backticks (#11310) --- .../libraries/jvm-okhttp/api.mustache | 6 ++-- .../kotlin/KotlinReservedWordsTest.java | 36 ++++++++++++++++++- .../resources/3_0/kotlin/reserved_words.yaml | 16 +++++++++ ...11304_kotlin_backticks_reserved_words.yaml | 23 ++++++++++++ 4 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/bugs/issue_11304_kotlin_backticks_reserved_words.yaml diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache index d7948cf6a755..1616e309ff1a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache @@ -129,7 +129,7 @@ import {{packageName}}.infrastructure.toMultiValue {{#isDeprecated}} @Deprecated(message = "This operation is deprecated.") {{/isDeprecated}} - {{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}_{{operationId}}>{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{^doNotUseRxAndCoroutines}}{{#useCoroutines}} = withContext(Dispatchers.IO){{/useCoroutines}}{{/doNotUseRxAndCoroutines}} { + {{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}_{{operationId}}>{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{^doNotUseRxAndCoroutines}}{{#useCoroutines}} = withContext(Dispatchers.IO){{/useCoroutines}}{{/doNotUseRxAndCoroutines}} { {{#isDeprecated}} @Suppress("DEPRECATION") {{/isDeprecated}} @@ -163,7 +163,7 @@ import {{packageName}}.infrastructure.toMultiValue {{#isDeprecated}} @Deprecated(message = "This operation is deprecated.") {{/isDeprecated}} - {{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}_{{operationId}}>{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : ApiResponse<{{#returnType}}{{{returnType}}}?{{/returnType}}{{^returnType}}Unit?{{/returnType}}>{{^doNotUseRxAndCoroutines}}{{#useCoroutines}} = withContext(Dispatchers.IO){{/useCoroutines}}{{/doNotUseRxAndCoroutines}} { + {{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}_{{operationId}}>{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : ApiResponse<{{#returnType}}{{{returnType}}}?{{/returnType}}{{^returnType}}Unit?{{/returnType}}>{{^doNotUseRxAndCoroutines}}{{#useCoroutines}} = withContext(Dispatchers.IO){{/useCoroutines}}{{/doNotUseRxAndCoroutines}} { {{#isDeprecated}} @Suppress("DEPRECATION") {{/isDeprecated}} @@ -183,7 +183,7 @@ import {{packageName}}.infrastructure.toMultiValue {{#isDeprecated}} @Deprecated(message = "This operation is deprecated.") {{/isDeprecated}} - fun {{operationId}}RequestConfig({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}_{{operationId}}>{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map{{/hasFormParams}}{{/hasBodyParam}}> { + fun {{operationId}}RequestConfig({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}_{{operationId}}>{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map{{/hasFormParams}}{{/hasBodyParam}}> { val localVariableBody = {{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}null{{/hasFormParams}}{{#hasFormParams}}mapOf({{#formParams}}"{{{baseName}}}" to {{{paramName}}}{{^-last}}, {{/-last}}{{/formParams}}){{/hasFormParams}}{{/hasBodyParam}} val localVariableQuery: MultiValueMap = {{^hasQueryParams}}mutableMapOf() {{/hasQueryParams}}{{#hasQueryParams}}mutableMapOf>() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinReservedWordsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinReservedWordsTest.java index 914ed814da8e..bd06fde5f2aa 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinReservedWordsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinReservedWordsTest.java @@ -10,8 +10,13 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.HashSet; +import static org.openapitools.codegen.TestUtils.assertFileContains; +import static org.openapitools.codegen.TestUtils.assertFileNotContains; import static org.testng.Assert.assertEquals; @SuppressWarnings("rawtypes") @@ -51,7 +56,8 @@ static Object[][] reservedWords() { {"while"}, {"open"}, {"external"}, - {"internal"} + {"internal"}, + {"value"} }; } @@ -128,4 +134,32 @@ public void testReservedWordsAsProperties(String reservedWord) { assertEquals(property.baseName, reservedWord); } + @Test + public void reservedWordsInGeneratedCode() throws Exception { + String baseApiPackage = "/org/openapitools/client/apis/"; + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); //may be move to /build + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/bugs/issue_11304_kotlin_backticks_reserved_words.yaml"); + + KotlinClientCodegen codegen = new KotlinClientCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(input).generate(); + + File resultSourcePath = new File(output, "src/main/kotlin"); + + assertFileContains(Paths.get(resultSourcePath.getAbsolutePath() + baseApiPackage + "DefaultApi.kt"), + "fun test(`value`: kotlin.String) : Unit {", + "fun testWithHttpInfo(`value`: kotlin.String) : ApiResponse {", + "fun testRequestConfig(`value`: kotlin.String) : RequestConfig {" + ); + + assertFileNotContains(Paths.get(resultSourcePath.getAbsolutePath() + baseApiPackage + "DefaultApi.kt"), + "`" + ); + } } 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 881ffe494995..d5074fd953c9 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 @@ -108,6 +108,10 @@ paths: in: header schema: type: string + - name: value + in: header + schema: + type: string - name: var in: header schema: @@ -192,6 +196,8 @@ components: type: string val: type: string + value: + type: string var: type: string when: @@ -261,6 +267,8 @@ components: $ref: '#/components/schemas/typeof' val: $ref: '#/components/schemas/val' + value: + $ref: '#/components/schemas/value' var: $ref: '#/components/schemas/var' when: @@ -473,6 +481,14 @@ components: type: integer format: int64 + value: + title: Testing reserved word 'value' + type: object + properties: + id: + type: integer + format: int64 + var: title: Testing reserved word 'var' type: object diff --git a/modules/openapi-generator/src/test/resources/bugs/issue_11304_kotlin_backticks_reserved_words.yaml b/modules/openapi-generator/src/test/resources/bugs/issue_11304_kotlin_backticks_reserved_words.yaml new file mode 100644 index 000000000000..33498515ac6e --- /dev/null +++ b/modules/openapi-generator/src/test/resources/bugs/issue_11304_kotlin_backticks_reserved_words.yaml @@ -0,0 +1,23 @@ +openapi: 3.0.3 +info: + title: Kotlin Issue + version: "1.0" + +servers: + - url: "http://localhost" + +paths: + /test/{value}: + post: + summary: test + operationId: test + parameters: + - name: value + in: path + required: true + schema: + type: string + example: something + responses: + '200': + description: OK \ No newline at end of file From 1b6d0f8746153def389c615ec7e79f04bdb9a67b Mon Sep 17 00:00:00 2001 From: Anakael Date: Sat, 15 Jan 2022 19:18:12 +0300 Subject: [PATCH 098/175] Add condition for header (#11325) --- .../libraries/httpclient/api.mustache | 12 +++---- .../src/Org.OpenAPITools/Api/FakeApi.cs | 8 ++--- .../src/Org.OpenAPITools/Api/PetApi.cs | 32 +++++++++---------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/api.mustache index f1f8a890d3db..c0d49570a620 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/api.mustache @@ -489,21 +489,21 @@ namespace {{packageName}}.{{apiPackage}} {{/isApiKey}} {{#isBasicBasic}} // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } {{/isBasicBasic}} {{#isBasicBearer}} // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } {{/isBasicBearer}} {{#isOAuth}} // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -689,14 +689,14 @@ namespace {{packageName}}.{{apiPackage}} {{#isBasic}} {{#isBasicBasic}} // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } {{/isBasicBasic}} {{#isBasicBearer}} // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -704,7 +704,7 @@ namespace {{packageName}}.{{apiPackage}} {{/isBasic}} {{#isOAuth}} // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/FakeApi.cs index b43035fbb268..542c9dadd54b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -2121,7 +2121,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2258,7 +2258,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (http_basic_test) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2533,7 +2533,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -2616,7 +2616,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI // authentication (bearer_test) required // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/PetApi.cs index f38f7cb75572..a4ab1260df9e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/PetApi.cs @@ -719,7 +719,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -800,7 +800,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -862,7 +862,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -927,7 +927,7 @@ public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1006,7 +1006,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1088,7 +1088,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByStatusWithHttpIn } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1169,7 +1169,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1253,7 +1253,7 @@ public Org.OpenAPITools.Client.ApiResponse> FindPetsByTagsWithHttpInfo } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1450,7 +1450,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1531,7 +1531,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet } // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1600,7 +1600,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1672,7 +1672,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1743,7 +1743,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1817,7 +1817,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1889,7 +1889,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } @@ -1964,7 +1964,7 @@ public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet // authentication (petstore_auth) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } From 249968e397c481e9c78b587975a8aa2417c14083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul-Etienne=20Fran=C3=A7ois?= Date: Sat, 15 Jan 2022 17:51:40 +0100 Subject: [PATCH 099/175] [Java][Native] Fix the Content-Type and Accept headers that were forced to application/json (#11303) * [Java][Native] Fix the Content-Type and Accept headers that were forced to application/json * Update the generated samples after fixing issue no. 6779 --- .../main/resources/Java/libraries/native/api.mustache | 4 ++-- .../main/java/org/openapitools/client/api/FakeApi.java | 10 +++++----- .../main/java/org/openapitools/client/api/PetApi.java | 6 +++--- .../java/org/openapitools/client/api/StoreApi.java | 4 ++-- .../main/java/org/openapitools/client/api/UserApi.java | 4 ++-- .../main/java/org/openapitools/client/api/FakeApi.java | 10 +++++----- .../main/java/org/openapitools/client/api/PetApi.java | 6 +++--- .../java/org/openapitools/client/api/StoreApi.java | 4 ++-- .../main/java/org/openapitools/client/api/UserApi.java | 4 ++-- 9 files changed, 26 insertions(+), 26 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 218a432d1064..86fb8dd899c1 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 @@ -341,9 +341,9 @@ public class {{classname}} { } {{/headerParams}} {{#bodyParam}} - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "{{#hasConsumes}}{{#consumes}}{{#-first}}{{mediaType}}{{/-first}}{{/consumes}}{{/hasConsumes}}{{#hasConsumes}}{{^consumes}}application/json{{/consumes}}{{/hasConsumes}}{{^hasConsumes}}application/json{{/hasConsumes}}"); {{/bodyParam}} - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "{{#hasProduces}}{{#produces}}{{mediaType}}{{^-last}}, {{/-last}}{{/produces}}{{/hasProduces}}{{#hasProduces}}{{^produces}}application/json{{/produces}}{{/hasProduces}}{{^hasProduces}}application/json{{/hasProduces}}"); {{#bodyParam}} try { 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 69e4b4562c50..b600572f5116 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 @@ -148,7 +148,7 @@ private HttpRequest.Builder createXmlItemRequestBuilder(XmlItem xmlItem) throws localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "application/xml"); localVarRequestBuilder.header("Accept", "application/json"); try { @@ -241,7 +241,7 @@ private HttpRequest.Builder fakeOuterBooleanSerializeRequestBuilder(Boolean body localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); @@ -333,7 +333,7 @@ private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterCompo localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); @@ -425,7 +425,7 @@ private HttpRequest.Builder fakeOuterNumberSerializeRequestBuilder(BigDecimal bo localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); @@ -517,7 +517,7 @@ private HttpRequest.Builder fakeOuterStringSerializeRequestBuilder(String body) localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); 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 69c55b8cb668..f8020e0d6fe0 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 @@ -330,7 +330,7 @@ private HttpRequest.Builder findPetsByStatusRequestBuilder(List status) localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); } - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -433,7 +433,7 @@ private HttpRequest.Builder findPetsByTagsRequestBuilder(Set tags) throw localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); } - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -524,7 +524,7 @@ private HttpRequest.Builder getPetByIdRequestBuilder(Long petId) throws ApiExcep localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { 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 0ed6d0b6db1b..65430c5eaa5c 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 @@ -316,7 +316,7 @@ private HttpRequest.Builder getOrderByIdRequestBuilder(Long orderId) throws ApiE localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -407,7 +407,7 @@ private HttpRequest.Builder placeOrderRequestBuilder(Order body) throws ApiExcep localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); 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 209d289e08e4..5e05a49b80cf 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 @@ -479,7 +479,7 @@ private HttpRequest.Builder getUserByNameRequestBuilder(String username) throws localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -585,7 +585,7 @@ private HttpRequest.Builder loginUserRequestBuilder(String username, String pass localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); } - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { 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 6618620891c5..665df72be2f3 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 @@ -146,7 +146,7 @@ private HttpRequest.Builder createXmlItemRequestBuilder(XmlItem xmlItem) throws localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "application/xml"); localVarRequestBuilder.header("Accept", "application/json"); try { @@ -221,7 +221,7 @@ private HttpRequest.Builder fakeOuterBooleanSerializeRequestBuilder(Boolean body localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); @@ -295,7 +295,7 @@ private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterCompo localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); @@ -369,7 +369,7 @@ private HttpRequest.Builder fakeOuterNumberSerializeRequestBuilder(BigDecimal bo localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); @@ -443,7 +443,7 @@ private HttpRequest.Builder fakeOuterStringSerializeRequestBuilder(String body) localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); 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 758142dfa7b2..b113b63a959a 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 @@ -309,7 +309,7 @@ private HttpRequest.Builder findPetsByStatusRequestBuilder(List status) localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); } - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -394,7 +394,7 @@ private HttpRequest.Builder findPetsByTagsRequestBuilder(Set tags) throw localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); } - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -467,7 +467,7 @@ private HttpRequest.Builder getPetByIdRequestBuilder(Long petId) throws ApiExcep localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { 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 bde07853f967..2f142dd94115 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 @@ -278,7 +278,7 @@ private HttpRequest.Builder getOrderByIdRequestBuilder(Long orderId) throws ApiE localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -351,7 +351,7 @@ private HttpRequest.Builder placeOrderRequestBuilder(Order body) throws ApiExcep localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); try { byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); 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 2ce486c6491f..b4ceaf86bf95 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 @@ -456,7 +456,7 @@ private HttpRequest.Builder getUserByNameRequestBuilder(String username) throws localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -544,7 +544,7 @@ private HttpRequest.Builder loginUserRequestBuilder(String username, String pass localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); } - localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/xml, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { From 0427681bc48064555017523b76677e42d876b86f Mon Sep 17 00:00:00 2001 From: jiangyuan Date: Sun, 16 Jan 2022 10:23:15 +0800 Subject: [PATCH 100/175] fix java apache-httpclient set basePath (#11277) --- .../Java/libraries/apache-httpclient/ApiClient.mustache | 1 + .../src/main/java/org/openapitools/client/ApiClient.java | 1 + 2 files changed, 2 insertions(+) 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 dadec3c2ccee..371f8ee72686 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 @@ -228,6 +228,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; + this.serverIndex = null; return this; } 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 686ad20b9512..754393e13a02 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 @@ -193,6 +193,7 @@ public String getBasePath() { */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; + this.serverIndex = null; return this; } From c12456de8e4f7d099f5e588f48607a7bfbb31deb Mon Sep 17 00:00:00 2001 From: mvistein Date: Sun, 16 Jan 2022 03:29:47 +0100 Subject: [PATCH 101/175] [Java-okhttp-gson] Do not set content-type if content type is null #2 (#11315) * Fixing empty Content-Type in HTTP requests * Updating samples --- .../okhttp-gson-nextgen/api.mustache | 2 +- .../Java/libraries/okhttp-gson/api.mustache | 2 +- .../org/openapitools/client/api/PingApi.java | 2 +- .../client/api/AnotherFakeApi.java | 2 +- .../org/openapitools/client/api/FakeApi.java | 28 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 2 +- .../org/openapitools/client/api/PetApi.java | 18 ++++++------ .../org/openapitools/client/api/StoreApi.java | 8 +++--- .../org/openapitools/client/api/UserApi.java | 16 +++++------ .../client/api/AnotherFakeApi.java | 2 +- .../openapitools/client/api/DefaultApi.java | 2 +- .../org/openapitools/client/api/FakeApi.java | 28 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 2 +- .../org/openapitools/client/api/PetApi.java | 18 ++++++------ .../org/openapitools/client/api/StoreApi.java | 8 +++--- .../org/openapitools/client/api/UserApi.java | 16 +++++------ .../client/api/AnotherFakeApi.java | 2 +- .../org/openapitools/client/api/FakeApi.java | 28 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 2 +- .../org/openapitools/client/api/PetApi.java | 18 ++++++------ .../org/openapitools/client/api/StoreApi.java | 8 +++--- .../org/openapitools/client/api/UserApi.java | 16 +++++------ .../client/api/AnotherFakeApi.java | 2 +- .../org/openapitools/client/api/FakeApi.java | 28 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 2 +- .../org/openapitools/client/api/PetApi.java | 18 ++++++------ .../org/openapitools/client/api/StoreApi.java | 8 +++--- .../org/openapitools/client/api/UserApi.java | 16 +++++------ 28 files changed, 152 insertions(+), 152 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/api.mustache index e0d605818d34..943e6948de76 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/api.mustache @@ -173,7 +173,7 @@ public class {{classname}} { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index c55259c44fee..e81f874f1e1b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -204,7 +204,7 @@ public class {{classname}} { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java index 5f408920f53e..dc64eace5442 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java @@ -123,7 +123,7 @@ public okhttp3.Call postPingCall(SomeObj someObj, final ApiCallback _callback) t "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 815719efc1f6..5f6571f9e7d8 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -133,7 +133,7 @@ public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _c "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 c7332815b44f..c55d1e12c08a 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 @@ -141,7 +141,7 @@ public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ApiCallback _callba "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 = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -272,7 +272,7 @@ public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ApiCallbac }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -402,7 +402,7 @@ public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final A }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -532,7 +532,7 @@ public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -662,7 +662,7 @@ public okhttp3.Call fakeOuterStringSerializeCall(String body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -792,7 +792,7 @@ public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -925,7 +925,7 @@ public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1064,7 +1064,7 @@ public okhttp3.Call testClientModelCall(Client body, final ApiCallback _callback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1269,7 +1269,7 @@ public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1479,7 +1479,7 @@ public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, S "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1623,7 +1623,7 @@ private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolea }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1844,7 +1844,7 @@ public okhttp3.Call testInlineAdditionalPropertiesCall(Map param "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1984,7 +1984,7 @@ public okhttp3.Call testJsonFormDataCall(String param, String param2, final ApiC "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -2132,7 +2132,7 @@ public okhttp3.Call testQueryParameterCollectionFormatCall(List pipe, Li }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 2483077a5c8b..c508d0d8bb6b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -133,7 +133,7 @@ public okhttp3.Call testClassnameCall(Client body, final ApiCallback _callback) "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java index e5ba04115881..085d9f0ec8e0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java @@ -137,7 +137,7 @@ public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws Api "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -275,7 +275,7 @@ public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _ }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -414,7 +414,7 @@ public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -556,7 +556,7 @@ public okhttp3.Call findPetsByTagsCall(Set tags, final ApiCallback _call }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -704,7 +704,7 @@ public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -848,7 +848,7 @@ public okhttp3.Call updatePetCall(Pet body, final ApiCallback _callback) throws "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -999,7 +999,7 @@ public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1147,7 +1147,7 @@ public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File f "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1299,7 +1299,7 @@ public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 1e32b8c76074..afa9b5c026d3 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 @@ -135,7 +135,7 @@ public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -268,7 +268,7 @@ public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiExce }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -398,7 +398,7 @@ public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -540,7 +540,7 @@ public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java index faf4e626946e..2051423374cb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java @@ -134,7 +134,7 @@ public okhttp3.Call createUserCall(User body, final ApiCallback _callback) throw }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -265,7 +265,7 @@ public okhttp3.Call createUsersWithArrayInputCall(List body, final ApiCall }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -396,7 +396,7 @@ public okhttp3.Call createUsersWithListInputCall(List body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -529,7 +529,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -666,7 +666,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -811,7 +811,7 @@ public okhttp3.Call loginUserCall(String username, String password, final ApiCal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -956,7 +956,7 @@ public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiExcept }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1082,7 +1082,7 @@ public okhttp3.Call updateUserCall(String username, User body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 9482a5a5f86d..52c19920a970 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -91,7 +91,7 @@ public okhttp3.Call call123testSpecialTagsCall(Client client, final ApiCallback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/DefaultApi.java index 70e9788eb14f..7741b8200a9c 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -90,7 +90,7 @@ public okhttp3.Call fooGetCall(final ApiCallback _callback) throws ApiException }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeApi.java index 0e4cf97f1c83..d413cd3e8291 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeApi.java @@ -98,7 +98,7 @@ public okhttp3.Call fakeHealthGetCall(final ApiCallback _callback) throws ApiExc }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -209,7 +209,7 @@ public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ApiCallbac "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -323,7 +323,7 @@ public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite outerComposit "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -437,7 +437,7 @@ public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ApiCallb "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -551,7 +551,7 @@ public okhttp3.Call fakeOuterStringSerializeCall(String body, final ApiCallback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -664,7 +664,7 @@ public okhttp3.Call getArrayOfEnumsCall(final ApiCallback _callback) throws ApiE }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -780,7 +780,7 @@ public okhttp3.Call testBodyWithQueryParamsCall(String query, User user, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -897,7 +897,7 @@ public okhttp3.Call testClientModelCall(Client client, final ApiCallback _callba "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1086,7 +1086,7 @@ public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1292,7 +1292,7 @@ public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, S "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1432,7 +1432,7 @@ private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolea }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1631,7 +1631,7 @@ public okhttp3.Call testInlineAdditionalPropertiesCall(Map reque "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1749,7 +1749,7 @@ public okhttp3.Call testJsonFormDataCall(String param, String param2, final ApiC "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1890,7 +1890,7 @@ public okhttp3.Call testQueryParameterCollectionFormatCall(List pipe, Li }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 1fac7240705a..34c9d282281e 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -91,7 +91,7 @@ public okhttp3.Call testClassnameCall(Client client, final ApiCallback _callback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/PetApi.java index c1523ef07907..8c8a226d0cb6 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/PetApi.java @@ -93,7 +93,7 @@ public okhttp3.Call addPetCall(Pet pet, final ApiCallback _callback) throws ApiE "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -208,7 +208,7 @@ public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _ }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -325,7 +325,7 @@ public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -454,7 +454,7 @@ public okhttp3.Call findPetsByTagsCall(List tags, final ApiCallback _cal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -586,7 +586,7 @@ public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -713,7 +713,7 @@ public okhttp3.Call updatePetCall(Pet pet, final ApiCallback _callback) throws A "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -839,7 +839,7 @@ public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -965,7 +965,7 @@ public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File f "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1101,7 +1101,7 @@ public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/StoreApi.java index 5d93e6322231..f57a9e3ff700 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/StoreApi.java @@ -93,7 +93,7 @@ public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -204,7 +204,7 @@ public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiExce }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -318,7 +318,7 @@ public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -444,7 +444,7 @@ public okhttp3.Call placeOrderCall(Order order, final ApiCallback _callback) thr "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java index 56c6433a490a..f6d5e33327ce 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java @@ -92,7 +92,7 @@ public okhttp3.Call createUserCall(User user, final ApiCallback _callback) throw "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -201,7 +201,7 @@ public okhttp3.Call createUsersWithArrayInputCall(List user, final ApiCall "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -310,7 +310,7 @@ public okhttp3.Call createUsersWithListInputCall(List user, final ApiCallb "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -421,7 +421,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -536,7 +536,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -671,7 +671,7 @@ public okhttp3.Call loginUserCall(String username, String password, final ApiCal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -800,7 +800,7 @@ public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiExcept }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -904,7 +904,7 @@ public okhttp3.Call updateUserCall(String username, User user, final ApiCallback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index af9e915240d6..5789ec8083be 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -122,7 +122,7 @@ public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _c "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 b27961d1479f..450dbb1a5b7a 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 @@ -130,7 +130,7 @@ public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ApiCallback _callba "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 = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -253,7 +253,7 @@ public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ApiCallbac }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -375,7 +375,7 @@ public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final A }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -497,7 +497,7 @@ public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -619,7 +619,7 @@ public okhttp3.Call fakeOuterStringSerializeCall(String body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -741,7 +741,7 @@ public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -869,7 +869,7 @@ public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1000,7 +1000,7 @@ public okhttp3.Call testClientModelCall(Client body, final ApiCallback _callback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1197,7 +1197,7 @@ public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1417,7 +1417,7 @@ public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, S "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1571,7 +1571,7 @@ private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolea }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1784,7 +1784,7 @@ public okhttp3.Call testInlineAdditionalPropertiesCall(Map param "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1916,7 +1916,7 @@ public okhttp3.Call testJsonFormDataCall(String param, String param2, final ApiC "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -2071,7 +2071,7 @@ public okhttp3.Call testQueryParameterCollectionFormatCall(List pipe, Li }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index d6bac0d84af7..e9e0d6cb8c9f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -122,7 +122,7 @@ public okhttp3.Call testClassnameCall(Client body, final ApiCallback _callback) "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index 2f90b4257f9e..580a5f993cef 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -126,7 +126,7 @@ public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws Api "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -259,7 +259,7 @@ public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _ }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -393,7 +393,7 @@ public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -530,7 +530,7 @@ public okhttp3.Call findPetsByTagsCall(Set tags, final ApiCallback _call }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -670,7 +670,7 @@ public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -806,7 +806,7 @@ public okhttp3.Call updatePetCall(Pet body, final ApiCallback _callback) throws "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -949,7 +949,7 @@ public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1089,7 +1089,7 @@ public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File f "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1233,7 +1233,7 @@ public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 9aeea0062d0d..e17f7df6c482 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 @@ -124,7 +124,7 @@ public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -249,7 +249,7 @@ public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiExce }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -371,7 +371,7 @@ public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -505,7 +505,7 @@ public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java index abf14e6dba3f..627f78804878 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java @@ -123,7 +123,7 @@ public okhttp3.Call createUserCall(User body, final ApiCallback _callback) throw }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -246,7 +246,7 @@ public okhttp3.Call createUsersWithArrayInputCall(List body, final ApiCall }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -369,7 +369,7 @@ public okhttp3.Call createUsersWithListInputCall(List body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -494,7 +494,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -623,7 +623,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -766,7 +766,7 @@ public okhttp3.Call loginUserCall(String username, String password, final ApiCal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -903,7 +903,7 @@ public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiExcept }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1021,7 +1021,7 @@ public okhttp3.Call updateUserCall(String username, User body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index af9e915240d6..5789ec8083be 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -122,7 +122,7 @@ public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _c "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 b27961d1479f..450dbb1a5b7a 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 @@ -130,7 +130,7 @@ public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ApiCallback _callba "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 = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -253,7 +253,7 @@ public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ApiCallbac }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -375,7 +375,7 @@ public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final A }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -497,7 +497,7 @@ public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -619,7 +619,7 @@ public okhttp3.Call fakeOuterStringSerializeCall(String body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -741,7 +741,7 @@ public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -869,7 +869,7 @@ public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1000,7 +1000,7 @@ public okhttp3.Call testClientModelCall(Client body, final ApiCallback _callback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1197,7 +1197,7 @@ public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1417,7 +1417,7 @@ public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, S "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1571,7 +1571,7 @@ private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolea }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1784,7 +1784,7 @@ public okhttp3.Call testInlineAdditionalPropertiesCall(Map param "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1916,7 +1916,7 @@ public okhttp3.Call testJsonFormDataCall(String param, String param2, final ApiC "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -2071,7 +2071,7 @@ public okhttp3.Call testQueryParameterCollectionFormatCall(List pipe, Li }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index d6bac0d84af7..e9e0d6cb8c9f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -122,7 +122,7 @@ public okhttp3.Call testClassnameCall(Client body, final ApiCallback _callback) "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index 2f90b4257f9e..580a5f993cef 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -126,7 +126,7 @@ public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws Api "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -259,7 +259,7 @@ public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _ }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -393,7 +393,7 @@ public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -530,7 +530,7 @@ public okhttp3.Call findPetsByTagsCall(Set tags, final ApiCallback _call }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -670,7 +670,7 @@ public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -806,7 +806,7 @@ public okhttp3.Call updatePetCall(Pet body, final ApiCallback _callback) throws "application/json", "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -949,7 +949,7 @@ public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1089,7 +1089,7 @@ public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File f "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1233,7 +1233,7 @@ public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } 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 9aeea0062d0d..e17f7df6c482 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 @@ -124,7 +124,7 @@ public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -249,7 +249,7 @@ public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiExce }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -371,7 +371,7 @@ public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -505,7 +505,7 @@ public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) thro }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java index abf14e6dba3f..627f78804878 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java @@ -123,7 +123,7 @@ public okhttp3.Call createUserCall(User body, final ApiCallback _callback) throw }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -246,7 +246,7 @@ public okhttp3.Call createUsersWithArrayInputCall(List body, final ApiCall }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -369,7 +369,7 @@ public okhttp3.Call createUsersWithListInputCall(List body, final ApiCallb }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -494,7 +494,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -623,7 +623,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -766,7 +766,7 @@ public okhttp3.Call loginUserCall(String username, String password, final ApiCal }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -903,7 +903,7 @@ public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiExcept }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } @@ -1021,7 +1021,7 @@ public okhttp3.Call updateUserCall(String username, User body, final ApiCallback }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarHeaderParams != null && localVarContentTypes != null) { + if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } From 5bccbf6734e82184e8a4aba0d2bb46a28bfb7276 Mon Sep 17 00:00:00 2001 From: mactho Date: Sat, 15 Jan 2022 18:39:20 -0800 Subject: [PATCH 102/175] Fix an issue where moustache template adds an extra null to the generated source code when 'nullable: true' is used in the api spec (#11284) Co-authored-by: Thomas MacNeil --- .../main/resources/kotlin-client/model_room_init_var.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/model_room_init_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/model_room_init_var.mustache index 01896d2439f6..3e6f299d3d6e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/model_room_init_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/model_room_init_var.mustache @@ -1 +1 @@ -{{#isNullable}}?{{/isNullable}}{{^required}}?{{/required}}{{#defaultvalue}} = {{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}{{#isNullable}} = null{{/isNullable}}{{^required}} = null{{/required}}{{/defaultvalue}} \ No newline at end of file +{{#isNullable}}?{{/isNullable}}{{^required}}{{^isNullable}}?{{/isNullable}}{{/required}}{{#defaultvalue}} = {{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}{{#isNullable}} = null{{/isNullable}}{{^required}}{{^isNullable}} = null{{/isNullable}}{{/required}}{{/defaultvalue}} \ No newline at end of file From ffe5df8fa1726478b10cc9879476857e462b30e0 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 16 Jan 2022 01:12:38 -0800 Subject: [PATCH 103/175] Turns python-legacy CI back on in circle, fixes python-legacy test (#11326) * Turns python-legacy CI back on in circle, fixes python-legacy test * Installs python 2.7 into circleci node 3 * Python 2.7 version changed to 2.7 * Switches back to py2714 --- CI/circle_parallel.sh | 1 + pom.xml | 1 + .../client/petstore/python-legacy/test/test_fake_api.py | 5 ++++- .../openapi3/client/petstore/python-legacy/test_python2.sh | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 697009699a33..74e5f018f1ba 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -59,6 +59,7 @@ elif [ "$NODE_INDEX" = "3" ]; then #sudo make altinstall pyenv install --list pyenv install 3.6.3 + pyenv install 2.7.14 pyenv global 3.6.3 python3 --version diff --git a/pom.xml b/pom.xml index 318bf21f0dcd..06a209e74580 100644 --- a/pom.xml +++ b/pom.xml @@ -1283,6 +1283,7 @@ samples/client/petstore/python samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent samples/openapi3/client/petstore/python + samples/openapi3/client/petstore/python-legacy + samples/server/petstore/java-camel samples/server/petstore/jaxrs-jersey samples/server/petstore/jaxrs-spec samples/server/petstore/jaxrs-spec-interface @@ -1246,12 +1247,14 @@ + samples/client/petstore/spring-cloud samples/openapi3/client/petstore/spring-cloud samples/client/petstore/spring-cloud-date-time samples/openapi3/client/petstore/spring-cloud-date-time + samples/client/petstore/spring-stubs + samples/openapi3/client/petstore/spring-stubs - samples/server/petstore/java-camel samples/server/petstore/spring-mvc samples/server/petstore/spring-mvc-default-value samples/server/petstore/spring-mvc-j8-async diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index ff55cadf21fc..d5f991221430 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -22,7 +23,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Pet", description = "the Pet API") public interface PetApi { 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 f968f9607750..8967afe8802d 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 @@ -22,7 +22,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Store", description = "the Store API") public interface StoreApi { diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 5ca513e5ffea..746cc2472d69 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -23,7 +23,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "User", description = "the User API") public interface UserApi { diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java index f21d835af4da..af9a5d3bbec9 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ + @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Category name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { 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("}"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java index ec1b1b81d6a4..3ab8ad09cb6d 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ + @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -38,9 +41,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -58,9 +60,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -78,9 +79,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -89,7 +89,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 2f24cd46851d..658d0de71681 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,13 +16,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ + @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -32,7 +36,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -87,9 +91,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -107,9 +110,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -127,9 +129,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -147,10 +148,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -168,9 +167,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -188,9 +186,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -199,7 +196,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -226,7 +222,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index a1f702f1a72f..1c0c076a38c1 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -18,13 +18,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ + @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -158,10 +156,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -187,10 +183,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -208,9 +202,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -219,7 +212,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +238,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java index 8e3f67322335..86be70f2d3ed 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ + @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { 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("}"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java index 73fcf01b5375..e350716a9338 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ + @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -53,9 +56,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -73,9 +75,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -93,9 +94,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -113,9 +113,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -133,9 +132,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -153,9 +151,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -173,9 +170,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -193,9 +189,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -204,7 +199,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -233,7 +227,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); 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 54e556cb9ed2..7e8e91235940 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 @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; import java.time.OffsetDateTime; import io.swagger.annotations.*; @@ -21,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Default", description = "the Default API") public interface DefaultApi { @@ -49,10 +52,10 @@ public interface DefaultApi { value = "/thingy/{date}" ) ResponseEntity get( - @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @NotNull @ApiParam(value = "A date-time query parameter", required = true) @Valid @RequestParam(value = "dateTime", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "A date header parameter", required = true) @RequestHeader(value = "X-Order-Date", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate xOrderDate, - @ApiParam(value = "A date cookie parameter") @CookieValue("loginDate") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate loginDate + @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @ApiParam(value = "A date-time query parameter", required = true) @Valid @RequestParam(value = "dateTime", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "A date header parameter", required = true) @RequestHeader(value = "X-Order-Date", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate, + @ApiParam(value = "A date cookie parameter") @CookieValue("loginDate") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate ); @@ -79,8 +82,8 @@ ResponseEntity get( consumes = "application/x-www-form-urlencoded" ) ResponseEntity updatePetWithForm( - @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "Updated last vist timestamp") @RequestParam(value="visitDate", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "Updated last vist timestamp") @RequestParam(value="visitDate", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); } diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index ac82a073506d..9967f902fbf0 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +24,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Pet", description = "the Pet API") public interface PetApi { @@ -122,7 +127,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); @@ -160,7 +165,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); 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 b4b4df339155..94e33923fb3d 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 @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Store", description = "the Store API") public interface StoreApi { diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index fdd47d7f560c..5dd5dabb68d0 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "User", description = "the User API") public interface UserApi { diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java index f21d835af4da..af9a5d3bbec9 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ + @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Category name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { 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("}"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index ec1b1b81d6a4..3ab8ad09cb6d 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ + @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -38,9 +41,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -58,9 +60,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -78,9 +79,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -89,7 +89,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java index 2f24cd46851d..658d0de71681 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,13 +16,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ + @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -32,7 +36,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -87,9 +91,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -107,9 +110,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -127,9 +129,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -147,10 +148,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -168,9 +167,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -188,9 +186,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -199,7 +196,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -226,7 +222,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index a1f702f1a72f..1c0c076a38c1 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -18,13 +18,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ + @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -158,10 +156,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -187,10 +183,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -208,9 +202,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -219,7 +212,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +238,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 8e3f67322335..86be70f2d3ed 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ + @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { 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("}"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java index 73fcf01b5375..e350716a9338 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ + @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -53,9 +56,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -73,9 +75,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -93,9 +94,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -113,9 +113,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -133,9 +132,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -153,9 +151,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -173,9 +170,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -193,9 +189,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -204,7 +199,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -233,7 +227,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index a9cde131118a..5bb72a8db6d2 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Pet", description = "the Pet API") public interface PetApi { 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 ab7dd8afc556..cc5a4ab5f125 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 @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Store", description = "the Store API") public interface StoreApi { diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index e44789929a72..cf4bf1833965 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "User", description = "the User API") public interface UserApi { diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index 26f5a6768a3d..a34d3d591218 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ + @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Category name(String name) { * Get name * @return name */ + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(value = "") - -@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { 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("}"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index ec1b1b81d6a4..3ab8ad09cb6d 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ + @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -38,9 +41,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -58,9 +60,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -78,9 +79,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -89,7 +89,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 2f24cd46851d..658d0de71681 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,13 +16,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ + @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -32,7 +36,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -87,9 +91,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -107,9 +110,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -127,9 +129,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -147,10 +148,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -168,9 +167,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -188,9 +186,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -199,7 +196,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -226,7 +222,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index a1f702f1a72f..1c0c076a38c1 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -18,13 +18,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ + @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -158,10 +156,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -187,10 +183,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -208,9 +202,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -219,7 +212,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +238,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index 8e3f67322335..86be70f2d3ed 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ + @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { 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("}"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index 73fcf01b5375..e350716a9338 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ + @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -53,9 +56,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -73,9 +75,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -93,9 +94,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -113,9 +113,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -133,9 +132,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -153,9 +151,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -173,9 +170,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -193,9 +189,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -204,7 +199,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -233,7 +227,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index a893c6896117..ea38051f7a9f 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { 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 1ffe7a38f36a..49e3a394772d 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 @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 2baaed308ede..1eaf80c61555 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java index f21d835af4da..af9a5d3bbec9 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ + @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Category name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { 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("}"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java index ec1b1b81d6a4..3ab8ad09cb6d 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ + @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -38,9 +41,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -58,9 +60,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -78,9 +79,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -89,7 +89,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index 2f24cd46851d..658d0de71681 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,13 +16,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ + @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -32,7 +36,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -87,9 +91,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -107,9 +110,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -127,9 +129,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -147,10 +148,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -168,9 +167,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -188,9 +186,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -199,7 +196,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -226,7 +222,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index a1f702f1a72f..1c0c076a38c1 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -18,13 +18,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ + @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -158,10 +156,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -187,10 +183,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -208,9 +202,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -219,7 +212,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +238,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java index 8e3f67322335..86be70f2d3ed 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ + @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { 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("}"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java index 73fcf01b5375..e350716a9338 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ + @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -53,9 +56,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -73,9 +75,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -93,9 +94,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -113,9 +113,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -133,9 +132,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -153,9 +151,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -173,9 +170,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -193,9 +189,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -204,7 +199,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -233,7 +227,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); 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 88803c5bac2a..7e87d57e371f 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -29,7 +30,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Pet", description = "the Pet API") public interface PetApi { @@ -41,6 +44,7 @@ public interface PetApi { * @return Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -68,6 +72,7 @@ CompletableFuture> addPet( * @return Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -96,6 +101,7 @@ CompletableFuture> deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -126,6 +132,7 @@ CompletableFuture>> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -156,6 +163,7 @@ CompletableFuture>> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -186,6 +194,7 @@ CompletableFuture> getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -216,6 +225,7 @@ CompletableFuture> updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -246,6 +256,7 @@ CompletableFuture> updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { 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 da999d740a5a..e58b40e6494d 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 @@ -29,7 +29,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Store", description = "the Store API") public interface StoreApi { @@ -43,6 +45,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -66,6 +69,7 @@ CompletableFuture> deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -95,6 +99,7 @@ CompletableFuture>> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -121,6 +126,7 @@ CompletableFuture> getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { 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 225627cbacc0..7c13a46234c3 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 @@ -30,7 +30,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "User", description = "the User API") public interface UserApi { @@ -43,6 +45,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -65,6 +68,7 @@ CompletableFuture> createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -87,6 +91,7 @@ CompletableFuture> createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -111,6 +116,7 @@ CompletableFuture> createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -136,6 +142,7 @@ CompletableFuture> deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -163,6 +170,7 @@ CompletableFuture> getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -187,6 +195,7 @@ CompletableFuture> loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -212,6 +221,7 @@ CompletableFuture> logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java index cb69c674a1e4..03e4a4ce0b51 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ef610e38f01..ea4f1e402648 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 528598b79ea7..e624a0d7c1fe 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,13 +15,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 7c2986fea846..ddff66759bac 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -17,13 +17,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java index 27166f687a27..5c3ac82ba6e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java index ba24f681c1df..328569672eb4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); 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 7dbf104466fb..7eb240e1ccce 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 @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; import java.time.OffsetDateTime; import io.swagger.v3.oas.annotations.Operation; @@ -28,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Default", description = "the Default API") public interface DefaultApi { @@ -43,8 +46,7 @@ public interface DefaultApi { * @return OK (status code 200) */ @Operation( - summary = "", - tags = { }, + operationId = "get", responses = { @ApiResponse(responseCode = "200", description = "OK") } @@ -54,10 +56,10 @@ public interface DefaultApi { value = "/thingy/{date}" ) ResponseEntity get( - @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "dateTime", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true, schema = @Schema(description = "")) @RequestHeader(value = "X-Order-Date", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate xOrderDate, - @Parameter(name = "loginDate", description = "A date cookie parameter", schema = @Schema(description = "")) @CookieValue("loginDate") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate loginDate + @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "dateTime", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true, schema = @Schema(description = "")) @RequestHeader(value = "X-Order-Date", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate, + @Parameter(name = "loginDate", description = "A date cookie parameter", schema = @Schema(description = "")) @CookieValue("loginDate") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate ); @@ -70,8 +72,7 @@ ResponseEntity get( * @return Invalid input (status code 405) */ @Operation( - summary = "", - tags = { }, + operationId = "updatePetWithForm", responses = { @ApiResponse(responseCode = "405", description = "Invalid input") } @@ -82,8 +83,8 @@ ResponseEntity get( consumes = "application/x-www-form-urlencoded" ) ResponseEntity updatePetWithForm( - @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "visitDate", description = "Updated last vist timestamp", schema = @Schema(description = "")) @RequestParam(value="visitDate", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "visitDate", description = "Updated last vist timestamp", schema = @Schema(description = "")) @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/AnotherFakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9085e07967bc..a257403c1053 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 @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "AnotherFake", description = "the AnotherFake API") public interface AnotherFakeApi { @@ -40,6 +42,7 @@ public interface AnotherFakeApi { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { 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 a9d785eaea31..f6b8fb74feb1 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 @@ -7,11 +7,13 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -35,7 +37,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Fake", description = "the Fake API") public interface FakeApi { @@ -48,6 +52,7 @@ public interface FakeApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -72,7 +77,7 @@ ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -96,7 +101,7 @@ ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -120,7 +125,7 @@ ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -144,7 +149,7 @@ ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -168,7 +173,7 @@ ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -192,7 +197,7 @@ ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -217,6 +222,7 @@ ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -256,6 +262,7 @@ ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -282,8 +289,8 @@ ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @RequestParam(value="float", required=false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @RequestParam(value="string", required=false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestParam("binary") MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @RequestParam(value="date", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @RequestParam(value="dateTime", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @RequestParam(value="date", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @RequestParam(value="dateTime", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @RequestParam(value="password", required=false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @RequestParam(value="callback", required=false) String paramCallback ); @@ -305,6 +312,7 @@ ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -342,6 +350,7 @@ ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -369,6 +378,7 @@ ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -393,6 +403,7 @@ ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -422,7 +433,7 @@ ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", 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 4239438bd3c1..4be02096d7bc 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 @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "FakeClassnameTags123", description = "the FakeClassnameTags123 API") public interface FakeClassnameTags123Api { @@ -40,6 +42,7 @@ public interface FakeClassnameTags123Api { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { 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 c618e1e4d902..b5d40e07435a 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -29,7 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Pet", description = "the Pet API") public interface PetApi { @@ -42,6 +45,7 @@ public interface PetApi { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -71,6 +75,7 @@ ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -100,6 +105,7 @@ ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -130,6 +136,7 @@ ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -160,6 +167,7 @@ ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -191,6 +199,7 @@ ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -222,6 +231,7 @@ ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -252,6 +262,7 @@ ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { @@ -283,6 +294,7 @@ ResponseEntity uploadFile( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { 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 d8329e19d40b..f660e0a976d3 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 @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Store", description = "the Store API") public interface StoreApi { @@ -42,6 +44,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -65,6 +68,7 @@ ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -94,6 +98,7 @@ ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -120,6 +125,7 @@ ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { 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 665546ec700e..de834ecc2330 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 @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "User", description = "the User API") public interface UserApi { @@ -42,6 +44,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -64,6 +67,7 @@ ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -86,6 +90,7 @@ ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -110,6 +115,7 @@ ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -135,6 +141,7 @@ ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -162,6 +169,7 @@ ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -186,6 +194,7 @@ ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -211,6 +220,7 @@ ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { 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"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); 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 9eb95c97b891..4ae25d24dfb3 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 @@ -6,7 +6,9 @@ package org.openapitools.api; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -28,7 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Pet", description = "the Pet API") public interface PetApi { @@ -40,6 +44,7 @@ public interface PetApi { * @return Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -67,6 +72,7 @@ ResponseEntity addPet( * @return Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -95,6 +101,7 @@ ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -112,7 +119,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status, - final org.springframework.data.domain.Pageable pageable + final Pageable pageable ); @@ -126,6 +133,7 @@ ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -143,7 +151,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags, - final org.springframework.data.domain.Pageable pageable + final Pageable pageable ); @@ -157,6 +165,7 @@ ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -187,6 +196,7 @@ ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -217,6 +227,7 @@ ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -247,6 +258,7 @@ ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { 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 a11117a8c9fa..680489f3b4a1 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 @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Store", description = "the Store API") public interface StoreApi { @@ -42,6 +44,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -65,6 +68,7 @@ ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -94,6 +98,7 @@ ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -120,6 +125,7 @@ ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { 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 f583fb099e73..d51556186fe0 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 @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "User", description = "the User API") public interface UserApi { @@ -42,6 +44,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -64,6 +67,7 @@ ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -86,6 +90,7 @@ ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -110,6 +115,7 @@ ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -135,6 +141,7 @@ ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -162,6 +169,7 @@ ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -186,6 +194,7 @@ ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -207,6 +216,7 @@ ResponseEntity logoutUser( * @return endpoint configuration response (status code 200) */ @Operation( + operationId = "logoutUserOptions", summary = "logoutUserOptions", tags = { "user" }, responses = { @@ -232,6 +242,7 @@ ResponseEntity logoutUserOptions( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java index cb69c674a1e4..03e4a4ce0b51 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ef610e38f01..ea4f1e402648 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java index 528598b79ea7..e624a0d7c1fe 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,13 +15,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 7c2986fea846..ddff66759bac 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -17,13 +17,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 27166f687a27..5c3ac82ba6e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java index ba24f681c1df..328569672eb4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); 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 90dfd2c5f8e9..9f82a4385212 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -28,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Pet", description = "the Pet API") public interface PetApi { @@ -41,6 +44,7 @@ public interface PetApi { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -70,6 +74,7 @@ ResponseEntity addPet( * @return Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -98,6 +103,7 @@ ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -128,6 +134,7 @@ ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -158,6 +165,7 @@ ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -189,6 +197,7 @@ ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -221,6 +230,7 @@ ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -251,6 +261,7 @@ ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { 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 c42b27e3a5b8..a8bab9da996a 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 @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Store", description = "the Store API") public interface StoreApi { @@ -42,6 +44,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -65,6 +68,7 @@ ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -94,6 +98,7 @@ ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -120,6 +125,7 @@ ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { 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 5b0522ee7758..6181c9579ead 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 @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "User", description = "the User API") public interface UserApi { @@ -42,6 +44,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -68,6 +71,7 @@ ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -94,6 +98,7 @@ ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -122,6 +127,7 @@ ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -150,6 +156,7 @@ ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -177,6 +184,7 @@ ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -201,6 +209,7 @@ ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -229,6 +238,7 @@ ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index 463de0ed39a3..823adb2ae4d8 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - -@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ef610e38f01..ea4f1e402648 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 528598b79ea7..e624a0d7c1fe 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,13 +15,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 7c2986fea846..ddff66759bac 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -17,13 +17,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index 27166f687a27..5c3ac82ba6e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index ba24f681c1df..328569672eb4 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator-ignore b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/.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/openapi3/client/petstore/spring-stubs/.openapi-generator/FILES b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/FILES new file mode 100644 index 000000000000..87837793235c --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/FILES @@ -0,0 +1,12 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java diff --git a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-stubs/README.md b/samples/openapi3/client/petstore/spring-stubs/README.md new file mode 100644 index 000000000000..d43a1de307df --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/README.md @@ -0,0 +1,27 @@ + +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/samples/openapi3/client/petstore/spring-stubs/pom.xml b/samples/openapi3/client/petstore/spring-stubs/pom.xml new file mode 100644 index 000000000000..5e1f049caf43 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-stubs + jar + spring-stubs + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} 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 new file mode 100644 index 000000000000..a8206198c4a8 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,359 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid input (status code 405) + */ + @Operation( + operationId = "addPet", + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = "application/json" + ) + default ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + @Operation( + operationId = "deletePet", + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + default ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + operationId = "findPetsByStatus", + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = "application/json" + ) + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + operationId = "findPetsByTags", + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = "application/json" + ) + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + operationId = "getPetById", + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = "application/json" + ) + default ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + operationId = "updatePet", + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = "application/json" + ) + default ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + operationId = "updatePetWithForm", + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = "application/x-www-form-urlencoded" + ) + default ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "uploadFile", + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = "application/json", + consumes = "multipart/form-data" + ) + default ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..a0f582be8e25 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,189 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + operationId = "deleteOrder", + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + default ResponseEntity deleteOrder( + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("orderId") String orderId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + operationId = "getInventory", + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = "application/json" + ) + default ResponseEntity> getInventory( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + operationId = "getOrderById", + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = "application/json" + ) + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("orderId") Long orderId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + operationId = "placeOrder", + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = "application/json" + ) + default ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} 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 new file mode 100644 index 000000000000..ea95ba18f55c --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,282 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUser", + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + default ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUsersWithArrayInput", + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + default ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUsersWithListInput", + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + default ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "deleteUser", + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + default ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "getUserByName", + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = "application/json" + ) + default ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + operationId = "loginUser", + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = "application/json" + ) + default ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + operationId = "logoutUser", + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + default ResponseEntity logoutUser( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /user/{username} : 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) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "updateUser", + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + default ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..03e4a4ce0b51 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A category for a pet + */ + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + 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 + */ + + @Schema(name = "name", required = false) + 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/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..ea4f1e402648 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,132 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Describes the result of uploading an image resource + */ + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @Schema(name = "code", required = false) + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", required = false) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @Schema(name = "message", required = false) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..e624a0d7c1fe --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,245 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * An order for a pets from the pet store + */ + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + + @Schema(name = "petId", required = false) + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + + @Schema(name = "quantity", required = false) + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Valid + @Schema(name = "shipDate", required = false) + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + + @Schema(name = "status", description = "Order Status", required = false) + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + + @Schema(name = "complete", required = false) + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..ddff66759bac --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,261 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A pet for sale in the pet store + */ + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Valid + @Schema(name = "category", required = false) + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @Schema(name = "name", example = "doggie", required = true) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + 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 + */ + @NotNull + @Schema(name = "photoUrls", required = true) + 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 + */ + @Valid + @Schema(name = "tags", required = false) + 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 + */ + + @Schema(name = "status", description = "pet status in the store", required = false) + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..5c3ac82ba6e8 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A tag for a pet + */ + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + 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 + */ + + @Schema(name = "name", required = false) + 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/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..328569672eb4 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,252 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A User who is purchasing from the pet store + */ + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + + @Schema(name = "username", required = false) + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + + @Schema(name = "firstName", required = false) + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + + @Schema(name = "lastName", required = false) + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + + @Schema(name = "email", required = false) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + + @Schema(name = "password", required = false) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + + @Schema(name = "phone", required = false) + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + + @Schema(name = "userStatus", description = "User Status", required = false) + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + 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 81ca2e8ee07c..e6cdc38fc69e 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 @@ -23,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -36,6 +38,7 @@ public interface AnotherFakeApi { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7968826328d7..7c04dd3bba6b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -26,14 +27,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 d634215d030b..02ebe80dc983 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -32,7 +34,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -45,6 +49,7 @@ public interface FakeApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -69,7 +74,7 @@ ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -93,7 +98,7 @@ ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -117,7 +122,7 @@ ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -141,7 +146,7 @@ ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -165,7 +170,7 @@ ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -189,7 +194,7 @@ ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -214,6 +219,7 @@ ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -253,6 +259,7 @@ ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -279,8 +286,8 @@ ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ); @@ -302,6 +309,7 @@ ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -339,6 +347,7 @@ ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -366,6 +375,7 @@ ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -390,6 +400,7 @@ ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -419,7 +430,7 @@ ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -447,6 +458,7 @@ ResponseEntity testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 362ff5ff5e3a..29b8c0d8176d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -28,6 +30,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -35,14 +38,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } @@ -215,8 +220,8 @@ public ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { 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 5f640ca78deb..bbfe6492b97a 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 @@ -23,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -36,6 +38,7 @@ public interface FakeClassnameTestApi { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 1f416d5ab25f..aaed20e877f5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -26,14 +27,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } 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 d4cbbab6f7b1..28441b7e8515 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -25,7 +26,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -38,6 +41,7 @@ public interface PetApi { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -67,6 +71,7 @@ ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -96,6 +101,7 @@ ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -126,6 +132,7 @@ ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -156,6 +163,7 @@ ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -187,6 +195,7 @@ ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -218,6 +227,7 @@ ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -248,6 +258,7 @@ ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 47d4ffcdb9d9..5b4cc8611ca9 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -28,14 +30,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 26389c13ef58..46a9931877bc 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 @@ -24,7 +24,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -38,6 +40,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -61,6 +64,7 @@ ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -90,6 +94,7 @@ ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -116,6 +121,7 @@ ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 91b88d0652f3..5d9974b56913 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -27,14 +28,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } 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 3cdc6eeed919..62d52cbcebf3 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 @@ -25,7 +25,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -38,6 +40,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -60,6 +63,7 @@ ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -82,6 +86,7 @@ ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -106,6 +111,7 @@ ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -131,6 +137,7 @@ ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -158,6 +165,7 @@ ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -182,6 +190,7 @@ ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -207,6 +216,7 @@ ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index c77024353b9c..27741595f571 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -28,14 +29,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 70f6bb0d1c47..1facfb48af62 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index ceb28401cd5e..9775210209ab 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 9455c14cd5fd..d2440961a78c 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 69e4ba3737e9..f28ec12951fd 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -78,9 +81,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -106,10 +108,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -135,9 +135,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -163,9 +162,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -191,10 +189,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -220,10 +216,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -249,10 +243,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -278,10 +270,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -299,9 +289,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -319,9 +308,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -339,9 +327,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -350,7 +337,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -382,7 +368,6 @@ public int hashCode() { 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"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index fb06ae322e26..2125dd106955 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 71868e473357..788612115c61 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 75db554b3295..f469e4b37d94 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index aa62e4fbb2ea..00091c392dfc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index 26eeb264a74d..e762aace509a 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -12,19 +12,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -40,10 +42,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -61,9 +61,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -72,7 +71,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -95,7 +93,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 436750d2ef67..0facaee5e606 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -40,10 +43,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -52,7 +53,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -74,7 +74,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index da9c15f73dd1..1be9988fc5bc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -40,10 +43,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -52,7 +53,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -74,7 +74,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index 6e995d00cb8d..52090b658b85 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -48,9 +51,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -76,10 +78,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -105,10 +105,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -117,7 +115,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -141,7 +138,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index 1ca8388a6ce4..455f600b0cee 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index f39298398eb9..56ea82672354 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -68,9 +71,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -79,7 +81,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +102,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index ac4b97258888..bab70ab41af5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -43,9 +46,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -63,9 +65,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -83,9 +84,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -103,9 +103,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -123,9 +122,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -143,9 +141,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -154,7 +151,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -181,7 +177,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index e41f36a626bd..d502537ab4e6 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 9bc555ab0007..5354e8af1322 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -28,9 +31,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -39,7 +41,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 03a760ee3fd5..57afab36b95e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -31,9 +34,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -51,10 +53,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -63,7 +63,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +85,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 878a45986a82..b31b562dbba5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -29,9 +32,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -40,7 +42,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java index 74b85fd28234..31927074d37b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -28,9 +31,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -39,7 +41,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index 1dbce140c902..992bc894a34b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 0af97ffbaf41..a82bcdc49073 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -28,9 +31,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -39,7 +41,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index ef006f92c684..dabe3611437e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -105,9 +108,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -133,9 +135,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -144,7 +145,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -167,7 +167,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java index f5edf59363ac..d26620f561a6 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index f67ec5d041aa..a9cc411bc890 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -186,9 +189,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -206,10 +208,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -227,9 +227,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -247,9 +246,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -267,10 +265,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -279,7 +275,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -305,7 +300,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java index 3eb39014b636..87884c44e796 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -29,9 +32,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -40,7 +42,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 0ab7ce083e3a..8d27d598bb27 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -35,10 +38,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -64,10 +65,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -76,7 +75,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -99,7 +97,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index e0203457d83b..a82f33264d64 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -7,6 +7,8 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -46,14 +51,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -76,9 +81,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -98,9 +102,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -118,9 +121,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -140,11 +142,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -164,9 +163,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -186,9 +184,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -206,9 +203,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -226,10 +222,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -238,7 +232,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -247,15 +241,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -268,11 +260,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -290,10 +279,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -311,10 +298,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -332,10 +317,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -353,10 +336,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -365,7 +346,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -400,7 +380,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d2f0afa1d4ae..adc53a60f2c2 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -31,9 +34,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -51,9 +53,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -62,7 +63,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +85,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index ed29ea575eef..81ec542f86bb 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -88,10 +91,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -117,9 +118,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,9 +145,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -173,9 +172,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -184,7 +182,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -209,7 +206,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e846cf63782d..704d5daf9615 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -9,6 +9,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; @@ -16,17 +17,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -42,10 +46,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -63,10 +65,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -92,10 +92,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -104,7 +102,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -128,7 +125,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 8aa5b96e1dae..21c119570b91 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -32,9 +35,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -52,9 +54,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -63,7 +64,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +86,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index 86af4aba24a0..b2190788b398 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -34,9 +37,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -54,9 +56,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -74,9 +75,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -85,7 +85,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -109,7 +108,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java index 4c81c32e795a..65083e0155bd 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -28,9 +31,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -39,7 +41,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 06bc8e6627cf..2c77d8a517a2 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -29,9 +32,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -40,7 +42,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index 5e755ef8dd18..2dd3efc08b45 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -38,10 +41,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -59,9 +60,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -79,9 +79,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -99,9 +98,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -110,7 +108,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -135,7 +132,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index 88b9009b1dc1..e4f864b35b27 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -29,10 +32,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -41,7 +42,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java index 5c9bb7ae7e4a..a69c5a43f4e8 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; @@ -12,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -28,7 +32,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -83,9 +87,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -103,9 +106,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -123,9 +125,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -143,10 +144,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -164,9 +163,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -184,9 +182,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -195,7 +192,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -222,7 +218,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index cea0bf2f7578..2a94c21a95d9 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -35,10 +38,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -56,9 +57,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -76,9 +76,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -87,7 +86,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +109,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java index 72e7826828f3..6e050d8e1507 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index 9ca656bd9170..5192f3943c04 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -18,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 15b221c739be..cf421153515a 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -31,9 +34,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -51,9 +53,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -62,7 +63,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +85,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index 56ced4dc6f0a..e52a3838938e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -28,9 +31,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -39,7 +41,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java index f98b6a0b281d..873bb3fc435b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -31,9 +34,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -51,9 +53,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -62,7 +63,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +85,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index d346c36b80aa..625823af85ea 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -44,10 +47,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -65,11 +66,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -87,10 +85,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -108,10 +104,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index c62a0e4dc71f..90533252ffd8 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -47,10 +50,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -111,10 +107,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -132,10 +126,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java index 155bdf978d59..60b86f5edc60 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -49,9 +52,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -69,9 +71,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -89,9 +90,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -109,9 +109,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -129,9 +128,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -149,9 +147,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -169,9 +166,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -189,9 +185,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -200,7 +195,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -229,7 +223,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 9f829a1a26fe..ac1c8c10e5dc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -124,9 +127,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -144,10 +146,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -165,9 +165,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -185,9 +184,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -213,9 +211,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -233,9 +230,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -253,10 +249,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -274,9 +268,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -294,9 +287,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -322,9 +314,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -350,9 +341,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -370,9 +360,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -390,10 +379,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -411,9 +398,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -431,9 +417,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -459,9 +444,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -487,9 +471,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -507,9 +490,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -527,10 +509,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -548,9 +528,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -568,9 +547,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -596,9 +574,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -624,9 +601,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -644,9 +620,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -664,10 +639,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -685,9 +658,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -705,9 +677,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -733,9 +704,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -761,9 +731,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -772,7 +741,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -822,7 +790,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); 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 b36ef3022ad8..65e395479d43 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 @@ -23,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -40,6 +42,7 @@ default AnotherFakeApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index a86542ddf223..2d5e24bcd5f6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { 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 a1667f68fd91..8f17228b6a26 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -32,7 +34,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -49,6 +53,7 @@ default FakeApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -75,7 +80,7 @@ default ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -101,7 +106,7 @@ default ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -127,7 +132,7 @@ default ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -153,7 +158,7 @@ default ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -179,7 +184,7 @@ default ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -205,7 +210,7 @@ default ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -232,6 +237,7 @@ default ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -273,6 +279,7 @@ default ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -299,8 +306,8 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { @@ -324,6 +331,7 @@ default ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -363,6 +371,7 @@ default ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -392,6 +401,7 @@ default ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -418,6 +428,7 @@ default ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -449,7 +460,7 @@ default ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -479,6 +490,7 @@ default ResponseEntity testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } 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 d3a949e65d81..3796fc00ce58 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 @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -19,12 +21,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { 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 52e3ba4f096d..e13856e59a2e 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 @@ -23,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -40,6 +42,7 @@ default FakeClassnameTestApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index ed5a6bfc09a0..fb689b13f943 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { 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 7ddf343bfc3a..ccc4a0d30157 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -25,7 +26,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -42,6 +45,7 @@ default PetApiDelegate getDelegate() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -73,6 +77,7 @@ default ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -104,6 +109,7 @@ default ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -136,6 +142,7 @@ default ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -168,6 +175,7 @@ default ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -201,6 +209,7 @@ default ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -234,6 +243,7 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -266,6 +276,7 @@ default ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index e3adc7d4bca7..9c616c14aaa8 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -12,12 +13,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { 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 de9cf4c59e2a..2c5d36169608 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 @@ -24,7 +24,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -42,6 +44,7 @@ default StoreApiDelegate getDelegate() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -67,6 +70,7 @@ default ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -98,6 +102,7 @@ default ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -126,6 +131,7 @@ default ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } 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 dfe4bb314961..e9b7146b52a8 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 @@ -11,12 +11,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { 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 e7dd25c6b5db..c348d32b8c17 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 @@ -25,7 +25,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -42,6 +44,7 @@ default UserApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -66,6 +69,7 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -90,6 +94,7 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -116,6 +121,7 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -143,6 +149,7 @@ default ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -172,6 +179,7 @@ default ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -198,6 +206,7 @@ default ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -225,6 +234,7 @@ default ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index 2efbd71c9dc9..c39231c6b299 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -12,12 +12,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { 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"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); 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 82a5df22e20e..5b0b00add83c 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 @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -44,6 +46,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 456caa3cf66f..9bc3c924c700 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -36,7 +38,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -53,6 +57,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -82,7 +87,7 @@ default ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -111,7 +116,7 @@ default ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -149,7 +154,7 @@ default ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -178,7 +183,7 @@ default ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -207,7 +212,7 @@ default ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -236,7 +241,7 @@ default ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -266,6 +271,7 @@ default ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -319,6 +325,7 @@ default ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -347,8 +354,8 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { @@ -371,6 +378,7 @@ default ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -411,6 +419,7 @@ default ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -443,6 +452,7 @@ default ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -472,6 +482,7 @@ default ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -506,7 +517,7 @@ default ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -539,6 +550,7 @@ default ResponseEntity testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } 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 8f1db4a34810..ada59fbd2be1 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 @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -44,6 +46,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } 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 67abf9f8cb5e..b44b240e3c38 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -29,7 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -46,6 +49,7 @@ default Optional getRequest() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -79,6 +83,7 @@ default ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -113,6 +118,7 @@ default ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -162,6 +168,7 @@ default ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -211,6 +218,7 @@ default ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -261,6 +269,7 @@ default ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -297,6 +306,7 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -332,6 +342,7 @@ default ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 ce360c31059f..3f7578b7e96b 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 @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -74,6 +77,7 @@ default ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -108,6 +112,7 @@ default ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -153,6 +158,7 @@ default ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } 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 3f0113d6d1ad..6312c5190a15 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 @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -73,6 +76,7 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -100,6 +104,7 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -129,6 +134,7 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -159,6 +165,7 @@ default ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -205,6 +212,7 @@ default ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -234,6 +242,7 @@ default ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -264,6 +273,7 @@ default ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { 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"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); 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 c7e2bb2b25a2..847cc88474b8 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 @@ -27,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -44,6 +46,7 @@ default AnotherFakeApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2ef11c811c11..575a4e23910b 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -14,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { 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 729f78eb8246..e0ac539a024c 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -36,7 +38,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -53,6 +57,7 @@ default FakeApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -80,7 +85,7 @@ default Mono> createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -107,7 +112,7 @@ default Mono> fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -134,7 +139,7 @@ default Mono> fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -161,7 +166,7 @@ default Mono> fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -188,7 +193,7 @@ default Mono> fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -215,7 +220,7 @@ default Mono> testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -243,6 +248,7 @@ default Mono> testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -285,6 +291,7 @@ default Mono> testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -311,8 +318,8 @@ default Mono> testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) Flux binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback, @Parameter(hidden = true) final ServerWebExchange exchange @@ -337,6 +344,7 @@ default Mono> testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -377,6 +385,7 @@ default Mono> testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -407,6 +416,7 @@ default Mono> testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -434,6 +444,7 @@ default Mono> testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -466,7 +477,7 @@ default Mono> testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -497,6 +508,7 @@ default Mono> testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } 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 dbe78fa1c7f9..0193067433b9 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 @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -23,12 +25,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { 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 229cba518a2a..17dfd1cca127 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 @@ -27,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -44,6 +46,7 @@ default FakeClassnameTestApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 4127d96d9e3e..bd1f7f3542f8 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -14,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { 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 150f20d9401e..09c88088125d 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -29,7 +30,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -46,6 +49,7 @@ default PetApiDelegate getDelegate() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -78,6 +82,7 @@ default Mono> addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -110,6 +115,7 @@ default Mono> deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -143,6 +149,7 @@ default Mono>> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -176,6 +183,7 @@ default Mono>> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -210,6 +218,7 @@ default Mono> getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -244,6 +253,7 @@ default Mono> updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -277,6 +287,7 @@ default Mono> updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index 8dc1be776ea0..b4c51ede9184 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -16,12 +17,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { 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 056bfb145d45..776ecce29b0a 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 @@ -28,7 +28,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -46,6 +48,7 @@ default StoreApiDelegate getDelegate() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -72,6 +75,7 @@ default Mono> deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -103,6 +107,7 @@ default Mono>> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -132,6 +137,7 @@ default Mono> getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } 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 02daadf024a1..d4f1e2efbf99 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 @@ -15,12 +15,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { 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 1bdbac92e64c..14d69223a9cc 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 @@ -29,7 +29,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -46,6 +48,7 @@ default UserApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -71,6 +74,7 @@ default Mono> createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -96,6 +100,7 @@ default Mono> createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -123,6 +128,7 @@ default Mono> createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -151,6 +157,7 @@ default Mono> deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -181,6 +188,7 @@ default Mono> getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -208,6 +216,7 @@ default Mono> loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -235,6 +244,7 @@ default Mono> logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index 3985dd30ecdf..063cd6d0ee87 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -16,12 +16,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { 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"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); 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 ccd404fbf320..26879041d82e 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 @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -44,6 +46,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 720457848da9..f34a5b0d2b79 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -36,7 +38,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -53,6 +57,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -80,7 +85,7 @@ default ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -107,7 +112,7 @@ default ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -143,7 +148,7 @@ default ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -170,7 +175,7 @@ default ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -197,7 +202,7 @@ default ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -224,7 +229,7 @@ default ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -252,6 +257,7 @@ default ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -303,6 +309,7 @@ default ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -329,8 +336,8 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { @@ -355,6 +362,7 @@ default ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -395,6 +403,7 @@ default ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -425,6 +434,7 @@ default ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -452,6 +462,7 @@ default ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -484,7 +495,7 @@ default ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -515,6 +526,7 @@ default ResponseEntity testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } 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 62e378597251..ff42c358bc41 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 @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -44,6 +46,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } 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 f28b85a83435..5f049169a647 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -29,7 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -46,6 +49,7 @@ default Optional getRequest() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -78,6 +82,7 @@ default ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -110,6 +115,7 @@ default ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -157,6 +163,7 @@ default ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -204,6 +211,7 @@ default ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -252,6 +260,7 @@ default ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -286,6 +295,7 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -319,6 +329,7 @@ default ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 de9b9d16f830..2709d5b98b60 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 @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -72,6 +75,7 @@ default ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -104,6 +108,7 @@ default ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -147,6 +152,7 @@ default ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } 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 5a85648b515c..9c87066a553a 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 @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -71,6 +74,7 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -96,6 +100,7 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -123,6 +128,7 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -151,6 +157,7 @@ default ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -195,6 +202,7 @@ default ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -222,6 +230,7 @@ default ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -250,6 +259,7 @@ default ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { 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"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); 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 0bec586d6930..f27571c387be 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -28,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -45,6 +48,7 @@ default Optional getRequest() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -91,6 +95,7 @@ default ResponseEntity addPet( * @return Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -122,6 +127,7 @@ default ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -169,6 +175,7 @@ default ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -216,6 +223,7 @@ default ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -264,6 +272,7 @@ default ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -313,6 +322,7 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -346,6 +356,7 @@ default ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 98cbb475200d..04b786a8ba48 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 @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -72,6 +75,7 @@ default ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -104,6 +108,7 @@ default ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -147,6 +152,7 @@ default ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } 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 899416135fc5..3268f2475c06 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 @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -75,6 +78,7 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -104,6 +108,7 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -135,6 +140,7 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -166,6 +172,7 @@ default ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -210,6 +217,7 @@ default ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -237,6 +245,7 @@ default ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -268,6 +277,7 @@ default ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index 463de0ed39a3..823adb2ae4d8 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - -@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ef610e38f01..ea4f1e402648 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index 528598b79ea7..e624a0d7c1fe 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,13 +15,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 7c2986fea846..ddff66759bac 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -17,13 +17,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index 27166f687a27..5c3ac82ba6e8 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index ba24f681c1df..328569672eb4 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java index b5835986beca..e8a00e182c54 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java @@ -16,15 +16,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Category") + +@Schema(name = "Category", description = "A category for a pet") +@JacksonXmlRootElement(localName = "Category") @XmlRootElement(name = "Category") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class Category { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -42,9 +47,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -62,9 +66,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - -@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(name = "name", required = false) public String getName() { return name; } @@ -73,7 +76,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +98,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java index 4029a7a8be32..9be107507838 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -16,15 +16,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "ModelApiResponse") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@JacksonXmlRootElement(localName = "ModelApiResponse") @XmlRootElement(name = "ModelApiResponse") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class ModelApiResponse { + @JsonProperty("code") @JacksonXmlProperty(localName = "code") private Integer code; @@ -46,9 +51,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -66,9 +70,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -86,9 +89,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -97,7 +99,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -121,7 +122,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java index 50fc948d4d59..5e8e4d0fc1aa 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Date; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,15 +19,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Order") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@JacksonXmlRootElement(localName = "Order") @XmlRootElement(name = "Order") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class Order { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -41,7 +47,7 @@ public class Order { @JsonProperty("shipDate") @JacksonXmlProperty(localName = "shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private Date shipDate; /** @@ -98,9 +104,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -118,9 +123,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -138,9 +142,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -158,10 +161,8 @@ public Order shipDate(Date shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public Date getShipDate() { return shipDate; } @@ -179,9 +180,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -199,9 +199,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -210,7 +209,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -237,7 +235,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java index 04fe97643f6e..22b7ba48291b 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java @@ -21,15 +21,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Pet") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@JacksonXmlRootElement(localName = "Pet") @XmlRootElement(name = "Pet") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class Pet { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -102,9 +107,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -122,10 +126,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -143,10 +145,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -169,10 +169,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -198,10 +196,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -219,9 +215,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -230,7 +225,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -257,7 +251,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java index 1c26d8799952..a7beefc24152 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java @@ -16,15 +16,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Tag") + +@Schema(name = "Tag", description = "A tag for a pet") +@JacksonXmlRootElement(localName = "Tag") @XmlRootElement(name = "Tag") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class Tag { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -42,9 +47,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -62,9 +66,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -73,7 +76,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +98,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java index e6943a48f328..f8b1176d41bb 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java @@ -16,15 +16,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "User") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@JacksonXmlRootElement(localName = "User") @XmlRootElement(name = "User") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class User { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -66,9 +71,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -86,9 +90,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -106,9 +109,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -126,9 +128,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -146,9 +147,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -166,9 +166,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -186,9 +185,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -206,9 +204,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -217,7 +214,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +242,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java index f4cc86e3817c..cf414337bbc0 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "test-headers", description = "the test-headers API") public interface TestHeadersApi { diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApiController.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApiController.java index 503c9cea6617..cdc9e71f4347 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApiController.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.toto.base-path:}") public class TestHeadersApiController implements TestHeadersApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public TestHeadersApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java index 208840a0b056..e585fe05b84f 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "test-query-params", description = "the test-query-params API") public interface TestQueryParamsApi { diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApiController.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApiController.java index 8ded34a79bbb..1884ac71c223 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApiController.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.toto.base-path:}") public class TestQueryParamsApiController implements TestQueryParamsApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public TestQueryParamsApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java index e7115a5f13b9..cae289f03d1b 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TestResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TestResponse { + @JsonProperty("id") private Integer id; @@ -41,10 +44,8 @@ public TestResponse id(Integer id) { * Get id * @return id */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getId() { return id; } @@ -62,10 +63,8 @@ public TestResponse stringField(String stringField) { * Get stringField * @return stringField */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringField() { return stringField; } @@ -83,11 +82,8 @@ public TestResponse numberField(BigDecimal numberField) { * Get numberField * @return numberField */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberField() { return numberField; } @@ -105,10 +101,8 @@ public TestResponse booleanField(Boolean booleanField) { * Get booleanField * @return booleanField */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBooleanField() { return booleanField; } @@ -117,7 +111,6 @@ public void setBooleanField(Boolean booleanField) { this.booleanField = booleanField; } - @Override public boolean equals(Object o) { if (this == o) { @@ -142,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TestResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" stringField: ").append(toIndentedString(stringField)).append("\n"); sb.append(" numberField: ").append(toIndentedString(numberField)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57027ab454f9..82d201bd766e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -21,7 +21,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 5481edab7a72..8b5f909ae5ce 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -30,7 +32,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -350,8 +354,8 @@ default CompletableFuture> testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 4d7d81f1a1b5..05159a4c14f9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -21,7 +21,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 22c715f84ef6..053fc844b0d1 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -23,7 +24,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index f3637cae181f..00a99bf54ba8 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -22,7 +22,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 1293676616e2..e8b247455d18 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -23,7 +23,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index fbf95bc75027..682e77202d1e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -20,8 +20,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index bc0af05b90fe..8c4c84d27003 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) LocalDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index 9ab7a9c21f56..acaf496cde75 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index fbf95bc75027..682e77202d1e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -20,8 +20,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java index 1eb518cb89d3..63af72a20e4c 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(LocalDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public LocalDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 04802633a427..d36d85b62d81 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(LocalDateTime dateTi * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public LocalDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java index 593ed335a0fd..2a6c352f08b1 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(LocalDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public LocalDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 71ffda67b0c2..f63a9141189c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index 97c36459aa0f..7e3d25bb2752 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -19,8 +19,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 54acb5633367..73241ece58af 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index af849ea35e73..8ccdac40b273 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index e494b1b2c600..a191e434268c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 00ab9b250fb4..b319600c9510 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 7e78c62f6e16..989f88c0c63d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index d01dc2c8e740..32e7a118e940 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index ef6da01824ae..a9f074c13f65 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 13174a324c55..fcf049c6af9c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java index e61b1eb77b6e..c15efd1d937b 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 96aec05a7434..aecbda603cb5 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index d15054d62914..194acd76a434 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index d6ac2177926c..8e8b948cac22 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java index d2ece0d81f96..4f3be6ed2259 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index a280a3f6cdcf..824974fe6142 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index a064557cd58a..57505b24226d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java index fc4ab35c4fa2..b8976cec9e36 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 9a1f6caceff6..1ad2fc260c02 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java index 250c280e8b17..96a6580d410a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 24a57ea3f813..45154ca12c1d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java index 2b17053e1e65..fce7506b0322 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java index e1f27783a597..204603129979 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 05f26186f9a2..5ff013305270 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index e8101183905e..5c758075628f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java index 6dc082079cf5..21a99583f0d2 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 20672ddb0ff3..f29a046fa29d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/File.java index 05ee5b5aa9b3..35dca542482f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 7e130932b58b..77b8104b7a75 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 0379f1c5c6e1..e37ca0109135 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,18 +11,23 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index f4b869294be5..09dc39be6e83 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java index feba6551cdb2..d23c0b96ca06 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index abbc1403bb6f..0a91f59ff49b 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,23 +12,27 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 513c6029234f..1270afd57ba1 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index 8e7128437969..8ced5f5e4169 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelList.java index 7685326df760..5dbced071c03 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 0c8859109559..37f2d7b22f0c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java index 5551de4c5438..d0980783d75b 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index 4f9793f1e12a..f52e43c1dd84 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java index 89be413bc219..83e683e3d6ae 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -8,18 +8,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index e365d6f2f39e..50e684f86e5c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java index 41cfb97d1e69..cb8a02c1e184 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java index 9c5a7d4617d0..db4c1ce0513c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -162,10 +160,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -192,10 +188,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -213,9 +207,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -224,7 +217,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -251,7 +243,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f31a23539b97..6d313020ae9c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index 36c8e903bf46..0dca87914aff 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java index a6afe72ee647..5c803770a210 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 529910bf9e05..ac0dd3265f79 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -139,10 +133,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -151,7 +143,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -177,7 +168,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index 6f9abf43c41e..b13b6e0d1d14 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -163,10 +155,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -175,7 +165,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -202,7 +191,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java index 523bd4962749..cd278220668f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 2eb5145f1970..cd6bf2b1a1d5 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 14af6c292108..2bc50f00c65b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index dc4a8ace4c6f..294576ae0454 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +24,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -136,7 +141,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -191,7 +196,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index fbf95bc75027..682e77202d1e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -20,8 +20,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java index db4f29350ded..1dc5fc69c61b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -15,18 +15,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 729ef7defa59..d330c28e6791 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -18,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 71ffda67b0c2..f63a9141189c 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index fbf95bc75027..682e77202d1e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -20,8 +20,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 6de38b1147e6..f72d9b894ce0 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index cacb0750801f..17d2e07868be 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -36,9 +39,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -47,7 +49,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 84aa067c80d0..5a89a239c7bb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index afbcf499d332..e1c617b3a62e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,14 +17,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -83,9 +86,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -111,10 +113,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -140,9 +140,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -168,9 +167,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -196,10 +194,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -225,10 +221,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -254,10 +248,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -283,10 +275,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -304,9 +294,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -324,9 +313,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -344,9 +332,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -355,7 +342,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -387,7 +373,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index acc58a56a368..dc95c5c9454a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index be84ad677c57..7325cfa7dd1f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -36,9 +39,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -47,7 +49,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index c9e823070d8e..7e8cab024670 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index c62dc11f2ed2..d14290a194c1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java index 14f743766311..aded2bae8cb8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java @@ -15,21 +15,23 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) -@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") -@com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -45,10 +47,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -66,9 +66,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -77,7 +76,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -100,7 +98,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 61c61fc91997..f733f6d05d5b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -45,10 +48,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -57,7 +58,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +79,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3ad7d2361f7c..948967dfb0e3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -45,10 +48,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -57,7 +58,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +79,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java index 4bfc2cfbb4db..e9c533969a90 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -53,9 +56,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -81,10 +83,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -110,10 +110,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -122,7 +120,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -146,7 +143,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java index ada0edb12a9b..832369e9ff4e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -76,9 +79,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -87,7 +89,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java index 461ed180406a..d52a06bb429c 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,14 +14,17 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -74,9 +77,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -85,7 +87,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -107,7 +108,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java index 437e279449e5..63572bf8e8e3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -48,9 +51,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -68,9 +70,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -88,9 +89,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -108,9 +108,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -128,9 +127,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -148,9 +146,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -159,7 +156,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -186,7 +182,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java index 12ca73636c60..108e5c8b30a5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -35,9 +38,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -46,7 +48,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java index bb4667b4e2cb..08432295c3d2 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java index 84099ff8042b..1497947c1e7e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -36,9 +39,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -56,10 +58,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -68,7 +68,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -91,7 +90,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java index f74c32f05c74..359d871aa11b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -34,9 +37,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -45,7 +47,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -67,7 +68,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java index 55fa62058c17..a7b07bf268c3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -33,9 +36,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -44,7 +46,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java index 93c917674106..800b5daa10cf 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -35,9 +38,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -46,7 +48,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java index 025e4d7759b9..ce03d3658685 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java index 30fe225638ea..816494968a44 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -112,9 +115,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -140,9 +142,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -151,7 +152,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +174,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java index 2d83af41c8e3..acf588be02cd 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ * Gets or Sets EnumClass */ @com.fasterxml.jackson.annotation.JsonFormat + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java index 33ea4eacb0f7..747b908c75fa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -195,9 +198,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -215,10 +217,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -236,9 +236,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -256,9 +255,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -276,10 +274,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -288,7 +284,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -314,7 +309,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/File.java index f483d840515f..f0763ba3be83 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/File.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -34,9 +37,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -45,7 +47,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -67,7 +68,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 89db3e7f8028..c85e7c28fb92 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -40,10 +43,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -69,10 +70,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -81,7 +80,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +102,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java index 86d421a9d886..0964a16e87c9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,14 +20,17 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -51,14 +56,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -81,9 +86,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -103,9 +107,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -123,9 +126,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -145,11 +147,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -169,9 +168,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -191,9 +189,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -211,9 +208,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -231,10 +227,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -243,7 +237,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -252,15 +246,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -273,11 +265,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -295,10 +284,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -316,10 +303,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -337,10 +322,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -358,10 +341,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -370,7 +351,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -405,7 +385,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 97d1a64a22d5..94d26e272480 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -36,9 +39,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -56,9 +58,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -67,7 +68,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -90,7 +90,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java index 726c8b5fcf0d..a67a2f842a80 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java @@ -17,14 +17,17 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -94,10 +97,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -123,9 +124,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -151,9 +151,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -179,9 +178,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -190,7 +188,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -215,7 +212,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b20b2dec7273..09ac3cd1254e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,19 +20,22 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -47,10 +51,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -68,10 +70,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -97,10 +97,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -109,7 +107,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -133,7 +130,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java index f74c29e604cf..df2b0df09245 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -37,9 +40,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -57,9 +59,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -68,7 +69,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -91,7 +91,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java index 01d035fa32d8..607b3d9db62f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -39,9 +42,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -59,9 +61,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -79,9 +80,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -90,7 +90,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +113,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelList.java index e9926c427982..2ba4741b6610 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelList.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -33,9 +36,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -44,7 +46,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java index d17a0da84c8f..0eb9f005974f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -34,9 +37,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -45,7 +47,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -67,7 +68,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java index c5882dc983a9..9afeb6c3d0a7 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -43,10 +46,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -64,9 +65,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -84,9 +84,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -104,9 +103,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -115,7 +113,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -140,7 +137,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java index fc212048b084..e78ca1fb663d 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,14 +14,17 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -34,10 +37,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -46,7 +47,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -68,7 +68,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java index ede10667c9d7..05b93a9c0c79 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -33,7 +37,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -89,9 +93,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -109,9 +112,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -129,9 +131,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -149,10 +150,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -170,9 +169,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -190,9 +188,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -201,7 +198,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -228,7 +224,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java index 0e0d3dc1c394..6b6318d1e2c6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,14 +14,17 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -40,10 +43,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -61,9 +62,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -81,9 +81,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -92,7 +91,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -116,7 +114,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java index e293d46d7b43..1adaf1da0cd6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ * Gets or Sets OuterEnum */ @com.fasterxml.jackson.annotation.JsonFormat + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java index 7f2bff42e91e..07fb58bfa1f1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java @@ -21,14 +21,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -96,9 +99,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -116,10 +118,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -137,10 +137,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -163,10 +161,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -193,10 +189,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -214,9 +208,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -225,7 +218,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -252,7 +244,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1ddffebe8f53..f54ba1923dc9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -36,9 +39,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -56,9 +58,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -67,7 +68,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -90,7 +90,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java index 32a7f5a8851a..240ccd256470 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -33,9 +36,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -44,7 +46,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java index 96053497912d..ddc332d38703 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -36,9 +39,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -56,9 +58,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -67,7 +68,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -90,7 +90,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java index 91863ff730f2..42fd3375bfd1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -49,10 +52,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -113,10 +109,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -139,10 +133,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -151,7 +143,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -177,7 +168,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java index 9d2b60593521..48b53ae02b86 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -52,10 +55,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -73,11 +74,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -95,10 +93,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -116,10 +112,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -137,10 +131,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -163,10 +155,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -175,7 +165,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -202,7 +191,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java index 3fa19e61270a..f889aba17b7e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -54,9 +57,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -74,9 +76,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -94,9 +95,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -114,9 +114,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -134,9 +133,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -154,9 +152,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -174,9 +171,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -194,9 +190,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -205,7 +200,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -234,7 +228,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java index 5d477653f0c2..699a0dc85003 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -129,9 +132,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -149,10 +151,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -170,9 +170,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -190,9 +189,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -218,9 +216,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -238,9 +235,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -258,10 +254,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -279,9 +273,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -299,9 +292,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -327,9 +319,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -355,9 +346,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -375,9 +365,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -395,10 +384,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -416,9 +403,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -436,9 +422,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -464,9 +449,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -492,9 +476,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -512,9 +495,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -532,10 +514,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -553,9 +533,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -573,9 +552,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -601,9 +579,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -629,9 +606,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -649,9 +625,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -669,10 +644,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -690,9 +663,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -710,9 +682,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -738,9 +709,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -766,9 +736,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -777,7 +746,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -827,7 +795,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index eb4da37da2c4..5a4e5b8c884b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index e8f022846bfc..c9ae29ba1fea 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -20,14 +21,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 ce2e0775f783..b14b9f6fecad 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -295,8 +299,8 @@ ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 76034668bf3c..aa5e668384ee 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -22,6 +24,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -29,14 +32,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } @@ -209,8 +214,8 @@ public ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f482b6bf5ac9..ccd8d276dc65 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index b705c60d83bb..e1119b1010d6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -20,14 +21,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index f0ab551e4d9f..c32bead44069 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -18,7 +19,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index f5625cea3f90..ba115c2cd0a4 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -22,14 +24,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 cb72ccb357fd..5dce0416efbc 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 @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 203faf80f73c..d25fe52ea15c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -21,14 +22,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 3f8d7b71b281..07fe60cce885 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index 224d437db48a..af6939bbb160 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -22,14 +23,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 66ec66896784..3792eec67489 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index aeb477e916f2..7bbca47bb996 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4631883198a5..386a47d64607 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 8b8eaffbe717..47118d90ba4e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -79,9 +82,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -107,10 +109,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -136,9 +136,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -164,9 +163,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -192,10 +190,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -221,10 +217,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -250,10 +244,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -279,10 +271,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -300,9 +290,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -320,9 +309,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -340,9 +328,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -351,7 +338,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -383,7 +369,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 30654d0bec87..995edc193238 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 1a2c2a018f13..114425f840c5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 4f14fb1747d0..c655acde2d48 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 3cbd66fa9308..62824a372517 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index 65534bbd4e39..188d2098d77b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -13,19 +13,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -41,10 +43,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -62,9 +62,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -73,7 +72,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +94,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6366e913a321..0b434e5d80dd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -41,10 +44,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -53,7 +54,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -75,7 +75,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 373e9f19c382..704b68432d7d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -41,10 +44,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -53,7 +54,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -75,7 +75,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index 209d51c584d3..5ca8ee5b7d8e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -49,9 +52,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -77,10 +79,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -106,10 +106,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -118,7 +116,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -142,7 +139,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index f0fa16873cb8..56f1dd720fd6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index a296dfc58190..1c40cb56ac25 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -69,9 +72,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -80,7 +82,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +103,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index 638fd85562a5..6bad3f78e73a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -44,9 +47,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -64,9 +66,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -84,9 +85,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -104,9 +104,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -124,9 +123,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -144,9 +142,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -155,7 +152,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -182,7 +178,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index f1a6ba0ecd89..bd2f9fc3ca08 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 166fdfaf7c88..f47941a937ae 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -29,9 +32,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -40,7 +42,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 3ca433624284..49c5f68bebdc 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -32,9 +35,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -52,10 +54,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -64,7 +64,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +86,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 314cec6e2053..f5363eb06dc9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -30,9 +33,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -41,7 +43,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java index 1853eeff5f03..fd5095aade68 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -29,9 +32,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -40,7 +42,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index e1d49d613485..df2817a964b3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 0249347555d8..25131d8dc35a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -29,9 +32,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -40,7 +42,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index 2c22712b9ce4..27bbf28c2b38 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -106,9 +109,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -134,9 +136,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -145,7 +146,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -168,7 +168,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java index 344a5cc7f8d9..1e8800e0b670 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -8,6 +8,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -15,6 +16,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 47feac7def26..450377215592 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -187,9 +190,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -207,10 +209,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -228,9 +228,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -248,9 +247,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -268,10 +266,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -280,7 +276,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -306,7 +301,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java index cbbbf5213c15..f0a6777289cd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -30,9 +33,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -41,7 +43,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8b9090cdc97a..ecb3820b0cf5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -36,10 +39,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -65,10 +66,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -77,7 +76,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -100,7 +98,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index d7d44db402c7..063aed84e30d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; @@ -16,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -47,14 +52,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -77,9 +82,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -99,9 +103,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -119,9 +122,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -141,11 +143,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -165,9 +164,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -187,9 +185,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -207,9 +204,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -227,10 +223,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -239,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -248,15 +242,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -269,11 +261,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -291,10 +280,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -312,10 +299,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -333,10 +318,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -354,10 +337,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -366,7 +347,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -401,7 +381,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 055eaea62215..a6100dec7e69 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -32,9 +35,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -52,9 +54,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -63,7 +64,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +86,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index 777ec8f061f8..53e126c34fe7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -89,10 +92,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -118,9 +119,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -146,9 +146,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -174,9 +173,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -185,7 +183,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -210,7 +207,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 31f0e9691e44..68e453768196 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -11,23 +11,27 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -43,10 +47,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -64,10 +66,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -93,10 +93,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -105,7 +103,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -129,7 +126,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index a523a095a0d0..ff5f1cbfd767 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -33,9 +36,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -53,9 +55,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -64,7 +65,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index e2c8aca9fccb..61fd70ab5992 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -35,9 +38,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -55,9 +57,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -75,9 +76,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -86,7 +86,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -110,7 +109,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java index 5fbabcc7122c..029b4bf191ea 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -29,9 +32,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -40,7 +42,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 2887e82ae242..6e7190a8bb66 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -30,9 +33,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -41,7 +43,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index e90e446667d0..ac665b62dd94 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -39,10 +42,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -60,9 +61,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -80,9 +80,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -100,9 +99,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -111,7 +109,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -136,7 +133,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index e7453ce92624..ce78534bcf72 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -30,10 +33,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -42,7 +43,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java index d90339edc7e3..a9627499bf79 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -7,18 +7,22 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -29,7 +33,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -84,9 +88,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -104,9 +107,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -124,9 +126,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -144,10 +145,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -165,9 +164,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -185,9 +183,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -196,7 +193,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -223,7 +219,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index 44d5a9dc16d6..2300973669e6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -36,10 +39,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -57,9 +58,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -77,9 +77,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -88,7 +87,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java index 214947f375cd..874cedf63cfc 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -8,6 +8,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -15,6 +16,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index 7c8eeae0204c..90683df8d08a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -19,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -161,10 +159,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -191,10 +187,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -212,9 +206,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -223,7 +216,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -250,7 +242,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index af3367a7ffc1..a374f2899ff7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -32,9 +35,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -52,9 +54,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -63,7 +64,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +86,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index 6cde569d9c0b..d9c67e23a77a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -29,9 +32,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -40,7 +42,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java index 219b5ef9b872..e24b0968e5ca 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -32,9 +35,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -52,9 +54,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -63,7 +64,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +86,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 5ddbf1ebca16..922da4c45a33 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -45,10 +48,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -66,11 +67,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -88,10 +86,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -109,10 +105,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -138,10 +132,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -150,7 +142,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -176,7 +167,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index ad7786409091..c090002feadf 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -48,10 +51,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -69,11 +70,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -91,10 +89,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -112,10 +108,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -133,10 +127,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -162,10 +154,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -174,7 +164,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -201,7 +190,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java index 6e56bc32a2e5..f2b4ed4a98ee 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -50,9 +53,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -70,9 +72,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -90,9 +91,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -110,9 +110,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -130,9 +129,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -150,9 +148,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -170,9 +167,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -190,9 +186,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -201,7 +196,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -230,7 +224,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 621f973ebaeb..c9267532f459 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -125,9 +128,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -145,10 +147,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -166,9 +166,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -186,9 +185,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -214,9 +212,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -234,9 +231,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -254,10 +250,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -275,9 +269,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -295,9 +288,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -323,9 +315,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -351,9 +342,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -371,9 +361,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -391,10 +380,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -412,9 +399,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -432,9 +418,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -460,9 +445,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -488,9 +472,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -508,9 +491,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -528,10 +510,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -549,9 +529,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -569,9 +548,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -597,9 +575,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -625,9 +602,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -645,9 +621,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -665,10 +640,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -686,9 +659,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -706,9 +678,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -734,9 +705,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -762,9 +732,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -773,7 +742,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -823,7 +791,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 71ffda67b0c2..f63a9141189c 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 19ab0bb614b6..bc6e370299dc 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 @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index ff5677cd8c33..25aa61f48d66 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index a86542ddf223..2d5e24bcd5f6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { 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 52267c039104..960fdd4fbb22 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -315,8 +319,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } 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 d3a949e65d81..3796fc00ce58 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 @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -19,12 +21,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f76698310b49..a1b0656bc43b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index ed5a6bfc09a0..fb689b13f943 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index c62662ff8c93..289e898a6831 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -18,7 +19,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index e3adc7d4bca7..9c616c14aaa8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -12,12 +13,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { 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 39f4c0b7c7e9..0f4dda3730fd 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 @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } 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 dfe4bb314961..e9b7146b52a8 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 @@ -11,12 +11,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index b45b075f9240..e7aa6f28b61b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index 2efbd71c9dc9..c39231c6b299 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -12,12 +12,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index ff5677cd8c33..25aa61f48d66 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index a86542ddf223..2d5e24bcd5f6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { 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 52267c039104..960fdd4fbb22 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -315,8 +319,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } 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 d3a949e65d81..3796fc00ce58 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 @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -19,12 +21,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f76698310b49..a1b0656bc43b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index ed5a6bfc09a0..fb689b13f943 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index c62662ff8c93..289e898a6831 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -18,7 +19,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index e3adc7d4bca7..9c616c14aaa8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -12,12 +13,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { 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 39f4c0b7c7e9..0f4dda3730fd 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 @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } 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 dfe4bb314961..e9b7146b52a8 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 @@ -11,12 +11,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index b45b075f9240..e7aa6f28b61b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index 2efbd71c9dc9..c39231c6b299 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -12,12 +12,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 08fad3c33bf2..f32b3ca03b66 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 940a74845194..037a13dee307 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -363,8 +367,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 902ff4d66003..b52a218dd3ee 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 9ea20fa79798..19270de6e6e6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 60aaea2af9a5..565feb9ad1ca 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 @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 47da1e2faf2b..fa813d7e9465 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3fb97da7defe..0f78f2944335 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2ef11c811c11..575a4e23910b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -14,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { 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 c01306b7fd40..5471ba1820dd 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -327,8 +331,8 @@ default Mono> testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) Flux binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } 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 dbe78fa1c7f9..0193067433b9 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 @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -23,12 +25,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 4d2d37f1a59a..6a78bd00fe93 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 4127d96d9e3e..bd1f7f3542f8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -14,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 877603ff0094..4277d5fc01bf 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -22,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index 8dc1be776ea0..b4c51ede9184 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -16,12 +17,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { 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 1b8cd8622037..6d31ec918325 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 @@ -21,7 +21,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } 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 02daadf024a1..d4f1e2efbf99 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 @@ -15,12 +15,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 60a2f999e4bd..923cedcc6469 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index 3985dd30ecdf..063cd6d0ee87 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -16,12 +16,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index eb4da37da2c4..5a4e5b8c884b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index f1ca88a6a5ed..26b35dd83986 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -13,20 +13,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = delegate; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 17244270c859..0e0027d4bc33 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -6,12 +6,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { /** 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 1030dcc870c8..df8e22923773 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -295,8 +299,8 @@ ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 76cc2bb95757..78cddbd6dd52 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -22,20 +24,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = delegate; } @@ -185,8 +190,8 @@ public ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { 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 e88b7aa6ca50..717b8a75310b 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 @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.ResponseEntity; @@ -15,12 +17,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f482b6bf5ac9..ccd8d276dc65 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 65de19a78d30..498a7ee2e459 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -13,20 +13,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = delegate; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 31b94ac10958..414a09aed4e3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -6,12 +6,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index c8b2da14ebfc..9cf42e2e281c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -17,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -122,7 +127,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); @@ -160,7 +165,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 5583546f3e50..18e06dce43de 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -1,7 +1,10 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -14,20 +17,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = delegate; } @@ -72,7 +78,7 @@ public ResponseEntity deletePet( */ public ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final Pageable pageable + @ApiIgnore final Pageable pageable ) { return delegate.findPetsByStatus(status, pageable); } @@ -89,7 +95,7 @@ public ResponseEntity> findPetsByStatus( */ public ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final Pageable pageable + @ApiIgnore final Pageable pageable ) { return delegate.findPetsByTags(tags, pageable); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 94d3c58d3327..2537ce30da04 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -1,18 +1,22 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { /** @@ -46,7 +50,7 @@ ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - ResponseEntity> findPetsByStatus(List status, final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByStatus(List status, final Pageable pageable); /** * GET /pet/findByTags : Finds Pets by tags @@ -58,7 +62,7 @@ ResponseEntity deletePet(Long petId, * @deprecated * @see PetApi#findPetsByTags */ - ResponseEntity> findPetsByTags(List tags, final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByTags(List tags, final Pageable pageable); /** * GET /pet/{petId} : Find pet by ID 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 cb72ccb357fd..5dce0416efbc 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 @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index 3becdad6f4a6..9cc8ee421f69 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -14,20 +14,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = delegate; } 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 a6ad2c609955..5d4bde80620a 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 @@ -7,12 +7,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 3f8d7b71b281..07fe60cce885 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java index a9721c9a469e..777032bef5d4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -15,20 +15,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = delegate; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index f41ca92fd595..f1d806c05fd2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -8,12 +8,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 46281c6456d3..2874aee40b58 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 474278b1b192..303eb0c55db0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index c670f89cdfc0..1cac5fc9adca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 9f89c16c1bcf..167352b36568 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5ef4af43bbd9..faeaecb95cd2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 95a742297272..522c7e8dda03 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 9969c2fe7201..617d4fb867fd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 757c0a536fd8..74e04286771a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java index 22249d7cc27e..4bdbbcad59db 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -14,18 +14,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -41,10 +43,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -62,9 +62,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -73,7 +72,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +94,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 995bebadda86..622be10459ed 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 922dc7a56667..b0eb6b00dd7c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 6937756d45c7..8f34930a5e83 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java index 19ab1f8baff0..60748a7366ac 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java index ebf9c7cec807..9fd111c8430c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java index 257322699ab9..8e08090e24a3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java index 3c2a6be2b25f..06d98844c504 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java index 4d88c1e45a8e..2bffe7eecb0e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java index bb63f835363f..9bc13add64aa 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java index 21a27eb4e458..daf01294455d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java index 09bb08f9458b..6792f7900e9b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 14bf9e2c281c..aacc863a201b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java index ed676c3662e1..233a854ff582 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java index 3a9a9e85a8c2..cf2427d7be17 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java index 2042a57883ea..baed9c12618f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index b71b91db26ba..1d8395401695 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 7f83ebda6cbf..d44579f78f94 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index a712d19243f9..001a3cea2863 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java index a4f10eadf355..d9bc6491e74a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b6607ec1de22..a3e6d4338bf9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -11,6 +11,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 8e51dc7b0bf5..a308820b4be5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 1c50e0984df6..a932355454b9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java index f0fbf712e6b2..55133349d684 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index f71f60f59709..2c67234126d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java index 8336bed2c940..96cadd497361 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index 87c0551edfce..4ed41292ec07 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java index c03246a0acb9..6c5cc6ed8b20 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index 34098a524fc2..2fa1e8576afe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java index 33f64f0954e6..542939a2a636 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java index 8e56b7045abc..1a4e757a147e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -89,9 +92,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -109,10 +111,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -130,10 +130,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -156,10 +154,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -185,10 +181,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -206,9 +200,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -217,7 +210,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -244,7 +236,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 655154d2cf28..5cf483cb584b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index beddd922ad47..6f360adf416b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java index c7dba2565eea..0131b8854d89 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 9dbb6eeeb09d..66adede6dd12 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 998c11fb3232..b03cc5c37ec4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java index ac48b7bd3ac7..f443caa28bf0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java index fa83623c4bfb..4c6f7d42bd96 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index ff5677cd8c33..25aa61f48d66 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index a86542ddf223..2d5e24bcd5f6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { 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 0abbadcd381d..7dee6868f6e4 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -315,8 +319,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } 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 de03df402674..b8e9dd88d450 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 @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -19,12 +21,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f76698310b49..a1b0656bc43b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index ed5a6bfc09a0..fb689b13f943 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index ad5e552b083c..84d8d7bb47b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -17,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -130,7 +135,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByStatus(status, pageable); } @@ -170,7 +175,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByTags(tags, pageable); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java index 02d3eee8e53f..2fa88df6b0cf 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -1,7 +1,10 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -11,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { @@ -60,7 +64,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status, final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -89,7 +93,7 @@ default ResponseEntity> findPetsByStatus(List status, final or * @deprecated * @see PetApi#findPetsByTags */ - default ResponseEntity> findPetsByTags(List tags, final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByTags(List tags, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 39f4c0b7c7e9..0f4dda3730fd 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 @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } 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 dfe4bb314961..e9b7146b52a8 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 @@ -11,12 +11,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index b45b075f9240..e7aa6f28b61b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java index 2efbd71c9dc9..c39231c6b299 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -12,12 +12,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java index db4f29350ded..1dc5fc69c61b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java @@ -15,18 +15,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java index 729ef7defa59..d330c28e6791 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java @@ -18,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index eb4da37da2c4..5a4e5b8c884b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index e8f022846bfc..c9ae29ba1fea 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -20,14 +21,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 1030dcc870c8..df8e22923773 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -295,8 +299,8 @@ ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 9a5306056e85..e0f6cf75c832 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -22,6 +24,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -29,14 +32,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } @@ -209,8 +214,8 @@ public ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f482b6bf5ac9..ccd8d276dc65 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index b705c60d83bb..e1119b1010d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -20,14 +21,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index c8b2da14ebfc..9cf42e2e281c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -17,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -122,7 +127,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); @@ -160,7 +165,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 32b8031cf835..139d599af041 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -1,7 +1,10 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -14,6 +17,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -21,14 +25,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } @@ -76,7 +82,7 @@ public ResponseEntity deletePet( */ public ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final Pageable pageable + @ApiIgnore final Pageable pageable ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -106,7 +112,7 @@ public ResponseEntity> findPetsByStatus( */ public ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final Pageable pageable + @ApiIgnore final Pageable pageable ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 cb72ccb357fd..5dce0416efbc 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 @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index 203faf80f73c..d25fe52ea15c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -21,14 +22,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 3f8d7b71b281..07fe60cce885 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java index 224d437db48a..af6939bbb160 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -22,14 +23,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 46281c6456d3..2874aee40b58 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 474278b1b192..303eb0c55db0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index c670f89cdfc0..1cac5fc9adca 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 9f89c16c1bcf..167352b36568 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5ef4af43bbd9..faeaecb95cd2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 95a742297272..522c7e8dda03 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 9969c2fe7201..617d4fb867fd 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 757c0a536fd8..74e04286771a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java index 22249d7cc27e..4bdbbcad59db 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -14,18 +14,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -41,10 +43,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -62,9 +62,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -73,7 +72,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +94,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 995bebadda86..622be10459ed 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 922dc7a56667..b0eb6b00dd7c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 6937756d45c7..8f34930a5e83 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java index 19ab1f8baff0..60748a7366ac 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java index ebf9c7cec807..9fd111c8430c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java index 257322699ab9..8e08090e24a3 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java index 3c2a6be2b25f..06d98844c504 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java index 4d88c1e45a8e..2bffe7eecb0e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java index bb63f835363f..9bc13add64aa 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java index 21a27eb4e458..daf01294455d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java index 09bb08f9458b..6792f7900e9b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 14bf9e2c281c..aacc863a201b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java index ed676c3662e1..233a854ff582 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java index 3a9a9e85a8c2..cf2427d7be17 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java index 2042a57883ea..baed9c12618f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index b71b91db26ba..1d8395401695 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 7f83ebda6cbf..d44579f78f94 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index a712d19243f9..001a3cea2863 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java index a4f10eadf355..d9bc6491e74a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b6607ec1de22..a3e6d4338bf9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -11,6 +11,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 8e51dc7b0bf5..a308820b4be5 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 1c50e0984df6..a932355454b9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java index f0fbf712e6b2..55133349d684 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index f71f60f59709..2c67234126d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java index 8336bed2c940..96cadd497361 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index 87c0551edfce..4ed41292ec07 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java index c03246a0acb9..6c5cc6ed8b20 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index 34098a524fc2..2fa1e8576afe 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java index 33f64f0954e6..542939a2a636 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java index 8e56b7045abc..1a4e757a147e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -89,9 +92,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -109,10 +111,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -130,10 +130,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -156,10 +154,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -185,10 +181,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -206,9 +200,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -217,7 +210,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -244,7 +236,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 655154d2cf28..5cf483cb584b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index beddd922ad47..6f360adf416b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java index c7dba2565eea..0131b8854d89 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 9dbb6eeeb09d..66adede6dd12 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 998c11fb3232..b03cc5c37ec4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java index ac48b7bd3ac7..f443caa28bf0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java index fa83623c4bfb..4c6f7d42bd96 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 14af6c292108..2bc50f00c65b 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index dc4a8ace4c6f..294576ae0454 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +24,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -136,7 +141,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -191,7 +196,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 19ab0bb614b6..bc6e370299dc 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 @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java index db4f29350ded..1dc5fc69c61b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -15,18 +15,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 729ef7defa59..d330c28e6791 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -18,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 8a9cd128c463..b558d892cbb1 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index a5de2295a582..559dc219a4fe 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 19ab0bb614b6..bc6e370299dc 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 @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); 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 6504bc555c21..244f5f910bde 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 @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApiController.java index 78ba74424cb6..7245dbfc6448 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 8cfa7936f844..3c59680b33c8 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.virtualan.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.virtualan.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.virtualan.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.virtualan.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.virtualan.model.User; import org.openapitools.virtualan.model.XmlItem; import io.swagger.annotations.*; @@ -31,7 +33,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") @VirtualService @@ -357,8 +361,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java index 4d76ead36678..ece740199a68 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } 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 4eb9dd69cdda..4278ca712647 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 @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApiController.java index a737205f48f6..b49aa3047d7e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } 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 cc2491e204ff..ed063f0a8b72 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 @@ -7,6 +7,7 @@ import org.openapitools.virtualan.model.ModelApiResponse; import org.openapitools.virtualan.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import io.virtualan.annotation.ApiVirtual; @@ -24,7 +25,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java index 0abcfc3c7138..944d8536c305 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 3a23f5a91257..2f5b01082fbb 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 @@ -23,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApiController.java index 8302e1607788..d7441d6c6e04 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } 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 9d2430db5628..3d8032a80bce 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 @@ -24,7 +24,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApiController.java index 46bbd55b84f9..676266d17024 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java index 22fa90b899c0..7a9d204bd401 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java index 83acca5c876f..a286c969cdc4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java index 8d09220b9cbb..b379ee89c6c7 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index d51807ac9765..e88acdf73662 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java index cac69369d0ae..72f7d357b895 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java index b58b9bc950c4..d6ee16b057d3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java index 67b8b985fedf..bc35d0c6c349 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java index 51c6a3054665..afe4036afffd 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java index 51c6715f728d..f6ff1b04411c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java index bafe2d77003b..15759a42b451 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java index e7c79260c172..d2cd808c864f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java index 620e277c3746..3d8904d1860d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java index 4ed49f643a6b..21f41931c652 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java index 943231933200..ec9f1f735d14 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java index d21f7764706b..c8b98732c14f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java index 395738af94c2..9575c51db521 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java index b0ad30eb11c5..07df0cf4f63b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java index c626fa4b8cfa..89b1e16c9568 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java index cef8cd8b90a0..e2fbb4c84841 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java index 28b2c3b1b5fd..0d17cf36c362 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java index 8af075378f7f..ad083982b12c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java index 678e4809263a..03a99e51d04e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index c2d6663545f4..fc07498099ec 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java index 85be2a8ca87e..395fca337a5c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index d27c78376abc..716aa26971ad 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java index b3ec7aef4076..a10d9cf3cbaf 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java index b7c9bd3b2163..1bdf0037dbb1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index b17cb35148c0..7495eb4765bc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java index e74e246e1eeb..d80b97c6a2a4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index 1aac4a7b761e..8668bdd52295 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3b7c1d6f066e..d3062bf298a2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.virtualan.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java index d6ee65d5da49..57d1ea9cf5a3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java index 7aa0db2e770b..3245ee17d3fb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java index 17c4c30952e2..74de2ea47b29 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java index beccd82a057a..d201058acd36 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java index 09c2ff8ded9c..ca925033ab9b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java index ac7912f6bb3a..ec8823c6d1d0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index f7053b1ef4c8..f87bbe4c5b63 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java index 654297922e7e..6fa8aa39a0b0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java index 574ca853a37b..3f9a06195792 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index 997db40fa479..d5f7277f3364 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java index 0da3f27957b7..945a44bdc55e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java index 030ff057ae43..8b156545d7fd 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java index 05f100a5113d..ba86da8547fc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index 603dceb13698..ac1bbc674047 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index a8470a066d82..21ceeea10b87 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java index 8232f1059a48..14aeefb90b47 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java index 0a23cfea1162..01e81e5fdc63 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } 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 71ffda67b0c2..f63a9141189c 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 @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } 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 19ab0bb614b6..bc6e370299dc 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 @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { 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"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { 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("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); From c8fff9a6219d9e0f42cfede77ca3e8061b6d758a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 17 Jan 2022 16:09:49 +0800 Subject: [PATCH 115/175] =?UTF-8?q?add=20=E7=99=BE=E5=BA=A6=E8=90=A5?= =?UTF-8?q?=E9=94=80=20as=20a=20user=20of=20openapi-generator=20(#11337)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + website/src/dynamic/users.yml | 5 +++++ website/static/img/companies/ebaidu.jpeg | Bin 0 -> 7985 bytes 3 files changed, 6 insertions(+) create mode 100644 website/static/img/companies/ebaidu.jpeg diff --git a/README.md b/README.md index d4d90f83134f..6a23fc7554a2 100644 --- a/README.md +++ b/README.md @@ -577,6 +577,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [ASKUL](https://www.askul.co.jp) - [Arduino](https://www.arduino.cc/) - [b<>com](https://b-com.com/en) +- [百度营销](https://e.baidu.com) - [Banzai Cloud](https://banzaicloud.com) - [BIMData.io](https://bimdata.io) - [Bithost GmbH](https://www.bithost.ch) diff --git a/website/src/dynamic/users.yml b/website/src/dynamic/users.yml index 6c8d8667df54..59c93067b4de 100644 --- a/website/src/dynamic/users.yml +++ b/website/src/dynamic/users.yml @@ -48,6 +48,11 @@ image: "img/companies/b-com.png" infoLink: "https://b-com.com/en" pinned: false +- + caption: "百度营销" + image: "img/companies/ebaidu.jpeg" + infoLink: "https://e.baidu.com" + pinned: false - caption: "Banzai Cloud" image: "img/companies/banzai_cloud.png" diff --git a/website/static/img/companies/ebaidu.jpeg b/website/static/img/companies/ebaidu.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..9b7f305b66b645bb215586af83fb554411289f1f GIT binary patch literal 7985 zcmb_>1yEdD^XI^z3C`de+$Rj~5}e>R!9BP`a0nJ01_D8XWCjQ@cyLW{2ohXE@Zb>K zWqEJE_pN+YyZ^1)d#n1??f#wazUQ85Irm}qVHrT6qM)n*KtTZjP#$lj}&+%FhpZ6oMrn{QM7J0fblpCzNp@3IhO@5Cuqx^3V;S1^`e|fq%LB?+X(R1Bi}= zg8C@cAON7EprW8Z!N$TuLq~svpr8T)glOm(M9+9JiDk5OEZkGa#z7=x4BEPHVJV~# z0T0hl)n6F-_+=3_-zF@>I=h%&Sb4#j!&lc19~DwQT6(nhKbr$SYWv$53n9v*FDU4L zJM`bZd9?Ou?9rACv4#6vhU!Dm!#n^7_=qC}5(1hQR$UV-S(+Vb~)WwqBXW6tO?9& z@nEZ3nh07q7Y-Ah3lXbUC1JFzriwWKMgzM39`fUP*s+mt<&sh+M(LaZ=NDe+Pk9Ao zLizqOiA7&EVH1^XibQYmRMI4$A&ex6%52rLya94OA=EZ}dEok|yk2E+uZ&1xTnDMN zZ{~`%T`ocLA&&d#r#t6NpHXi?CmgX%p7A56P&YS+P@A)`?0^A!vT8aePjY&wC2#5X zgNhVzM1+oE$cY*8xu}Bx(Wx_G7OnXjUgfLe?|Ae?oLNHPG7`i8|0X7S88Hhuq<1O<*rm-hOS}Fm1G?$xk}S{u=h? zrQZ>u?5wp6V+415DjXj-_UX-b!V3F#Wj7n27Bukh_ogMv&AOEh7a&25I5j`dc=cK{ z1!6bHUmnD&HxKR$`bZ)jH2oWp2UM?Xd5_!7!4ECq_^d4dRZ7?`cBlfYkv@^PBK#os z(g#4~gW{=*&lw($iQMnF-lEjivZBNY|*DME=!Fbgi4JrG^Rg`J!L6*jXOmmJ#u>= zNXqoJ(JL8Ee;h(0>3s%eUoE>z%NStt*_YJH)ZJIbce|R*06=szDlf;#)UZZfhAo(-k#l(XZi&etFLY3w1;}XDb%P5 z9El*qe8%lS#0_#a_#Vj|wi*NEzTnp0V)b#18sRt^>i|cGJKLO&wO31j#y{M%XP!tB zp13mm@;`~1m)jPh;!o%R0M7MSV~@|m1Jw2f^E^5Xdn_5~c=F?D(o_b?Sz=;y@|qW{ z>MKbS?euywP=%x0bk>g$0#@stz0?zlAu6~k1D7mmVM$q%p6+<_UwqS_F1>gFurxHE ziIVHdzXu41R+U1Vy;~am5`xoRhY~{K{el=m0aO^JH}KdQP0-^CD3wnUP$QVX-Wi8{ z*D##4I`PC5`;d)KohXf->Ea~#^oM8SdFzW`3V#t3{9`dz|Bq4t#JZ3AnQ$budojJ*_F`4gf`C}$8%x^jWNV^A3o!}3fzP;2z zdbWDGSr?|i#)>_*=WRkgP8M{Wmq#^wgiPAuftzzEx|#)P*~Y3OdGSn#3YzVT;%GS2 zX3E$aB#D=^)fDCeWZ*mRVvdC@%{=V9sEI$wjVyd|ER*X7{OyLm|y>rq3q z$eUU$T$G**t$gA3osiq+f!x}Trxy;%E#(>(flTIi$TxPR*TA@gis+&02f*j$_D=A3 z!|`?QABQR3RKyG~m}kj*vuA-D*;|JR-Y%V%+R$;OpUN~ZIPpjrmUlPu)m_RX-t_&l zvZWfbTzMLNnpJ_WV*sR|BTl-j-z&QJ-CWP$Qa?;)3J)+C=h6KY_Y?~3xtNX{oLnrS zgZ`RFKl-LTpgh%J6L{IKE`R+vg)Xh6ODDY$4ne&`t-1@p1 z(q+)%>R%GYf1pplg(f@2JkGAH1b#?OU3M8X|4+;)*+74X{;&5Z3)7G$L39q?a27aM zi195($-REjnbLLd!33rNq^Z}!sv8mkF7!rA<~R9ZzmA<&_M}DqMz(6bRMu zGlLiT1LJrO`D#?Ll-xiHcin9&MRj)lQ~%iD+wau}oHmA(#) z9LO#00OjlqL=7$E5tqSM(oD!9^{G4NE_n58`S}NZ5o6sl+#RoopKT{pUMgSc2lZB` zrxIgJiD>K5>881EXm}gGksF?KuTrQ&hcIQCdfFurl~I|gCp9Dek}@xEX(1xk&~AU8 z6oTa(q6SjZnazlsEq*a%5W|uU-F2zYT1VaRIqL~y@qe=NFMPOc(>chSgyV8EX_vzA zgI+E;V!r8lsqht6vdz2@G+-vOl=NU|Q;PB$(=JQxWe#L+cgcP-P;YqP*0VT?HJF&~1@}b>;eLb6 zRQZHeX`wa*`xUt;uRdiL&{7nuDA(Qw5fi=rGf-{RKd!6!y}*z|+AW7Qj}wRdY+9PXnd`}4!%xUd_-xD)w|3UK=~QOQ z`JGFfehFrIu$0Qj_i?7)9kC*QIrUTKS5Y=@6wv2lPm*P}7-}e0tevWPD7qBpD>t7> zIwmp*UnY*JccMlWVOGKAlx@Iw5%a+=q{NDNIDXyiH@O*;~9< z`E+tQ`pbfwMQS!4!sp+De{!vUr{HW1(7QePPGo-Qp+TnhGnq zDY>Hp&%~W*=c^Q4>Gd8%L&D4sw0;{<4OrY`hcxMOwA-FsSaN0Wb|y~O^p7-u;2 z{iNYr(1$r0ZVH&Owuej@k|bs88}f3N4>nohU;;U=y6SmD08P3C@|R%vO* zpjhfx{*2#$dSyn@*EC^%IBto@ru+%9;VKU<*vS(M6#V&Eg~;b`#ZL^n#&*h!zkSi@ z7=gy~*@hG?wF-}N;W4)BwT%QPba_c_4CpJ)`m>36&}Fp&4~x>3ItO@Mm8tDU_V#VG zJe;GookURzoumZ(F;_Iy2HO*p_L**b^VQdmC0WpM`H2(?w!*e_Nvj3X4rht?irssm zk(#Q!PXN=(EMM_F>|0vEd&waS_yg(huOuy~tCePIloFlm2X}fG&Ouc8DYFj%oou9o zq^i~3V=yks`>g>SSe3+j05mD4iQ}_IUozhRM(tX!mzvzznXg@*ct_Y=gu`hk&nJ-> z%@K>e+%zso+oe2d1Q3oa7KCy|#$}?xEPlhV=^>vi+>3WX*TYbg=TKd5j$IswLHXD! zX)MOj#oFw&AR4-P<=c%4uP5a{P7J7GdtH-dO@svb!W_t4^;=SN&sJYVp7 zdF{!;mMIXhHRmIY6h201eRV+rrMmA4#jbB+yXl#iJ|89s`H6!m&dtl@1$S?kRcYEy znRTl;cGRLpA~#DAH=1r+nBg^}2|8I{#;8%Z_wfbNKAXY{G&{sm&*Gy4K`rNx$Kv6^ z;G(~F#dX0RVm(*=j7v&4=RH;kt(Al;;mr3%?Eb<- z`QW~oC^ME+vdk;6ens|2VEb@Se#7>-;C-Fux0PH2Y)Ue#ukic(XCvM^1_CwUupV3b z78+JYn@hk3U5o&o?x@OYR?vr0GMe%f?qjM!xwNBo@msMctVdsY zLs$PbJx3TcCltj)L!gA@qn~{>^xgXf@UZ-;rkR{qj`d0ED;lYUtD1u##k<0L1@-wI zi9y;le@X;qS?tur{)d7>hgMq*=;Ff4!d0Tn$I(tv@}RZc;;P+}Ln18t*>E?79|~29 z67v0B#A6b%S%&;f0FSk^p4Dj#?-lV9An87ePgB2?`ZO6-Cq@zV z%F1`a#6+cPgJEiL!q-!7UP9wKy?2d8qHmTVy@uNfvMBrE$+|EzctZ&@t1E2t!YJbg zYn!uPY)+sU$?PDoz% z$2+R1t&m}VnaM_v+-D#T4Gy+hBv&lropw~!jLZbcK)`pCY**)O{G#}11U&tDxA2dq zS2@YBsYuWDc6fp*3JV$fD=Ev{5zN4&^}R=63lnD4kzFHbJcl{+CeN4T>Z2JiPQT#rW*__=w^|O{9S%sGBu4|EZdeDk*plJS(&zuWndq%VSfI zQjnsouS_Eg$d7!?v0ut#=-r+gR@71kZhVgm3mw@S0dj1W0Iqr$_z|NY|0J<-J!9~_ zsOjD&5gLCYUCG%HnFv`mFl}p9TeCe+mK6IMQ5+jLMGR=wFdl_wooQPhbw*ARoK5 z;62sl9a4Zl$9laJysjW|Leg$$Br9gWb**hWbFQg*YsJdVYWSAC24~R=$Vs63IA&+sQ$r^?;vrBIxf#59w@2-_Tf`anXh_g*e`crIy_4-)x)Pph4qelSomS zg`hAEa(T=}bQO3_%jY#K**19W(boS6K*&g)3!Q60vr4j!LR3ihRazF5;_$gD7s|T% zyjsEPIV^ON95+-uEaxgR&22mNaF^+b5ip|<10{`%Ok+3Z=N#j+_?O;#yeYoIOqI|J z77?4OJ6a^3&fm4#NA&q>7>1W8)raf-S5RS@xlM&{!-3+}(nRu4;q&Uwejpn8=vg&3 z_R(fRHw$$PXo}r>iV2CHqJbb@Vayn-902c2mxXdH=EkO!!b&sUi8YdOPlCi~VRLIi z=*7KLnt6|8te86|of}Jd#538Kv7Y7cd_^A(1k-rFJKjG4p3vqP%T1@EbJ;W0!eTT7x4zd}L`Gk2m-`+FH~JW; z5#S*zK8S2*W=i&I@%xJ4wGg3-+=wmEl^pOB@P*)KU$*d^S|;x-u4m~rJpi6=Z#BsO z8P+7xtLUFsU=syp z`)HbY+%};;EhG2oR=&qBA`Bm8$?Z4}-zz1qYNAIcW5V@8y+IM(6WNsn;?*b>A2X?_ zH_@re`+Lbqg>Hg2hjD&bDazsZZ(D|P8y#UQdyKA$Yft-tk zzP}5S!v)P_v=uGPd=>y{f-lTqA26{MY$OTbJ1RSiucwe<@59O1=a}-S&L?MP-C@j~NHFVuMJ7Bvv-SVL6VAL+{u@_L8W2Pm ze?xY!BOTdg#k@p(ni6<+cYgX#!mG^_kL(O~=Y4NsA|b8a=M$0{aXlWwp(C1Z^yPMl zbvpG*J6xmj&wkBac(9Z1?}GMqJPbi;CA6M^PH(~ySjpUc?;)fyZql5 zk*PY*bn1Il?s_Z#9bM8k_7v}V=&I>5&JO;Uf{hIxi_b39TyF%i#30eg#Law19pBJ# zr5P&uMJJ`{MsnF^P&j{PdZkaahMja{`CR{6));6z4i%!`8h#YoIW zMG|2oS&7FR-oy@x2LLCzdtVdBalP7em3|*w2j9s(sfhy0D54C%;Z&im)AxP@9wL2M z_XtF8amz2m)#DHrDare$dl&X^DOT%OQA{ec)feaYDG2Q!J+@ zi|>`oTM!Eruqt}OPOzCb8Edb;@Z|oJ{L@IlWa%c00MB?TA2c&S9%PX8N%wAY^gjFV z*0_Qs)=sZCuGpgcE8zh@^|u1yt;UUtj3ZOJdYH!Rb5l z5@8(b)PBZDoD{(xli+b5woTDUuaMZo+XxdwAAP&$TVegNh!|b)iVUWZhill1Mc8u2 z4-7^N=Q2fJO9z&KwFqGxom5LJ-pc9JQ^$*{@;i%MG<{EZ~<0 zTOE=&F?dLMLwYmO$&UvC})M2n+-I zVRHKZZaQ%{GZV?%$FFPoxGN(Ds@Tyj;t5=^5@ayrsT}gvTq+df@n`!k+ngK7qzZfP zlpX+CDt5#Ftb19|y1^v5(pvikCG+`KvC-+Qrcwb$fR(lJr&v@)fO0XWIc8QXVCVCl zTp${kvK@kHpBa=o?kqEmF9>T9gsrh`F51HyH_$HzHpj#kL*s>jyyo4&E_3v2d43F3 z!Wy=F^u3ZN`3|U^;X9Ab;$N|cBQq~Emv^v6PIe^hYmThkv={Ucx)46%d%)vmFfE?m z$Lnz8=g@=D-o&w$?& Date: Mon, 17 Jan 2022 11:08:15 -0500 Subject: [PATCH 116/175] if discriminator is not defined with useOneOfDiscriminatorLookup set to true, we generated as useOneOfDiscriminatorLookup false (#11178) --- .../main/resources/go/model_oneof.mustache | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) 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 45562dcc7c30..6938308d763e 100644 --- a/modules/openapi-generator/src/main/resources/go/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_oneof.mustache @@ -48,8 +48,38 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error { } {{/mappedModels}} - {{/discriminator}} return nil + {{/discriminator}} + {{^discriminator}} + match := 0 + {{#oneOf}} + // try to unmarshal data into {{{.}}} + err = json.Unmarshal(data, &dst.{{{.}}}) + if err == nil { + json{{{.}}}, _ := json.Marshal(dst.{{{.}}}) + if string(json{{{.}}}) == "{}" { // empty struct + dst.{{{.}}} = nil + } else { + match++ + } + } else { + dst.{{{.}}} = nil + } + + {{/oneOf}} + if match > 1 { // more than 1 match + // reset to nil + {{#oneOf}} + dst.{{{.}}} = 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}})") + } + {{/discriminator}} {{/useOneOfDiscriminatorLookup}} {{^useOneOfDiscriminatorLookup}} match := 0 From 90972c638ab17a8dfcafe5bf60705f2efd8e21e8 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 18 Jan 2022 18:21:00 +0800 Subject: [PATCH 117/175] add type check in the equal method (#11346) --- .../codegen/languages/JavaPlayFrameworkCodegen.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java index a152d69cf399..400ed76f95aa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java @@ -451,6 +451,14 @@ public CodegenSecurity filterByScopeNames(List filterScopes) { @Override public boolean equals(Object o) { + if (o == null) { + return false; + } + + if (this.getClass() != o.getClass()) { + return false; + } + boolean result = super.equals(o); JavaPlayFrameworkCodegen.ExtendedCodegenSecurity that = (JavaPlayFrameworkCodegen.ExtendedCodegenSecurity) o; return result && From 0cb88ce024ade086e673b2e6c32260b2f61e4233 Mon Sep 17 00:00:00 2001 From: Ananta Dwi Prasetya Purna Yuda Date: Tue, 18 Jan 2022 18:39:29 +0700 Subject: [PATCH 118/175] [KOTLIN] add `modelMutable` additional properties parser (#11332) * [kotlin] add modelMutable parser * [kotlin] fix kotlin vertx samples --- .../languages/AbstractKotlinCodegen.java | 4 ++++ .../openapitools/server/api/model/Category.kt | 4 ++-- .../server/api/model/ModelApiResponse.kt | 6 +++--- .../openapitools/server/api/model/Order.kt | 12 +++++------ .../org/openapitools/server/api/model/Pet.kt | 20 +++++++++---------- .../org/openapitools/server/api/model/Tag.kt | 4 ++-- .../org/openapitools/server/api/model/User.kt | 16 +++++++-------- 7 files changed, 35 insertions(+), 31 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index a00fc670c3c4..e980427505ef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -416,6 +416,10 @@ public void processOpts() { LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); } + if (additionalProperties.containsKey(MODEL_MUTABLE)) { + additionalProperties.put(MODEL_MUTABLE, Boolean.parseBoolean(additionalProperties.get(MODEL_MUTABLE).toString())); + } + if (additionalProperties.containsKey(CodegenConstants.ENUM_PROPERTY_NAMING)) { setEnumPropertyNaming((String) additionalProperties.get(CodegenConstants.ENUM_PROPERTY_NAMING)); } diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Category.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Category.kt index 29aaa19c2c2f..7768072a83d8 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Category.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Category.kt @@ -24,8 +24,8 @@ import com.fasterxml.jackson.annotation.JsonInclude @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) data class Category ( - var id: kotlin.Long? = null, - var name: kotlin.String? = null + val id: kotlin.Long? = null, + val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt index ce8326960332..332a3c0f6e7b 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt @@ -25,9 +25,9 @@ import com.fasterxml.jackson.annotation.JsonInclude @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) data class ModelApiResponse ( - var code: kotlin.Int? = null, - var type: kotlin.String? = null, - var message: kotlin.String? = null + val code: kotlin.Int? = null, + val type: kotlin.String? = null, + val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt index a25f7e74bc7f..9078e0bdd256 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt @@ -28,13 +28,13 @@ import com.fasterxml.jackson.annotation.JsonInclude @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) data class Order ( - var id: kotlin.Long? = null, - var petId: kotlin.Long? = null, - var quantity: kotlin.Int? = null, - var shipDate: java.time.OffsetDateTime? = null, + val id: kotlin.Long? = null, + val petId: kotlin.Long? = null, + val quantity: kotlin.Int? = null, + val shipDate: java.time.OffsetDateTime? = null, /* Order Status */ - var status: Order.Status? = null, - var complete: kotlin.Boolean? = false + val status: Order.Status? = null, + val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Pet.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Pet.kt index e80d49fc3f5f..6061c8e01549 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Pet.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Pet.kt @@ -30,13 +30,13 @@ import com.fasterxml.jackson.annotation.JsonInclude @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) data class Pet ( - @SerializedName("name") private var _name: kotlin.String?, - @SerializedName("photoUrls") private var _photoUrls: kotlin.Array?, - var id: kotlin.Long? = null, - var category: Category? = null, - var tags: kotlin.Array? = null, + @SerializedName("name") private val _name: kotlin.String?, + @SerializedName("photoUrls") private val _photoUrls: kotlin.Array?, + val id: kotlin.Long? = null, + val category: Category? = null, + val tags: kotlin.Array? = null, /* pet status in the store */ - var status: Pet.Status? = null + val status: Pet.Status? = null ) { /** @@ -53,9 +53,9 @@ data class Pet ( } - var name get() = _name ?: throw IllegalArgumentException("name is required") - set(value){ _name = value } - var photoUrls get() = _photoUrls ?: throw IllegalArgumentException("photoUrls is required") - set(value){ _photoUrls = value } + val name get() = _name ?: throw IllegalArgumentException("name is required") + + val photoUrls get() = _photoUrls ?: throw IllegalArgumentException("photoUrls is required") + } diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Tag.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Tag.kt index 359a53af6091..b444b341a9e3 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Tag.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Tag.kt @@ -24,8 +24,8 @@ import com.fasterxml.jackson.annotation.JsonInclude @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) data class Tag ( - var id: kotlin.Long? = null, - var name: kotlin.String? = null + val id: kotlin.Long? = null, + val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/User.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/User.kt index 791d0b882333..e8b5bb5e7051 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/User.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/User.kt @@ -30,15 +30,15 @@ import com.fasterxml.jackson.annotation.JsonInclude @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) data class User ( - var id: kotlin.Long? = null, - var username: kotlin.String? = null, - var firstName: kotlin.String? = null, - var lastName: kotlin.String? = null, - var email: kotlin.String? = null, - var password: kotlin.String? = null, - var phone: kotlin.String? = null, + val id: kotlin.Long? = null, + val username: kotlin.String? = null, + val firstName: kotlin.String? = null, + val lastName: kotlin.String? = null, + val email: kotlin.String? = null, + val password: kotlin.String? = null, + val phone: kotlin.String? = null, /* User Status */ - var userStatus: kotlin.Int? = null + val userStatus: kotlin.Int? = null ) { } From 2d927a738b1758c2213464e10985ee5124a091c6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 19 Jan 2022 18:43:39 +0800 Subject: [PATCH 119/175] Improve example value handling in C# generators (#11355) * improve example value handling in C# generators * fix typo * update samples --- .../languages/AbstractCSharpCodegen.java | 152 ++++++++++++++---- .../docs/MultipartApi.md | 4 +- .../docs/FakeApi.md | 44 ++--- .../docs/PetApi.md | 24 +-- .../docs/StoreApi.md | 4 +- .../docs/UserApi.md | 10 +- .../OpenAPIClient-httpclient/docs/FakeApi.md | 44 ++--- .../OpenAPIClient-httpclient/docs/PetApi.md | 24 +-- .../OpenAPIClient-httpclient/docs/StoreApi.md | 4 +- .../OpenAPIClient-httpclient/docs/UserApi.md | 10 +- .../OpenAPIClient-net47/docs/FakeApi.md | 44 ++--- .../OpenAPIClient-net47/docs/PetApi.md | 24 +-- .../OpenAPIClient-net47/docs/StoreApi.md | 4 +- .../OpenAPIClient-net47/docs/UserApi.md | 10 +- .../OpenAPIClient-net5.0/docs/FakeApi.md | 44 ++--- .../OpenAPIClient-net5.0/docs/PetApi.md | 24 +-- .../OpenAPIClient-net5.0/docs/StoreApi.md | 4 +- .../OpenAPIClient-net5.0/docs/UserApi.md | 10 +- .../OpenAPIClient/docs/FakeApi.md | 44 ++--- .../OpenAPIClient/docs/PetApi.md | 24 +-- .../OpenAPIClient/docs/StoreApi.md | 4 +- .../OpenAPIClient/docs/UserApi.md | 10 +- .../OpenAPIClientCore/docs/FakeApi.md | 44 ++--- .../OpenAPIClientCore/docs/PetApi.md | 24 +-- .../OpenAPIClientCore/docs/StoreApi.md | 4 +- .../OpenAPIClientCore/docs/UserApi.md | 10 +- .../OpenAPIClientCoreAndNet47/docs/PetApi.md | 18 +-- .../docs/StoreApi.md | 4 +- .../OpenAPIClientCoreAndNet47/docs/UserApi.md | 10 +- .../csharp/OpenAPIClient/docs/FakeApi.md | 52 +++--- .../csharp/OpenAPIClient/docs/PetApi.md | 24 +-- .../csharp/OpenAPIClient/docs/StoreApi.md | 4 +- .../csharp/OpenAPIClient/docs/UserApi.md | 10 +- 33 files changed, 426 insertions(+), 344 deletions(-) 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 2a8977310f73..bb8f9901765f 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 @@ -1261,42 +1261,124 @@ protected boolean isValueType(CodegenProperty var) { } @Override - public void setParameterExampleValue(CodegenParameter codegenParameter) { - - // set the example value - // if not specified in x-example, generate a default value - // TODO need to revise how to obtain the example value - if (codegenParameter.vendorExtensions != null && codegenParameter.vendorExtensions.containsKey("x-example")) { - codegenParameter.example = Json.pretty(codegenParameter.vendorExtensions.get("x-example")); - } else if (Boolean.TRUE.equals(codegenParameter.isBoolean)) { - codegenParameter.example = "true"; - } else if (Boolean.TRUE.equals(codegenParameter.isLong)) { - codegenParameter.example = "789"; - } else if (Boolean.TRUE.equals(codegenParameter.isInteger)) { - codegenParameter.example = "56"; - } else if (Boolean.TRUE.equals(codegenParameter.isFloat)) { - codegenParameter.example = "3.4F"; - } else if (Boolean.TRUE.equals(codegenParameter.isDouble)) { - codegenParameter.example = "1.2D"; - } else if (Boolean.TRUE.equals(codegenParameter.isNumber)) { - codegenParameter.example = "8.14"; - } else if (Boolean.TRUE.equals(codegenParameter.isBinary)) { - codegenParameter.example = "BINARY_DATA_HERE"; - } else if (Boolean.TRUE.equals(codegenParameter.isByteArray)) { - codegenParameter.example = "BYTE_ARRAY_DATA_HERE"; - } else if (Boolean.TRUE.equals(codegenParameter.isFile)) { - codegenParameter.example = "/path/to/file.txt"; - } else if (Boolean.TRUE.equals(codegenParameter.isDate)) { - codegenParameter.example = "2013-10-20"; - } else if (Boolean.TRUE.equals(codegenParameter.isDateTime)) { - codegenParameter.example = "2013-10-20T19:20:30+01:00"; - } else if (Boolean.TRUE.equals(codegenParameter.isUuid)) { - codegenParameter.example = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; - } else if (Boolean.TRUE.equals(codegenParameter.isUri)) { - codegenParameter.example = "https://openapi-generator.tech"; - } else if (Boolean.TRUE.equals(codegenParameter.isString)) { - codegenParameter.example = codegenParameter.paramName + "_example"; + public void setParameterExampleValue(CodegenParameter p) { + String example; + + boolean hasAllowableValues = p.allowableValues != null && !p.allowableValues.isEmpty(); + if (hasAllowableValues) { + //support examples for inline enums + final List values = (List) p.allowableValues.get("values"); + example = String.valueOf(values.get(0)); + } else if (p.defaultValue == null) { + example = p.example; + } else { + example = p.defaultValue; + } + + String type = p.baseType; + if (type == null) { + type = p.dataType; + } + + if (p.isString) { + if (example == null) { + example = p.paramName + "_example"; + } + example = "\"" + escapeText(example) + "\""; + } else if (p.isInteger || p.isShort) { + if (example == null) { + example = "56"; + } + } else if (p.isLong) { + if (example == null) { + example = "789"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "L"); + } else if (p.isFloat) { + if (example == null) { + example = "3.4F"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "F"); + } else if (p.isDouble) { + if (example == null) { + example = "1.2D"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "D"); + } else if (p.isNumber) { + if (example == null) { + example = "8.14"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "D"); + } else if (p.isBoolean) { + if (example == null) { + example = "true"; + } + } else if (p.isBinary || p.isFile) { + if (example == null) { + example = "/path/to/file.txt"; + } + example = "new System.IO.MemoryStream(System.IO.File.ReadAllBytes(\"" + escapeText(example) + "\"))"; + } else if (p.isByteArray) { + if (example == null) { + example = "BYTE_ARRAY_DATA_HERE"; + } + example = "System.Text.Encoding.ASCII.GetBytes(\"" + escapeText(example) + "\")"; + } else if (p.isDate) { + if (example == null) { + example = "DateTime.Parse(\"2013-10-20\")"; + } else { + example = "DateTime.Parse(\"" + example + "\")"; + } + } else if (p.isDateTime) { + if (example == null) { + example = "DateTime.Parse(\"2013-10-20T19:20:30+01:00\")"; + } else { + example = "DateTime.Parse(\"" + example + "\")"; + } + } else if (p.isDecimal) { + if (example == null) { + example = "8.9M"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "M"); + } else if (p.isUuid) { + if (example == null) { + example = "\"38400000-8cf0-11bd-b23e-10b96e4ef00d\""; + } else { + example = "\"" + example + "\""; + } + } else if (p.isUri) { + if (example == null) { + example = "new Uri(\"https://openapi-generator.tech\")"; + } else { + example = "new Uri(\"" + example + "\")"; + } + } else if (hasAllowableValues) { + //parameter is enum defined as a schema component + example = "(" + type + ") \"" + example + "\""; + } else if (!languageSpecificPrimitives.contains(type)) { + // type is a model class, e.g. User + example = "new " + type + "()"; + } + + if (example == null) { + example = "null"; + } else if (Boolean.TRUE.equals(p.isArray)) { + if (p.items.defaultValue != null) { + String innerExample; + if ("String".equals(p.items.dataType)) { + innerExample = "\"" + p.items.defaultValue + "\""; + } else { + innerExample = p.items.defaultValue; + } + example = "new List<" + p.items.dataType + ">({" + innerExample + "})"; + } else { + example = "new List<" + p.items.dataType + ">()"; + } + } else if (Boolean.TRUE.equals(p.isMap)) { + example = "new Dictionary"; } + + p.example = example; } @Override diff --git a/samples/client/others/csharp-netcore-complex-files/docs/MultipartApi.md b/samples/client/others/csharp-netcore-complex-files/docs/MultipartApi.md index dbf9ae08743f..c16dc5314f51 100644 --- a/samples/client/others/csharp-netcore-complex-files/docs/MultipartApi.md +++ b/samples/client/others/csharp-netcore-complex-files/docs/MultipartApi.md @@ -103,7 +103,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost"; var apiInstance = new MultipartApi(config); - var file = BINARY_DATA_HERE; // System.IO.Stream | a file + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | a file var marker = new MultipartMixedMarker(); // MultipartMixedMarker | (optional) try @@ -174,7 +174,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost"; var apiInstance = new MultipartApi(config); - var file = BINARY_DATA_HERE; // System.IO.Stream | One file (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | One file (optional) try { 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 87c4c9571487..8a5cb9aaf429 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,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 { @@ -523,7 +523,7 @@ 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 query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+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 _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) try { @@ -767,13 +767,13 @@ namespace Example 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 = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + 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 = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (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 = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer 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 int64Group = 789; // long? | Integer in group parameters (optional) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md index aa5cd9f497b4..f429575063c3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // 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 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) + 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) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + 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) try { 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 24e2480d5deb..963ecda9c142 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/UserApi.md index aa12c26c69f1..2f478081dc25 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ 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 username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try 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 635f38544d52..42e8aea53103 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md @@ -267,7 +267,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -341,7 +341,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -555,7 +555,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -709,20 +709,20 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // FileParameter | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+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 _string = "_string_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | 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) try { @@ -811,13 +811,13 @@ namespace Example HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + 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 = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (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 = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -904,10 +904,10 @@ namespace Example var apiInstance = new FakeApi(httpClient, config, httpClientHandler); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer 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 int64Group = 789; // long? | Integer in group parameters (optional) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1056,8 +1056,8 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md index 43033c45b594..505380841a6e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md @@ -120,8 +120,8 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -359,7 +359,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -514,9 +514,9 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var petId = 789; // 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 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) try { @@ -593,9 +593,9 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // FileParameter | file to upload (optional) + 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")); // FileParameter | file to upload (optional) try { @@ -673,9 +673,9 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // FileParameter | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + var petId = 789L; // long | ID of pet to update + var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | file to upload + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { 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 248bf31f849c..44bf0ce59eab 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md @@ -39,7 +39,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new StoreApi(httpClient, config, httpClientHandler); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -190,7 +190,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new StoreApi(httpClient, config, httpClientHandler); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/UserApi.md index 417d9002cf94..fe9ac2db8181 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/UserApi.md @@ -261,7 +261,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new UserApi(httpClient, config, httpClientHandler); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -334,7 +334,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new UserApi(httpClient, config, httpClientHandler); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -409,8 +409,8 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new UserApi(httpClient, config, httpClientHandler); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -555,7 +555,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new UserApi(httpClient, config, httpClientHandler); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try 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 87c4c9571487..8a5cb9aaf429 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,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 { @@ -523,7 +523,7 @@ 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 query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+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 _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) try { @@ -767,13 +767,13 @@ namespace Example 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 = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + 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 = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (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 = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer 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 int64Group = 789; // long? | Integer in group parameters (optional) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md index aa5cd9f497b4..f429575063c3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // 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 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) + 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) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + 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) try { 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 24e2480d5deb..963ecda9c142 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/UserApi.md index aa12c26c69f1..2f478081dc25 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ 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 username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try 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 87c4c9571487..8a5cb9aaf429 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 @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,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 { @@ -523,7 +523,7 @@ 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 query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+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 _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) try { @@ -767,13 +767,13 @@ namespace Example 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 = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + 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 = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (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 = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer 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 int64Group = 789; // long? | Integer in group parameters (optional) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { 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 aa5cd9f497b4..f429575063c3 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 @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // 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 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) + 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) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + 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) try { 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 24e2480d5deb..963ecda9c142 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 @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md index aa12c26c69f1..2f478081dc25 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ 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 username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md index 87c4c9571487..8a5cb9aaf429 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,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 { @@ -523,7 +523,7 @@ 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 query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+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 _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) try { @@ -767,13 +767,13 @@ namespace Example 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 = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + 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 = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (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 = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer 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 int64Group = 789; // long? | Integer in group parameters (optional) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md index aa5cd9f497b4..f429575063c3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // 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 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) + 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) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + 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) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md index 24e2480d5deb..963ecda9c142 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md index aa12c26c69f1..2f478081dc25 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ 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 username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md index 87c4c9571487..8a5cb9aaf429 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,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 { @@ -523,7 +523,7 @@ 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 query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+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 _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) try { @@ -767,13 +767,13 @@ namespace Example 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 = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + 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 = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (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 = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer 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 int64Group = 789; // long? | Integer in group parameters (optional) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md index aa5cd9f497b4..f429575063c3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // 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 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) + 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) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + 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) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md index 24e2480d5deb..963ecda9c142 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md index aa12c26c69f1..2f478081dc25 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ 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 username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md index 4baa360aa757..109fec4f4114 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md @@ -113,8 +113,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -340,7 +340,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -489,9 +489,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // 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 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) try { @@ -564,9 +564,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) + 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) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md index 8b1ba130f4cc..a3c7f1f92beb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/UserApi.md index b7d26019ae9c..398955476868 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/UserApi.md @@ -265,7 +265,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -334,7 +334,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -405,8 +405,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -553,7 +553,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new UserApi(config); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index b38dea5dd37d..93a9e0afbf0d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -119,8 +119,8 @@ namespace Example var apiInstance = new FakeApi(Configuration.Default); var pet = new Pet(); // Pet | Pet object that needs to be added to the store - var query1 = query1_example; // string | query parameter (optional) - var header1 = header1_example; // string | header parameter (optional) + var query1 = "query1_example"; // string | query parameter (optional) + var header1 = "header1_example"; // string | header parameter (optional) try { @@ -347,7 +347,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -422,7 +422,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -572,7 +572,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = BINARY_DATA_HERE; // System.IO.Stream | image to upload + var body = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | image to upload try { @@ -718,7 +718,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -874,20 +874,20 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(Configuration.Default); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) - var password = password_example; // string | None (optional) - var callback = callback_example; // string | 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("2013-10-20T19:20:30+01:00"); // DateTime? | None (optional) + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -977,13 +977,13 @@ namespace Example Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + 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 = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (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 = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -1071,10 +1071,10 @@ namespace Example var apiInstance = new FakeApi(Configuration.Default); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer 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 int64Group = 789; // long? | Integer in group parameters (optional) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1225,8 +1225,8 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { @@ -1307,7 +1307,7 @@ namespace Example var http = new List(); // List | var url = new List(); // List | var context = new List(); // List | - var allowEmpty = allowEmpty_example; // string | + var allowEmpty = "allowEmpty_example"; // string | var language = new Dictionary(); // Dictionary | (optional) try diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md index 8675820ce219..b02d582adc15 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md @@ -119,8 +119,8 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -362,7 +362,7 @@ namespace Example // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -520,9 +520,9 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // 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 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) try { @@ -601,9 +601,9 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) + 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) try { @@ -682,9 +682,9 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + 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) try { diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md index eac4f3fcafcc..3a452bc4d698 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md @@ -36,7 +36,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(Configuration.Default); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -189,7 +189,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(Configuration.Default); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md index 611bd412da59..5bd0898eac18 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md @@ -261,7 +261,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -335,7 +335,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -411,8 +411,8 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -559,7 +559,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try From 55ffdb791f14cc3aa2f4db00ad82ea94d6edcc11 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 21 Jan 2022 16:36:19 +0800 Subject: [PATCH 120/175] mark retry class as static (#11369) --- .../csharp-netcore/RetryConfiguration.mustache | 4 +++- .../Org.OpenAPITools/Client/RetryConfiguration.cs | 12 +++++++++++- .../Org.OpenAPITools/Client/RetryConfiguration.cs | 12 +++++++++++- .../Org.OpenAPITools/Client/RetryConfiguration.cs | 12 +++++++++++- .../Org.OpenAPITools/Client/RetryConfiguration.cs | 12 +++++++++++- .../Org.OpenAPITools/Client/RetryConfiguration.cs | 12 +++++++++++- .../Org.OpenAPITools/Client/RetryConfiguration.cs | 12 +++++++++++- .../Org.OpenAPITools/Client/RetryConfiguration.cs | 12 +++++++++++- .../Org.OpenAPITools/Client/RetryConfiguration.cs | 12 +++++++++++- 9 files changed, 91 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache index 29aa60926811..4cc953487a81 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache @@ -1,3 +1,5 @@ +{{>partial_header}} + using Polly; {{#useRestSharp}} using RestSharp; @@ -11,7 +13,7 @@ namespace {{packageName}}.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { {{#useRestSharp}} /// diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RetryConfiguration.cs index c93633a36d93..f589a4482da0 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,3 +1,13 @@ +/* + * MultipartFile test + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + using Polly; using RestSharp; @@ -6,7 +16,7 @@ namespace Org.OpenAPITools.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RetryConfiguration.cs index c93633a36d93..91bc7cc6d54a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,3 +1,13 @@ +/* + * OpenAPI Petstore + * + * 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 Polly; using RestSharp; @@ -6,7 +16,7 @@ namespace Org.OpenAPITools.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/RetryConfiguration.cs index 285b6dac105b..139ef334aa05 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,3 +1,13 @@ +/* + * OpenAPI Petstore + * + * 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 Polly; using System.Net.Http; @@ -6,7 +16,7 @@ namespace Org.OpenAPITools.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RetryConfiguration.cs index c93633a36d93..91bc7cc6d54a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,3 +1,13 @@ +/* + * OpenAPI Petstore + * + * 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 Polly; using RestSharp; @@ -6,7 +16,7 @@ namespace Org.OpenAPITools.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RetryConfiguration.cs index c93633a36d93..91bc7cc6d54a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,3 +1,13 @@ +/* + * OpenAPI Petstore + * + * 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 Polly; using RestSharp; @@ -6,7 +16,7 @@ namespace Org.OpenAPITools.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs index c93633a36d93..91bc7cc6d54a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,3 +1,13 @@ +/* + * OpenAPI Petstore + * + * 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 Polly; using RestSharp; @@ -6,7 +16,7 @@ namespace Org.OpenAPITools.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs index c93633a36d93..91bc7cc6d54a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,3 +1,13 @@ +/* + * OpenAPI Petstore + * + * 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 Polly; using RestSharp; @@ -6,7 +16,7 @@ namespace Org.OpenAPITools.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RetryConfiguration.cs index c93633a36d93..92d8f878ca02 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,3 +1,13 @@ +/* + * 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://github.com/openapitools/openapi-generator.git + */ + + using Polly; using RestSharp; @@ -6,7 +16,7 @@ namespace Org.OpenAPITools.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy From 93488f41959b00a7ceb011b05430208d7216e825 Mon Sep 17 00:00:00 2001 From: hackerman <3372410+aeneasr@users.noreply.github.com> Date: Fri, 21 Jan 2022 09:54:09 +0100 Subject: [PATCH 121/175] Resolve several issues in generated Go code (#8491) * [go] use regular stdlib import names * [go] support primitive oneOf types See #8489 * [go] improve pbv/pbr handling Improves the way pass-by-value and pass-by-reference variables are used. Closes #8489 * [go] improve generated documentation * [go] adopt pointer changes in interface * [go] regenerate sample * [go] resolve pointer issues * [go] regenerate clients and avoid pointers on primitive return values * [go] improve Exec() return value handling * [go] regernate files * [go] use go modules * [go] properly handle polymorph decode If polymorphism without discriminator was used, the previous code was unable to properly decode the vaules. By using a strict decoder, which rejects unknown fields, type guessing now works. * [go] make GetActualInstance not panic on nil * [go] return GenericOpenAPIError as pointer * [go] clarify helper function godoc * [go] address test regression error type * [go] regenerate go samples * [go] resolve go mod issues and test regressions * [go] resolve merge conflicts and regenerate * [go] resolve merge conflicts * [go] Replace spaces with tabs Co-authored-by: Jiri Kuncar * [go] Replace spaces with tabs Co-authored-by: Jiri Kuncar Co-authored-by: Jiri Kuncar --- .../src/main/resources/go/README.mustache | 14 +- .../src/main/resources/go/api.mustache | 53 +- .../src/main/resources/go/api_doc.mustache | 4 +- .../src/main/resources/go/client.mustache | 7 + .../src/main/resources/go/go.mod.mustache | 2 +- .../main/resources/go/model_oneof.mustache | 35 +- .../main/resources/go/model_simple.mustache | 18 +- .../main/resources/go/nullable_model.mustache | 8 +- samples/client/petstore/go/auth_test.go | 18 +- samples/client/petstore/go/fake_api_test.go | 4 +- .../client/petstore/go/go-petstore/README.md | 10 +- .../go/go-petstore/api_another_fake.go | 44 +- .../petstore/go/go-petstore/api_fake.go | 446 ++++++++-------- .../go-petstore/api_fake_classname_tags123.go | 44 +- .../client/petstore/go/go-petstore/api_pet.go | 310 +++++------ .../petstore/go/go-petstore/api_store.go | 144 +++--- .../petstore/go/go-petstore/api_user.go | 262 +++++----- .../client/petstore/go/go-petstore/client.go | 7 + .../go/go-petstore/docs/AnotherFakeApi.md | 4 +- .../petstore/go/go-petstore/docs/FakeApi.md | 56 +- .../docs/FakeClassnameTags123Api.md | 4 +- .../petstore/go/go-petstore/docs/PetApi.md | 36 +- .../petstore/go/go-petstore/docs/StoreApi.md | 16 +- .../petstore/go/go-petstore/docs/UserApi.md | 32 +- samples/client/petstore/go/go-petstore/go.mod | 2 +- .../model_additional_properties_class.go | 24 +- .../model_array_of_array_of_number_only.go | 8 +- .../go-petstore/model_array_of_number_only.go | 8 +- .../go/go-petstore/model_array_test_.go | 24 +- .../go/go-petstore/model_enum_arrays.go | 8 +- .../model_file_schema_test_class.go | 8 +- .../petstore/go/go-petstore/model_pet.go | 12 +- .../go-petstore/model_type_holder_default.go | 4 +- .../go-petstore/model_type_holder_example.go | 4 +- .../petstore/go/go-petstore/model_xml_item.go | 72 +-- samples/client/petstore/go/go.mod | 11 + samples/client/petstore/go/go.sum | 371 ++++++++++++++ .../client/petstore/go/mock/mock_api_pet.go | 26 +- samples/client/petstore/go/pet_api_test.go | 8 +- samples/client/petstore/go/store_api_test.go | 2 +- samples/client/petstore/go/user_api_test.go | 10 +- .../x-auth-id-alias/go-experimental/README.md | 10 +- .../go-experimental/api_usage.go | 114 ++--- .../x-auth-id-alias/go-experimental/client.go | 7 + .../go-experimental/docs/UsageApi.md | 16 +- .../x-auth-id-alias/go-experimental/go.mod | 2 +- .../openapi3/client/petstore/go/auth_test.go | 18 +- .../client/petstore/go/fake_api_test.go | 4 +- .../client/petstore/go/go-petstore/README.md | 14 +- .../go/go-petstore/api_another_fake.go | 44 +- .../petstore/go/go-petstore/api_default.go | 44 +- .../petstore/go/go-petstore/api_fake.go | 482 +++++++++--------- .../go-petstore/api_fake_classname_tags123.go | 44 +- .../client/petstore/go/go-petstore/api_pet.go | 310 +++++------ .../petstore/go/go-petstore/api_store.go | 144 +++--- .../petstore/go/go-petstore/api_user.go | 262 +++++----- .../client/petstore/go/go-petstore/client.go | 7 + .../go/go-petstore/docs/AnotherFakeApi.md | 4 +- .../go/go-petstore/docs/DefaultApi.md | 4 +- .../petstore/go/go-petstore/docs/FakeApi.md | 60 +-- .../docs/FakeClassnameTags123Api.md | 4 +- .../petstore/go/go-petstore/docs/PetApi.md | 36 +- .../petstore/go/go-petstore/docs/StoreApi.md | 16 +- .../petstore/go/go-petstore/docs/UserApi.md | 32 +- .../client/petstore/go/go-petstore/go.mod | 2 +- .../model_array_of_array_of_number_only.go | 8 +- .../go-petstore/model_array_of_number_only.go | 8 +- .../go/go-petstore/model_array_test_.go | 24 +- .../go/go-petstore/model_enum_arrays.go | 8 +- .../model_file_schema_test_class.go | 8 +- .../petstore/go/go-petstore/model_fruit.go | 15 +- .../go/go-petstore/model_fruit_req.go | 15 +- .../go/go-petstore/model_inline_object.go | 4 +- .../go/go-petstore/model_inline_object_1.go | 4 +- .../go/go-petstore/model_inline_object_2.go | 4 +- .../go/go-petstore/model_inline_object_3.go | 22 +- .../go/go-petstore/model_inline_object_4.go | 14 +- .../go/go-petstore/model_inline_object_5.go | 10 +- .../petstore/go/go-petstore/model_mammal.go | 15 +- .../go/go-petstore/model_nullable_class.go | 32 +- .../model_outer_object_with_enum_property.go | 4 +- .../petstore/go/go-petstore/model_pet.go | 12 +- .../petstore/go/go-petstore/model_user.go | 12 +- samples/openapi3/client/petstore/go/go.mod | 11 + samples/openapi3/client/petstore/go/go.sum | 371 ++++++++++++++ .../client/petstore/go/http_signature_test.go | 4 +- .../openapi3/client/petstore/go/model_test.go | 2 +- .../petstore/go/nullable_marshalling_test.go | 118 ++--- .../client/petstore/go/pet_api_test.go | 6 +- .../client/petstore/go/store_api_test.go | 2 +- .../client/petstore/go/user_api_test.go | 10 +- 91 files changed, 2705 insertions(+), 1898 deletions(-) create mode 100644 samples/client/petstore/go/go.mod create mode 100644 samples/client/petstore/go/go.sum create mode 100644 samples/openapi3/client/petstore/go/go.mod create mode 100644 samples/openapi3/client/petstore/go/go.sum diff --git a/modules/openapi-generator/src/main/resources/go/README.mustache b/modules/openapi-generator/src/main/resources/go/README.mustache index e6d140d28b26..b00e98e55cb3 100644 --- a/modules/openapi-generator/src/main/resources/go/README.mustache +++ b/modules/openapi-generator/src/main/resources/go/README.mustache @@ -30,7 +30,7 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: ```golang -import sw "./{{packageName}}" +import {{packageName}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" ``` To use a proxy, set the environment variable `HTTP_PROXY`: @@ -48,7 +48,7 @@ Default configuration comes with `Servers` field that contains server objects as For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. ```golang -ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) +ctx := context.WithValue(context.Background(), {{packageName}}.ContextServerIndex, 1) ``` ### Templated Server URL @@ -56,7 +56,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. ```golang -ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{ +ctx := context.WithValue(context.Background(), {{packageName}}.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` @@ -70,10 +70,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string. Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. ``` -ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ +ctx := context.WithValue(context.Background(), {{packageName}}.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) -ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ +ctx = context.WithValue(context.Background(), {{packageName}}.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, @@ -117,7 +117,7 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example ```golang -auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING") +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") r, err := client.Service.Operation(auth, args) ``` @@ -142,7 +142,7 @@ r, err := client.Service.Operation(auth, args) Example ```golang - authConfig := sw.HttpSignatureAuth{ + authConfig := client.HttpSignatureAuth{ KeyId: "my-key-id", PrivateKeyPath: "rsa.pem", Passphrase: "my-passphrase", diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index 4a94d6aaf598..f7a31797b01f 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -4,17 +4,17 @@ package {{packageName}} {{#operations}} import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" {{#imports}} "{{import}}" {{/imports}} ) // Linger please var ( - _ _context.Context + _ context.Context ) {{#generateInterfaces}} @@ -28,7 +28,7 @@ type {{classname}} interface { {{{unescapedNotes}}} {{/notes}} - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} @return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request {{#isDeprecated}} @@ -36,14 +36,14 @@ type {{classname}} interface { Deprecated {{/isDeprecated}} */ - {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request + {{{nickname}}}(ctx context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request // {{nickname}}Execute executes the request{{#returnType}} // @return {{{.}}}{{/returnType}} {{#isDeprecated}} // Deprecated {{/isDeprecated}} - {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) + {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}*{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) {{/operation}} } {{/generateInterfaces}} @@ -53,8 +53,11 @@ type {{classname}}Service service {{#operation}} type {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request struct { - ctx _context.Context - ApiService {{#generateInterfaces}}{{classname}}{{/generateInterfaces}}{{^generateInterfaces}}*{{classname}}Service{{/generateInterfaces}} + ctx context.Context{{#generateInterfaces}} + ApiService {{classname}} +{{/generateInterfaces}}{{^generateInterfaces}} + ApiService *{{classname}}Service +{{/generateInterfaces}} {{#allParams}} {{paramName}} {{^isPathParam}}*{{/isPathParam}}{{{dataType}}} {{/allParams}} @@ -71,7 +74,7 @@ func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Reques return r }{{/isPathParam}}{{/allParams}} -func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) { +func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) Execute() ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}*{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) { return r.ApiService.{{nickname}}Execute(r) } @@ -82,7 +85,7 @@ func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Reques {{{unescapedNotes}}} {{/notes}} - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} @return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request {{#isDeprecated}} @@ -90,7 +93,7 @@ func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Reques Deprecated {{/isDeprecated}} */ -func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request { +func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request { return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request{ ApiService: a, ctx: ctx, @@ -105,27 +108,27 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParam {{#isDeprecated}} // Deprecated {{/isDeprecated}} -func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) { +func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}*{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.Method{{httpMethod}} + localVarHTTPMethod = http.Method{{httpMethod}} localVarPostBody interface{} formFiles []formFile {{#returnType}} - localVarReturnValue {{{.}}} + localVarReturnValue {{^isArray}}{{^returnTypeIsPrimitive}}*{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}} {{/returnType}} ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}") if err != nil { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, GenericOpenAPIError{error: err.Error()} + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "{{{path}}}"{{#pathParams}} - localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.PathEscape(parameterToString(r.{{paramName}}, "{{collectionFormat}}")), -1){{/pathParams}} + localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", url.PathEscape(parameterToString(r.{{paramName}}, "{{collectionFormat}}")), -1){{/pathParams}} localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} {{#allParams}} {{#required}} {{^isPathParam}} @@ -265,7 +268,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class } {{/required}} if {{paramName}}LocalVarFile != nil { - fbs, _ := _ioutil.ReadAll({{paramName}}LocalVarFile) + fbs, _ := ioutil.ReadAll({{paramName}}LocalVarFile) {{paramName}}LocalVarFileBytes = fbs {{paramName}}LocalVarFileName = {{paramName}}LocalVarFile.Name() {{paramName}}LocalVarFile.Close() @@ -344,15 +347,15 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -399,7 +402,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class {{#returnType}} err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/modules/openapi-generator/src/main/resources/go/api_doc.mustache b/modules/openapi-generator/src/main/resources/go/api_doc.mustache index c99fff852bb3..c9927461bda3 100644 --- a/modules/openapi-generator/src/main/resources/go/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go/api_doc.mustache @@ -41,8 +41,8 @@ func main() { {{/allParams}} configuration := {{goImportAlias}}.NewConfiguration() - api_client := {{goImportAlias}}.NewAPIClient(configuration) - resp, r, err := api_client.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() + apiClient := {{goImportAlias}}.NewAPIClient(configuration) + resp, r, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index 609b362a8629..8b9e173fe018 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -477,6 +477,13 @@ func reportError(format string, a ...interface{}) error { return fmt.Errorf(format, a...) } +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { 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 97fceb03a927..c7e0fe117e36 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,7 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}} go 1.13 require ( - golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 {{#withAWSV4Signature}} github.com/aws/aws-sdk-go v1.34.14 {{/withAWSV4Signature}} 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 6938308d763e..dc85c438f100 100644 --- a/modules/openapi-generator/src/main/resources/go/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_oneof.mustache @@ -1,14 +1,16 @@ // {{classname}} - {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} type {{classname}} struct { {{#oneOf}} - {{{.}}} *{{{.}}} + {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} *{{{.}}} {{/oneOf}} } {{#oneOf}} // {{{.}}}As{{classname}} is a convenience function that returns {{{.}}} wrapped in {{classname}} -func {{{.}}}As{{classname}}(v *{{{.}}}) {{classname}} { - return {{classname}}{ {{{.}}}: v} +func {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}As{{classname}}(v *{{{.}}}) {{classname}} { + return {{classname}}{ + {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}: v, + } } {{/oneOf}} @@ -29,7 +31,7 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error { {{#-first}} // use discriminator value to speed up the lookup var jsonDict map[string]interface{} - err = json.Unmarshal(data, &jsonDict) + err = newStrictDecoder(data).Decode(&jsonDict) if err != nil { return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") } @@ -84,24 +86,24 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error { {{^useOneOfDiscriminatorLookup}} match := 0 {{#oneOf}} - // try to unmarshal data into {{{.}}} - err = json.Unmarshal(data, &dst.{{{.}}}) + // try to unmarshal data into {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} + err = newStrictDecoder(data).Decode(&dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) if err == nil { - json{{{.}}}, _ := json.Marshal(dst.{{{.}}}) - if string(json{{{.}}}) == "{}" { // empty struct - dst.{{{.}}} = nil + json{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}, _ := json.Marshal(dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) + if string(json{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) == "{}" { // empty struct + dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil } else { match++ } } else { - dst.{{{.}}} = nil + dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil } {{/oneOf}} if match > 1 { // more than 1 match // reset to nil {{#oneOf}} - dst.{{{.}}} = nil + dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil {{/oneOf}} return fmt.Errorf("Data matches more than one schema in oneOf({{classname}})") @@ -116,8 +118,8 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src {{classname}}) MarshalJSON() ([]byte, error) { {{#oneOf}} - if src.{{{.}}} != nil { - return json.Marshal(&src.{{{.}}}) + if src.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} != nil { + return json.Marshal(&src.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) } {{/oneOf}} @@ -126,9 +128,12 @@ func (src {{classname}}) MarshalJSON() ([]byte, error) { // Get the actual instance func (obj *{{classname}}) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } {{#oneOf}} - if obj.{{{.}}} != nil { - return obj.{{{.}}} + if obj.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} != nil { + return obj.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} } {{/oneOf}} 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 97884f910b33..feeefee88752 100644 --- a/modules/openapi-generator/src/main/resources/go/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_simple.mustache @@ -19,7 +19,7 @@ type {{classname}} struct { {{#deprecated}} // Deprecated {{/deprecated}} - {{name}} {{^required}}{{^isNullable}}*{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` + {{name}} {{^required}}{{^isNullable}}{{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` {{/vars}} {{#isAdditionalPropertiesTrue}} AdditionalProperties map[string]interface{} @@ -121,20 +121,20 @@ func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { {{#deprecated}} // Deprecated {{/deprecated}} -func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool) { +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}}|| o.{{name}} == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { return nil, false } {{#isNullable}} {{#vendorExtensions.x-golang-is-container}} - return &o.{{name}}, true + return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true {{/vendorExtensions.x-golang-is-container}} {{^vendorExtensions.x-golang-is-container}} return o.{{name}}.Get(), o.{{name}}.IsSet() {{/vendorExtensions.x-golang-is-container}} {{/isNullable}} {{^isNullable}} - return &o.{{name}}, true + return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true {{/isNullable}} } @@ -176,7 +176,7 @@ func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { {{/vendorExtensions.x-golang-is-container}} {{/isNullable}} {{^isNullable}} - return *o.{{name}} + return {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}o.{{name}} {{/isNullable}} } @@ -188,13 +188,13 @@ func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { {{#deprecated}} // Deprecated {{/deprecated}} -func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool) { +func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) { if o == nil {{^isNullable}}|| o.{{name}} == nil{{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}}|| o.{{name}} == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { return nil, false } {{#isNullable}} {{#vendorExtensions.x-golang-is-container}} - return &o.{{name}}, true + return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true {{/vendorExtensions.x-golang-is-container}} {{^vendorExtensions.x-golang-is-container}} return o.{{name}}.Get(), o.{{name}}.IsSet() @@ -224,11 +224,11 @@ func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) { o.{{name}} = v {{/vendorExtensions.x-golang-is-container}} {{^vendorExtensions.x-golang-is-container}} - o.{{name}}.Set(&v) + o.{{name}}.Set({{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}v) {{/vendorExtensions.x-golang-is-container}} {{/isNullable}} {{^isNullable}} - o.{{name}} = &v + o.{{name}} = {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}v {{/isNullable}} } {{#isNullable}} diff --git a/modules/openapi-generator/src/main/resources/go/nullable_model.mustache b/modules/openapi-generator/src/main/resources/go/nullable_model.mustache index 20d357691305..7b60ce6d3a15 100644 --- a/modules/openapi-generator/src/main/resources/go/nullable_model.mustache +++ b/modules/openapi-generator/src/main/resources/go/nullable_model.mustache @@ -1,13 +1,13 @@ type Nullable{{{classname}}} struct { - value *{{{classname}}} + value {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{{classname}}} isSet bool } -func (v Nullable{{classname}}) Get() *{{classname}} { +func (v Nullable{{classname}}) Get() {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}} { return v.value } -func (v *Nullable{{classname}}) Set(val *{{classname}}) { +func (v *Nullable{{classname}}) Set(val {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}}) { v.value = val v.isSet = true } @@ -21,7 +21,7 @@ func (v *Nullable{{classname}}) Unset() { v.isSet = false } -func NewNullable{{classname}}(val *{{classname}}) *Nullable{{classname}} { +func NewNullable{{classname}}(val {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}}) *Nullable{{classname}} { return &Nullable{{classname}}{value: val, isSet: true} } diff --git a/samples/client/petstore/go/auth_test.go b/samples/client/petstore/go/auth_test.go index c35e5b24fbcd..94ba6a1526e2 100644 --- a/samples/client/petstore/go/auth_test.go +++ b/samples/client/petstore/go/auth_test.go @@ -10,7 +10,7 @@ import ( "golang.org/x/oauth2" - sw "./go-petstore" + sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore" ) func TestOAuth2(t *testing.T) { @@ -39,7 +39,7 @@ func TestOAuth2(t *testing.T) { newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute() @@ -74,7 +74,7 @@ func TestBasicAuth(t *testing.T) { newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(auth).Body(newPet).Execute() @@ -104,7 +104,7 @@ func TestAccessToken(t *testing.T) { newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(nil).Body(newPet).Execute() @@ -130,11 +130,11 @@ func TestAccessToken(t *testing.T) { } func TestAPIKeyNoPrefix(t *testing.T) { - auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123"}}) + auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123"}}) newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute() @@ -165,11 +165,11 @@ func TestAPIKeyNoPrefix(t *testing.T) { } func TestAPIKeyWithPrefix(t *testing.T) { - auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123", Prefix: "Bearer"}}) + auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123", Prefix: "Bearer"}}) newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(nil).Body(newPet).Execute() @@ -202,7 +202,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { func TestDefaultHeader(t *testing.T) { newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute() diff --git a/samples/client/petstore/go/fake_api_test.go b/samples/client/petstore/go/fake_api_test.go index d27137eeacfa..9e163fa565f2 100644 --- a/samples/client/petstore/go/fake_api_test.go +++ b/samples/client/petstore/go/fake_api_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - sw "./go-petstore" + sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore" ) // TestPutBodyWithFileSchema ensures a model with the name 'File' @@ -15,7 +15,7 @@ func TestPutBodyWithFileSchema(t *testing.T) { schema := sw.FileSchemaTestClass{ File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")}, - Files: &[]sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}} + Files: []sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}} r, err := client.FakeApi.TestBodyWithFileSchema(context.Background()).Body(schema).Execute() diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index d462bd1be83c..70d0040a3a6b 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -22,7 +22,7 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: ```golang -import sw "./petstore" +import petstore "github.com/GIT_USER_ID/GIT_REPO_ID" ``` To use a proxy, set the environment variable `HTTP_PROXY`: @@ -40,7 +40,7 @@ Default configuration comes with `Servers` field that contains server objects as For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. ```golang -ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) +ctx := context.WithValue(context.Background(), petstore.ContextServerIndex, 1) ``` ### Templated Server URL @@ -48,7 +48,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. ```golang -ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{ +ctx := context.WithValue(context.Background(), petstore.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` @@ -62,10 +62,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string. Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. ``` -ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ +ctx := context.WithValue(context.Background(), petstore.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) -ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ +ctx = context.WithValue(context.Background(), petstore.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go index bb5add0ca9fe..8199c4fd3703 100644 --- a/samples/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore/api_another_fake.go @@ -12,15 +12,15 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" ) // Linger please var ( - _ _context.Context + _ context.Context ) type AnotherFakeApi interface { @@ -30,21 +30,21 @@ type AnotherFakeApi interface { To test special tags and operation ID starting with number - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCall123TestSpecialTagsRequest */ - Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest + Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest // Call123TestSpecialTagsExecute executes the request // @return Client - Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) + Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) } // AnotherFakeApiService AnotherFakeApi service type AnotherFakeApiService service type ApiCall123TestSpecialTagsRequest struct { - ctx _context.Context + ctx context.Context ApiService AnotherFakeApi body *Client } @@ -55,7 +55,7 @@ func (r ApiCall123TestSpecialTagsRequest) Body(body Client) ApiCall123TestSpecia return r } -func (r ApiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) { +func (r ApiCall123TestSpecialTagsRequest) Execute() (*Client, *http.Response, error) { return r.ApiService.Call123TestSpecialTagsExecute(r) } @@ -64,10 +64,10 @@ Call123TestSpecialTags To test special tags To test special tags and operation ID starting with number - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCall123TestSpecialTagsRequest */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest { +func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest { return ApiCall123TestSpecialTagsRequest{ ApiService: a, ctx: ctx, @@ -76,24 +76,24 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) Api // Execute executes the request // @return Client -func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue Client + localVarReturnValue *Client ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/another-fake/dummy" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return localVarReturnValue, nil, reportError("body is required and must be specified") } @@ -127,15 +127,15 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -144,7 +144,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 40252ad41b5a..96a2c5ba9f72 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -12,10 +12,10 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "os" "time" "reflect" @@ -23,7 +23,7 @@ import ( // Linger please var ( - _ _context.Context + _ context.Context ) type FakeApi interface { @@ -33,107 +33,107 @@ type FakeApi interface { this route creates an XmlItem - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateXmlItemRequest */ - CreateXmlItem(ctx _context.Context) ApiCreateXmlItemRequest + CreateXmlItem(ctx context.Context) ApiCreateXmlItemRequest // CreateXmlItemExecute executes the request - CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*_nethttp.Response, error) + CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*http.Response, error) /* FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize Test serialization of outer boolean types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterBooleanSerializeRequest */ - FakeOuterBooleanSerialize(ctx _context.Context) ApiFakeOuterBooleanSerializeRequest + FakeOuterBooleanSerialize(ctx context.Context) ApiFakeOuterBooleanSerializeRequest // FakeOuterBooleanSerializeExecute executes the request // @return bool - FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *_nethttp.Response, error) + FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *http.Response, error) /* FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize Test serialization of object with outer number type - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterCompositeSerializeRequest */ - FakeOuterCompositeSerialize(ctx _context.Context) ApiFakeOuterCompositeSerializeRequest + FakeOuterCompositeSerialize(ctx context.Context) ApiFakeOuterCompositeSerializeRequest // FakeOuterCompositeSerializeExecute executes the request // @return OuterComposite - FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (OuterComposite, *_nethttp.Response, error) + FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (*OuterComposite, *http.Response, error) /* FakeOuterNumberSerialize Method for FakeOuterNumberSerialize Test serialization of outer number types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterNumberSerializeRequest */ - FakeOuterNumberSerialize(ctx _context.Context) ApiFakeOuterNumberSerializeRequest + FakeOuterNumberSerialize(ctx context.Context) ApiFakeOuterNumberSerializeRequest // FakeOuterNumberSerializeExecute executes the request // @return float32 - FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *_nethttp.Response, error) + FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *http.Response, error) /* FakeOuterStringSerialize Method for FakeOuterStringSerialize Test serialization of outer string types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterStringSerializeRequest */ - FakeOuterStringSerialize(ctx _context.Context) ApiFakeOuterStringSerializeRequest + FakeOuterStringSerialize(ctx context.Context) ApiFakeOuterStringSerializeRequest // FakeOuterStringSerializeExecute executes the request // @return string - FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *_nethttp.Response, error) + FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *http.Response, error) /* TestBodyWithFileSchema Method for TestBodyWithFileSchema For this test, the body for this request much reference a schema named `File`. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestBodyWithFileSchemaRequest */ - TestBodyWithFileSchema(ctx _context.Context) ApiTestBodyWithFileSchemaRequest + TestBodyWithFileSchema(ctx context.Context) ApiTestBodyWithFileSchemaRequest // TestBodyWithFileSchemaExecute executes the request - TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*_nethttp.Response, error) + TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*http.Response, error) /* TestBodyWithQueryParams Method for TestBodyWithQueryParams - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestBodyWithQueryParamsRequest */ - TestBodyWithQueryParams(ctx _context.Context) ApiTestBodyWithQueryParamsRequest + TestBodyWithQueryParams(ctx context.Context) ApiTestBodyWithQueryParamsRequest // TestBodyWithQueryParamsExecute executes the request - TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*_nethttp.Response, error) + TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*http.Response, error) /* TestClientModel To test \"client\" model To test "client" model - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestClientModelRequest */ - TestClientModel(ctx _context.Context) ApiTestClientModelRequest + TestClientModel(ctx context.Context) ApiTestClientModelRequest // TestClientModelExecute executes the request // @return Client - TestClientModelExecute(r ApiTestClientModelRequest) (Client, *_nethttp.Response, error) + TestClientModelExecute(r ApiTestClientModelRequest) (*Client, *http.Response, error) /* TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -143,81 +143,81 @@ type FakeApi interface { 偽のエンドポイント 가짜 엔드 포인트 - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestEndpointParametersRequest */ - TestEndpointParameters(ctx _context.Context) ApiTestEndpointParametersRequest + TestEndpointParameters(ctx context.Context) ApiTestEndpointParametersRequest // TestEndpointParametersExecute executes the request - TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*_nethttp.Response, error) + TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*http.Response, error) /* TestEnumParameters To test enum parameters To test enum parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestEnumParametersRequest */ - TestEnumParameters(ctx _context.Context) ApiTestEnumParametersRequest + TestEnumParameters(ctx context.Context) ApiTestEnumParametersRequest // TestEnumParametersExecute executes the request - TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*_nethttp.Response, error) + TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*http.Response, error) /* TestGroupParameters Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestGroupParametersRequest */ - TestGroupParameters(ctx _context.Context) ApiTestGroupParametersRequest + TestGroupParameters(ctx context.Context) ApiTestGroupParametersRequest // TestGroupParametersExecute executes the request - TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*_nethttp.Response, error) + TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*http.Response, error) /* TestInlineAdditionalProperties test inline additionalProperties - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestInlineAdditionalPropertiesRequest */ - TestInlineAdditionalProperties(ctx _context.Context) ApiTestInlineAdditionalPropertiesRequest + TestInlineAdditionalProperties(ctx context.Context) ApiTestInlineAdditionalPropertiesRequest // TestInlineAdditionalPropertiesExecute executes the request - TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*_nethttp.Response, error) + TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*http.Response, error) /* TestJsonFormData test json serialization of form data - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestJsonFormDataRequest */ - TestJsonFormData(ctx _context.Context) ApiTestJsonFormDataRequest + TestJsonFormData(ctx context.Context) ApiTestJsonFormDataRequest // TestJsonFormDataExecute executes the request - TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*_nethttp.Response, error) + TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*http.Response, error) /* TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat To test the collection format in query parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestQueryParameterCollectionFormatRequest */ - TestQueryParameterCollectionFormat(ctx _context.Context) ApiTestQueryParameterCollectionFormatRequest + TestQueryParameterCollectionFormat(ctx context.Context) ApiTestQueryParameterCollectionFormatRequest // TestQueryParameterCollectionFormatExecute executes the request - TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*_nethttp.Response, error) + TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) } // FakeApiService FakeApi service type FakeApiService service type ApiCreateXmlItemRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi xmlItem *XmlItem } @@ -228,7 +228,7 @@ func (r ApiCreateXmlItemRequest) XmlItem(xmlItem XmlItem) ApiCreateXmlItemReques return r } -func (r ApiCreateXmlItemRequest) Execute() (*_nethttp.Response, error) { +func (r ApiCreateXmlItemRequest) Execute() (*http.Response, error) { return r.ApiService.CreateXmlItemExecute(r) } @@ -237,10 +237,10 @@ CreateXmlItem creates an XmlItem this route creates an XmlItem - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateXmlItemRequest */ -func (a *FakeApiService) CreateXmlItem(ctx _context.Context) ApiCreateXmlItemRequest { +func (a *FakeApiService) CreateXmlItem(ctx context.Context) ApiCreateXmlItemRequest { return ApiCreateXmlItemRequest{ ApiService: a, ctx: ctx, @@ -248,23 +248,23 @@ func (a *FakeApiService) CreateXmlItem(ctx _context.Context) ApiCreateXmlItemReq } // Execute executes the request -func (a *FakeApiService) CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.CreateXmlItem") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/create_xml_item" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.xmlItem == nil { return nil, reportError("xmlItem is required and must be specified") } @@ -298,15 +298,15 @@ func (a *FakeApiService) CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*_neth return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -317,7 +317,7 @@ func (a *FakeApiService) CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*_neth } type ApiFakeOuterBooleanSerializeRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *bool } @@ -328,7 +328,7 @@ func (r ApiFakeOuterBooleanSerializeRequest) Body(body bool) ApiFakeOuterBoolean return r } -func (r ApiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response, error) { +func (r ApiFakeOuterBooleanSerializeRequest) Execute() (bool, *http.Response, error) { return r.ApiService.FakeOuterBooleanSerializeExecute(r) } @@ -337,10 +337,10 @@ FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize Test serialization of outer boolean types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterBooleanSerializeRequest */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) ApiFakeOuterBooleanSerializeRequest { +func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context) ApiFakeOuterBooleanSerializeRequest { return ApiFakeOuterBooleanSerializeRequest{ ApiService: a, ctx: ctx, @@ -349,9 +349,9 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) ApiFake // Execute executes the request // @return bool -func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile localVarReturnValue bool @@ -359,14 +359,14 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/outer/boolean" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -397,15 +397,15 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -414,7 +414,7 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -425,7 +425,7 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS } type ApiFakeOuterCompositeSerializeRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *OuterComposite } @@ -436,7 +436,7 @@ func (r ApiFakeOuterCompositeSerializeRequest) Body(body OuterComposite) ApiFake return r } -func (r ApiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_nethttp.Response, error) { +func (r ApiFakeOuterCompositeSerializeRequest) Execute() (*OuterComposite, *http.Response, error) { return r.ApiService.FakeOuterCompositeSerializeExecute(r) } @@ -445,10 +445,10 @@ FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize Test serialization of object with outer number type - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterCompositeSerializeRequest */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) ApiFakeOuterCompositeSerializeRequest { +func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context) ApiFakeOuterCompositeSerializeRequest { return ApiFakeOuterCompositeSerializeRequest{ ApiService: a, ctx: ctx, @@ -457,24 +457,24 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) ApiFa // Execute executes the request // @return OuterComposite -func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (*OuterComposite, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue OuterComposite + localVarReturnValue *OuterComposite ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/outer/composite" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -505,15 +505,15 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -522,7 +522,7 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -533,7 +533,7 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos } type ApiFakeOuterNumberSerializeRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *float32 } @@ -544,7 +544,7 @@ func (r ApiFakeOuterNumberSerializeRequest) Body(body float32) ApiFakeOuterNumbe return r } -func (r ApiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Response, error) { +func (r ApiFakeOuterNumberSerializeRequest) Execute() (float32, *http.Response, error) { return r.ApiService.FakeOuterNumberSerializeExecute(r) } @@ -553,10 +553,10 @@ FakeOuterNumberSerialize Method for FakeOuterNumberSerialize Test serialization of outer number types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterNumberSerializeRequest */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) ApiFakeOuterNumberSerializeRequest { +func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context) ApiFakeOuterNumberSerializeRequest { return ApiFakeOuterNumberSerializeRequest{ ApiService: a, ctx: ctx, @@ -565,9 +565,9 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) ApiFakeO // Execute executes the request // @return float32 -func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile localVarReturnValue float32 @@ -575,14 +575,14 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/outer/number" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -613,15 +613,15 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -630,7 +630,7 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -641,7 +641,7 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer } type ApiFakeOuterStringSerializeRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *string } @@ -652,7 +652,7 @@ func (r ApiFakeOuterStringSerializeRequest) Body(body string) ApiFakeOuterString return r } -func (r ApiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Response, error) { +func (r ApiFakeOuterStringSerializeRequest) Execute() (string, *http.Response, error) { return r.ApiService.FakeOuterStringSerializeExecute(r) } @@ -661,10 +661,10 @@ FakeOuterStringSerialize Method for FakeOuterStringSerialize Test serialization of outer string types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterStringSerializeRequest */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) ApiFakeOuterStringSerializeRequest { +func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context) ApiFakeOuterStringSerializeRequest { return ApiFakeOuterStringSerializeRequest{ ApiService: a, ctx: ctx, @@ -673,9 +673,9 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) ApiFakeO // Execute executes the request // @return string -func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile localVarReturnValue string @@ -683,14 +683,14 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/outer/string" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -721,15 +721,15 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -738,7 +738,7 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -749,7 +749,7 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer } type ApiTestBodyWithFileSchemaRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *FileSchemaTestClass } @@ -759,7 +759,7 @@ func (r ApiTestBodyWithFileSchemaRequest) Body(body FileSchemaTestClass) ApiTest return r } -func (r ApiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestBodyWithFileSchemaRequest) Execute() (*http.Response, error) { return r.ApiService.TestBodyWithFileSchemaExecute(r) } @@ -768,10 +768,10 @@ TestBodyWithFileSchema Method for TestBodyWithFileSchema For this test, the body for this request much reference a schema named `File`. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestBodyWithFileSchemaRequest */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) ApiTestBodyWithFileSchemaRequest { +func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context) ApiTestBodyWithFileSchemaRequest { return ApiTestBodyWithFileSchemaRequest{ ApiService: a, ctx: ctx, @@ -779,23 +779,23 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) ApiTestBod } // Execute executes the request -func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/body-with-file-schema" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return nil, reportError("body is required and must be specified") } @@ -829,15 +829,15 @@ func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSche return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -848,7 +848,7 @@ func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSche } type ApiTestBodyWithQueryParamsRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi query *string body *User @@ -863,17 +863,17 @@ func (r ApiTestBodyWithQueryParamsRequest) Body(body User) ApiTestBodyWithQueryP return r } -func (r ApiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestBodyWithQueryParamsRequest) Execute() (*http.Response, error) { return r.ApiService.TestBodyWithQueryParamsExecute(r) } /* TestBodyWithQueryParams Method for TestBodyWithQueryParams - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestBodyWithQueryParamsRequest */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) ApiTestBodyWithQueryParamsRequest { +func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context) ApiTestBodyWithQueryParamsRequest { return ApiTestBodyWithQueryParamsRequest{ ApiService: a, ctx: ctx, @@ -881,23 +881,23 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) ApiTestBo } // Execute executes the request -func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/body-with-query-params" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.query == nil { return nil, reportError("query is required and must be specified") } @@ -935,15 +935,15 @@ func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryPa return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -954,7 +954,7 @@ func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryPa } type ApiTestClientModelRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *Client } @@ -965,7 +965,7 @@ func (r ApiTestClientModelRequest) Body(body Client) ApiTestClientModelRequest { return r } -func (r ApiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error) { +func (r ApiTestClientModelRequest) Execute() (*Client, *http.Response, error) { return r.ApiService.TestClientModelExecute(r) } @@ -974,10 +974,10 @@ TestClientModel To test \"client\" model To test "client" model - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestClientModelRequest */ -func (a *FakeApiService) TestClientModel(ctx _context.Context) ApiTestClientModelRequest { +func (a *FakeApiService) TestClientModel(ctx context.Context) ApiTestClientModelRequest { return ApiTestClientModelRequest{ ApiService: a, ctx: ctx, @@ -986,24 +986,24 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context) ApiTestClientMode // Execute executes the request // @return Client -func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Client, *_nethttp.Response, error) { +func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (*Client, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue Client + localVarReturnValue *Client ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return localVarReturnValue, nil, reportError("body is required and must be specified") } @@ -1037,15 +1037,15 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Cl return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1054,7 +1054,7 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Cl err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1065,7 +1065,7 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Cl } type ApiTestEndpointParametersRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi number *float32 double *float64 @@ -1154,7 +1154,7 @@ func (r ApiTestEndpointParametersRequest) Callback(callback string) ApiTestEndpo return r } -func (r ApiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestEndpointParametersRequest) Execute() (*http.Response, error) { return r.ApiService.TestEndpointParametersExecute(r) } @@ -1166,10 +1166,10 @@ Fake endpoint for testing various parameters 偽のエンドポイント 가짜 엔드 포인트 - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestEndpointParametersRequest */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) ApiTestEndpointParametersRequest { +func (a *FakeApiService) TestEndpointParameters(ctx context.Context) ApiTestEndpointParametersRequest { return ApiTestEndpointParametersRequest{ ApiService: a, ctx: ctx, @@ -1177,23 +1177,23 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) ApiTestEnd } // Execute executes the request -func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.number == nil { return nil, reportError("number is required and must be specified") } @@ -1266,7 +1266,7 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete binaryLocalVarFile = *r.binary } if binaryLocalVarFile != nil { - fbs, _ := _ioutil.ReadAll(binaryLocalVarFile) + fbs, _ := ioutil.ReadAll(binaryLocalVarFile) binaryLocalVarFileBytes = fbs binaryLocalVarFileName = binaryLocalVarFile.Name() binaryLocalVarFile.Close() @@ -1294,15 +1294,15 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1313,7 +1313,7 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete } type ApiTestEnumParametersRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi enumHeaderStringArray *[]string enumHeaderString *string @@ -1366,7 +1366,7 @@ func (r ApiTestEnumParametersRequest) EnumFormString(enumFormString string) ApiT return r } -func (r ApiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestEnumParametersRequest) Execute() (*http.Response, error) { return r.ApiService.TestEnumParametersExecute(r) } @@ -1375,10 +1375,10 @@ TestEnumParameters To test enum parameters To test enum parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestEnumParametersRequest */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context) ApiTestEnumParametersRequest { +func (a *FakeApiService) TestEnumParameters(ctx context.Context) ApiTestEnumParametersRequest { return ApiTestEnumParametersRequest{ ApiService: a, ctx: ctx, @@ -1386,23 +1386,23 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context) ApiTestEnumPar } // Execute executes the request -func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.enumQueryStringArray != nil { localVarQueryParams.Add("enum_query_string_array", parameterToString(*r.enumQueryStringArray, "csv")) @@ -1455,15 +1455,15 @@ func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersReques return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1474,7 +1474,7 @@ func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersReques } type ApiTestGroupParametersRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi requiredStringGroup *int32 requiredBooleanGroup *bool @@ -1515,7 +1515,7 @@ func (r ApiTestGroupParametersRequest) Int64Group(int64Group int64) ApiTestGroup return r } -func (r ApiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestGroupParametersRequest) Execute() (*http.Response, error) { return r.ApiService.TestGroupParametersExecute(r) } @@ -1524,10 +1524,10 @@ TestGroupParameters Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestGroupParametersRequest */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context) ApiTestGroupParametersRequest { +func (a *FakeApiService) TestGroupParameters(ctx context.Context) ApiTestGroupParametersRequest { return ApiTestGroupParametersRequest{ ApiService: a, ctx: ctx, @@ -1535,23 +1535,23 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context) ApiTestGroupP } // Execute executes the request -func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.requiredStringGroup == nil { return nil, reportError("requiredStringGroup is required and must be specified") } @@ -1601,15 +1601,15 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1620,7 +1620,7 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ } type ApiTestInlineAdditionalPropertiesRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi param *map[string]string } @@ -1631,17 +1631,17 @@ func (r ApiTestInlineAdditionalPropertiesRequest) Param(param map[string]string) return r } -func (r ApiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestInlineAdditionalPropertiesRequest) Execute() (*http.Response, error) { return r.ApiService.TestInlineAdditionalPropertiesExecute(r) } /* TestInlineAdditionalProperties test inline additionalProperties - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestInlineAdditionalPropertiesRequest */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) ApiTestInlineAdditionalPropertiesRequest { +func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context) ApiTestInlineAdditionalPropertiesRequest { return ApiTestInlineAdditionalPropertiesRequest{ ApiService: a, ctx: ctx, @@ -1649,23 +1649,23 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) Ap } // Execute executes the request -func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/inline-additionalProperties" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.param == nil { return nil, reportError("param is required and must be specified") } @@ -1699,15 +1699,15 @@ func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAd return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1718,7 +1718,7 @@ func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAd } type ApiTestJsonFormDataRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi param *string param2 *string @@ -1735,17 +1735,17 @@ func (r ApiTestJsonFormDataRequest) Param2(param2 string) ApiTestJsonFormDataReq return r } -func (r ApiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestJsonFormDataRequest) Execute() (*http.Response, error) { return r.ApiService.TestJsonFormDataExecute(r) } /* TestJsonFormData test json serialization of form data - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestJsonFormDataRequest */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context) ApiTestJsonFormDataRequest { +func (a *FakeApiService) TestJsonFormData(ctx context.Context) ApiTestJsonFormDataRequest { return ApiTestJsonFormDataRequest{ ApiService: a, ctx: ctx, @@ -1753,23 +1753,23 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context) ApiTestJsonFormD } // Execute executes the request -func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/jsonFormData" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.param == nil { return nil, reportError("param is required and must be specified") } @@ -1806,15 +1806,15 @@ func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) ( return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1825,7 +1825,7 @@ func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) ( } type ApiTestQueryParameterCollectionFormatRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi pipe *[]string ioutil *[]string @@ -1855,7 +1855,7 @@ func (r ApiTestQueryParameterCollectionFormatRequest) Context(context []string) return r } -func (r ApiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestQueryParameterCollectionFormatRequest) Execute() (*http.Response, error) { return r.ApiService.TestQueryParameterCollectionFormatExecute(r) } @@ -1864,10 +1864,10 @@ TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat To test the collection format in query parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestQueryParameterCollectionFormatRequest */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context) ApiTestQueryParameterCollectionFormatRequest { +func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx context.Context) ApiTestQueryParameterCollectionFormatRequest { return ApiTestQueryParameterCollectionFormatRequest{ ApiService: a, ctx: ctx, @@ -1875,23 +1875,23 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context } // Execute executes the request -func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/test-query-parameters" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.pipe == nil { return nil, reportError("pipe is required and must be specified") } @@ -1950,15 +1950,15 @@ func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQuer return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } diff --git a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go index 67f9f95661a7..67b8e6a66c7d 100644 --- a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -12,15 +12,15 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" ) // Linger please var ( - _ _context.Context + _ context.Context ) type FakeClassnameTags123Api interface { @@ -30,21 +30,21 @@ type FakeClassnameTags123Api interface { To test class name in snake case - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestClassnameRequest */ - TestClassname(ctx _context.Context) ApiTestClassnameRequest + TestClassname(ctx context.Context) ApiTestClassnameRequest // TestClassnameExecute executes the request // @return Client - TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) + TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) } // FakeClassnameTags123ApiService FakeClassnameTags123Api service type FakeClassnameTags123ApiService service type ApiTestClassnameRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeClassnameTags123Api body *Client } @@ -55,7 +55,7 @@ func (r ApiTestClassnameRequest) Body(body Client) ApiTestClassnameRequest { return r } -func (r ApiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) { +func (r ApiTestClassnameRequest) Execute() (*Client, *http.Response, error) { return r.ApiService.TestClassnameExecute(r) } @@ -64,10 +64,10 @@ TestClassname To test class name in snake case To test class name in snake case - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestClassnameRequest */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) ApiTestClassnameRequest { +func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context) ApiTestClassnameRequest { return ApiTestClassnameRequest{ ApiService: a, ctx: ctx, @@ -76,24 +76,24 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) Api // Execute executes the request // @return Client -func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue Client + localVarReturnValue *Client ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake_classname_test" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return localVarReturnValue, nil, reportError("body is required and must be specified") } @@ -141,15 +141,15 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -158,7 +158,7 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index dc8fe0167356..1c97ee676fe4 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -12,17 +12,17 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" "os" ) // Linger please var ( - _ _context.Context + _ context.Context ) type PetApi interface { @@ -30,127 +30,127 @@ type PetApi interface { /* AddPet Add a new pet to the store - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAddPetRequest */ - AddPet(ctx _context.Context) ApiAddPetRequest + AddPet(ctx context.Context) ApiAddPetRequest // AddPetExecute executes the request - AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) + AddPetExecute(r ApiAddPetRequest) (*http.Response, error) /* DeletePet Deletes a pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId Pet id to delete @return ApiDeletePetRequest */ - DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest + DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest // DeletePetExecute executes the request - DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) + DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) /* FindPetsByStatus Finds Pets by status Multiple status values can be provided with comma separated strings - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindPetsByStatusRequest */ - FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest + FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest // FindPetsByStatusExecute executes the request // @return []Pet - FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) + FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) /* FindPetsByTags Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindPetsByTagsRequest Deprecated */ - FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest + FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest // FindPetsByTagsExecute executes the request // @return []Pet // Deprecated - FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) + FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) /* GetPetById Find pet by ID Returns a single pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to return @return ApiGetPetByIdRequest */ - GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest + GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest // GetPetByIdExecute executes the request // @return Pet - GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) + GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) /* UpdatePet Update an existing pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiUpdatePetRequest */ - UpdatePet(ctx _context.Context) ApiUpdatePetRequest + UpdatePet(ctx context.Context) ApiUpdatePetRequest // UpdatePetExecute executes the request - UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) + UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) /* UpdatePetWithForm Updates a pet in the store with form data - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet that needs to be updated @return ApiUpdatePetWithFormRequest */ - UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest + UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest // UpdatePetWithFormExecute executes the request - UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) + UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) /* UploadFile uploads an image - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to update @return ApiUploadFileRequest */ - UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest + UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest // UploadFileExecute executes the request // @return ApiResponse - UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) + UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) /* UploadFileWithRequiredFile uploads an image (required) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to update @return ApiUploadFileWithRequiredFileRequest */ - UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest + UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest // UploadFileWithRequiredFileExecute executes the request // @return ApiResponse - UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) + UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) } // PetApiService PetApi service type PetApiService service type ApiAddPetRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi body *Pet } @@ -161,17 +161,17 @@ func (r ApiAddPetRequest) Body(body Pet) ApiAddPetRequest { return r } -func (r ApiAddPetRequest) Execute() (*_nethttp.Response, error) { +func (r ApiAddPetRequest) Execute() (*http.Response, error) { return r.ApiService.AddPetExecute(r) } /* AddPet Add a new pet to the store - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAddPetRequest */ -func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest { +func (a *PetApiService) AddPet(ctx context.Context) ApiAddPetRequest { return ApiAddPetRequest{ ApiService: a, ctx: ctx, @@ -179,23 +179,23 @@ func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest { } // Execute executes the request -func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) { +func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return nil, reportError("body is required and must be specified") } @@ -229,15 +229,15 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, e return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -248,7 +248,7 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, e } type ApiDeletePetRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 apiKey *string @@ -259,18 +259,18 @@ func (r ApiDeletePetRequest) ApiKey(apiKey string) ApiDeletePetRequest { return r } -func (r ApiDeletePetRequest) Execute() (*_nethttp.Response, error) { +func (r ApiDeletePetRequest) Execute() (*http.Response, error) { return r.ApiService.DeletePetExecute(r) } /* DeletePet Deletes a pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId Pet id to delete @return ApiDeletePetRequest */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest { +func (a *PetApiService) DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest { return ApiDeletePetRequest{ ApiService: a, ctx: ctx, @@ -279,24 +279,24 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePe } // Execute executes the request -func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) { +func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -328,15 +328,15 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -347,7 +347,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo } type ApiFindPetsByStatusRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi status *[]string } @@ -358,7 +358,7 @@ func (r ApiFindPetsByStatusRequest) Status(status []string) ApiFindPetsByStatusR return r } -func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) { +func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *http.Response, error) { return r.ApiService.FindPetsByStatusExecute(r) } @@ -367,10 +367,10 @@ FindPetsByStatus Finds Pets by status Multiple status values can be provided with comma separated strings - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindPetsByStatusRequest */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest { +func (a *PetApiService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest { return ApiFindPetsByStatusRequest{ ApiService: a, ctx: ctx, @@ -379,9 +379,9 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStat // Execute executes the request // @return []Pet -func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) { +func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue []Pet @@ -389,14 +389,14 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/findByStatus" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.status == nil { return localVarReturnValue, nil, reportError("status is required and must be specified") } @@ -429,15 +429,15 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -446,7 +446,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -457,7 +457,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ } type ApiFindPetsByTagsRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi tags *[]string } @@ -468,7 +468,7 @@ func (r ApiFindPetsByTagsRequest) Tags(tags []string) ApiFindPetsByTagsRequest { return r } -func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) { +func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *http.Response, error) { return r.ApiService.FindPetsByTagsExecute(r) } @@ -477,12 +477,12 @@ FindPetsByTags Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindPetsByTagsRequest Deprecated */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest { +func (a *PetApiService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest { return ApiFindPetsByTagsRequest{ ApiService: a, ctx: ctx, @@ -492,9 +492,9 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRe // Execute executes the request // @return []Pet // Deprecated -func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) { +func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue []Pet @@ -502,14 +502,14 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/findByTags" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.tags == nil { return localVarReturnValue, nil, reportError("tags is required and must be specified") } @@ -542,15 +542,15 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -559,7 +559,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -570,13 +570,13 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet } type ApiGetPetByIdRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 } -func (r ApiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) { +func (r ApiGetPetByIdRequest) Execute() (*Pet, *http.Response, error) { return r.ApiService.GetPetByIdExecute(r) } @@ -585,11 +585,11 @@ GetPetById Find pet by ID Returns a single pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to return @return ApiGetPetByIdRequest */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest { +func (a *PetApiService) GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest { return ApiGetPetByIdRequest{ ApiService: a, ctx: ctx, @@ -599,25 +599,25 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetB // Execute executes the request // @return Pet -func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) { +func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue Pet + localVarReturnValue *Pet ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -660,15 +660,15 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -677,7 +677,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -688,7 +688,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt } type ApiUpdatePetRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi body *Pet } @@ -699,17 +699,17 @@ func (r ApiUpdatePetRequest) Body(body Pet) ApiUpdatePetRequest { return r } -func (r ApiUpdatePetRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdatePetRequest) Execute() (*http.Response, error) { return r.ApiService.UpdatePetExecute(r) } /* UpdatePet Update an existing pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiUpdatePetRequest */ -func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest { +func (a *PetApiService) UpdatePet(ctx context.Context) ApiUpdatePetRequest { return ApiUpdatePetRequest{ ApiService: a, ctx: ctx, @@ -717,23 +717,23 @@ func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest { } // Execute executes the request -func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) { +func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return nil, reportError("body is required and must be specified") } @@ -767,15 +767,15 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -786,7 +786,7 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo } type ApiUpdatePetWithFormRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 name *string @@ -804,18 +804,18 @@ func (r ApiUpdatePetWithFormRequest) Status(status string) ApiUpdatePetWithFormR return r } -func (r ApiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdatePetWithFormRequest) Execute() (*http.Response, error) { return r.ApiService.UpdatePetWithFormExecute(r) } /* UpdatePetWithForm Updates a pet in the store with form data - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet that needs to be updated @return ApiUpdatePetWithFormRequest */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest { +func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest { return ApiUpdatePetWithFormRequest{ ApiService: a, ctx: ctx, @@ -824,24 +824,24 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) Api } // Execute executes the request -func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) { +func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -876,15 +876,15 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -895,7 +895,7 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) } type ApiUploadFileRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 additionalMetadata *string @@ -913,18 +913,18 @@ func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest { return r } -func (r ApiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) { +func (r ApiUploadFileRequest) Execute() (*ApiResponse, *http.Response, error) { return r.ApiService.UploadFileExecute(r) } /* UploadFile uploads an image - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to update @return ApiUploadFileRequest */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest { +func (a *PetApiService) UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest { return ApiUploadFileRequest{ ApiService: a, ctx: ctx, @@ -934,25 +934,25 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadF // Execute executes the request // @return ApiResponse -func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) { +func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue ApiResponse + localVarReturnValue *ApiResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"multipart/form-data"} @@ -985,7 +985,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, fileLocalVarFile = *r.file } if fileLocalVarFile != nil { - fbs, _ := _ioutil.ReadAll(fileLocalVarFile) + fbs, _ := ioutil.ReadAll(fileLocalVarFile) fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() @@ -1001,15 +1001,15 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1018,7 +1018,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1029,7 +1029,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, } type ApiUploadFileWithRequiredFileRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 requiredFile **os.File @@ -1047,18 +1047,18 @@ func (r ApiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetad return r } -func (r ApiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) { +func (r ApiUploadFileWithRequiredFileRequest) Execute() (*ApiResponse, *http.Response, error) { return r.ApiService.UploadFileWithRequiredFileExecute(r) } /* UploadFileWithRequiredFile uploads an image (required) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to update @return ApiUploadFileWithRequiredFileRequest */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest { +func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest { return ApiUploadFileWithRequiredFileRequest{ ApiService: a, ctx: ctx, @@ -1068,25 +1068,25 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i // Execute executes the request // @return ApiResponse -func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) { +func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue ApiResponse + localVarReturnValue *ApiResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.requiredFile == nil { return localVarReturnValue, nil, reportError("requiredFile is required and must be specified") } @@ -1119,7 +1119,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq requiredFileLocalVarFile := *r.requiredFile if requiredFileLocalVarFile != nil { - fbs, _ := _ioutil.ReadAll(requiredFileLocalVarFile) + fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) requiredFileLocalVarFileBytes = fbs requiredFileLocalVarFileName = requiredFileLocalVarFile.Name() requiredFileLocalVarFile.Close() @@ -1135,15 +1135,15 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1152,7 +1152,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go index be6336216da6..61dcc483761a 100644 --- a/samples/client/petstore/go/go-petstore/api_store.go +++ b/samples/client/petstore/go/go-petstore/api_store.go @@ -12,16 +12,16 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) type StoreApi interface { @@ -31,68 +31,68 @@ type StoreApi interface { For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param orderId ID of the order that needs to be deleted @return ApiDeleteOrderRequest */ - DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest + DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest // DeleteOrderExecute executes the request - DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) + DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) /* GetInventory Returns pet inventories by status Returns a map of status codes to quantities - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetInventoryRequest */ - GetInventory(ctx _context.Context) ApiGetInventoryRequest + GetInventory(ctx context.Context) ApiGetInventoryRequest // GetInventoryExecute executes the request // @return map[string]int32 - GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) + GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *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 - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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 @return ApiGetOrderByIdRequest */ - GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest + GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest // GetOrderByIdExecute executes the request // @return Order - GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) + GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) /* PlaceOrder Place an order for a pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiPlaceOrderRequest */ - PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest + PlaceOrder(ctx context.Context) ApiPlaceOrderRequest // PlaceOrderExecute executes the request // @return Order - PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) + PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) } // StoreApiService StoreApi service type StoreApiService service type ApiDeleteOrderRequest struct { - ctx _context.Context + ctx context.Context ApiService StoreApi orderId string } -func (r ApiDeleteOrderRequest) Execute() (*_nethttp.Response, error) { +func (r ApiDeleteOrderRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteOrderExecute(r) } @@ -101,11 +101,11 @@ DeleteOrder Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param orderId ID of the order that needs to be deleted @return ApiDeleteOrderRequest */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest { +func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest { return ApiDeleteOrderRequest{ ApiService: a, ctx: ctx, @@ -114,24 +114,24 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiD } // Execute executes the request -func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) { +func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.PathEscape(parameterToString(r.orderId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -160,15 +160,15 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -179,12 +179,12 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp } type ApiGetInventoryRequest struct { - ctx _context.Context + ctx context.Context ApiService StoreApi } -func (r ApiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) { +func (r ApiGetInventoryRequest) Execute() (map[string]int32, *http.Response, error) { return r.ApiService.GetInventoryExecute(r) } @@ -193,10 +193,10 @@ GetInventory Returns pet inventories by status Returns a map of status codes to quantities - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetInventoryRequest */ -func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequest { +func (a *StoreApiService) GetInventory(ctx context.Context) ApiGetInventoryRequest { return ApiGetInventoryRequest{ ApiService: a, ctx: ctx, @@ -205,9 +205,9 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequ // Execute executes the request // @return map[string]int32 -func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue map[string]int32 @@ -215,14 +215,14 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/inventory" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -265,15 +265,15 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -282,7 +282,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -293,13 +293,13 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str } type ApiGetOrderByIdRequest struct { - ctx _context.Context + ctx context.Context ApiService StoreApi orderId int64 } -func (r ApiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) { +func (r ApiGetOrderByIdRequest) Execute() (*Order, *http.Response, error) { return r.ApiService.GetOrderByIdExecute(r) } @@ -308,11 +308,11 @@ GetOrderById Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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 @return ApiGetOrderByIdRequest */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest { +func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest { return ApiGetOrderByIdRequest{ ApiService: a, ctx: ctx, @@ -322,25 +322,25 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiG // Execute executes the request // @return Order -func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) { +func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue Order + localVarReturnValue *Order ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.PathEscape(parameterToString(r.orderId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.orderId < 1 { return localVarReturnValue, nil, reportError("orderId must be greater than 1") } @@ -375,15 +375,15 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -392,7 +392,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -403,7 +403,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, } type ApiPlaceOrderRequest struct { - ctx _context.Context + ctx context.Context ApiService StoreApi body *Order } @@ -414,17 +414,17 @@ func (r ApiPlaceOrderRequest) Body(body Order) ApiPlaceOrderRequest { return r } -func (r ApiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) { +func (r ApiPlaceOrderRequest) Execute() (*Order, *http.Response, error) { return r.ApiService.PlaceOrderExecute(r) } /* PlaceOrder Place an order for a pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiPlaceOrderRequest */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest { +func (a *StoreApiService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest { return ApiPlaceOrderRequest{ ApiService: a, ctx: ctx, @@ -433,24 +433,24 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest // Execute executes the request // @return Order -func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) { +func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue Order + localVarReturnValue *Order ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return localVarReturnValue, nil, reportError("body is required and must be specified") } @@ -484,15 +484,15 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -501,7 +501,7 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/samples/client/petstore/go/go-petstore/api_user.go b/samples/client/petstore/go/go-petstore/api_user.go index d6f2c7f710bd..a8107b6e4611 100644 --- a/samples/client/petstore/go/go-petstore/api_user.go +++ b/samples/client/petstore/go/go-petstore/api_user.go @@ -12,16 +12,16 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) type UserApi interface { @@ -31,106 +31,106 @@ type UserApi interface { This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUserRequest */ - CreateUser(ctx _context.Context) ApiCreateUserRequest + CreateUser(ctx context.Context) ApiCreateUserRequest // CreateUserExecute executes the request - CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) + CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) /* CreateUsersWithArrayInput Creates list of users with given input array - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUsersWithArrayInputRequest */ - CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest + CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest // CreateUsersWithArrayInputExecute executes the request - CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) + CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) /* CreateUsersWithListInput Creates list of users with given input array - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUsersWithListInputRequest */ - CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest + CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest // CreateUsersWithListInputExecute executes the request - CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) + CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) /* DeleteUser Delete user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username The name that needs to be deleted @return ApiDeleteUserRequest */ - DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest + DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest // DeleteUserExecute executes the request - DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) + DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) /* GetUserByName Get user by user name - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username The name that needs to be fetched. Use user1 for testing. @return ApiGetUserByNameRequest */ - GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest + GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest // GetUserByNameExecute executes the request // @return User - GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) + GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) /* LoginUser Logs user into the system - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiLoginUserRequest */ - LoginUser(ctx _context.Context) ApiLoginUserRequest + LoginUser(ctx context.Context) ApiLoginUserRequest // LoginUserExecute executes the request // @return string - LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) + LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) /* LogoutUser Logs out current logged in user session - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiLogoutUserRequest */ - LogoutUser(ctx _context.Context) ApiLogoutUserRequest + LogoutUser(ctx context.Context) ApiLogoutUserRequest // LogoutUserExecute executes the request - LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) + LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) /* UpdateUser Updated user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username name that need to be deleted @return ApiUpdateUserRequest */ - UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest + UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest // UpdateUserExecute executes the request - UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) + UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) } // UserApiService UserApi service type UserApiService service type ApiCreateUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi body *User } @@ -141,7 +141,7 @@ func (r ApiCreateUserRequest) Body(body User) ApiCreateUserRequest { return r } -func (r ApiCreateUserRequest) Execute() (*_nethttp.Response, error) { +func (r ApiCreateUserRequest) Execute() (*http.Response, error) { return r.ApiService.CreateUserExecute(r) } @@ -150,10 +150,10 @@ CreateUser Create user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUserRequest */ -func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest { +func (a *UserApiService) CreateUser(ctx context.Context) ApiCreateUserRequest { return ApiCreateUserRequest{ ApiService: a, ctx: ctx, @@ -161,23 +161,23 @@ func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest { } // Execute executes the request -func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return nil, reportError("body is required and must be specified") } @@ -211,15 +211,15 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -230,7 +230,7 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re } type ApiCreateUsersWithArrayInputRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi body *[]User } @@ -241,17 +241,17 @@ func (r ApiCreateUsersWithArrayInputRequest) Body(body []User) ApiCreateUsersWit return r } -func (r ApiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) { +func (r ApiCreateUsersWithArrayInputRequest) Execute() (*http.Response, error) { return r.ApiService.CreateUsersWithArrayInputExecute(r) } /* CreateUsersWithArrayInput Creates list of users with given input array - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUsersWithArrayInputRequest */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest { +func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest { return ApiCreateUsersWithArrayInputRequest{ ApiService: a, ctx: ctx, @@ -259,23 +259,23 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCrea } // Execute executes the request -func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/createWithArray" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return nil, reportError("body is required and must be specified") } @@ -309,15 +309,15 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -328,7 +328,7 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr } type ApiCreateUsersWithListInputRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi body *[]User } @@ -339,17 +339,17 @@ func (r ApiCreateUsersWithListInputRequest) Body(body []User) ApiCreateUsersWith return r } -func (r ApiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) { +func (r ApiCreateUsersWithListInputRequest) Execute() (*http.Response, error) { return r.ApiService.CreateUsersWithListInputExecute(r) } /* CreateUsersWithListInput Creates list of users with given input array - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUsersWithListInputRequest */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest { +func (a *UserApiService) CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest { return ApiCreateUsersWithListInputRequest{ ApiService: a, ctx: ctx, @@ -357,23 +357,23 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreat } // Execute executes the request -func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/createWithList" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return nil, reportError("body is required and must be specified") } @@ -407,15 +407,15 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -426,13 +426,13 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis } type ApiDeleteUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi username string } -func (r ApiDeleteUserRequest) Execute() (*_nethttp.Response, error) { +func (r ApiDeleteUserRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteUserExecute(r) } @@ -441,11 +441,11 @@ DeleteUser Delete user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username The name that needs to be deleted @return ApiDeleteUserRequest */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest { +func (a *UserApiService) DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest { return ApiDeleteUserRequest{ ApiService: a, ctx: ctx, @@ -454,24 +454,24 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDe } // Execute executes the request -func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) { +func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -500,15 +500,15 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -519,24 +519,24 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re } type ApiGetUserByNameRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi username string } -func (r ApiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) { +func (r ApiGetUserByNameRequest) Execute() (*User, *http.Response, error) { return r.ApiService.GetUserByNameExecute(r) } /* GetUserByName Get user by user name - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username The name that needs to be fetched. Use user1 for testing. @return ApiGetUserByNameRequest */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest { +func (a *UserApiService) GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest { return ApiGetUserByNameRequest{ ApiService: a, ctx: ctx, @@ -546,25 +546,25 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) Ap // Execute executes the request // @return User -func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) { +func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue User + localVarReturnValue *User ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -593,15 +593,15 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -610,7 +610,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -621,7 +621,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, } type ApiLoginUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi username *string password *string @@ -638,17 +638,17 @@ func (r ApiLoginUserRequest) Password(password string) ApiLoginUserRequest { return r } -func (r ApiLoginUserRequest) Execute() (string, *_nethttp.Response, error) { +func (r ApiLoginUserRequest) Execute() (string, *http.Response, error) { return r.ApiService.LoginUserExecute(r) } /* LoginUser Logs user into the system - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiLoginUserRequest */ -func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest { +func (a *UserApiService) LoginUser(ctx context.Context) ApiLoginUserRequest { return ApiLoginUserRequest{ ApiService: a, ctx: ctx, @@ -657,9 +657,9 @@ func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest { // Execute executes the request // @return string -func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) { +func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue string @@ -667,14 +667,14 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/login" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.username == nil { return localVarReturnValue, nil, reportError("username is required and must be specified") } @@ -711,15 +711,15 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -728,7 +728,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -739,22 +739,22 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth } type ApiLogoutUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi } -func (r ApiLogoutUserRequest) Execute() (*_nethttp.Response, error) { +func (r ApiLogoutUserRequest) Execute() (*http.Response, error) { return r.ApiService.LogoutUserExecute(r) } /* LogoutUser Logs out current logged in user session - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiLogoutUserRequest */ -func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest { +func (a *UserApiService) LogoutUser(ctx context.Context) ApiLogoutUserRequest { return ApiLogoutUserRequest{ ApiService: a, ctx: ctx, @@ -762,23 +762,23 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest { } // Execute executes the request -func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) { +func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/logout" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -807,15 +807,15 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -826,7 +826,7 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re } type ApiUpdateUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi username string body *User @@ -838,7 +838,7 @@ func (r ApiUpdateUserRequest) Body(body User) ApiUpdateUserRequest { return r } -func (r ApiUpdateUserRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdateUserRequest) Execute() (*http.Response, error) { return r.ApiService.UpdateUserExecute(r) } @@ -847,11 +847,11 @@ UpdateUser Updated user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username name that need to be deleted @return ApiUpdateUserRequest */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest { +func (a *UserApiService) UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest { return ApiUpdateUserRequest{ ApiService: a, ctx: ctx, @@ -860,24 +860,24 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUp } // Execute executes the request -func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) { +func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.body == nil { return nil, reportError("body is required and must be specified") } @@ -911,15 +911,15 @@ func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Re return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index 8fbafd329352..d3c90d431293 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -437,6 +437,13 @@ func reportError(format string, a ...interface{}) error { return fmt.Errorf(format, a...) } +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { diff --git a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index 6243abe3c4d7..2996979cd19d 100644 --- a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -32,8 +32,8 @@ func main() { body := *openapiclient.NewClient() // Client | client model configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md index 9a4a2bbd5ff5..e51cddca5bda 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md @@ -45,8 +45,8 @@ func main() { xmlItem := *openapiclient.NewXmlItem() // XmlItem | XmlItem Body configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.CreateXmlItem(context.Background()).XmlItem(xmlItem).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.CreateXmlItem(context.Background()).XmlItem(xmlItem).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.CreateXmlItem``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -109,8 +109,8 @@ func main() { body := true // bool | Input boolean as post body (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -175,8 +175,8 @@ func main() { body := *openapiclient.NewOuterComposite() // OuterComposite | Input composite as post body (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -241,8 +241,8 @@ func main() { body := float32(8.14) // float32 | Input number as post body (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -307,8 +307,8 @@ func main() { body := "body_example" // string | Input string as post body (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -373,8 +373,8 @@ func main() { body := *openapiclient.NewFileSchemaTestClass() // FileSchemaTestClass | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -436,8 +436,8 @@ func main() { body := *openapiclient.NewUser() // User | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -501,8 +501,8 @@ func main() { body := *openapiclient.NewClient() // Client | client model configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestClientModel(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestClientModel(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -581,8 +581,8 @@ func main() { callback := "callback_example" // string | None (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -665,8 +665,8 @@ func main() { enumFormString := "enumFormString_example" // string | Form parameter enum test (string) (optional) (default to "-efg") configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -741,8 +741,8 @@ func main() { int64Group := int64(789) // int64 | Integer in group parameters (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -808,8 +808,8 @@ func main() { param := map[string]string{"key": "Inner_example"} // map[string]string | request body configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background()).Param(param).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).Param(param).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -871,8 +871,8 @@ func main() { param2 := "param2_example" // string | field2 configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -940,8 +940,8 @@ func main() { context := []string{"Inner_example"} // []string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index b206d05d09c7..71891e792759 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -32,8 +32,8 @@ func main() { body := *openapiclient.NewClient() // Client | client model configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/PetApi.md b/samples/client/petstore/go/go-petstore/docs/PetApi.md index d93265c16ed7..81c7e187ac74 100644 --- a/samples/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore/docs/PetApi.md @@ -38,8 +38,8 @@ func main() { body := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.AddPet(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.AddPet(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -101,8 +101,8 @@ func main() { apiKey := "apiKey_example" // string | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.DeletePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -170,8 +170,8 @@ func main() { status := []string{"Status_example"} // []string | Status values that need to be considered for filter configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -236,8 +236,8 @@ func main() { tags := []string{"Inner_example"} // []string | Tags to filter by configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -302,8 +302,8 @@ func main() { petId := int64(789) // int64 | ID of pet to return configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.GetPetById(context.Background(), petId).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.GetPetById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -370,8 +370,8 @@ func main() { body := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UpdatePet(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.UpdatePet(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -434,8 +434,8 @@ func main() { status := "status_example" // string | Updated status of the pet (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePetWithForm``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -504,8 +504,8 @@ func main() { file := os.NewFile(1234, "some_file") // *os.File | file to upload (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -576,8 +576,8 @@ func main() { additionalMetadata := "additionalMetadata_example" // string | Additional data to pass to server (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/client/petstore/go/go-petstore/docs/StoreApi.md index 1e5c0ae5ba82..243512eb723a 100644 --- a/samples/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore/docs/StoreApi.md @@ -35,8 +35,8 @@ func main() { orderId := "orderId_example" // string | ID of the order that needs to be deleted configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.DeleteOrder(context.Background(), orderId).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.DeleteOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -102,8 +102,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.GetInventory(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StoreApi.GetInventory(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -164,8 +164,8 @@ func main() { orderId := int64(789) // int64 | ID of pet that needs to be fetched configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.GetOrderById(context.Background(), orderId).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetOrderById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -232,8 +232,8 @@ func main() { body := *openapiclient.NewOrder() // Order | order placed for purchasing the pet configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.PlaceOrder(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StoreApi.PlaceOrder(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/UserApi.md b/samples/client/petstore/go/go-petstore/docs/UserApi.md index e1623fabec46..5a5c8f52d2eb 100644 --- a/samples/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore/docs/UserApi.md @@ -39,8 +39,8 @@ func main() { body := *openapiclient.NewUser() // User | Created user object configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUser(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.CreateUser(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -101,8 +101,8 @@ func main() { body := []openapiclient.User{*openapiclient.NewUser()} // []User | List of user object configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -163,8 +163,8 @@ func main() { body := []openapiclient.User{*openapiclient.NewUser()} // []User | List of user object configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -227,8 +227,8 @@ func main() { username := "username_example" // string | The name that needs to be deleted configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.DeleteUser(context.Background(), username).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.DeleteUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -293,8 +293,8 @@ func main() { username := "username_example" // string | The name that needs to be fetched. Use user1 for testing. configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.GetUserByName(context.Background(), username).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserByName``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -362,8 +362,8 @@ func main() { password := "password_example" // string | The password for login in clear text configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -426,8 +426,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.LogoutUser(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.LogoutUser(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -487,8 +487,8 @@ func main() { body := *openapiclient.NewUser() // User | Updated user object configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.UpdateUser(context.Background(), username).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/go.mod b/samples/client/petstore/go/go-petstore/go.mod index 0f43de9ebb2c..ead32606c72d 100644 --- a/samples/client/petstore/go/go-petstore/go.mod +++ b/samples/client/petstore/go/go-petstore/go.mod @@ -3,5 +3,5 @@ module github.com/GIT_USER_ID/GIT_REPO_ID go 1.13 require ( - golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 ) diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go index 5b44d7e51ff8..e5ec45291f25 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go @@ -24,9 +24,9 @@ type AdditionalPropertiesClass struct { MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"` MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` - Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"` - Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"` - Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"` + Anytype1 map[string]interface{} `json:"anytype_1,omitempty"` + Anytype2 map[string]interface{} `json:"anytype_2,omitempty"` + Anytype3 map[string]interface{} `json:"anytype_3,omitempty"` } // NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object @@ -308,12 +308,12 @@ func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { var ret map[string]interface{} return ret } - return *o.Anytype1 + return o.Anytype1 } // GetAnytype1Ok returns a tuple with the Anytype1 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype1Ok() (*map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype1 == nil { return nil, false } @@ -331,7 +331,7 @@ func (o *AdditionalPropertiesClass) HasAnytype1() bool { // SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field. func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) { - o.Anytype1 = &v + o.Anytype1 = v } // GetAnytype2 returns the Anytype2 field value if set, zero value otherwise. @@ -340,12 +340,12 @@ func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { var ret map[string]interface{} return ret } - return *o.Anytype2 + return o.Anytype2 } // GetAnytype2Ok returns a tuple with the Anytype2 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype2Ok() (*map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype2 == nil { return nil, false } @@ -363,7 +363,7 @@ func (o *AdditionalPropertiesClass) HasAnytype2() bool { // SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field. func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) { - o.Anytype2 = &v + o.Anytype2 = v } // GetAnytype3 returns the Anytype3 field value if set, zero value otherwise. @@ -372,12 +372,12 @@ func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { var ret map[string]interface{} return ret } - return *o.Anytype3 + return o.Anytype3 } // GetAnytype3Ok returns a tuple with the Anytype3 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype3Ok() (*map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype3 == nil { return nil, false } @@ -395,7 +395,7 @@ func (o *AdditionalPropertiesClass) HasAnytype3() bool { // SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field. func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) { - o.Anytype3 = &v + o.Anytype3 = v } func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { diff --git a/samples/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go b/samples/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go index 29fbda5bfc80..fc8559be8b86 100644 --- a/samples/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go @@ -16,7 +16,7 @@ import ( // ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly type ArrayOfArrayOfNumberOnly struct { - ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` + ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"` } // NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object @@ -42,12 +42,12 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { var ret [][]float32 return ret } - return *o.ArrayArrayNumber + return o.ArrayArrayNumber } // GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() (*[][]float32, bool) { +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { if o == nil || o.ArrayArrayNumber == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool { // SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) { - o.ArrayArrayNumber = &v + o.ArrayArrayNumber = v } func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { diff --git a/samples/client/petstore/go/go-petstore/model_array_of_number_only.go b/samples/client/petstore/go/go-petstore/model_array_of_number_only.go index 1c6b5b2374b9..d5265a97b3d1 100644 --- a/samples/client/petstore/go/go-petstore/model_array_of_number_only.go +++ b/samples/client/petstore/go/go-petstore/model_array_of_number_only.go @@ -16,7 +16,7 @@ import ( // ArrayOfNumberOnly struct for ArrayOfNumberOnly type ArrayOfNumberOnly struct { - ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` + ArrayNumber []float32 `json:"ArrayNumber,omitempty"` } // NewArrayOfNumberOnly instantiates a new ArrayOfNumberOnly object @@ -42,12 +42,12 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { var ret []float32 return ret } - return *o.ArrayNumber + return o.ArrayNumber } // GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayOfNumberOnly) GetArrayNumberOk() (*[]float32, bool) { +func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { if o == nil || o.ArrayNumber == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *ArrayOfNumberOnly) HasArrayNumber() bool { // SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) { - o.ArrayNumber = &v + o.ArrayNumber = v } func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { diff --git a/samples/client/petstore/go/go-petstore/model_array_test_.go b/samples/client/petstore/go/go-petstore/model_array_test_.go index 54f72759d3f1..b33b09a55dbd 100644 --- a/samples/client/petstore/go/go-petstore/model_array_test_.go +++ b/samples/client/petstore/go/go-petstore/model_array_test_.go @@ -16,9 +16,9 @@ import ( // ArrayTest struct for ArrayTest type ArrayTest struct { - ArrayOfString *[]string `json:"array_of_string,omitempty"` - ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"` - ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` + ArrayOfString []string `json:"array_of_string,omitempty"` + ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty"` + ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` } // NewArrayTest instantiates a new ArrayTest object @@ -44,12 +44,12 @@ func (o *ArrayTest) GetArrayOfString() []string { var ret []string return ret } - return *o.ArrayOfString + return o.ArrayOfString } // GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayOfStringOk() (*[]string, bool) { +func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { if o == nil || o.ArrayOfString == nil { return nil, false } @@ -67,7 +67,7 @@ func (o *ArrayTest) HasArrayOfString() bool { // SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. func (o *ArrayTest) SetArrayOfString(v []string) { - o.ArrayOfString = &v + o.ArrayOfString = v } // GetArrayArrayOfInteger returns the ArrayArrayOfInteger field value if set, zero value otherwise. @@ -76,12 +76,12 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { var ret [][]int64 return ret } - return *o.ArrayArrayOfInteger + return o.ArrayArrayOfInteger } // GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayArrayOfIntegerOk() (*[][]int64, bool) { +func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { if o == nil || o.ArrayArrayOfInteger == nil { return nil, false } @@ -99,7 +99,7 @@ func (o *ArrayTest) HasArrayArrayOfInteger() bool { // SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) { - o.ArrayArrayOfInteger = &v + o.ArrayArrayOfInteger = v } // GetArrayArrayOfModel returns the ArrayArrayOfModel field value if set, zero value otherwise. @@ -108,12 +108,12 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { var ret [][]ReadOnlyFirst return ret } - return *o.ArrayArrayOfModel + return o.ArrayArrayOfModel } // GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayArrayOfModelOk() (*[][]ReadOnlyFirst, bool) { +func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { if o == nil || o.ArrayArrayOfModel == nil { return nil, false } @@ -131,7 +131,7 @@ func (o *ArrayTest) HasArrayArrayOfModel() bool { // SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) { - o.ArrayArrayOfModel = &v + o.ArrayArrayOfModel = v } func (o ArrayTest) MarshalJSON() ([]byte, error) { diff --git a/samples/client/petstore/go/go-petstore/model_enum_arrays.go b/samples/client/petstore/go/go-petstore/model_enum_arrays.go index ed2f6e8b145f..19dc8bc8e987 100644 --- a/samples/client/petstore/go/go-petstore/model_enum_arrays.go +++ b/samples/client/petstore/go/go-petstore/model_enum_arrays.go @@ -17,7 +17,7 @@ import ( // EnumArrays struct for EnumArrays type EnumArrays struct { JustSymbol *string `json:"just_symbol,omitempty"` - ArrayEnum *[]string `json:"array_enum,omitempty"` + ArrayEnum []string `json:"array_enum,omitempty"` } // NewEnumArrays instantiates a new EnumArrays object @@ -75,12 +75,12 @@ func (o *EnumArrays) GetArrayEnum() []string { var ret []string return ret } - return *o.ArrayEnum + return o.ArrayEnum } // GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumArrays) GetArrayEnumOk() (*[]string, bool) { +func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { if o == nil || o.ArrayEnum == nil { return nil, false } @@ -98,7 +98,7 @@ func (o *EnumArrays) HasArrayEnum() bool { // SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. func (o *EnumArrays) SetArrayEnum(v []string) { - o.ArrayEnum = &v + o.ArrayEnum = v } func (o EnumArrays) MarshalJSON() ([]byte, error) { diff --git a/samples/client/petstore/go/go-petstore/model_file_schema_test_class.go b/samples/client/petstore/go/go-petstore/model_file_schema_test_class.go index 78fbc5aa2c24..52dcf0e1e9f6 100644 --- a/samples/client/petstore/go/go-petstore/model_file_schema_test_class.go +++ b/samples/client/petstore/go/go-petstore/model_file_schema_test_class.go @@ -17,7 +17,7 @@ import ( // FileSchemaTestClass struct for FileSchemaTestClass type FileSchemaTestClass struct { File *File `json:"file,omitempty"` - Files *[]File `json:"files,omitempty"` + Files []File `json:"files,omitempty"` } // NewFileSchemaTestClass instantiates a new FileSchemaTestClass object @@ -75,12 +75,12 @@ func (o *FileSchemaTestClass) GetFiles() []File { var ret []File return ret } - return *o.Files + return o.Files } // GetFilesOk returns a tuple with the Files field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FileSchemaTestClass) GetFilesOk() (*[]File, bool) { +func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { if o == nil || o.Files == nil { return nil, false } @@ -98,7 +98,7 @@ func (o *FileSchemaTestClass) HasFiles() bool { // SetFiles gets a reference to the given []File and assigns it to the Files field. func (o *FileSchemaTestClass) SetFiles(v []File) { - o.Files = &v + o.Files = v } func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { diff --git a/samples/client/petstore/go/go-petstore/model_pet.go b/samples/client/petstore/go/go-petstore/model_pet.go index 2d07615cb4fe..538b9aa4d1ff 100644 --- a/samples/client/petstore/go/go-petstore/model_pet.go +++ b/samples/client/petstore/go/go-petstore/model_pet.go @@ -20,7 +20,7 @@ type Pet struct { Category *Category `json:"category,omitempty"` Name string `json:"name"` PhotoUrls []string `json:"photoUrls"` - Tags *[]Tag `json:"tags,omitempty"` + Tags []Tag `json:"tags,omitempty"` // pet status in the store Status *string `json:"status,omitempty"` } @@ -144,11 +144,11 @@ func (o *Pet) GetPhotoUrls() []string { // GetPhotoUrlsOk returns a tuple with the PhotoUrls field value // and a boolean to check if the value has been set. -func (o *Pet) GetPhotoUrlsOk() (*[]string, bool) { +func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { if o == nil { return nil, false } - return &o.PhotoUrls, true + return o.PhotoUrls, true } // SetPhotoUrls sets field value @@ -162,12 +162,12 @@ func (o *Pet) GetTags() []Tag { var ret []Tag return ret } - return *o.Tags + return o.Tags } // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetTagsOk() (*[]Tag, bool) { +func (o *Pet) GetTagsOk() ([]Tag, bool) { if o == nil || o.Tags == nil { return nil, false } @@ -185,7 +185,7 @@ func (o *Pet) HasTags() bool { // SetTags gets a reference to the given []Tag and assigns it to the Tags field. func (o *Pet) SetTags(v []Tag) { - o.Tags = &v + o.Tags = v } // GetStatus returns the Status field value if set, zero value otherwise. 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 91d7c3014b6c..34bef67ff014 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 @@ -157,11 +157,11 @@ func (o *TypeHolderDefault) GetArrayItem() []int32 { // GetArrayItemOk returns a tuple with the ArrayItem field value // and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetArrayItemOk() (*[]int32, bool) { +func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool) { if o == nil { return nil, false } - return &o.ArrayItem, true + return o.ArrayItem, true } // SetArrayItem sets field value 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 084c4d4c380c..fd363cdb2932 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 @@ -179,11 +179,11 @@ func (o *TypeHolderExample) GetArrayItem() []int32 { // GetArrayItemOk returns a tuple with the ArrayItem field value // and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetArrayItemOk() (*[]int32, bool) { +func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool) { if o == nil { return nil, false } - return &o.ArrayItem, true + return o.ArrayItem, true } // SetArrayItem sets field value diff --git a/samples/client/petstore/go/go-petstore/model_xml_item.go b/samples/client/petstore/go/go-petstore/model_xml_item.go index 4d01502ae73d..31a23e273091 100644 --- a/samples/client/petstore/go/go-petstore/model_xml_item.go +++ b/samples/client/petstore/go/go-petstore/model_xml_item.go @@ -20,31 +20,31 @@ type XmlItem struct { AttributeNumber *float32 `json:"attribute_number,omitempty"` AttributeInteger *int32 `json:"attribute_integer,omitempty"` AttributeBoolean *bool `json:"attribute_boolean,omitempty"` - WrappedArray *[]int32 `json:"wrapped_array,omitempty"` + WrappedArray []int32 `json:"wrapped_array,omitempty"` NameString *string `json:"name_string,omitempty"` NameNumber *float32 `json:"name_number,omitempty"` NameInteger *int32 `json:"name_integer,omitempty"` NameBoolean *bool `json:"name_boolean,omitempty"` - NameArray *[]int32 `json:"name_array,omitempty"` - NameWrappedArray *[]int32 `json:"name_wrapped_array,omitempty"` + NameArray []int32 `json:"name_array,omitempty"` + NameWrappedArray []int32 `json:"name_wrapped_array,omitempty"` PrefixString *string `json:"prefix_string,omitempty"` PrefixNumber *float32 `json:"prefix_number,omitempty"` PrefixInteger *int32 `json:"prefix_integer,omitempty"` PrefixBoolean *bool `json:"prefix_boolean,omitempty"` - PrefixArray *[]int32 `json:"prefix_array,omitempty"` - PrefixWrappedArray *[]int32 `json:"prefix_wrapped_array,omitempty"` + PrefixArray []int32 `json:"prefix_array,omitempty"` + PrefixWrappedArray []int32 `json:"prefix_wrapped_array,omitempty"` NamespaceString *string `json:"namespace_string,omitempty"` NamespaceNumber *float32 `json:"namespace_number,omitempty"` NamespaceInteger *int32 `json:"namespace_integer,omitempty"` NamespaceBoolean *bool `json:"namespace_boolean,omitempty"` - NamespaceArray *[]int32 `json:"namespace_array,omitempty"` - NamespaceWrappedArray *[]int32 `json:"namespace_wrapped_array,omitempty"` + NamespaceArray []int32 `json:"namespace_array,omitempty"` + NamespaceWrappedArray []int32 `json:"namespace_wrapped_array,omitempty"` PrefixNsString *string `json:"prefix_ns_string,omitempty"` PrefixNsNumber *float32 `json:"prefix_ns_number,omitempty"` PrefixNsInteger *int32 `json:"prefix_ns_integer,omitempty"` PrefixNsBoolean *bool `json:"prefix_ns_boolean,omitempty"` - PrefixNsArray *[]int32 `json:"prefix_ns_array,omitempty"` - PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty"` + PrefixNsArray []int32 `json:"prefix_ns_array,omitempty"` + PrefixNsWrappedArray []int32 `json:"prefix_ns_wrapped_array,omitempty"` } // NewXmlItem instantiates a new XmlItem object @@ -198,12 +198,12 @@ func (o *XmlItem) GetWrappedArray() []int32 { var ret []int32 return ret } - return *o.WrappedArray + return o.WrappedArray } // GetWrappedArrayOk returns a tuple with the WrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetWrappedArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) { if o == nil || o.WrappedArray == nil { return nil, false } @@ -221,7 +221,7 @@ func (o *XmlItem) HasWrappedArray() bool { // SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field. func (o *XmlItem) SetWrappedArray(v []int32) { - o.WrappedArray = &v + o.WrappedArray = v } // GetNameString returns the NameString field value if set, zero value otherwise. @@ -358,12 +358,12 @@ func (o *XmlItem) GetNameArray() []int32 { var ret []int32 return ret } - return *o.NameArray + return o.NameArray } // GetNameArrayOk returns a tuple with the NameArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetNameArrayOk() ([]int32, bool) { if o == nil || o.NameArray == nil { return nil, false } @@ -381,7 +381,7 @@ func (o *XmlItem) HasNameArray() bool { // SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field. func (o *XmlItem) SetNameArray(v []int32) { - o.NameArray = &v + o.NameArray = v } // GetNameWrappedArray returns the NameWrappedArray field value if set, zero value otherwise. @@ -390,12 +390,12 @@ func (o *XmlItem) GetNameWrappedArray() []int32 { var ret []int32 return ret } - return *o.NameWrappedArray + return o.NameWrappedArray } // GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameWrappedArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) { if o == nil || o.NameWrappedArray == nil { return nil, false } @@ -413,7 +413,7 @@ func (o *XmlItem) HasNameWrappedArray() bool { // SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field. func (o *XmlItem) SetNameWrappedArray(v []int32) { - o.NameWrappedArray = &v + o.NameWrappedArray = v } // GetPrefixString returns the PrefixString field value if set, zero value otherwise. @@ -550,12 +550,12 @@ func (o *XmlItem) GetPrefixArray() []int32 { var ret []int32 return ret } - return *o.PrefixArray + return o.PrefixArray } // GetPrefixArrayOk returns a tuple with the PrefixArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) { if o == nil || o.PrefixArray == nil { return nil, false } @@ -573,7 +573,7 @@ func (o *XmlItem) HasPrefixArray() bool { // SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field. func (o *XmlItem) SetPrefixArray(v []int32) { - o.PrefixArray = &v + o.PrefixArray = v } // GetPrefixWrappedArray returns the PrefixWrappedArray field value if set, zero value otherwise. @@ -582,12 +582,12 @@ func (o *XmlItem) GetPrefixWrappedArray() []int32 { var ret []int32 return ret } - return *o.PrefixWrappedArray + return o.PrefixWrappedArray } // GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixWrappedArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) { if o == nil || o.PrefixWrappedArray == nil { return nil, false } @@ -605,7 +605,7 @@ func (o *XmlItem) HasPrefixWrappedArray() bool { // SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field. func (o *XmlItem) SetPrefixWrappedArray(v []int32) { - o.PrefixWrappedArray = &v + o.PrefixWrappedArray = v } // GetNamespaceString returns the NamespaceString field value if set, zero value otherwise. @@ -742,12 +742,12 @@ func (o *XmlItem) GetNamespaceArray() []int32 { var ret []int32 return ret } - return *o.NamespaceArray + return o.NamespaceArray } // GetNamespaceArrayOk returns a tuple with the NamespaceArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) { if o == nil || o.NamespaceArray == nil { return nil, false } @@ -765,7 +765,7 @@ func (o *XmlItem) HasNamespaceArray() bool { // SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field. func (o *XmlItem) SetNamespaceArray(v []int32) { - o.NamespaceArray = &v + o.NamespaceArray = v } // GetNamespaceWrappedArray returns the NamespaceWrappedArray field value if set, zero value otherwise. @@ -774,12 +774,12 @@ func (o *XmlItem) GetNamespaceWrappedArray() []int32 { var ret []int32 return ret } - return *o.NamespaceWrappedArray + return o.NamespaceWrappedArray } // GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceWrappedArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { if o == nil || o.NamespaceWrappedArray == nil { return nil, false } @@ -797,7 +797,7 @@ func (o *XmlItem) HasNamespaceWrappedArray() bool { // SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field. func (o *XmlItem) SetNamespaceWrappedArray(v []int32) { - o.NamespaceWrappedArray = &v + o.NamespaceWrappedArray = v } // GetPrefixNsString returns the PrefixNsString field value if set, zero value otherwise. @@ -934,12 +934,12 @@ func (o *XmlItem) GetPrefixNsArray() []int32 { var ret []int32 return ret } - return *o.PrefixNsArray + return o.PrefixNsArray } // GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) { if o == nil || o.PrefixNsArray == nil { return nil, false } @@ -957,7 +957,7 @@ func (o *XmlItem) HasPrefixNsArray() bool { // SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field. func (o *XmlItem) SetPrefixNsArray(v []int32) { - o.PrefixNsArray = &v + o.PrefixNsArray = v } // GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field value if set, zero value otherwise. @@ -966,12 +966,12 @@ func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { var ret []int32 return ret } - return *o.PrefixNsWrappedArray + return o.PrefixNsWrappedArray } // GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsWrappedArrayOk() (*[]int32, bool) { +func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { if o == nil || o.PrefixNsWrappedArray == nil { return nil, false } @@ -989,7 +989,7 @@ func (o *XmlItem) HasPrefixNsWrappedArray() bool { // SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field. func (o *XmlItem) SetPrefixNsWrappedArray(v []int32) { - o.PrefixNsWrappedArray = &v + o.PrefixNsWrappedArray = v } func (o XmlItem) MarshalJSON() ([]byte, error) { diff --git a/samples/client/petstore/go/go.mod b/samples/client/petstore/go/go.mod new file mode 100644 index 000000000000..b8b87c5fe95a --- /dev/null +++ b/samples/client/petstore/go/go.mod @@ -0,0 +1,11 @@ +module github.com/OpenAPITools/openapi-generator/samples/client/petstore/go + +replace github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore => ./go-petstore + +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/oauth2 v0.0.0-20210323180902-22b0adad7558 +) diff --git a/samples/client/petstore/go/go.sum b/samples/client/petstore/go/go.sum new file mode 100644 index 000000000000..0df1d1a38a06 --- /dev/null +++ b/samples/client/petstore/go/go.sum @@ -0,0 +1,371 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +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/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= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +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/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= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +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/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= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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/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= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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/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/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= +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= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +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/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= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +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/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= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +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/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= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +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= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +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/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= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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/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/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= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +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/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= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +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/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= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +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= +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= +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= +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= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/samples/client/petstore/go/mock/mock_api_pet.go b/samples/client/petstore/go/mock/mock_api_pet.go index 84686bb5f2e5..66a4f27adc06 100644 --- a/samples/client/petstore/go/mock/mock_api_pet.go +++ b/samples/client/petstore/go/mock/mock_api_pet.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - sw "../go-petstore" + sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore" ) // MockPetApi is a mock of the PetApi interface @@ -21,7 +21,7 @@ func (m *MockPetApi) AddPet(ctx context.Context) sw.ApiAddPetRequest { } func (m *MockPetApi) AddPetExecute(r sw.ApiAddPetRequest) (*http.Response, error) { - return &http.Response{StatusCode:200}, nil + return &http.Response{StatusCode: 200}, nil } func (m *MockPetApi) DeletePet(ctx context.Context, petId int64) sw.ApiDeletePetRequest { @@ -29,7 +29,7 @@ func (m *MockPetApi) DeletePet(ctx context.Context, petId int64) sw.ApiDeletePet } func (m *MockPetApi) DeletePetExecute(r sw.ApiDeletePetRequest) (*http.Response, error) { - return &http.Response{StatusCode:200}, nil + return &http.Response{StatusCode: 200}, nil } func (m *MockPetApi) FindPetsByStatus(ctx context.Context) sw.ApiFindPetsByStatusRequest { @@ -37,7 +37,7 @@ func (m *MockPetApi) FindPetsByStatus(ctx context.Context) sw.ApiFindPetsByStatu } func (m *MockPetApi) FindPetsByStatusExecute(r sw.ApiFindPetsByStatusRequest) ([]sw.Pet, *http.Response, error) { - return []sw.Pet{}, &http.Response{StatusCode:200}, nil + return []sw.Pet{}, &http.Response{StatusCode: 200}, nil } func (m *MockPetApi) FindPetsByTags(ctx context.Context) sw.ApiFindPetsByTagsRequest { @@ -45,15 +45,15 @@ func (m *MockPetApi) FindPetsByTags(ctx context.Context) sw.ApiFindPetsByTagsReq } func (m *MockPetApi) FindPetsByTagsExecute(r sw.ApiFindPetsByTagsRequest) ([]sw.Pet, *http.Response, error) { - return []sw.Pet{}, &http.Response{StatusCode:200}, nil + return []sw.Pet{}, &http.Response{StatusCode: 200}, nil } func (m *MockPetApi) GetPetById(ctx context.Context, petId int64) sw.ApiGetPetByIdRequest { return sw.ApiGetPetByIdRequest{ApiService: m} } -func (m *MockPetApi) GetPetByIdExecute(r sw.ApiGetPetByIdRequest) (sw.Pet, *http.Response, error) { - return sw.Pet{}, &http.Response{StatusCode:200}, nil +func (m *MockPetApi) GetPetByIdExecute(r sw.ApiGetPetByIdRequest) (*sw.Pet, *http.Response, error) { + return &sw.Pet{}, &http.Response{StatusCode: 200}, nil } func (m *MockPetApi) UpdatePet(ctx context.Context) sw.ApiUpdatePetRequest { @@ -61,7 +61,7 @@ func (m *MockPetApi) UpdatePet(ctx context.Context) sw.ApiUpdatePetRequest { } func (m *MockPetApi) UpdatePetExecute(r sw.ApiUpdatePetRequest) (*http.Response, error) { - return &http.Response{StatusCode:200}, nil + return &http.Response{StatusCode: 200}, nil } func (m *MockPetApi) UpdatePetWithForm(ctx context.Context, petId int64) sw.ApiUpdatePetWithFormRequest { @@ -69,21 +69,21 @@ func (m *MockPetApi) UpdatePetWithForm(ctx context.Context, petId int64) sw.ApiU } func (m *MockPetApi) UpdatePetWithFormExecute(r sw.ApiUpdatePetWithFormRequest) (*http.Response, error) { - return &http.Response{StatusCode:200}, nil + return &http.Response{StatusCode: 200}, nil } func (m *MockPetApi) UploadFile(ctx context.Context, petId int64) sw.ApiUploadFileRequest { return sw.ApiUploadFileRequest{ApiService: m} } -func (m *MockPetApi) UploadFileExecute(r sw.ApiUploadFileRequest) (sw.ApiResponse, *http.Response, error) { - return sw.ApiResponse{}, &http.Response{StatusCode:200}, nil +func (m *MockPetApi) UploadFileExecute(r sw.ApiUploadFileRequest) (*sw.ApiResponse, *http.Response, error) { + return &sw.ApiResponse{}, &http.Response{StatusCode: 200}, nil } func (m *MockPetApi) UploadFileWithRequiredFile(ctx context.Context, petId int64) sw.ApiUploadFileWithRequiredFileRequest { return sw.ApiUploadFileWithRequiredFileRequest{ApiService: m} } -func (m *MockPetApi) UploadFileWithRequiredFileExecute(r sw.ApiUploadFileWithRequiredFileRequest) (sw.ApiResponse, *http.Response, error) { - return sw.ApiResponse{}, &http.Response{StatusCode:200}, nil +func (m *MockPetApi) UploadFileWithRequiredFileExecute(r sw.ApiUploadFileWithRequiredFileRequest) (*sw.ApiResponse, *http.Response, error) { + return &sw.ApiResponse{}, &http.Response{StatusCode: 200}, nil } diff --git a/samples/client/petstore/go/pet_api_test.go b/samples/client/petstore/go/pet_api_test.go index 0868c4b96ccb..0a17cbed8f00 100644 --- a/samples/client/petstore/go/pet_api_test.go +++ b/samples/client/petstore/go/pet_api_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - sw "./go-petstore" - mock "./mock" + sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore" + mock "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/mock" ) var client *sw.APIClient @@ -30,7 +30,7 @@ func TestMain(m *testing.M) { func TestAddPet(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{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute() @@ -69,7 +69,7 @@ func TestGetPetById(t *testing.T) { func TestGetPetByIdWithInvalidID(t *testing.T) { resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999).Execute() if r != nil && r.StatusCode == 404 { - assertedError, ok := err.(sw.GenericOpenAPIError) + assertedError, ok := err.(*sw.GenericOpenAPIError) a := assert.New(t) a.True(ok) a.Contains(string(assertedError.Body()), "type") diff --git a/samples/client/petstore/go/store_api_test.go b/samples/client/petstore/go/store_api_test.go index f9f55273eb92..94ca695c17b6 100644 --- a/samples/client/petstore/go/store_api_test.go +++ b/samples/client/petstore/go/store_api_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - sw "./go-petstore" + sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore" ) func TestPlaceOrder(t *testing.T) { diff --git a/samples/client/petstore/go/user_api_test.go b/samples/client/petstore/go/user_api_test.go index 361e77ac9aa7..52195d6caac9 100644 --- a/samples/client/petstore/go/user_api_test.go +++ b/samples/client/petstore/go/user_api_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - sw "./go-petstore" + sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore" ) func TestCreateUser(t *testing.T) { @@ -33,7 +33,7 @@ func TestCreateUser(t *testing.T) { //adding x to skip the test, currently it is failing func TestCreateUsersWithArrayInput(t *testing.T) { newUsers := []sw.User{ - sw.User{ + { Id: sw.PtrInt64(1001), FirstName: sw.PtrString("gopher1"), LastName: sw.PtrString("lang1"), @@ -43,7 +43,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { Phone: sw.PtrString("5101112222"), UserStatus: sw.PtrInt32(1), }, - sw.User{ + { Id: sw.PtrInt64(1002), FirstName: sw.PtrString("gopher2"), LastName: sw.PtrString("lang2"), @@ -62,7 +62,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { if apiResponse.StatusCode != 200 { t.Log(apiResponse) } -/* issue deleting users due to issue in the server side (500). commented out below for the time being + /* issue deleting users due to issue in the server side (500). commented out below for the time being //tear down _, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1").Execute() if err1 != nil { @@ -75,7 +75,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { t.Errorf("Error while deleting user") t.Log(err2) } -*/ + */ } func TestGetUserByName(t *testing.T) { 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 f765717c5fed..5921adf7dcf3 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 @@ -22,7 +22,7 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: ```golang -import sw "./x_auth_id_alias" +import x_auth_id_alias "github.com/GIT_USER_ID/GIT_REPO_ID" ``` To use a proxy, set the environment variable `HTTP_PROXY`: @@ -40,7 +40,7 @@ Default configuration comes with `Servers` field that contains server objects as For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. ```golang -ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) +ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextServerIndex, 1) ``` ### Templated Server URL @@ -48,7 +48,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. ```golang -ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{ +ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` @@ -62,10 +62,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string. Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. ``` -ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ +ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) -ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ +ctx = context.WithValue(context.Background(), x_auth_id_alias.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/api_usage.go b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/api_usage.go index 6e891fbe6faa..8ba9a49d9d35 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/api_usage.go +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/api_usage.go @@ -12,27 +12,27 @@ package x_auth_id_alias import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" ) // Linger please var ( - _ _context.Context + _ context.Context ) // UsageApiService UsageApi service type UsageApiService service type ApiAnyKeyRequest struct { - ctx _context.Context + ctx context.Context ApiService *UsageApiService } -func (r ApiAnyKeyRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) { +func (r ApiAnyKeyRequest) Execute() (map[string]interface{}, *http.Response, error) { return r.ApiService.AnyKeyExecute(r) } @@ -41,10 +41,10 @@ AnyKey Use any API key Use any API key - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAnyKeyRequest */ -func (a *UsageApiService) AnyKey(ctx _context.Context) ApiAnyKeyRequest { +func (a *UsageApiService) AnyKey(ctx context.Context) ApiAnyKeyRequest { return ApiAnyKeyRequest{ ApiService: a, ctx: ctx, @@ -53,9 +53,9 @@ func (a *UsageApiService) AnyKey(ctx _context.Context) ApiAnyKeyRequest { // Execute executes the request // @return map[string]interface{} -func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interface{}, *_nethttp.Response, error) { +func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue map[string]interface{} @@ -63,14 +63,14 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.AnyKey") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/any" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -127,15 +127,15 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -144,7 +144,7 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -155,12 +155,12 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac } type ApiBothKeysRequest struct { - ctx _context.Context + ctx context.Context ApiService *UsageApiService } -func (r ApiBothKeysRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) { +func (r ApiBothKeysRequest) Execute() (map[string]interface{}, *http.Response, error) { return r.ApiService.BothKeysExecute(r) } @@ -169,10 +169,10 @@ BothKeys Use both API keys Use both API keys - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiBothKeysRequest */ -func (a *UsageApiService) BothKeys(ctx _context.Context) ApiBothKeysRequest { +func (a *UsageApiService) BothKeys(ctx context.Context) ApiBothKeysRequest { return ApiBothKeysRequest{ ApiService: a, ctx: ctx, @@ -181,9 +181,9 @@ func (a *UsageApiService) BothKeys(ctx _context.Context) ApiBothKeysRequest { // Execute executes the request // @return map[string]interface{} -func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]interface{}, *_nethttp.Response, error) { +func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue map[string]interface{} @@ -191,14 +191,14 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.BothKeys") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/both" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -255,15 +255,15 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -272,7 +272,7 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -283,12 +283,12 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte } type ApiKeyInHeaderRequest struct { - ctx _context.Context + ctx context.Context ApiService *UsageApiService } -func (r ApiKeyInHeaderRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) { +func (r ApiKeyInHeaderRequest) Execute() (map[string]interface{}, *http.Response, error) { return r.ApiService.KeyInHeaderExecute(r) } @@ -297,10 +297,10 @@ KeyInHeader Use API key in header Use API key in header - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiKeyInHeaderRequest */ -func (a *UsageApiService) KeyInHeader(ctx _context.Context) ApiKeyInHeaderRequest { +func (a *UsageApiService) KeyInHeader(ctx context.Context) ApiKeyInHeaderRequest { return ApiKeyInHeaderRequest{ ApiService: a, ctx: ctx, @@ -309,9 +309,9 @@ func (a *UsageApiService) KeyInHeader(ctx _context.Context) ApiKeyInHeaderReques // Execute executes the request // @return map[string]interface{} -func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[string]interface{}, *_nethttp.Response, error) { +func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue map[string]interface{} @@ -319,14 +319,14 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.KeyInHeader") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/header" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -369,15 +369,15 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -386,7 +386,7 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -397,12 +397,12 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin } type ApiKeyInQueryRequest struct { - ctx _context.Context + ctx context.Context ApiService *UsageApiService } -func (r ApiKeyInQueryRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) { +func (r ApiKeyInQueryRequest) Execute() (map[string]interface{}, *http.Response, error) { return r.ApiService.KeyInQueryExecute(r) } @@ -411,10 +411,10 @@ KeyInQuery Use API key in query Use API key in query - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiKeyInQueryRequest */ -func (a *UsageApiService) KeyInQuery(ctx _context.Context) ApiKeyInQueryRequest { +func (a *UsageApiService) KeyInQuery(ctx context.Context) ApiKeyInQueryRequest { return ApiKeyInQueryRequest{ ApiService: a, ctx: ctx, @@ -423,9 +423,9 @@ func (a *UsageApiService) KeyInQuery(ctx _context.Context) ApiKeyInQueryRequest // Execute executes the request // @return map[string]interface{} -func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]interface{}, *_nethttp.Response, error) { +func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue map[string]interface{} @@ -433,14 +433,14 @@ func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string] localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.KeyInQuery") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/query" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -483,15 +483,15 @@ func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string] return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -500,7 +500,7 @@ func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string] err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } 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 f7a7c368cbf3..d538f2435332 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,6 +422,13 @@ func reportError(format string, a ...interface{}) error { return fmt.Errorf(format, a...) } +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/docs/UsageApi.md b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/docs/UsageApi.md index 6322c976a683..f6d814dedf2f 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/docs/UsageApi.md +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/docs/UsageApi.md @@ -34,8 +34,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UsageApi.AnyKey(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsageApi.AnyKey(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.AnyKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -95,8 +95,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UsageApi.BothKeys(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsageApi.BothKeys(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.BothKeys``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -156,8 +156,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UsageApi.KeyInHeader(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsageApi.KeyInHeader(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.KeyInHeader``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -217,8 +217,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UsageApi.KeyInQuery(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsageApi.KeyInQuery(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.KeyInQuery``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 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 0f43de9ebb2c..ead32606c72d 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,5 @@ module github.com/GIT_USER_ID/GIT_REPO_ID go 1.13 require ( - golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 ) diff --git a/samples/openapi3/client/petstore/go/auth_test.go b/samples/openapi3/client/petstore/go/auth_test.go index c56d64e5e518..52f5875f637a 100644 --- a/samples/openapi3/client/petstore/go/auth_test.go +++ b/samples/openapi3/client/petstore/go/auth_test.go @@ -10,7 +10,7 @@ import ( "golang.org/x/oauth2" - sw "./go-petstore" + sw "go-petstore" ) func TestOAuth2(t *testing.T) { @@ -39,7 +39,7 @@ func TestOAuth2(t *testing.T) { newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute() @@ -74,7 +74,7 @@ func TestBasicAuth(t *testing.T) { newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(auth).Pet(newPet).Execute() @@ -104,7 +104,7 @@ func TestAccessToken(t *testing.T) { newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(nil).Pet(newPet).Execute() @@ -130,11 +130,11 @@ func TestAccessToken(t *testing.T) { } func TestAPIKeyNoPrefix(t *testing.T) { - auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123"}}) + auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123"}}) newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute() @@ -165,11 +165,11 @@ func TestAPIKeyNoPrefix(t *testing.T) { } func TestAPIKeyWithPrefix(t *testing.T) { - auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123", Prefix: "Bearer"}}) + auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123", Prefix: "Bearer"}}) newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(nil).Pet(newPet).Execute() @@ -202,7 +202,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { func TestDefaultHeader(t *testing.T) { newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute() diff --git a/samples/openapi3/client/petstore/go/fake_api_test.go b/samples/openapi3/client/petstore/go/fake_api_test.go index 97910bf3cf7b..b25af45ee6ca 100644 --- a/samples/openapi3/client/petstore/go/fake_api_test.go +++ b/samples/openapi3/client/petstore/go/fake_api_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - sw "./go-petstore" + sw "go-petstore" ) // TestPutBodyWithFileSchema ensures a model with the name 'File' @@ -15,7 +15,7 @@ func TestPutBodyWithFileSchema(t *testing.T) { schema := sw.FileSchemaTestClass{ File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")}, - Files: &[]sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}} + Files: []sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}} r, err := client.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(schema).Execute() diff --git a/samples/openapi3/client/petstore/go/go-petstore/README.md b/samples/openapi3/client/petstore/go/go-petstore/README.md index 64d951b11c0e..10f8ee9f4365 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go/go-petstore/README.md @@ -22,7 +22,7 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: ```golang -import sw "./petstore" +import petstore "github.com/GIT_USER_ID/GIT_REPO_ID" ``` To use a proxy, set the environment variable `HTTP_PROXY`: @@ -40,7 +40,7 @@ Default configuration comes with `Servers` field that contains server objects as For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. ```golang -ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) +ctx := context.WithValue(context.Background(), petstore.ContextServerIndex, 1) ``` ### Templated Server URL @@ -48,7 +48,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. ```golang -ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{ +ctx := context.WithValue(context.Background(), petstore.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` @@ -62,10 +62,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string. Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. ``` -ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ +ctx := context.WithValue(context.Background(), petstore.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) -ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ +ctx = context.WithValue(context.Background(), petstore.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, @@ -206,7 +206,7 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example ```golang -auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING") +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") r, err := client.Service.Operation(auth, args) ``` @@ -233,7 +233,7 @@ r, err := client.Service.Operation(auth, args) Example ```golang - authConfig := sw.HttpSignatureAuth{ + authConfig := client.HttpSignatureAuth{ KeyId: "my-key-id", PrivateKeyPath: "rsa.pem", Passphrase: "my-passphrase", diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go index 640c21d7250f..d1ac2900c4c2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go @@ -12,15 +12,15 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" ) // Linger please var ( - _ _context.Context + _ context.Context ) type AnotherFakeApi interface { @@ -30,21 +30,21 @@ type AnotherFakeApi interface { To test special tags and operation ID starting with number - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCall123TestSpecialTagsRequest */ - Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest + Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest // Call123TestSpecialTagsExecute executes the request // @return Client - Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) + Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) } // AnotherFakeApiService AnotherFakeApi service type AnotherFakeApiService service type ApiCall123TestSpecialTagsRequest struct { - ctx _context.Context + ctx context.Context ApiService AnotherFakeApi client *Client } @@ -55,7 +55,7 @@ func (r ApiCall123TestSpecialTagsRequest) Client(client Client) ApiCall123TestSp return r } -func (r ApiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) { +func (r ApiCall123TestSpecialTagsRequest) Execute() (*Client, *http.Response, error) { return r.ApiService.Call123TestSpecialTagsExecute(r) } @@ -64,10 +64,10 @@ Call123TestSpecialTags To test special tags To test special tags and operation ID starting with number - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCall123TestSpecialTagsRequest */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest { +func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest { return ApiCall123TestSpecialTagsRequest{ ApiService: a, ctx: ctx, @@ -76,24 +76,24 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) Api // Execute executes the request // @return Client -func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue Client + localVarReturnValue *Client ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/another-fake/dummy" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.client == nil { return localVarReturnValue, nil, reportError("client is required and must be specified") } @@ -127,15 +127,15 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -144,7 +144,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } 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 be637eceddf9..f5cd23745416 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_default.go @@ -12,15 +12,15 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" ) // Linger please var ( - _ _context.Context + _ context.Context ) type DefaultApi interface { @@ -28,36 +28,36 @@ type DefaultApi interface { /* FooGet Method for FooGet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFooGetRequest */ - FooGet(ctx _context.Context) ApiFooGetRequest + FooGet(ctx context.Context) ApiFooGetRequest // FooGetExecute executes the request // @return InlineResponseDefault - FooGetExecute(r ApiFooGetRequest) (InlineResponseDefault, *_nethttp.Response, error) + FooGetExecute(r ApiFooGetRequest) (*InlineResponseDefault, *http.Response, error) } // DefaultApiService DefaultApi service type DefaultApiService service type ApiFooGetRequest struct { - ctx _context.Context + ctx context.Context ApiService DefaultApi } -func (r ApiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response, error) { +func (r ApiFooGetRequest) Execute() (*InlineResponseDefault, *http.Response, error) { return r.ApiService.FooGetExecute(r) } /* FooGet Method for FooGet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFooGetRequest */ -func (a *DefaultApiService) FooGet(ctx _context.Context) ApiFooGetRequest { +func (a *DefaultApiService) FooGet(ctx context.Context) ApiFooGetRequest { return ApiFooGetRequest{ ApiService: a, ctx: ctx, @@ -66,24 +66,24 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) ApiFooGetRequest { // Execute executes the request // @return InlineResponseDefault -func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (InlineResponseDefault, *_nethttp.Response, error) { +func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (*InlineResponseDefault, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue InlineResponseDefault + localVarReturnValue *InlineResponseDefault ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FooGet") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/foo" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -112,15 +112,15 @@ func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (InlineResponseDef return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -156,7 +156,7 @@ func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (InlineResponseDef err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } 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 a2cb81b7fea9..1f4a8802ab0a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go @@ -12,10 +12,10 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "os" "time" "reflect" @@ -23,7 +23,7 @@ import ( // Linger please var ( - _ _context.Context + _ context.Context ) type FakeApi interface { @@ -31,108 +31,108 @@ type FakeApi interface { /* FakeHealthGet Health check endpoint - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeHealthGetRequest */ - FakeHealthGet(ctx _context.Context) ApiFakeHealthGetRequest + FakeHealthGet(ctx context.Context) ApiFakeHealthGetRequest // FakeHealthGetExecute executes the request // @return HealthCheckResult - FakeHealthGetExecute(r ApiFakeHealthGetRequest) (HealthCheckResult, *_nethttp.Response, error) + FakeHealthGetExecute(r ApiFakeHealthGetRequest) (*HealthCheckResult, *http.Response, error) /* FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize Test serialization of outer boolean types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterBooleanSerializeRequest */ - FakeOuterBooleanSerialize(ctx _context.Context) ApiFakeOuterBooleanSerializeRequest + FakeOuterBooleanSerialize(ctx context.Context) ApiFakeOuterBooleanSerializeRequest // FakeOuterBooleanSerializeExecute executes the request // @return bool - FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *_nethttp.Response, error) + FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *http.Response, error) /* FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize Test serialization of object with outer number type - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterCompositeSerializeRequest */ - FakeOuterCompositeSerialize(ctx _context.Context) ApiFakeOuterCompositeSerializeRequest + FakeOuterCompositeSerialize(ctx context.Context) ApiFakeOuterCompositeSerializeRequest // FakeOuterCompositeSerializeExecute executes the request // @return OuterComposite - FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (OuterComposite, *_nethttp.Response, error) + FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (*OuterComposite, *http.Response, error) /* FakeOuterNumberSerialize Method for FakeOuterNumberSerialize Test serialization of outer number types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterNumberSerializeRequest */ - FakeOuterNumberSerialize(ctx _context.Context) ApiFakeOuterNumberSerializeRequest + FakeOuterNumberSerialize(ctx context.Context) ApiFakeOuterNumberSerializeRequest // FakeOuterNumberSerializeExecute executes the request // @return float32 - FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *_nethttp.Response, error) + FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *http.Response, error) /* FakeOuterStringSerialize Method for FakeOuterStringSerialize Test serialization of outer string types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterStringSerializeRequest */ - FakeOuterStringSerialize(ctx _context.Context) ApiFakeOuterStringSerializeRequest + FakeOuterStringSerialize(ctx context.Context) ApiFakeOuterStringSerializeRequest // FakeOuterStringSerializeExecute executes the request // @return string - FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *_nethttp.Response, error) + FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *http.Response, error) /* TestBodyWithFileSchema Method for TestBodyWithFileSchema For this test, the body for this request much reference a schema named `File`. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestBodyWithFileSchemaRequest */ - TestBodyWithFileSchema(ctx _context.Context) ApiTestBodyWithFileSchemaRequest + TestBodyWithFileSchema(ctx context.Context) ApiTestBodyWithFileSchemaRequest // TestBodyWithFileSchemaExecute executes the request - TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*_nethttp.Response, error) + TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*http.Response, error) /* TestBodyWithQueryParams Method for TestBodyWithQueryParams - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestBodyWithQueryParamsRequest */ - TestBodyWithQueryParams(ctx _context.Context) ApiTestBodyWithQueryParamsRequest + TestBodyWithQueryParams(ctx context.Context) ApiTestBodyWithQueryParamsRequest // TestBodyWithQueryParamsExecute executes the request - TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*_nethttp.Response, error) + TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*http.Response, error) /* TestClientModel To test \"client\" model To test "client" model - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestClientModelRequest */ - TestClientModel(ctx _context.Context) ApiTestClientModelRequest + TestClientModel(ctx context.Context) ApiTestClientModelRequest // TestClientModelExecute executes the request // @return Client - TestClientModelExecute(r ApiTestClientModelRequest) (Client, *_nethttp.Response, error) + TestClientModelExecute(r ApiTestClientModelRequest) (*Client, *http.Response, error) /* TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -143,110 +143,110 @@ type FakeApi interface { 가짜 엔드 포인트 - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestEndpointParametersRequest */ - TestEndpointParameters(ctx _context.Context) ApiTestEndpointParametersRequest + TestEndpointParameters(ctx context.Context) ApiTestEndpointParametersRequest // TestEndpointParametersExecute executes the request - TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*_nethttp.Response, error) + TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*http.Response, error) /* TestEnumParameters To test enum parameters To test enum parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestEnumParametersRequest */ - TestEnumParameters(ctx _context.Context) ApiTestEnumParametersRequest + TestEnumParameters(ctx context.Context) ApiTestEnumParametersRequest // TestEnumParametersExecute executes the request - TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*_nethttp.Response, error) + TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*http.Response, error) /* TestGroupParameters Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestGroupParametersRequest */ - TestGroupParameters(ctx _context.Context) ApiTestGroupParametersRequest + TestGroupParameters(ctx context.Context) ApiTestGroupParametersRequest // TestGroupParametersExecute executes the request - TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*_nethttp.Response, error) + TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*http.Response, error) /* TestInlineAdditionalProperties test inline additionalProperties - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestInlineAdditionalPropertiesRequest */ - TestInlineAdditionalProperties(ctx _context.Context) ApiTestInlineAdditionalPropertiesRequest + TestInlineAdditionalProperties(ctx context.Context) ApiTestInlineAdditionalPropertiesRequest // TestInlineAdditionalPropertiesExecute executes the request - TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*_nethttp.Response, error) + TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*http.Response, error) /* TestJsonFormData test json serialization of form data - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestJsonFormDataRequest */ - TestJsonFormData(ctx _context.Context) ApiTestJsonFormDataRequest + TestJsonFormData(ctx context.Context) ApiTestJsonFormDataRequest // TestJsonFormDataExecute executes the request - TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*_nethttp.Response, error) + TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*http.Response, error) /* TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat To test the collection format in query parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestQueryParameterCollectionFormatRequest */ - TestQueryParameterCollectionFormat(ctx _context.Context) ApiTestQueryParameterCollectionFormatRequest + TestQueryParameterCollectionFormat(ctx context.Context) ApiTestQueryParameterCollectionFormatRequest // TestQueryParameterCollectionFormatExecute executes the request - TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*_nethttp.Response, error) + TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) /* TestUniqueItemsHeaderAndQueryParameterCollectionFormat Method for TestUniqueItemsHeaderAndQueryParameterCollectionFormat To test unique items in header and query parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest */ - TestUniqueItemsHeaderAndQueryParameterCollectionFormat(ctx _context.Context) ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest + TestUniqueItemsHeaderAndQueryParameterCollectionFormat(ctx context.Context) ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest // TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute executes the request // @return []Pet - TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) ([]Pet, *_nethttp.Response, error) + TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) ([]Pet, *http.Response, error) } // FakeApiService FakeApi service type FakeApiService service type ApiFakeHealthGetRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi } -func (r ApiFakeHealthGetRequest) Execute() (HealthCheckResult, *_nethttp.Response, error) { +func (r ApiFakeHealthGetRequest) Execute() (*HealthCheckResult, *http.Response, error) { return r.ApiService.FakeHealthGetExecute(r) } /* FakeHealthGet Health check endpoint - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeHealthGetRequest */ -func (a *FakeApiService) FakeHealthGet(ctx _context.Context) ApiFakeHealthGetRequest { +func (a *FakeApiService) FakeHealthGet(ctx context.Context) ApiFakeHealthGetRequest { return ApiFakeHealthGetRequest{ ApiService: a, ctx: ctx, @@ -255,24 +255,24 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) ApiFakeHealthGetReq // Execute executes the request // @return HealthCheckResult -func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (HealthCheckResult, *_nethttp.Response, error) { +func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (*HealthCheckResult, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue HealthCheckResult + localVarReturnValue *HealthCheckResult ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeHealthGet") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/health" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -301,15 +301,15 @@ func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (Health return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -318,7 +318,7 @@ func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (Health err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -329,7 +329,7 @@ func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (Health } type ApiFakeOuterBooleanSerializeRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *bool } @@ -340,7 +340,7 @@ func (r ApiFakeOuterBooleanSerializeRequest) Body(body bool) ApiFakeOuterBoolean return r } -func (r ApiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response, error) { +func (r ApiFakeOuterBooleanSerializeRequest) Execute() (bool, *http.Response, error) { return r.ApiService.FakeOuterBooleanSerializeExecute(r) } @@ -349,10 +349,10 @@ FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize Test serialization of outer boolean types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterBooleanSerializeRequest */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) ApiFakeOuterBooleanSerializeRequest { +func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context) ApiFakeOuterBooleanSerializeRequest { return ApiFakeOuterBooleanSerializeRequest{ ApiService: a, ctx: ctx, @@ -361,9 +361,9 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) ApiFake // Execute executes the request // @return bool -func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile localVarReturnValue bool @@ -371,14 +371,14 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/outer/boolean" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -409,15 +409,15 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -426,7 +426,7 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -437,7 +437,7 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS } type ApiFakeOuterCompositeSerializeRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi outerComposite *OuterComposite } @@ -448,7 +448,7 @@ func (r ApiFakeOuterCompositeSerializeRequest) OuterComposite(outerComposite Out return r } -func (r ApiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_nethttp.Response, error) { +func (r ApiFakeOuterCompositeSerializeRequest) Execute() (*OuterComposite, *http.Response, error) { return r.ApiService.FakeOuterCompositeSerializeExecute(r) } @@ -457,10 +457,10 @@ FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize Test serialization of object with outer number type - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterCompositeSerializeRequest */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) ApiFakeOuterCompositeSerializeRequest { +func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context) ApiFakeOuterCompositeSerializeRequest { return ApiFakeOuterCompositeSerializeRequest{ ApiService: a, ctx: ctx, @@ -469,24 +469,24 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) ApiFa // Execute executes the request // @return OuterComposite -func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (*OuterComposite, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue OuterComposite + localVarReturnValue *OuterComposite ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/outer/composite" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -517,15 +517,15 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -534,7 +534,7 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -545,7 +545,7 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos } type ApiFakeOuterNumberSerializeRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *float32 } @@ -556,7 +556,7 @@ func (r ApiFakeOuterNumberSerializeRequest) Body(body float32) ApiFakeOuterNumbe return r } -func (r ApiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Response, error) { +func (r ApiFakeOuterNumberSerializeRequest) Execute() (float32, *http.Response, error) { return r.ApiService.FakeOuterNumberSerializeExecute(r) } @@ -565,10 +565,10 @@ FakeOuterNumberSerialize Method for FakeOuterNumberSerialize Test serialization of outer number types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterNumberSerializeRequest */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) ApiFakeOuterNumberSerializeRequest { +func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context) ApiFakeOuterNumberSerializeRequest { return ApiFakeOuterNumberSerializeRequest{ ApiService: a, ctx: ctx, @@ -577,9 +577,9 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) ApiFakeO // Execute executes the request // @return float32 -func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile localVarReturnValue float32 @@ -587,14 +587,14 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/outer/number" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -625,15 +625,15 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -642,7 +642,7 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -653,7 +653,7 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer } type ApiFakeOuterStringSerializeRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi body *string } @@ -664,7 +664,7 @@ func (r ApiFakeOuterStringSerializeRequest) Body(body string) ApiFakeOuterString return r } -func (r ApiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Response, error) { +func (r ApiFakeOuterStringSerializeRequest) Execute() (string, *http.Response, error) { return r.ApiService.FakeOuterStringSerializeExecute(r) } @@ -673,10 +673,10 @@ FakeOuterStringSerialize Method for FakeOuterStringSerialize Test serialization of outer string types - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFakeOuterStringSerializeRequest */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) ApiFakeOuterStringSerializeRequest { +func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context) ApiFakeOuterStringSerializeRequest { return ApiFakeOuterStringSerializeRequest{ ApiService: a, ctx: ctx, @@ -685,9 +685,9 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) ApiFakeO // Execute executes the request // @return string -func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile localVarReturnValue string @@ -695,14 +695,14 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/outer/string" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -733,15 +733,15 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -750,7 +750,7 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -761,7 +761,7 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer } type ApiTestBodyWithFileSchemaRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi fileSchemaTestClass *FileSchemaTestClass } @@ -771,7 +771,7 @@ func (r ApiTestBodyWithFileSchemaRequest) FileSchemaTestClass(fileSchemaTestClas return r } -func (r ApiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestBodyWithFileSchemaRequest) Execute() (*http.Response, error) { return r.ApiService.TestBodyWithFileSchemaExecute(r) } @@ -780,10 +780,10 @@ TestBodyWithFileSchema Method for TestBodyWithFileSchema For this test, the body for this request much reference a schema named `File`. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestBodyWithFileSchemaRequest */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) ApiTestBodyWithFileSchemaRequest { +func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context) ApiTestBodyWithFileSchemaRequest { return ApiTestBodyWithFileSchemaRequest{ ApiService: a, ctx: ctx, @@ -791,23 +791,23 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) ApiTestBod } // Execute executes the request -func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/body-with-file-schema" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.fileSchemaTestClass == nil { return nil, reportError("fileSchemaTestClass is required and must be specified") } @@ -841,15 +841,15 @@ func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSche return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -860,7 +860,7 @@ func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSche } type ApiTestBodyWithQueryParamsRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi query *string user *User @@ -875,17 +875,17 @@ func (r ApiTestBodyWithQueryParamsRequest) User(user User) ApiTestBodyWithQueryP return r } -func (r ApiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestBodyWithQueryParamsRequest) Execute() (*http.Response, error) { return r.ApiService.TestBodyWithQueryParamsExecute(r) } /* TestBodyWithQueryParams Method for TestBodyWithQueryParams - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestBodyWithQueryParamsRequest */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) ApiTestBodyWithQueryParamsRequest { +func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context) ApiTestBodyWithQueryParamsRequest { return ApiTestBodyWithQueryParamsRequest{ ApiService: a, ctx: ctx, @@ -893,23 +893,23 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) ApiTestBo } // Execute executes the request -func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/body-with-query-params" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.query == nil { return nil, reportError("query is required and must be specified") } @@ -947,15 +947,15 @@ func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryPa return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -966,7 +966,7 @@ func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryPa } type ApiTestClientModelRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi client *Client } @@ -977,7 +977,7 @@ func (r ApiTestClientModelRequest) Client(client Client) ApiTestClientModelReque return r } -func (r ApiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error) { +func (r ApiTestClientModelRequest) Execute() (*Client, *http.Response, error) { return r.ApiService.TestClientModelExecute(r) } @@ -986,10 +986,10 @@ TestClientModel To test \"client\" model To test "client" model - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestClientModelRequest */ -func (a *FakeApiService) TestClientModel(ctx _context.Context) ApiTestClientModelRequest { +func (a *FakeApiService) TestClientModel(ctx context.Context) ApiTestClientModelRequest { return ApiTestClientModelRequest{ ApiService: a, ctx: ctx, @@ -998,24 +998,24 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context) ApiTestClientMode // Execute executes the request // @return Client -func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Client, *_nethttp.Response, error) { +func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (*Client, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue Client + localVarReturnValue *Client ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.client == nil { return localVarReturnValue, nil, reportError("client is required and must be specified") } @@ -1049,15 +1049,15 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Cl return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1066,7 +1066,7 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Cl err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1077,7 +1077,7 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Cl } type ApiTestEndpointParametersRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi number *float32 double *float64 @@ -1166,7 +1166,7 @@ func (r ApiTestEndpointParametersRequest) Callback(callback string) ApiTestEndpo return r } -func (r ApiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestEndpointParametersRequest) Execute() (*http.Response, error) { return r.ApiService.TestEndpointParametersExecute(r) } @@ -1179,10 +1179,10 @@ Fake endpoint for testing various parameters 가짜 엔드 포인트 - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestEndpointParametersRequest */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) ApiTestEndpointParametersRequest { +func (a *FakeApiService) TestEndpointParameters(ctx context.Context) ApiTestEndpointParametersRequest { return ApiTestEndpointParametersRequest{ ApiService: a, ctx: ctx, @@ -1190,23 +1190,23 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) ApiTestEnd } // Execute executes the request -func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.number == nil { return nil, reportError("number is required and must be specified") } @@ -1279,7 +1279,7 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete binaryLocalVarFile = *r.binary } if binaryLocalVarFile != nil { - fbs, _ := _ioutil.ReadAll(binaryLocalVarFile) + fbs, _ := ioutil.ReadAll(binaryLocalVarFile) binaryLocalVarFileBytes = fbs binaryLocalVarFileName = binaryLocalVarFile.Name() binaryLocalVarFile.Close() @@ -1307,15 +1307,15 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1326,7 +1326,7 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete } type ApiTestEnumParametersRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi enumHeaderStringArray *[]string enumHeaderString *string @@ -1379,7 +1379,7 @@ func (r ApiTestEnumParametersRequest) EnumFormString(enumFormString string) ApiT return r } -func (r ApiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestEnumParametersRequest) Execute() (*http.Response, error) { return r.ApiService.TestEnumParametersExecute(r) } @@ -1388,10 +1388,10 @@ TestEnumParameters To test enum parameters To test enum parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestEnumParametersRequest */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context) ApiTestEnumParametersRequest { +func (a *FakeApiService) TestEnumParameters(ctx context.Context) ApiTestEnumParametersRequest { return ApiTestEnumParametersRequest{ ApiService: a, ctx: ctx, @@ -1399,23 +1399,23 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context) ApiTestEnumPar } // Execute executes the request -func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.enumQueryStringArray != nil { t := *r.enumQueryStringArray @@ -1476,15 +1476,15 @@ func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersReques return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1495,7 +1495,7 @@ func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersReques } type ApiTestGroupParametersRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi requiredStringGroup *int32 requiredBooleanGroup *bool @@ -1536,7 +1536,7 @@ func (r ApiTestGroupParametersRequest) Int64Group(int64Group int64) ApiTestGroup return r } -func (r ApiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestGroupParametersRequest) Execute() (*http.Response, error) { return r.ApiService.TestGroupParametersExecute(r) } @@ -1545,10 +1545,10 @@ TestGroupParameters Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestGroupParametersRequest */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context) ApiTestGroupParametersRequest { +func (a *FakeApiService) TestGroupParameters(ctx context.Context) ApiTestGroupParametersRequest { return ApiTestGroupParametersRequest{ ApiService: a, ctx: ctx, @@ -1556,23 +1556,23 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context) ApiTestGroupP } // Execute executes the request -func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.requiredStringGroup == nil { return nil, reportError("requiredStringGroup is required and must be specified") } @@ -1622,15 +1622,15 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1641,7 +1641,7 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ } type ApiTestInlineAdditionalPropertiesRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi requestBody *map[string]string } @@ -1652,17 +1652,17 @@ func (r ApiTestInlineAdditionalPropertiesRequest) RequestBody(requestBody map[st return r } -func (r ApiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestInlineAdditionalPropertiesRequest) Execute() (*http.Response, error) { return r.ApiService.TestInlineAdditionalPropertiesExecute(r) } /* TestInlineAdditionalProperties test inline additionalProperties - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestInlineAdditionalPropertiesRequest */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) ApiTestInlineAdditionalPropertiesRequest { +func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context) ApiTestInlineAdditionalPropertiesRequest { return ApiTestInlineAdditionalPropertiesRequest{ ApiService: a, ctx: ctx, @@ -1670,23 +1670,23 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) Ap } // Execute executes the request -func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/inline-additionalProperties" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.requestBody == nil { return nil, reportError("requestBody is required and must be specified") } @@ -1720,15 +1720,15 @@ func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAd return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1739,7 +1739,7 @@ func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAd } type ApiTestJsonFormDataRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi param *string param2 *string @@ -1756,17 +1756,17 @@ func (r ApiTestJsonFormDataRequest) Param2(param2 string) ApiTestJsonFormDataReq return r } -func (r ApiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestJsonFormDataRequest) Execute() (*http.Response, error) { return r.ApiService.TestJsonFormDataExecute(r) } /* TestJsonFormData test json serialization of form data - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestJsonFormDataRequest */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context) ApiTestJsonFormDataRequest { +func (a *FakeApiService) TestJsonFormData(ctx context.Context) ApiTestJsonFormDataRequest { return ApiTestJsonFormDataRequest{ ApiService: a, ctx: ctx, @@ -1774,23 +1774,23 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context) ApiTestJsonFormD } // Execute executes the request -func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/jsonFormData" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.param == nil { return nil, reportError("param is required and must be specified") } @@ -1827,15 +1827,15 @@ func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) ( return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1846,7 +1846,7 @@ func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) ( } type ApiTestQueryParameterCollectionFormatRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi pipe *[]string ioutil *[]string @@ -1876,7 +1876,7 @@ func (r ApiTestQueryParameterCollectionFormatRequest) Context(context []string) return r } -func (r ApiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Response, error) { +func (r ApiTestQueryParameterCollectionFormatRequest) Execute() (*http.Response, error) { return r.ApiService.TestQueryParameterCollectionFormatExecute(r) } @@ -1885,10 +1885,10 @@ TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat To test the collection format in query parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestQueryParameterCollectionFormatRequest */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context) ApiTestQueryParameterCollectionFormatRequest { +func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx context.Context) ApiTestQueryParameterCollectionFormatRequest { return ApiTestQueryParameterCollectionFormatRequest{ ApiService: a, ctx: ctx, @@ -1896,23 +1896,23 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context } // Execute executes the request -func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*_nethttp.Response, error) { +func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/test-query-parameters" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.pipe == nil { return nil, reportError("pipe is required and must be specified") } @@ -1981,15 +1981,15 @@ func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQuer return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -2000,7 +2000,7 @@ func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQuer } type ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeApi queryUnique *[]string headerUnique *[]string @@ -2015,7 +2015,7 @@ func (r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) Header return r } -func (r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) Execute() ([]Pet, *_nethttp.Response, error) { +func (r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) Execute() ([]Pet, *http.Response, error) { return r.ApiService.TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r) } @@ -2024,10 +2024,10 @@ TestUniqueItemsHeaderAndQueryParameterCollectionFormat Method for TestUniqueItem To test unique items in header and query parameters - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest */ -func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormat(ctx _context.Context) ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest { +func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormat(ctx context.Context) ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest { return ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest{ ApiService: a, ctx: ctx, @@ -2036,9 +2036,9 @@ func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormat( // Execute executes the request // @return []Pet -func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) ([]Pet, *_nethttp.Response, error) { +func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) ([]Pet, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile localVarReturnValue []Pet @@ -2046,14 +2046,14 @@ func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatE localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestUniqueItemsHeaderAndQueryParameterCollectionFormat") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/test-unique-parameters" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.queryUnique == nil { return localVarReturnValue, nil, reportError("queryUnique is required and must be specified") } @@ -2100,15 +2100,15 @@ func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatE return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -2117,7 +2117,7 @@ func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatE err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go index a9e7b6279f3e..fef8f4cb3d42 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -12,15 +12,15 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" ) // Linger please var ( - _ _context.Context + _ context.Context ) type FakeClassnameTags123Api interface { @@ -30,21 +30,21 @@ type FakeClassnameTags123Api interface { To test class name in snake case - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestClassnameRequest */ - TestClassname(ctx _context.Context) ApiTestClassnameRequest + TestClassname(ctx context.Context) ApiTestClassnameRequest // TestClassnameExecute executes the request // @return Client - TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) + TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) } // FakeClassnameTags123ApiService FakeClassnameTags123Api service type FakeClassnameTags123ApiService service type ApiTestClassnameRequest struct { - ctx _context.Context + ctx context.Context ApiService FakeClassnameTags123Api client *Client } @@ -55,7 +55,7 @@ func (r ApiTestClassnameRequest) Client(client Client) ApiTestClassnameRequest { return r } -func (r ApiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) { +func (r ApiTestClassnameRequest) Execute() (*Client, *http.Response, error) { return r.ApiService.TestClassnameExecute(r) } @@ -64,10 +64,10 @@ TestClassname To test class name in snake case To test class name in snake case - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiTestClassnameRequest */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) ApiTestClassnameRequest { +func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context) ApiTestClassnameRequest { return ApiTestClassnameRequest{ ApiService: a, ctx: ctx, @@ -76,24 +76,24 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) Api // Execute executes the request // @return Client -func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue Client + localVarReturnValue *Client ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake_classname_test" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.client == nil { return localVarReturnValue, nil, reportError("client is required and must be specified") } @@ -141,15 +141,15 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -158,7 +158,7 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } 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 0b50bc15c5ec..d0b5aff3871b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go @@ -12,17 +12,17 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" "os" ) // Linger please var ( - _ _context.Context + _ context.Context ) type PetApi interface { @@ -30,127 +30,127 @@ type PetApi interface { /* AddPet Add a new pet to the store - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAddPetRequest */ - AddPet(ctx _context.Context) ApiAddPetRequest + AddPet(ctx context.Context) ApiAddPetRequest // AddPetExecute executes the request - AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) + AddPetExecute(r ApiAddPetRequest) (*http.Response, error) /* DeletePet Deletes a pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId Pet id to delete @return ApiDeletePetRequest */ - DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest + DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest // DeletePetExecute executes the request - DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) + DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) /* FindPetsByStatus Finds Pets by status Multiple status values can be provided with comma separated strings - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindPetsByStatusRequest */ - FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest + FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest // FindPetsByStatusExecute executes the request // @return []Pet - FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) + FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) /* FindPetsByTags Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindPetsByTagsRequest Deprecated */ - FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest + FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest // FindPetsByTagsExecute executes the request // @return []Pet // Deprecated - FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) + FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) /* GetPetById Find pet by ID Returns a single pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to return @return ApiGetPetByIdRequest */ - GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest + GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest // GetPetByIdExecute executes the request // @return Pet - GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) + GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) /* UpdatePet Update an existing pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiUpdatePetRequest */ - UpdatePet(ctx _context.Context) ApiUpdatePetRequest + UpdatePet(ctx context.Context) ApiUpdatePetRequest // UpdatePetExecute executes the request - UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) + UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) /* UpdatePetWithForm Updates a pet in the store with form data - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet that needs to be updated @return ApiUpdatePetWithFormRequest */ - UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest + UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest // UpdatePetWithFormExecute executes the request - UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) + UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) /* UploadFile uploads an image - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to update @return ApiUploadFileRequest */ - UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest + UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest // UploadFileExecute executes the request // @return ApiResponse - UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) + UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) /* UploadFileWithRequiredFile uploads an image (required) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to update @return ApiUploadFileWithRequiredFileRequest */ - UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest + UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest // UploadFileWithRequiredFileExecute executes the request // @return ApiResponse - UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) + UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) } // PetApiService PetApi service type PetApiService service type ApiAddPetRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi pet *Pet } @@ -161,17 +161,17 @@ func (r ApiAddPetRequest) Pet(pet Pet) ApiAddPetRequest { return r } -func (r ApiAddPetRequest) Execute() (*_nethttp.Response, error) { +func (r ApiAddPetRequest) Execute() (*http.Response, error) { return r.ApiService.AddPetExecute(r) } /* AddPet Add a new pet to the store - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAddPetRequest */ -func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest { +func (a *PetApiService) AddPet(ctx context.Context) ApiAddPetRequest { return ApiAddPetRequest{ ApiService: a, ctx: ctx, @@ -179,23 +179,23 @@ func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest { } // Execute executes the request -func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) { +func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.pet == nil { return nil, reportError("pet is required and must be specified") } @@ -229,15 +229,15 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, e return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -248,7 +248,7 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, e } type ApiDeletePetRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 apiKey *string @@ -259,18 +259,18 @@ func (r ApiDeletePetRequest) ApiKey(apiKey string) ApiDeletePetRequest { return r } -func (r ApiDeletePetRequest) Execute() (*_nethttp.Response, error) { +func (r ApiDeletePetRequest) Execute() (*http.Response, error) { return r.ApiService.DeletePetExecute(r) } /* DeletePet Deletes a pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId Pet id to delete @return ApiDeletePetRequest */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest { +func (a *PetApiService) DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest { return ApiDeletePetRequest{ ApiService: a, ctx: ctx, @@ -279,24 +279,24 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePe } // Execute executes the request -func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) { +func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -328,15 +328,15 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -347,7 +347,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo } type ApiFindPetsByStatusRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi status *[]string } @@ -359,7 +359,7 @@ func (r ApiFindPetsByStatusRequest) Status(status []string) ApiFindPetsByStatusR return r } -func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) { +func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *http.Response, error) { return r.ApiService.FindPetsByStatusExecute(r) } @@ -368,10 +368,10 @@ FindPetsByStatus Finds Pets by status Multiple status values can be provided with comma separated strings - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindPetsByStatusRequest */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest { +func (a *PetApiService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest { return ApiFindPetsByStatusRequest{ ApiService: a, ctx: ctx, @@ -380,9 +380,9 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStat // Execute executes the request // @return []Pet -func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) { +func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue []Pet @@ -390,14 +390,14 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/findByStatus" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.status == nil { return localVarReturnValue, nil, reportError("status is required and must be specified") } @@ -430,15 +430,15 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -447,7 +447,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -458,7 +458,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ } type ApiFindPetsByTagsRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi tags *[]string } @@ -469,7 +469,7 @@ func (r ApiFindPetsByTagsRequest) Tags(tags []string) ApiFindPetsByTagsRequest { return r } -func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) { +func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *http.Response, error) { return r.ApiService.FindPetsByTagsExecute(r) } @@ -478,12 +478,12 @@ FindPetsByTags Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindPetsByTagsRequest Deprecated */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest { +func (a *PetApiService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest { return ApiFindPetsByTagsRequest{ ApiService: a, ctx: ctx, @@ -493,9 +493,9 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRe // Execute executes the request // @return []Pet // Deprecated -func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) { +func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue []Pet @@ -503,14 +503,14 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/findByTags" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.tags == nil { return localVarReturnValue, nil, reportError("tags is required and must be specified") } @@ -543,15 +543,15 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -560,7 +560,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -571,13 +571,13 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet } type ApiGetPetByIdRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 } -func (r ApiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) { +func (r ApiGetPetByIdRequest) Execute() (*Pet, *http.Response, error) { return r.ApiService.GetPetByIdExecute(r) } @@ -586,11 +586,11 @@ GetPetById Find pet by ID Returns a single pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to return @return ApiGetPetByIdRequest */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest { +func (a *PetApiService) GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest { return ApiGetPetByIdRequest{ ApiService: a, ctx: ctx, @@ -600,25 +600,25 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetB // Execute executes the request // @return Pet -func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) { +func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue Pet + localVarReturnValue *Pet ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -661,15 +661,15 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -678,7 +678,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -689,7 +689,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt } type ApiUpdatePetRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi pet *Pet } @@ -700,17 +700,17 @@ func (r ApiUpdatePetRequest) Pet(pet Pet) ApiUpdatePetRequest { return r } -func (r ApiUpdatePetRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdatePetRequest) Execute() (*http.Response, error) { return r.ApiService.UpdatePetExecute(r) } /* UpdatePet Update an existing pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiUpdatePetRequest */ -func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest { +func (a *PetApiService) UpdatePet(ctx context.Context) ApiUpdatePetRequest { return ApiUpdatePetRequest{ ApiService: a, ctx: ctx, @@ -718,23 +718,23 @@ func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest { } // Execute executes the request -func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) { +func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.pet == nil { return nil, reportError("pet is required and must be specified") } @@ -768,15 +768,15 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -787,7 +787,7 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo } type ApiUpdatePetWithFormRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 name *string @@ -805,18 +805,18 @@ func (r ApiUpdatePetWithFormRequest) Status(status string) ApiUpdatePetWithFormR return r } -func (r ApiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdatePetWithFormRequest) Execute() (*http.Response, error) { return r.ApiService.UpdatePetWithFormExecute(r) } /* UpdatePetWithForm Updates a pet in the store with form data - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet that needs to be updated @return ApiUpdatePetWithFormRequest */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest { +func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest { return ApiUpdatePetWithFormRequest{ ApiService: a, ctx: ctx, @@ -825,24 +825,24 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) Api } // Execute executes the request -func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) { +func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -877,15 +877,15 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -896,7 +896,7 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) } type ApiUploadFileRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 additionalMetadata *string @@ -914,18 +914,18 @@ func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest { return r } -func (r ApiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) { +func (r ApiUploadFileRequest) Execute() (*ApiResponse, *http.Response, error) { return r.ApiService.UploadFileExecute(r) } /* UploadFile uploads an image - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to update @return ApiUploadFileRequest */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest { +func (a *PetApiService) UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest { return ApiUploadFileRequest{ ApiService: a, ctx: ctx, @@ -935,25 +935,25 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadF // Execute executes the request // @return ApiResponse -func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) { +func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue ApiResponse + localVarReturnValue *ApiResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{"multipart/form-data"} @@ -986,7 +986,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, fileLocalVarFile = *r.file } if fileLocalVarFile != nil { - fbs, _ := _ioutil.ReadAll(fileLocalVarFile) + fbs, _ := ioutil.ReadAll(fileLocalVarFile) fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() @@ -1002,15 +1002,15 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1019,7 +1019,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1030,7 +1030,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, } type ApiUploadFileWithRequiredFileRequest struct { - ctx _context.Context + ctx context.Context ApiService PetApi petId int64 requiredFile **os.File @@ -1048,18 +1048,18 @@ func (r ApiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetad return r } -func (r ApiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) { +func (r ApiUploadFileWithRequiredFileRequest) Execute() (*ApiResponse, *http.Response, error) { return r.ApiService.UploadFileWithRequiredFileExecute(r) } /* UploadFileWithRequiredFile uploads an image (required) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param petId ID of pet to update @return ApiUploadFileWithRequiredFileRequest */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest { +func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest { return ApiUploadFileWithRequiredFileRequest{ ApiService: a, ctx: ctx, @@ -1069,25 +1069,25 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i // Execute executes the request // @return ApiResponse -func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) { +func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue ApiResponse + localVarReturnValue *ApiResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.requiredFile == nil { return localVarReturnValue, nil, reportError("requiredFile is required and must be specified") } @@ -1120,7 +1120,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq requiredFileLocalVarFile := *r.requiredFile if requiredFileLocalVarFile != nil { - fbs, _ := _ioutil.ReadAll(requiredFileLocalVarFile) + fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) requiredFileLocalVarFileBytes = fbs requiredFileLocalVarFileName = requiredFileLocalVarFile.Name() requiredFileLocalVarFile.Close() @@ -1136,15 +1136,15 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -1153,7 +1153,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } 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 41c9e8fda94f..3957c73f96ae 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_store.go @@ -12,16 +12,16 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) type StoreApi interface { @@ -31,68 +31,68 @@ type StoreApi interface { For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param orderId ID of the order that needs to be deleted @return ApiDeleteOrderRequest */ - DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest + DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest // DeleteOrderExecute executes the request - DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) + DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) /* GetInventory Returns pet inventories by status Returns a map of status codes to quantities - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetInventoryRequest */ - GetInventory(ctx _context.Context) ApiGetInventoryRequest + GetInventory(ctx context.Context) ApiGetInventoryRequest // GetInventoryExecute executes the request // @return map[string]int32 - GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) + GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *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 - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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 @return ApiGetOrderByIdRequest */ - GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest + GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest // GetOrderByIdExecute executes the request // @return Order - GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) + GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) /* PlaceOrder Place an order for a pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiPlaceOrderRequest */ - PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest + PlaceOrder(ctx context.Context) ApiPlaceOrderRequest // PlaceOrderExecute executes the request // @return Order - PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) + PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) } // StoreApiService StoreApi service type StoreApiService service type ApiDeleteOrderRequest struct { - ctx _context.Context + ctx context.Context ApiService StoreApi orderId string } -func (r ApiDeleteOrderRequest) Execute() (*_nethttp.Response, error) { +func (r ApiDeleteOrderRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteOrderExecute(r) } @@ -101,11 +101,11 @@ DeleteOrder Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param orderId ID of the order that needs to be deleted @return ApiDeleteOrderRequest */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest { +func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest { return ApiDeleteOrderRequest{ ApiService: a, ctx: ctx, @@ -114,24 +114,24 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiD } // Execute executes the request -func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) { +func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.PathEscape(parameterToString(r.orderId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -160,15 +160,15 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -179,12 +179,12 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp } type ApiGetInventoryRequest struct { - ctx _context.Context + ctx context.Context ApiService StoreApi } -func (r ApiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) { +func (r ApiGetInventoryRequest) Execute() (map[string]int32, *http.Response, error) { return r.ApiService.GetInventoryExecute(r) } @@ -193,10 +193,10 @@ GetInventory Returns pet inventories by status Returns a map of status codes to quantities - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetInventoryRequest */ -func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequest { +func (a *StoreApiService) GetInventory(ctx context.Context) ApiGetInventoryRequest { return ApiGetInventoryRequest{ ApiService: a, ctx: ctx, @@ -205,9 +205,9 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequ // Execute executes the request // @return map[string]int32 -func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue map[string]int32 @@ -215,14 +215,14 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/inventory" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -265,15 +265,15 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -282,7 +282,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -293,13 +293,13 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str } type ApiGetOrderByIdRequest struct { - ctx _context.Context + ctx context.Context ApiService StoreApi orderId int64 } -func (r ApiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) { +func (r ApiGetOrderByIdRequest) Execute() (*Order, *http.Response, error) { return r.ApiService.GetOrderByIdExecute(r) } @@ -308,11 +308,11 @@ GetOrderById Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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 @return ApiGetOrderByIdRequest */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest { +func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest { return ApiGetOrderByIdRequest{ ApiService: a, ctx: ctx, @@ -322,25 +322,25 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiG // Execute executes the request // @return Order -func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) { +func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue Order + localVarReturnValue *Order ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.PathEscape(parameterToString(r.orderId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.orderId < 1 { return localVarReturnValue, nil, reportError("orderId must be greater than 1") } @@ -375,15 +375,15 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -392,7 +392,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -403,7 +403,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, } type ApiPlaceOrderRequest struct { - ctx _context.Context + ctx context.Context ApiService StoreApi order *Order } @@ -414,17 +414,17 @@ func (r ApiPlaceOrderRequest) Order(order Order) ApiPlaceOrderRequest { return r } -func (r ApiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) { +func (r ApiPlaceOrderRequest) Execute() (*Order, *http.Response, error) { return r.ApiService.PlaceOrderExecute(r) } /* PlaceOrder Place an order for a pet - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiPlaceOrderRequest */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest { +func (a *StoreApiService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest { return ApiPlaceOrderRequest{ ApiService: a, ctx: ctx, @@ -433,24 +433,24 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest // Execute executes the request // @return Order -func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) { +func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue Order + localVarReturnValue *Order ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.order == nil { return localVarReturnValue, nil, reportError("order is required and must be specified") } @@ -484,15 +484,15 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -501,7 +501,7 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } 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 d67bb32a7e03..b044e87a4353 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_user.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_user.go @@ -12,16 +12,16 @@ package petstore import ( "bytes" - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "context" + "io/ioutil" + "net/http" + "net/url" "strings" ) // Linger please var ( - _ _context.Context + _ context.Context ) type UserApi interface { @@ -31,106 +31,106 @@ type UserApi interface { This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUserRequest */ - CreateUser(ctx _context.Context) ApiCreateUserRequest + CreateUser(ctx context.Context) ApiCreateUserRequest // CreateUserExecute executes the request - CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) + CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) /* CreateUsersWithArrayInput Creates list of users with given input array - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUsersWithArrayInputRequest */ - CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest + CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest // CreateUsersWithArrayInputExecute executes the request - CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) + CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) /* CreateUsersWithListInput Creates list of users with given input array - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUsersWithListInputRequest */ - CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest + CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest // CreateUsersWithListInputExecute executes the request - CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) + CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) /* DeleteUser Delete user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username The name that needs to be deleted @return ApiDeleteUserRequest */ - DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest + DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest // DeleteUserExecute executes the request - DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) + DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) /* GetUserByName Get user by user name - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username The name that needs to be fetched. Use user1 for testing. @return ApiGetUserByNameRequest */ - GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest + GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest // GetUserByNameExecute executes the request // @return User - GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) + GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) /* LoginUser Logs user into the system - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiLoginUserRequest */ - LoginUser(ctx _context.Context) ApiLoginUserRequest + LoginUser(ctx context.Context) ApiLoginUserRequest // LoginUserExecute executes the request // @return string - LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) + LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) /* LogoutUser Logs out current logged in user session - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiLogoutUserRequest */ - LogoutUser(ctx _context.Context) ApiLogoutUserRequest + LogoutUser(ctx context.Context) ApiLogoutUserRequest // LogoutUserExecute executes the request - LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) + LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) /* UpdateUser Updated user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username name that need to be deleted @return ApiUpdateUserRequest */ - UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest + UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest // UpdateUserExecute executes the request - UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) + UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) } // UserApiService UserApi service type UserApiService service type ApiCreateUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi user *User } @@ -141,7 +141,7 @@ func (r ApiCreateUserRequest) User(user User) ApiCreateUserRequest { return r } -func (r ApiCreateUserRequest) Execute() (*_nethttp.Response, error) { +func (r ApiCreateUserRequest) Execute() (*http.Response, error) { return r.ApiService.CreateUserExecute(r) } @@ -150,10 +150,10 @@ CreateUser Create user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUserRequest */ -func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest { +func (a *UserApiService) CreateUser(ctx context.Context) ApiCreateUserRequest { return ApiCreateUserRequest{ ApiService: a, ctx: ctx, @@ -161,23 +161,23 @@ func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest { } // Execute executes the request -func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.user == nil { return nil, reportError("user is required and must be specified") } @@ -211,15 +211,15 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -230,7 +230,7 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re } type ApiCreateUsersWithArrayInputRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi user *[]User } @@ -241,17 +241,17 @@ func (r ApiCreateUsersWithArrayInputRequest) User(user []User) ApiCreateUsersWit return r } -func (r ApiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) { +func (r ApiCreateUsersWithArrayInputRequest) Execute() (*http.Response, error) { return r.ApiService.CreateUsersWithArrayInputExecute(r) } /* CreateUsersWithArrayInput Creates list of users with given input array - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUsersWithArrayInputRequest */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest { +func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest { return ApiCreateUsersWithArrayInputRequest{ ApiService: a, ctx: ctx, @@ -259,23 +259,23 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCrea } // Execute executes the request -func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/createWithArray" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.user == nil { return nil, reportError("user is required and must be specified") } @@ -309,15 +309,15 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -328,7 +328,7 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr } type ApiCreateUsersWithListInputRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi user *[]User } @@ -339,17 +339,17 @@ func (r ApiCreateUsersWithListInputRequest) User(user []User) ApiCreateUsersWith return r } -func (r ApiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) { +func (r ApiCreateUsersWithListInputRequest) Execute() (*http.Response, error) { return r.ApiService.CreateUsersWithListInputExecute(r) } /* CreateUsersWithListInput Creates list of users with given input array - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateUsersWithListInputRequest */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest { +func (a *UserApiService) CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest { return ApiCreateUsersWithListInputRequest{ ApiService: a, ctx: ctx, @@ -357,23 +357,23 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreat } // Execute executes the request -func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/createWithList" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.user == nil { return nil, reportError("user is required and must be specified") } @@ -407,15 +407,15 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -426,13 +426,13 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis } type ApiDeleteUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi username string } -func (r ApiDeleteUserRequest) Execute() (*_nethttp.Response, error) { +func (r ApiDeleteUserRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteUserExecute(r) } @@ -441,11 +441,11 @@ DeleteUser Delete user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username The name that needs to be deleted @return ApiDeleteUserRequest */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest { +func (a *UserApiService) DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest { return ApiDeleteUserRequest{ ApiService: a, ctx: ctx, @@ -454,24 +454,24 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDe } // Execute executes the request -func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) { +func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -500,15 +500,15 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -519,24 +519,24 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re } type ApiGetUserByNameRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi username string } -func (r ApiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) { +func (r ApiGetUserByNameRequest) Execute() (*User, *http.Response, error) { return r.ApiService.GetUserByNameExecute(r) } /* GetUserByName Get user by user name - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username The name that needs to be fetched. Use user1 for testing. @return ApiGetUserByNameRequest */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest { +func (a *UserApiService) GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest { return ApiGetUserByNameRequest{ ApiService: a, ctx: ctx, @@ -546,25 +546,25 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) Ap // Execute executes the request // @return User -func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) { +func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue User + localVarReturnValue *User ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -593,15 +593,15 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -610,7 +610,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -621,7 +621,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, } type ApiLoginUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi username *string password *string @@ -638,17 +638,17 @@ func (r ApiLoginUserRequest) Password(password string) ApiLoginUserRequest { return r } -func (r ApiLoginUserRequest) Execute() (string, *_nethttp.Response, error) { +func (r ApiLoginUserRequest) Execute() (string, *http.Response, error) { return r.ApiService.LoginUserExecute(r) } /* LoginUser Logs user into the system - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiLoginUserRequest */ -func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest { +func (a *UserApiService) LoginUser(ctx context.Context) ApiLoginUserRequest { return ApiLoginUserRequest{ ApiService: a, ctx: ctx, @@ -657,9 +657,9 @@ func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest { // Execute executes the request // @return string -func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) { +func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile localVarReturnValue string @@ -667,14 +667,14 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/login" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.username == nil { return localVarReturnValue, nil, reportError("username is required and must be specified") } @@ -711,15 +711,15 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -728,7 +728,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -739,22 +739,22 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth } type ApiLogoutUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi } -func (r ApiLogoutUserRequest) Execute() (*_nethttp.Response, error) { +func (r ApiLogoutUserRequest) Execute() (*http.Response, error) { return r.ApiService.LogoutUserExecute(r) } /* LogoutUser Logs out current logged in user session - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiLogoutUserRequest */ -func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest { +func (a *UserApiService) LogoutUser(ctx context.Context) ApiLogoutUserRequest { return ApiLogoutUserRequest{ ApiService: a, ctx: ctx, @@ -762,23 +762,23 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest { } // Execute executes the request -func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) { +func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/logout" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -807,15 +807,15 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } @@ -826,7 +826,7 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re } type ApiUpdateUserRequest struct { - ctx _context.Context + ctx context.Context ApiService UserApi username string user *User @@ -838,7 +838,7 @@ func (r ApiUpdateUserRequest) User(user User) ApiUpdateUserRequest { return r } -func (r ApiUpdateUserRequest) Execute() (*_nethttp.Response, error) { +func (r ApiUpdateUserRequest) Execute() (*http.Response, error) { return r.ApiService.UpdateUserExecute(r) } @@ -847,11 +847,11 @@ UpdateUser Updated user This can only be done by the logged in user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username name that need to be deleted @return ApiUpdateUserRequest */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest { +func (a *UserApiService) UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest { return ApiUpdateUserRequest{ ApiService: a, ctx: ctx, @@ -860,24 +860,24 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUp } // Execute executes the request -func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) { +func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} if r.user == nil { return nil, reportError("user is required and must be specified") } @@ -911,15 +911,15 @@ func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Re return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } diff --git a/samples/openapi3/client/petstore/go/go-petstore/client.go b/samples/openapi3/client/petstore/go/go-petstore/client.go index 99eed71f66fd..f0cb83375453 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/client.go @@ -450,6 +450,13 @@ func reportError(format string, a ...interface{}) error { return fmt.Errorf(format, a...) } +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index cd383de7c66c..5ebd96a41591 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -32,8 +32,8 @@ func main() { client := *openapiclient.NewClient() // Client | client model configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Client(client).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Client(client).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md index 90eb907168d5..62cef88c3f64 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md @@ -29,8 +29,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.FooGet(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.FooGet(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.FooGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 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 13dba6a766af..13ee6ee52efa 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md @@ -43,8 +43,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeHealthGet(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeHealthGet(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeHealthGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -105,8 +105,8 @@ func main() { body := true // bool | Input boolean as post body (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -171,8 +171,8 @@ func main() { outerComposite := *openapiclient.NewOuterComposite() // OuterComposite | Input composite as post body (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background()).OuterComposite(outerComposite).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).OuterComposite(outerComposite).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -237,8 +237,8 @@ func main() { body := float32(8.14) // float32 | Input number as post body (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -303,8 +303,8 @@ func main() { body := "body_example" // string | Input string as post body (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -369,8 +369,8 @@ func main() { fileSchemaTestClass := *openapiclient.NewFileSchemaTestClass() // FileSchemaTestClass | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(fileSchemaTestClass).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(fileSchemaTestClass).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -432,8 +432,8 @@ func main() { user := *openapiclient.NewUser() // User | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).User(user).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -497,8 +497,8 @@ func main() { client := *openapiclient.NewClient() // Client | client model configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestClientModel(context.Background()).Client(client).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestClientModel(context.Background()).Client(client).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -577,8 +577,8 @@ func main() { callback := "callback_example" // string | None (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -661,8 +661,8 @@ func main() { enumFormString := "enumFormString_example" // string | Form parameter enum test (string) (optional) (default to "-efg") configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -737,8 +737,8 @@ func main() { int64Group := int64(789) // int64 | Integer in group parameters (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -804,8 +804,8 @@ func main() { requestBody := map[string]string{"key": "Inner_example"} // map[string]string | request body configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background()).RequestBody(requestBody).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).RequestBody(requestBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -867,8 +867,8 @@ func main() { param2 := "param2_example" // string | field2 configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -936,8 +936,8 @@ func main() { context := []string{"Inner_example"} // []string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1005,8 +1005,8 @@ func main() { headerUnique := []string{"Inner_example"} // []string | configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).QueryUnique(queryUnique).HeaderUnique(headerUnique).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).QueryUnique(queryUnique).HeaderUnique(headerUnique).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index 27a260ff8130..688b50aa273f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -32,8 +32,8 @@ func main() { client := *openapiclient.NewClient() // Client | client model configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background()).Client(client).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Client(client).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 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 c99794e706dc..c0522b43c9af 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md @@ -38,8 +38,8 @@ func main() { pet := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.AddPet(context.Background()).Pet(pet).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.AddPet(context.Background()).Pet(pet).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -101,8 +101,8 @@ func main() { apiKey := "apiKey_example" // string | (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.DeletePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -170,8 +170,8 @@ func main() { status := []string{"Status_example"} // []string | Status values that need to be considered for filter configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -236,8 +236,8 @@ func main() { tags := []string{"Inner_example"} // []string | Tags to filter by configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -302,8 +302,8 @@ func main() { petId := int64(789) // int64 | ID of pet to return configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.GetPetById(context.Background(), petId).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.GetPetById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -370,8 +370,8 @@ func main() { pet := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UpdatePet(context.Background()).Pet(pet).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.UpdatePet(context.Background()).Pet(pet).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -434,8 +434,8 @@ func main() { status := "status_example" // string | Updated status of the pet (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePetWithForm``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -504,8 +504,8 @@ func main() { file := os.NewFile(1234, "some_file") // *os.File | file to upload (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -576,8 +576,8 @@ func main() { additionalMetadata := "additionalMetadata_example" // string | Additional data to pass to server (optional) configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md index 067ea3825762..70c0692ef118 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md @@ -35,8 +35,8 @@ func main() { orderId := "orderId_example" // string | ID of the order that needs to be deleted configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.DeleteOrder(context.Background(), orderId).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.DeleteOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -102,8 +102,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.GetInventory(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StoreApi.GetInventory(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -164,8 +164,8 @@ func main() { orderId := int64(789) // int64 | ID of pet that needs to be fetched configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.GetOrderById(context.Background(), orderId).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetOrderById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -232,8 +232,8 @@ func main() { order := *openapiclient.NewOrder() // Order | order placed for purchasing the pet configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.PlaceOrder(context.Background()).Order(order).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StoreApi.PlaceOrder(context.Background()).Order(order).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md index dbbbe3fa792e..3176eadbd76a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md @@ -39,8 +39,8 @@ func main() { user := *openapiclient.NewUser() // User | Created user object configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUser(context.Background()).User(user).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.CreateUser(context.Background()).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -101,8 +101,8 @@ func main() { user := []openapiclient.User{*openapiclient.NewUser()} // []User | List of user object configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background()).User(user).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -163,8 +163,8 @@ func main() { user := []openapiclient.User{*openapiclient.NewUser()} // []User | List of user object configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background()).User(user).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -227,8 +227,8 @@ func main() { username := "username_example" // string | The name that needs to be deleted configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.DeleteUser(context.Background(), username).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.DeleteUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -293,8 +293,8 @@ func main() { username := "username_example" // string | The name that needs to be fetched. Use user1 for testing. configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.GetUserByName(context.Background(), username).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserByName``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -362,8 +362,8 @@ func main() { password := "password_example" // string | The password for login in clear text configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -426,8 +426,8 @@ import ( func main() { configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.LogoutUser(context.Background()).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.LogoutUser(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -487,8 +487,8 @@ func main() { user := *openapiclient.NewUser() // User | Updated user object configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username).User(user).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserApi.UpdateUser(context.Background(), username).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/go.mod b/samples/openapi3/client/petstore/go/go-petstore/go.mod index 0f43de9ebb2c..ead32606c72d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/go.mod +++ b/samples/openapi3/client/petstore/go/go-petstore/go.mod @@ -3,5 +3,5 @@ module github.com/GIT_USER_ID/GIT_REPO_ID go 1.13 require ( - golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 ) 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 f4f77661d45f..56dcc6c3c94b 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 @@ -16,7 +16,7 @@ import ( // ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly type ArrayOfArrayOfNumberOnly struct { - ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` + ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"` AdditionalProperties map[string]interface{} } @@ -45,12 +45,12 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { var ret [][]float32 return ret } - return *o.ArrayArrayNumber + return o.ArrayArrayNumber } // GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() (*[][]float32, bool) { +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { if o == nil || o.ArrayArrayNumber == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool { // SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) { - o.ArrayArrayNumber = &v + o.ArrayArrayNumber = v } func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, 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 3f099edff2ab..36e967f70a69 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 @@ -16,7 +16,7 @@ import ( // ArrayOfNumberOnly struct for ArrayOfNumberOnly type ArrayOfNumberOnly struct { - ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` + ArrayNumber []float32 `json:"ArrayNumber,omitempty"` AdditionalProperties map[string]interface{} } @@ -45,12 +45,12 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { var ret []float32 return ret } - return *o.ArrayNumber + return o.ArrayNumber } // GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayOfNumberOnly) GetArrayNumberOk() (*[]float32, bool) { +func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { if o == nil || o.ArrayNumber == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *ArrayOfNumberOnly) HasArrayNumber() bool { // SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) { - o.ArrayNumber = &v + o.ArrayNumber = v } func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, 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 82ab2eaaf84c..aa07cef3a3c6 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 @@ -16,9 +16,9 @@ import ( // ArrayTest struct for ArrayTest type ArrayTest struct { - ArrayOfString *[]string `json:"array_of_string,omitempty"` - ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"` - ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` + ArrayOfString []string `json:"array_of_string,omitempty"` + ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty"` + ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` AdditionalProperties map[string]interface{} } @@ -47,12 +47,12 @@ func (o *ArrayTest) GetArrayOfString() []string { var ret []string return ret } - return *o.ArrayOfString + return o.ArrayOfString } // GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayOfStringOk() (*[]string, bool) { +func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { if o == nil || o.ArrayOfString == nil { return nil, false } @@ -70,7 +70,7 @@ func (o *ArrayTest) HasArrayOfString() bool { // SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. func (o *ArrayTest) SetArrayOfString(v []string) { - o.ArrayOfString = &v + o.ArrayOfString = v } // GetArrayArrayOfInteger returns the ArrayArrayOfInteger field value if set, zero value otherwise. @@ -79,12 +79,12 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { var ret [][]int64 return ret } - return *o.ArrayArrayOfInteger + return o.ArrayArrayOfInteger } // GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayArrayOfIntegerOk() (*[][]int64, bool) { +func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { if o == nil || o.ArrayArrayOfInteger == nil { return nil, false } @@ -102,7 +102,7 @@ func (o *ArrayTest) HasArrayArrayOfInteger() bool { // SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) { - o.ArrayArrayOfInteger = &v + o.ArrayArrayOfInteger = v } // GetArrayArrayOfModel returns the ArrayArrayOfModel field value if set, zero value otherwise. @@ -111,12 +111,12 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { var ret [][]ReadOnlyFirst return ret } - return *o.ArrayArrayOfModel + return o.ArrayArrayOfModel } // GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayArrayOfModelOk() (*[][]ReadOnlyFirst, bool) { +func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { if o == nil || o.ArrayArrayOfModel == nil { return nil, false } @@ -134,7 +134,7 @@ func (o *ArrayTest) HasArrayArrayOfModel() bool { // SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) { - o.ArrayArrayOfModel = &v + o.ArrayArrayOfModel = v } func (o ArrayTest) MarshalJSON() ([]byte, 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 b602cc1122f3..9ed5be80d6ce 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 @@ -17,7 +17,7 @@ import ( // EnumArrays struct for EnumArrays type EnumArrays struct { JustSymbol *string `json:"just_symbol,omitempty"` - ArrayEnum *[]string `json:"array_enum,omitempty"` + ArrayEnum []string `json:"array_enum,omitempty"` AdditionalProperties map[string]interface{} } @@ -78,12 +78,12 @@ func (o *EnumArrays) GetArrayEnum() []string { var ret []string return ret } - return *o.ArrayEnum + return o.ArrayEnum } // GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumArrays) GetArrayEnumOk() (*[]string, bool) { +func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { if o == nil || o.ArrayEnum == nil { return nil, false } @@ -101,7 +101,7 @@ func (o *EnumArrays) HasArrayEnum() bool { // SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. func (o *EnumArrays) SetArrayEnum(v []string) { - o.ArrayEnum = &v + o.ArrayEnum = v } func (o EnumArrays) MarshalJSON() ([]byte, 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 49c463209dfb..a61e7d43a7be 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 @@ -17,7 +17,7 @@ import ( // FileSchemaTestClass struct for FileSchemaTestClass type FileSchemaTestClass struct { File *File `json:"file,omitempty"` - Files *[]File `json:"files,omitempty"` + Files []File `json:"files,omitempty"` AdditionalProperties map[string]interface{} } @@ -78,12 +78,12 @@ func (o *FileSchemaTestClass) GetFiles() []File { var ret []File return ret } - return *o.Files + return o.Files } // GetFilesOk returns a tuple with the Files field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FileSchemaTestClass) GetFilesOk() (*[]File, bool) { +func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { if o == nil || o.Files == nil { return nil, false } @@ -101,7 +101,7 @@ func (o *FileSchemaTestClass) HasFiles() bool { // SetFiles gets a reference to the given []File and assigns it to the Files field. func (o *FileSchemaTestClass) SetFiles(v []File) { - o.Files = &v + o.Files = v } func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_fruit.go b/samples/openapi3/client/petstore/go/go-petstore/model_fruit.go index 555b8ab7484f..74b0aa52b3c3 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_fruit.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_fruit.go @@ -23,12 +23,16 @@ type Fruit struct { // AppleAsFruit is a convenience function that returns Apple wrapped in Fruit func AppleAsFruit(v *Apple) Fruit { - return Fruit{ Apple: v} + return Fruit{ + Apple: v, + } } // BananaAsFruit is a convenience function that returns Banana wrapped in Fruit func BananaAsFruit(v *Banana) Fruit { - return Fruit{ Banana: v} + return Fruit{ + Banana: v, + } } @@ -37,7 +41,7 @@ func (dst *Fruit) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into Apple - err = json.Unmarshal(data, &dst.Apple) + err = newStrictDecoder(data).Decode(&dst.Apple) if err == nil { jsonApple, _ := json.Marshal(dst.Apple) if string(jsonApple) == "{}" { // empty struct @@ -50,7 +54,7 @@ func (dst *Fruit) UnmarshalJSON(data []byte) error { } // try to unmarshal data into Banana - err = json.Unmarshal(data, &dst.Banana) + err = newStrictDecoder(data).Decode(&dst.Banana) if err == nil { jsonBanana, _ := json.Marshal(dst.Banana) if string(jsonBanana) == "{}" { // empty struct @@ -90,6 +94,9 @@ func (src Fruit) MarshalJSON() ([]byte, error) { // Get the actual instance func (obj *Fruit) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } if obj.Apple != nil { return obj.Apple } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_fruit_req.go b/samples/openapi3/client/petstore/go/go-petstore/model_fruit_req.go index c3d6ea1cea6c..82ff8714324a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_fruit_req.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_fruit_req.go @@ -23,12 +23,16 @@ type FruitReq struct { // AppleReqAsFruitReq is a convenience function that returns AppleReq wrapped in FruitReq func AppleReqAsFruitReq(v *AppleReq) FruitReq { - return FruitReq{ AppleReq: v} + return FruitReq{ + AppleReq: v, + } } // BananaReqAsFruitReq is a convenience function that returns BananaReq wrapped in FruitReq func BananaReqAsFruitReq(v *BananaReq) FruitReq { - return FruitReq{ BananaReq: v} + return FruitReq{ + BananaReq: v, + } } @@ -37,7 +41,7 @@ func (dst *FruitReq) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into AppleReq - err = json.Unmarshal(data, &dst.AppleReq) + err = newStrictDecoder(data).Decode(&dst.AppleReq) if err == nil { jsonAppleReq, _ := json.Marshal(dst.AppleReq) if string(jsonAppleReq) == "{}" { // empty struct @@ -50,7 +54,7 @@ func (dst *FruitReq) UnmarshalJSON(data []byte) error { } // try to unmarshal data into BananaReq - err = json.Unmarshal(data, &dst.BananaReq) + err = newStrictDecoder(data).Decode(&dst.BananaReq) if err == nil { jsonBananaReq, _ := json.Marshal(dst.BananaReq) if string(jsonBananaReq) == "{}" { // empty struct @@ -90,6 +94,9 @@ func (src FruitReq) MarshalJSON() ([]byte, error) { // Get the actual instance func (obj *FruitReq) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } if obj.AppleReq != nil { return obj.AppleReq } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object.go b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object.go index 6922f820e8a2..9b407ec01867 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object.go @@ -19,7 +19,7 @@ type InlineObject struct { // Updated name of the pet Name *string `json:"name,omitempty"` // Updated status of the pet - Status *string `json:"status,omitempty"` + Status *string `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -175,5 +175,3 @@ func (v *NullableInlineObject) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_1.go b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_1.go index 877677710ec2..ee4202e1e667 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_1.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_1.go @@ -20,7 +20,7 @@ type InlineObject1 struct { // Additional data to pass to server AdditionalMetadata *string `json:"additionalMetadata,omitempty"` // file to upload - File **os.File `json:"file,omitempty"` + File **os.File `json:"file,omitempty"` AdditionalProperties map[string]interface{} } @@ -176,5 +176,3 @@ func (v *NullableInlineObject1) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_2.go b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_2.go index 8b9d4b66db34..889cced58b53 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_2.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_2.go @@ -19,7 +19,7 @@ type InlineObject2 struct { // Form parameter enum test (string array) EnumFormStringArray *[]string `json:"enum_form_string_array,omitempty"` // Form parameter enum test (string) - EnumFormString *string `json:"enum_form_string,omitempty"` + EnumFormString *string `json:"enum_form_string,omitempty"` AdditionalProperties map[string]interface{} } @@ -179,5 +179,3 @@ func (v *NullableInlineObject2) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_3.go b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_3.go index 4c31bcd015dc..e85cadf01cd0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_3.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_3.go @@ -45,7 +45,7 @@ type InlineObject3 struct { // None Password *string `json:"password,omitempty"` // None - Callback *string `json:"callback,omitempty"` + Callback *string `json:"callback,omitempty"` AdditionalProperties map[string]interface{} } @@ -55,7 +55,7 @@ type _InlineObject3 InlineObject3 // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string, ) *InlineObject3 { +func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string) *InlineObject3 { this := InlineObject3{} this.Number = number this.Double = double @@ -170,7 +170,7 @@ func (o *InlineObject3) SetInt64(v int64) { // GetNumber returns the Number field value func (o *InlineObject3) GetNumber() float32 { - if o == nil { + if o == nil { var ret float32 return ret } @@ -181,7 +181,7 @@ func (o *InlineObject3) GetNumber() float32 { // GetNumberOk returns a tuple with the Number field value // and a boolean to check if the value has been set. func (o *InlineObject3) GetNumberOk() (*float32, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Number, true @@ -226,7 +226,7 @@ func (o *InlineObject3) SetFloat(v float32) { // GetDouble returns the Double field value func (o *InlineObject3) GetDouble() float64 { - if o == nil { + if o == nil { var ret float64 return ret } @@ -237,7 +237,7 @@ func (o *InlineObject3) GetDouble() float64 { // GetDoubleOk returns a tuple with the Double field value // and a boolean to check if the value has been set. func (o *InlineObject3) GetDoubleOk() (*float64, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Double, true @@ -282,7 +282,7 @@ func (o *InlineObject3) SetString(v string) { // GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field value func (o *InlineObject3) GetPatternWithoutDelimiter() string { - if o == nil { + if o == nil { var ret string return ret } @@ -293,7 +293,7 @@ func (o *InlineObject3) GetPatternWithoutDelimiter() string { // GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field value // and a boolean to check if the value has been set. func (o *InlineObject3) GetPatternWithoutDelimiterOk() (*string, bool) { - if o == nil { + if o == nil { return nil, false } return &o.PatternWithoutDelimiter, true @@ -306,7 +306,7 @@ func (o *InlineObject3) SetPatternWithoutDelimiter(v string) { // GetByte returns the Byte field value func (o *InlineObject3) GetByte() string { - if o == nil { + if o == nil { var ret string return ret } @@ -317,7 +317,7 @@ func (o *InlineObject3) GetByte() string { // GetByteOk returns a tuple with the Byte field value // and a boolean to check if the value has been set. func (o *InlineObject3) GetByteOk() (*string, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Byte, true @@ -605,5 +605,3 @@ func (v *NullableInlineObject3) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_4.go b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_4.go index 11ae1c06c47c..bf0e5771b2ae 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_4.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_4.go @@ -19,7 +19,7 @@ type InlineObject4 struct { // field1 Param string `json:"param"` // field2 - Param2 string `json:"param2"` + Param2 string `json:"param2"` AdditionalProperties map[string]interface{} } @@ -29,7 +29,7 @@ type _InlineObject4 InlineObject4 // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInlineObject4(param string, param2 string, ) *InlineObject4 { +func NewInlineObject4(param string, param2 string) *InlineObject4 { this := InlineObject4{} this.Param = param this.Param2 = param2 @@ -46,7 +46,7 @@ func NewInlineObject4WithDefaults() *InlineObject4 { // GetParam returns the Param field value func (o *InlineObject4) GetParam() string { - if o == nil { + if o == nil { var ret string return ret } @@ -57,7 +57,7 @@ func (o *InlineObject4) GetParam() string { // GetParamOk returns a tuple with the Param field value // and a boolean to check if the value has been set. func (o *InlineObject4) GetParamOk() (*string, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Param, true @@ -70,7 +70,7 @@ func (o *InlineObject4) SetParam(v string) { // GetParam2 returns the Param2 field value func (o *InlineObject4) GetParam2() string { - if o == nil { + if o == nil { var ret string return ret } @@ -81,7 +81,7 @@ func (o *InlineObject4) GetParam2() string { // GetParam2Ok returns a tuple with the Param2 field value // and a boolean to check if the value has been set. func (o *InlineObject4) GetParam2Ok() (*string, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Param2, true @@ -161,5 +161,3 @@ func (v *NullableInlineObject4) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_5.go b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_5.go index b60d46fc04d0..aacdd7db6e99 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_5.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_inline_object_5.go @@ -20,7 +20,7 @@ type InlineObject5 struct { // Additional data to pass to server AdditionalMetadata *string `json:"additionalMetadata,omitempty"` // file to upload - RequiredFile *os.File `json:"requiredFile"` + RequiredFile *os.File `json:"requiredFile"` AdditionalProperties map[string]interface{} } @@ -30,7 +30,7 @@ type _InlineObject5 InlineObject5 // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInlineObject5(requiredFile *os.File, ) *InlineObject5 { +func NewInlineObject5(requiredFile *os.File) *InlineObject5 { this := InlineObject5{} this.RequiredFile = requiredFile return &this @@ -78,7 +78,7 @@ func (o *InlineObject5) SetAdditionalMetadata(v string) { // GetRequiredFile returns the RequiredFile field value func (o *InlineObject5) GetRequiredFile() *os.File { - if o == nil { + if o == nil { var ret *os.File return ret } @@ -89,7 +89,7 @@ func (o *InlineObject5) GetRequiredFile() *os.File { // GetRequiredFileOk returns a tuple with the RequiredFile field value // and a boolean to check if the value has been set. func (o *InlineObject5) GetRequiredFileOk() (**os.File, bool) { - if o == nil { + if o == nil { return nil, false } return &o.RequiredFile, true @@ -169,5 +169,3 @@ func (v *NullableInlineObject5) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_mammal.go b/samples/openapi3/client/petstore/go/go-petstore/model_mammal.go index a67af74d5823..7f899aa6db7e 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_mammal.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_mammal.go @@ -23,12 +23,16 @@ type Mammal struct { // WhaleAsMammal is a convenience function that returns Whale wrapped in Mammal func WhaleAsMammal(v *Whale) Mammal { - return Mammal{ Whale: v} + return Mammal{ + Whale: v, + } } // ZebraAsMammal is a convenience function that returns Zebra wrapped in Mammal func ZebraAsMammal(v *Zebra) Mammal { - return Mammal{ Zebra: v} + return Mammal{ + Zebra: v, + } } @@ -37,7 +41,7 @@ func (dst *Mammal) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into Whale - err = json.Unmarshal(data, &dst.Whale) + err = newStrictDecoder(data).Decode(&dst.Whale) if err == nil { jsonWhale, _ := json.Marshal(dst.Whale) if string(jsonWhale) == "{}" { // empty struct @@ -50,7 +54,7 @@ func (dst *Mammal) UnmarshalJSON(data []byte) error { } // try to unmarshal data into Zebra - err = json.Unmarshal(data, &dst.Zebra) + err = newStrictDecoder(data).Decode(&dst.Zebra) if err == nil { jsonZebra, _ := json.Marshal(dst.Zebra) if string(jsonZebra) == "{}" { // empty struct @@ -90,6 +94,9 @@ func (src Mammal) MarshalJSON() ([]byte, error) { // Get the actual instance func (obj *Mammal) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } if obj.Whale != nil { return obj.Whale } 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 b46f891329eb..dbf4bfdbb894 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 @@ -25,10 +25,10 @@ type NullableClass struct { DatetimeProp NullableTime `json:"datetime_prop,omitempty"` ArrayNullableProp []map[string]interface{} `json:"array_nullable_prop,omitempty"` ArrayAndItemsNullableProp []*map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` - ArrayItemsNullable *[]*map[string]interface{} `json:"array_items_nullable,omitempty"` + ArrayItemsNullable []*map[string]interface{} `json:"array_items_nullable,omitempty"` ObjectNullableProp map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` ObjectAndItemsNullableProp map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` - ObjectItemsNullable *map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` + ObjectItemsNullable map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` } // NewNullableClass instantiates a new NullableClass object @@ -316,11 +316,11 @@ func (o *NullableClass) GetArrayNullableProp() []map[string]interface{} { // GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NullableClass) GetArrayNullablePropOk() (*[]map[string]interface{}, bool) { +func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool) { if o == nil || o.ArrayNullableProp == nil { return nil, false } - return &o.ArrayNullableProp, true + return o.ArrayNullableProp, true } // HasArrayNullableProp returns a boolean if a field has been set. @@ -349,11 +349,11 @@ func (o *NullableClass) GetArrayAndItemsNullableProp() []*map[string]interface{} // GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NullableClass) GetArrayAndItemsNullablePropOk() (*[]*map[string]interface{}, bool) { +func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]*map[string]interface{}, bool) { if o == nil || o.ArrayAndItemsNullableProp == nil { return nil, false } - return &o.ArrayAndItemsNullableProp, true + return o.ArrayAndItemsNullableProp, true } // HasArrayAndItemsNullableProp returns a boolean if a field has been set. @@ -376,12 +376,12 @@ func (o *NullableClass) GetArrayItemsNullable() []*map[string]interface{} { var ret []*map[string]interface{} return ret } - return *o.ArrayItemsNullable + return o.ArrayItemsNullable } // GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetArrayItemsNullableOk() (*[]*map[string]interface{}, bool) { +func (o *NullableClass) GetArrayItemsNullableOk() ([]*map[string]interface{}, bool) { if o == nil || o.ArrayItemsNullable == nil { return nil, false } @@ -399,7 +399,7 @@ func (o *NullableClass) HasArrayItemsNullable() bool { // SetArrayItemsNullable gets a reference to the given []*map[string]interface{} and assigns it to the ArrayItemsNullable field. func (o *NullableClass) SetArrayItemsNullable(v []*map[string]interface{}) { - o.ArrayItemsNullable = &v + o.ArrayItemsNullable = v } // GetObjectNullableProp returns the ObjectNullableProp field value if set, zero value otherwise (both if not set or set to explicit null). @@ -414,11 +414,11 @@ func (o *NullableClass) GetObjectNullableProp() map[string]map[string]interface{ // GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NullableClass) GetObjectNullablePropOk() (*map[string]map[string]interface{}, bool) { +func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool) { if o == nil || o.ObjectNullableProp == nil { return nil, false } - return &o.ObjectNullableProp, true + return o.ObjectNullableProp, true } // HasObjectNullableProp returns a boolean if a field has been set. @@ -447,11 +447,11 @@ func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]in // GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NullableClass) GetObjectAndItemsNullablePropOk() (*map[string]map[string]interface{}, bool) { +func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool) { if o == nil || o.ObjectAndItemsNullableProp == nil { return nil, false } - return &o.ObjectAndItemsNullableProp, true + return o.ObjectAndItemsNullableProp, true } // HasObjectAndItemsNullableProp returns a boolean if a field has been set. @@ -474,12 +474,12 @@ func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface var ret map[string]map[string]interface{} return ret } - return *o.ObjectItemsNullable + return o.ObjectItemsNullable } // GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetObjectItemsNullableOk() (*map[string]map[string]interface{}, bool) { +func (o *NullableClass) GetObjectItemsNullableOk() (map[string]map[string]interface{}, bool) { if o == nil || o.ObjectItemsNullable == nil { return nil, false } @@ -497,7 +497,7 @@ func (o *NullableClass) HasObjectItemsNullable() bool { // SetObjectItemsNullable gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectItemsNullable field. func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface{}) { - o.ObjectItemsNullable = &v + o.ObjectItemsNullable = v } func (o NullableClass) MarshalJSON() ([]byte, error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_outer_object_with_enum_property.go b/samples/openapi3/client/petstore/go/go-petstore/model_outer_object_with_enum_property.go index ed972e498d2e..bdde33f4417a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_outer_object_with_enum_property.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_outer_object_with_enum_property.go @@ -50,7 +50,7 @@ func (o *OuterObjectWithEnumProperty) GetValue() OuterEnumInteger { // GetValueOk returns a tuple with the Value field value // and a boolean to check if the value has been set. func (o *OuterObjectWithEnumProperty) GetValueOk() (*OuterEnumInteger, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Value, true @@ -104,5 +104,3 @@ func (v *NullableOuterObjectWithEnumProperty) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - 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 6a856bf7689c..8dffc304e742 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go @@ -20,7 +20,7 @@ type Pet struct { Category *Category `json:"category,omitempty"` Name string `json:"name"` PhotoUrls []string `json:"photoUrls"` - Tags *[]Tag `json:"tags,omitempty"` + Tags []Tag `json:"tags,omitempty"` // pet status in the store // Deprecated Status *string `json:"status,omitempty"` @@ -148,11 +148,11 @@ func (o *Pet) GetPhotoUrls() []string { // GetPhotoUrlsOk returns a tuple with the PhotoUrls field value // and a boolean to check if the value has been set. -func (o *Pet) GetPhotoUrlsOk() (*[]string, bool) { +func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { if o == nil { return nil, false } - return &o.PhotoUrls, true + return o.PhotoUrls, true } // SetPhotoUrls sets field value @@ -166,12 +166,12 @@ func (o *Pet) GetTags() []Tag { var ret []Tag return ret } - return *o.Tags + return o.Tags } // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetTagsOk() (*[]Tag, bool) { +func (o *Pet) GetTagsOk() ([]Tag, bool) { if o == nil || o.Tags == nil { return nil, false } @@ -189,7 +189,7 @@ func (o *Pet) HasTags() bool { // SetTags gets a reference to the given []Tag and assigns it to the Tags field. func (o *Pet) SetTags(v []Tag) { - o.Tags = &v + o.Tags = v } // GetStatus returns the Status field value if set, zero value otherwise. 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 85271ee249ed..a4b6dc232ef6 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_user.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_user.go @@ -26,7 +26,7 @@ type User struct { // User Status UserStatus *int32 `json:"userStatus,omitempty"` // test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - ArbitraryObject *map[string]interface{} `json:"arbitraryObject,omitempty"` + ArbitraryObject map[string]interface{} `json:"arbitraryObject,omitempty"` // test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. ArbitraryNullableObject map[string]interface{} `json:"arbitraryNullableObject,omitempty"` // test code generation for any type Value can be any type - string, number, boolean, array or object. @@ -317,12 +317,12 @@ func (o *User) GetArbitraryObject() map[string]interface{} { var ret map[string]interface{} return ret } - return *o.ArbitraryObject + return o.ArbitraryObject } // GetArbitraryObjectOk returns a tuple with the ArbitraryObject field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetArbitraryObjectOk() (*map[string]interface{}, bool) { +func (o *User) GetArbitraryObjectOk() (map[string]interface{}, bool) { if o == nil || o.ArbitraryObject == nil { return nil, false } @@ -340,7 +340,7 @@ func (o *User) HasArbitraryObject() bool { // SetArbitraryObject gets a reference to the given map[string]interface{} and assigns it to the ArbitraryObject field. func (o *User) SetArbitraryObject(v map[string]interface{}) { - o.ArbitraryObject = &v + o.ArbitraryObject = v } // GetArbitraryNullableObject returns the ArbitraryNullableObject field value if set, zero value otherwise (both if not set or set to explicit null). @@ -355,11 +355,11 @@ func (o *User) GetArbitraryNullableObject() map[string]interface{} { // GetArbitraryNullableObjectOk returns a tuple with the ArbitraryNullableObject field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *User) GetArbitraryNullableObjectOk() (*map[string]interface{}, bool) { +func (o *User) GetArbitraryNullableObjectOk() (map[string]interface{}, bool) { if o == nil || o.ArbitraryNullableObject == nil { return nil, false } - return &o.ArbitraryNullableObject, true + return o.ArbitraryNullableObject, true } // HasArbitraryNullableObject returns a boolean if a field has been set. diff --git a/samples/openapi3/client/petstore/go/go.mod b/samples/openapi3/client/petstore/go/go.mod new file mode 100644 index 000000000000..a35619c519fc --- /dev/null +++ b/samples/openapi3/client/petstore/go/go.mod @@ -0,0 +1,11 @@ +module github.com/OpenAPITools/openapi-generator/samples/openapi3/client/petstore/go + +go 1.16 + +replace go-petstore => ./go-petstore + +require ( + github.com/stretchr/testify v1.7.0 + go-petstore v0.0.0-00010101000000-000000000000 + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 +) diff --git a/samples/openapi3/client/petstore/go/go.sum b/samples/openapi3/client/petstore/go/go.sum new file mode 100644 index 000000000000..0df1d1a38a06 --- /dev/null +++ b/samples/openapi3/client/petstore/go/go.sum @@ -0,0 +1,371 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +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/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= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +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/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= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +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/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= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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/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= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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/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/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= +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= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +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/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= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +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/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= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +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/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= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +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= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +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/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= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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/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/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= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +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/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= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +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/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= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +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= +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= +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= +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= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/samples/openapi3/client/petstore/go/http_signature_test.go b/samples/openapi3/client/petstore/go/http_signature_test.go index 6348599111a6..104cd00f03ef 100644 --- a/samples/openapi3/client/petstore/go/http_signature_test.go +++ b/samples/openapi3/client/petstore/go/http_signature_test.go @@ -30,7 +30,7 @@ import ( "testing" "time" - sw "./go-petstore" + sw "go-petstore" ) // Test RSA private key as published in Appendix C 'Test Values' of @@ -276,7 +276,7 @@ func executeHttpSignatureAuth(t *testing.T, authConfig *sw.HttpSignatureAuth, ex newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) fmt.Printf("Request with HTTP signature. Scheme: '%s'. Algorithm: '%s'. MaxValidity: %v. Headers: '%v'\n", authConfig.SigningScheme, authConfig.SigningAlgorithm, authConfig.SignatureMaxValidity, authConfig.SignedHeaders) diff --git a/samples/openapi3/client/petstore/go/model_test.go b/samples/openapi3/client/petstore/go/model_test.go index 39e73f008406..0d7035eec85a 100644 --- a/samples/openapi3/client/petstore/go/model_test.go +++ b/samples/openapi3/client/petstore/go/model_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "testing" - sw "./go-petstore" "github.com/stretchr/testify/assert" + sw "go-petstore" ) func TestBanana(t *testing.T) { diff --git a/samples/openapi3/client/petstore/go/nullable_marshalling_test.go b/samples/openapi3/client/petstore/go/nullable_marshalling_test.go index 6422846c29e1..1ad208b13c98 100644 --- a/samples/openapi3/client/petstore/go/nullable_marshalling_test.go +++ b/samples/openapi3/client/petstore/go/nullable_marshalling_test.go @@ -1,71 +1,71 @@ package main import ( - "encoding/json" - "fmt" - "testing" + "encoding/json" + "fmt" + "testing" - sw "./go-petstore" + sw "go-petstore" ) func TestNullableMarshalling(t *testing.T) { - var fv float32 = 1.1 - nc := sw.NullableClass{ - IntegerProp: *sw.NewNullableInt32(nil), - NumberProp: *sw.NewNullableFloat32(&fv), - // BooleanProp is also nullable, but we leave it unset, so it shouldn't be in the JSON - } - res, err := json.Marshal(nc) - if err != nil { - t.Errorf("Error while marshalling structure with Nullables: %v", err) - } - expected := `{"integer_prop":null,"number_prop":1.1}` - assertStringsEqual(t, expected, string(res)) - // try unmarshalling now - var unc sw.NullableClass - err = json.Unmarshal(res, &unc) - if err != nil { - t.Errorf("Error while unmarshalling structure with Nullables: %v", err) - } - if unc.BooleanProp.IsSet() || unc.BooleanProp.Get() != nil { - t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc.BooleanProp) - } - if !unc.IntegerProp.IsSet() || unc.IntegerProp.Get() != nil { - t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc.IntegerProp) - } - if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv { - t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp) - } + var fv float32 = 1.1 + nc := sw.NullableClass{ + IntegerProp: *sw.NewNullableInt32(nil), + NumberProp: *sw.NewNullableFloat32(&fv), + // BooleanProp is also nullable, but we leave it unset, so it shouldn't be in the JSON + } + res, err := json.Marshal(nc) + if err != nil { + t.Errorf("Error while marshalling structure with Nullables: %v", err) + } + expected := `{"integer_prop":null,"number_prop":1.1}` + assertStringsEqual(t, expected, string(res)) + // try unmarshalling now + var unc sw.NullableClass + err = json.Unmarshal(res, &unc) + if err != nil { + t.Errorf("Error while unmarshalling structure with Nullables: %v", err) + } + if unc.BooleanProp.IsSet() || unc.BooleanProp.Get() != nil { + t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc.BooleanProp) + } + if !unc.IntegerProp.IsSet() || unc.IntegerProp.Get() != nil { + t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc.IntegerProp) + } + if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv { + t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp) + } - // change the values a bit to make sure the Set/Unset methods work correctly - nc.IntegerProp.Unset() - bv := false - nc.BooleanProp.Set(&bv) - res, err = json.Marshal(nc) - if err != nil { - t.Errorf("Error while marshalling structure with Nullables: %v", err) - } - expected = `{"boolean_prop":false,"number_prop":1.1}` - assertStringsEqual(t, expected, string(res)) - // try unmarshalling now - var unc2 sw.NullableClass - err = json.Unmarshal(res, &unc2) - if err != nil { - t.Errorf("Error while unmarshalling structure with Nullables: %v", err) - } - if !unc2.BooleanProp.IsSet() || *unc2.BooleanProp.Get() != false { - t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc2.BooleanProp) - } - if unc2.IntegerProp.IsSet() || unc2.IntegerProp.Get() != nil { - t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc2.IntegerProp) - } - if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv { - t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp) - } + // change the values a bit to make sure the Set/Unset methods work correctly + nc.IntegerProp.Unset() + bv := false + nc.BooleanProp.Set(&bv) + res, err = json.Marshal(nc) + if err != nil { + t.Errorf("Error while marshalling structure with Nullables: %v", err) + } + expected = `{"boolean_prop":false,"number_prop":1.1}` + assertStringsEqual(t, expected, string(res)) + // try unmarshalling now + var unc2 sw.NullableClass + err = json.Unmarshal(res, &unc2) + if err != nil { + t.Errorf("Error while unmarshalling structure with Nullables: %v", err) + } + if !unc2.BooleanProp.IsSet() || *unc2.BooleanProp.Get() != false { + t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc2.BooleanProp) + } + if unc2.IntegerProp.IsSet() || unc2.IntegerProp.Get() != nil { + t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc2.IntegerProp) + } + if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv { + t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp) + } } func assertStringsEqual(t *testing.T, expected, actual string) { - if expected != actual { - t.Errorf(fmt.Sprintf("`%s` (expected) != `%s` (actual)", expected, actual)) - } + if expected != actual { + t.Errorf(fmt.Sprintf("`%s` (expected) != `%s` (actual)", expected, actual)) + } } diff --git a/samples/openapi3/client/petstore/go/pet_api_test.go b/samples/openapi3/client/petstore/go/pet_api_test.go index 9f0a154f96a0..f92873d5d12a 100644 --- a/samples/openapi3/client/petstore/go/pet_api_test.go +++ b/samples/openapi3/client/petstore/go/pet_api_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" - sw "./go-petstore" + sw "go-petstore" ) var client *sw.APIClient @@ -29,7 +29,7 @@ func TestMain(m *testing.M) { func TestAddPet(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{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute() @@ -59,7 +59,7 @@ func TestGetPetById(t *testing.T) { func TestGetPetByIdWithInvalidID(t *testing.T) { resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999).Execute() if r != nil && r.StatusCode == 404 { - assertedError, ok := err.(sw.GenericOpenAPIError) + assertedError, ok := err.(*sw.GenericOpenAPIError) a := assert.New(t) a.True(ok) a.Contains(string(assertedError.Body()), "type") diff --git a/samples/openapi3/client/petstore/go/store_api_test.go b/samples/openapi3/client/petstore/go/store_api_test.go index fc0cdec9699a..b3e21e868507 100644 --- a/samples/openapi3/client/petstore/go/store_api_test.go +++ b/samples/openapi3/client/petstore/go/store_api_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - sw "./go-petstore" + sw "go-petstore" ) func TestPlaceOrder(t *testing.T) { diff --git a/samples/openapi3/client/petstore/go/user_api_test.go b/samples/openapi3/client/petstore/go/user_api_test.go index ef66e2410c06..757ac0fa9723 100644 --- a/samples/openapi3/client/petstore/go/user_api_test.go +++ b/samples/openapi3/client/petstore/go/user_api_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - sw "./go-petstore" + sw "go-petstore" ) func TestCreateUser(t *testing.T) { @@ -33,7 +33,7 @@ func TestCreateUser(t *testing.T) { //adding x to skip the test, currently it is failing func TestCreateUsersWithArrayInput(t *testing.T) { newUsers := []sw.User{ - sw.User{ + { Id: sw.PtrInt64(1001), FirstName: sw.PtrString("gopher1"), LastName: sw.PtrString("lang1"), @@ -43,7 +43,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { Phone: sw.PtrString("5101112222"), UserStatus: sw.PtrInt32(1), }, - sw.User{ + { Id: sw.PtrInt64(1002), FirstName: sw.PtrString("gopher2"), LastName: sw.PtrString("lang2"), @@ -63,7 +63,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { t.Log(apiResponse) } -/* issue deleting users due to issue in the server side (500). commented out below for the time being + /* issue deleting users due to issue in the server side (500). commented out below for the time being //tear down _, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1").Execute() if err1 != nil { @@ -76,7 +76,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { t.Errorf("Error while deleting user") t.Log(err2) } -*/ + */ } func TestGetUserByName(t *testing.T) { From 5e1164c554e4719aca9e04a507894efde8f50034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20C=C3=A1novas?= <52009512+fcanovas1986@users.noreply.github.com> Date: Fri, 21 Jan 2022 10:38:13 +0100 Subject: [PATCH 122/175] fix clone method (#11363) --- .../src/main/resources/Java/RFC3339DateFormat.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/Java/RFC3339DateFormat.mustache b/modules/openapi-generator/src/main/resources/Java/RFC3339DateFormat.mustache index cacd793e738a..46c7bb46dc30 100644 --- a/modules/openapi-generator/src/main/resources/Java/RFC3339DateFormat.mustache +++ b/modules/openapi-generator/src/main/resources/Java/RFC3339DateFormat.mustache @@ -39,6 +39,6 @@ public class RFC3339DateFormat extends DateFormat { @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file From b7c8de94250905c24b4b386a1054a3b5e8bb6537 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 21 Jan 2022 17:45:53 +0800 Subject: [PATCH 123/175] update samples --- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- .../main/java/org/openapitools/client/RFC3339DateFormat.java | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/RFC3339DateFormat.java index e8c4b6e227ad..a713954ea4b9 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 9ed3230bd364..455b7a6101a1 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/RFC3339DateFormat.java index f7ec336d257d..01137208e923 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 07d7e782b0da..80397abe9683 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -50,6 +50,6 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie @Override public Object clone() { - return this; + return super.clone(); } } \ No newline at end of file From 20bf0c73f8adf1ddf35df558d1c7f46fafb03446 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 21 Jan 2022 19:00:59 +0800 Subject: [PATCH 124/175] remove duplicated else if condition (#11370) --- .../csharp-netcore/HttpSigningConfiguration.mustache | 9 --------- .../Org.OpenAPITools/Client/HttpSigningConfiguration.cs | 9 --------- .../Org.OpenAPITools/Client/HttpSigningConfiguration.cs | 9 --------- .../Org.OpenAPITools/Client/HttpSigningConfiguration.cs | 9 --------- .../Org.OpenAPITools/Client/HttpSigningConfiguration.cs | 9 --------- .../Org.OpenAPITools/Client/HttpSigningConfiguration.cs | 9 --------- .../Org.OpenAPITools/Client/HttpSigningConfiguration.cs | 9 --------- 7 files changed, 63 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/HttpSigningConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/HttpSigningConfiguration.mustache index f80e584c6663..58a961b5da3c 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/HttpSigningConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/HttpSigningConfiguration.mustache @@ -741,15 +741,6 @@ namespace {{packageName}}.Client { keyType = PrivateKeyType.ECDSA; } - else if (key[0].Contains(ecPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - - // this type of key can hold many type different types of private key, but here due lack of pem header - // Considering this as EC key - //TODO :- update the key based on oid - keyType = PrivateKeyType.ECDSA; - } else { throw new Exception("Either the key is invalid or key is not supported"); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index f3eaf3c5ade3..6a8f9c8dc016 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -749,15 +749,6 @@ private PrivateKeyType GetKeyType(string keyFilePath) { keyType = PrivateKeyType.ECDSA; } - else if (key[0].Contains(ecPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - - // this type of key can hold many type different types of private key, but here due lack of pem header - // Considering this as EC key - //TODO :- update the key based on oid - keyType = PrivateKeyType.ECDSA; - } else { throw new Exception("Either the key is invalid or key is not supported"); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index f3eaf3c5ade3..6a8f9c8dc016 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -749,15 +749,6 @@ private PrivateKeyType GetKeyType(string keyFilePath) { keyType = PrivateKeyType.ECDSA; } - else if (key[0].Contains(ecPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - - // this type of key can hold many type different types of private key, but here due lack of pem header - // Considering this as EC key - //TODO :- update the key based on oid - keyType = PrivateKeyType.ECDSA; - } else { throw new Exception("Either the key is invalid or key is not supported"); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index f3eaf3c5ade3..6a8f9c8dc016 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -749,15 +749,6 @@ private PrivateKeyType GetKeyType(string keyFilePath) { keyType = PrivateKeyType.ECDSA; } - else if (key[0].Contains(ecPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - - // this type of key can hold many type different types of private key, but here due lack of pem header - // Considering this as EC key - //TODO :- update the key based on oid - keyType = PrivateKeyType.ECDSA; - } else { throw new Exception("Either the key is invalid or key is not supported"); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index f3eaf3c5ade3..6a8f9c8dc016 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -749,15 +749,6 @@ private PrivateKeyType GetKeyType(string keyFilePath) { keyType = PrivateKeyType.ECDSA; } - else if (key[0].Contains(ecPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - - // this type of key can hold many type different types of private key, but here due lack of pem header - // Considering this as EC key - //TODO :- update the key based on oid - keyType = PrivateKeyType.ECDSA; - } else { throw new Exception("Either the key is invalid or key is not supported"); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index f3eaf3c5ade3..6a8f9c8dc016 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -749,15 +749,6 @@ private PrivateKeyType GetKeyType(string keyFilePath) { keyType = PrivateKeyType.ECDSA; } - else if (key[0].Contains(ecPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - - // this type of key can hold many type different types of private key, but here due lack of pem header - // Considering this as EC key - //TODO :- update the key based on oid - keyType = PrivateKeyType.ECDSA; - } else { throw new Exception("Either the key is invalid or key is not supported"); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index f3eaf3c5ade3..6a8f9c8dc016 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -749,15 +749,6 @@ private PrivateKeyType GetKeyType(string keyFilePath) { keyType = PrivateKeyType.ECDSA; } - else if (key[0].Contains(ecPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - - // this type of key can hold many type different types of private key, but here due lack of pem header - // Considering this as EC key - //TODO :- update the key based on oid - keyType = PrivateKeyType.ECDSA; - } else { throw new Exception("Either the key is invalid or key is not supported"); From e1c5b220cd0b0659be770a8f406544a691c40a5e Mon Sep 17 00:00:00 2001 From: cachescrubber <5127753+cachescrubber@users.noreply.github.com> Date: Sat, 22 Jan 2022 01:51:17 +0100 Subject: [PATCH 125/175] [JAVA] new Feature interface: Documentation Provider and Annotation Library (#11258) * Implement DocumentationProviderFeatures and integrate it in AbstractJavaCodegen * Integrate DocumentationProviderFeatures in SpringCodegen * Run new test config spring-boot-springdoc * Do not use Locale.ROOT * Do not use Locale.ROOT, use NONE instead of empty list * Revert "Do not use Locale.ROOT" This reverts commit a0d6aac92bea2370b4f164d18ada3fd9097f3a30. * Do not use forbidden APIs * Fix spring maven plugin example * Introduce DocumentationProviderFeaturesTest.java * replace AUTO with preferredAnnotationLibrary * remove sout.println from Test * Apply code style. * Update spring sample configuration to use the new property * Update samples after merge * fix atBean import * Generate all samples * Add ParameterObject to test * Allow Subclasses to opt out * Use OpenAPI 2 (fka Swagger RESTful API Documentation Specification) instead of just "Swagger" * export generator docs * Fix typo * Fix typo - update docs. --- ...-boot-beanvalidation-no-nullable-oas3.yaml | 2 +- ...pring-boot-beanvalidation-no-nullable.yaml | 1 + bin/configs/spring-boot-beanvalidation.yaml | 1 + bin/configs/spring-boot-delegate-j8.yaml | 1 + bin/configs/spring-boot-delegate-oas3.yaml | 2 +- bin/configs/spring-boot-delegate.yaml | 1 + .../spring-boot-implicitHeaders-oas3.yaml | 1 + bin/configs/spring-boot-implicitHeaders.yaml | 1 + bin/configs/spring-boot-oas3.yaml | 2 +- bin/configs/spring-boot-reactive-oas3.yaml | 2 +- bin/configs/spring-boot-reactive.yaml | 1 + bin/configs/spring-boot-springdoc.yaml | 10 + bin/configs/spring-boot-useoptional-oas3.yaml | 2 +- bin/configs/spring-boot-useoptional.yaml | 1 + bin/configs/spring-boot-virtualan.yaml | 1 + bin/configs/spring-boot.yaml | 1 + bin/configs/spring-cloud-async-oas3.yaml | 2 +- bin/configs/spring-cloud-async.yaml | 1 + bin/configs/spring-cloud-date-time-oas3.yaml | 4 +- bin/configs/spring-cloud-date-time.yaml | 1 + bin/configs/spring-cloud-oas3-fakeapi.yaml | 2 +- bin/configs/spring-cloud-oas3.yaml | 2 +- ...d-petstore-feign-spring-pageable-oas3.yaml | 2 +- ...-cloud-petstore-feign-spring-pageable.yaml | 1 + bin/configs/spring-cloud.yaml | 1 + bin/configs/spring-mvc-default-values.yaml | 1 + bin/configs/spring-mvc-j8-async.yaml | 1 + bin/configs/spring-mvc-j8-localdatetime.yaml | 1 + bin/configs/spring-mvc-no-nullable.yaml | 1 + ...g-mvc-petstore-server-spring-pageable.yaml | 1 + bin/configs/spring-mvc.yaml | 1 + bin/configs/spring-stubs-oas3.yaml | 2 +- bin/configs/spring-stubs.yaml | 1 + ...g-pageable-delegatePattern-without-j8.yaml | 1 + ...erver-spring-pageable-delegatePattern.yaml | 1 + ...ore-server-spring-pageable-without-j8.yaml | 1 + ...gboot-petstore-server-spring-pageable.yaml | 1 + docs/generators/java-camel.md | 3 +- docs/generators/spring.md | 3 +- .../examples/spring.xml | 1 + .../languages/AbstractJavaCodegen.java | 83 +- .../codegen/languages/SpringCodegen.java | 60 +- .../DocumentationProviderFeatures.java | 173 ++++ .../JavaSpring/allowableValues.mustache | 2 +- .../main/resources/JavaSpring/api.mustache | 38 +- .../JavaSpring/apiController.mustache | 10 +- .../JavaSpring/homeController.mustache | 31 +- .../libraries/spring-boot/README.mustache | 4 +- .../spring-boot/application.mustache | 4 +- .../spring-boot/openapi2SpringBoot.mustache | 12 +- .../libraries/spring-boot/pom.mustache | 56 +- .../libraries/spring-cloud/pom.mustache | 52 +- .../libraries/spring-mvc/README.mustache | 4 +- .../libraries/spring-mvc/application.mustache | 4 +- .../openapiUiConfiguration.mustache | 12 +- .../libraries/spring-mvc/pom.mustache | 8 +- .../main/resources/JavaSpring/model.mustache | 4 +- .../resources/JavaSpring/paramDoc.mustache | 2 +- .../main/resources/JavaSpring/pojo.mustache | 15 +- .../java/spring/SpringCodegenTest.java | 4 + .../DocumentationProviderFeaturesTest.java | 50 + .../petstore/spring-cloud-async/pom.xml | 1 - .../petstore/spring-cloud-date-time/pom.xml | 1 - .../spring-cloud-spring-pageable/pom.xml | 1 - samples/client/petstore/spring-cloud/pom.xml | 1 - .../petstore/spring-cloud-async/pom.xml | 9 +- .../petstore/spring-cloud-date-time/pom.xml | 9 +- .../spring-cloud-oas3-fakeapi/pom.xml | 9 +- .../spring-cloud-spring-pageable/pom.xml | 9 +- .../java/org/openapitools/api/PetApi.java | 5 +- .../client/petstore/spring-cloud/pom.xml | 9 +- .../client/petstore/spring-stubs/pom.xml | 11 +- .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 20 + .../.openapi-generator/VERSION | 1 + .../petstore/spring-boot-springdoc/README.md | 16 + .../petstore/spring-boot-springdoc/pom.xml | 72 ++ .../org/openapitools/OpenAPI2SpringBoot.java | 63 ++ .../org/openapitools/RFC3339DateFormat.java | 38 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/PetApi.java | 393 ++++++++ .../openapitools/api/PetApiController.java | 27 + .../java/org/openapitools/api/StoreApi.java | 190 ++++ .../openapitools/api/StoreApiController.java | 27 + .../java/org/openapitools/api/UserApi.java | 304 ++++++ .../openapitools/api/UserApiController.java | 27 + .../configuration/HomeController.java | 53 ++ .../java/org/openapitools/model/Category.java | 108 +++ .../openapitools/model/ModelApiResponse.java | 132 +++ .../java/org/openapitools/model/Order.java | 245 +++++ .../main/java/org/openapitools/model/Pet.java | 261 +++++ .../main/java/org/openapitools/model/Tag.java | 108 +++ .../java/org/openapitools/model/User.java | 252 +++++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 893 ++++++++++++++++++ .../pom.xml | 11 +- .../api/AnotherFakeApiController.java | 1 + .../openapitools/api/FakeApiController.java | 1 + .../api/FakeClassnameTestApiController.java | 1 + .../openapitools/api/PetApiController.java | 1 + .../openapitools/api/StoreApiController.java | 1 + .../openapitools/api/UserApiController.java | 1 + .../configuration/HomeController.java | 2 +- .../petstore/springboot-delegate/pom.xml | 11 +- .../configuration/HomeController.java | 2 +- .../springboot-implicitHeaders/pom.xml | 11 +- .../configuration/HomeController.java | 2 +- .../petstore/springboot-reactive/pom.xml | 11 +- .../configuration/HomeController.java | 3 +- .../petstore/springboot-useoptional/pom.xml | 11 +- .../configuration/HomeController.java | 2 +- .../server/petstore/springboot/pom.xml | 11 +- .../configuration/HomeController.java | 2 +- .../api/AnotherFakeApiController.java | 1 - .../openapitools/api/FakeApiController.java | 1 - .../api/FakeClassnameTestApiController.java | 1 - .../openapitools/api/PetApiController.java | 1 - .../openapitools/api/StoreApiController.java | 1 - .../openapitools/api/UserApiController.java | 1 - .../petstore/springboot-reactive/README.md | 2 + .../petstore/springboot-reactive/pom.xml | 9 +- .../org/openapitools/OpenAPI2SpringBoot.java | 6 - .../org/openapitools/api/AnotherFakeApi.java | 3 +- .../api/AnotherFakeApiDelegate.java | 1 + .../java/org/openapitools/api/FakeApi.java | 31 +- .../org/openapitools/api/FakeApiDelegate.java | 1 + .../api/FakeClassnameTestApi.java | 3 +- .../api/FakeClassnameTestApiDelegate.java | 1 + .../java/org/openapitools/api/PetApi.java | 17 +- .../org/openapitools/api/PetApiDelegate.java | 1 + .../java/org/openapitools/api/StoreApi.java | 9 +- .../openapitools/api/StoreApiDelegate.java | 1 + .../java/org/openapitools/api/UserApi.java | 17 +- .../org/openapitools/api/UserApiDelegate.java | 1 + .../configuration/HomeController.java | 37 +- .../src/main/resources/application.properties | 1 + .../api/AnotherFakeApiController.java | 1 - .../openapitools/api/FakeApiController.java | 1 - .../api/FakeClassnameTestApiController.java | 1 - .../openapitools/api/PetApiController.java | 1 - .../openapitools/api/StoreApiController.java | 1 - .../openapitools/api/UserApiController.java | 1 - .../api/AnotherFakeApiController.java | 1 - .../openapitools/api/FakeApiController.java | 1 - .../api/FakeClassnameTestApiController.java | 1 - .../openapitools/api/PetApiController.java | 1 - .../openapitools/api/StoreApiController.java | 1 - .../openapitools/api/UserApiController.java | 1 - 148 files changed, 3967 insertions(+), 311 deletions(-) create mode 100644 bin/configs/spring-boot-springdoc.yaml create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/DocumentationProviderFeatures.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/languages/features/DocumentationProviderFeaturesTest.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator-ignore create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/FILES create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/README.md create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/pom.xml create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/OpenAPI2SpringBoot.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApiController.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApiController.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApiController.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/application.properties create mode 100644 samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml diff --git a/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml b/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml index 760305ec6cbf..b1e5245ae85b 100644 --- a/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml +++ b/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml @@ -5,7 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 - oas3: "true" + documentationProvider: springdoc java8: "false" useBeanValidation: true artifactId: spring-boot-beanvalidation-no-nullable diff --git a/bin/configs/spring-boot-beanvalidation-no-nullable.yaml b/bin/configs/spring-boot-beanvalidation-no-nullable.yaml index 85c687f4978b..1457469bc725 100644 --- a/bin/configs/spring-boot-beanvalidation-no-nullable.yaml +++ b/bin/configs/spring-boot-beanvalidation-no-nullable.yaml @@ -4,6 +4,7 @@ library: spring-boot inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox java8: "false" useBeanValidation: true artifactId: spring-boot-beanvalidation-no-nullable diff --git a/bin/configs/spring-boot-beanvalidation.yaml b/bin/configs/spring-boot-beanvalidation.yaml index 573d8e283b55..dd4ea561c849 100644 --- a/bin/configs/spring-boot-beanvalidation.yaml +++ b/bin/configs/spring-boot-beanvalidation.yaml @@ -4,6 +4,7 @@ library: spring-boot inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox java8: true useBeanValidation: true artifactId: spring-boot-beanvalidation diff --git a/bin/configs/spring-boot-delegate-j8.yaml b/bin/configs/spring-boot-delegate-j8.yaml index a90e8b3ce1d4..e1fae5805cd2 100644 --- a/bin/configs/spring-boot-delegate-j8.yaml +++ b/bin/configs/spring-boot-delegate-j8.yaml @@ -3,6 +3,7 @@ outputDir: samples/server/petstore/springboot-delegate-j8 inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: springboot-delegate-j8 hideGenerationTimestamp: "true" delegatePattern: "true" diff --git a/bin/configs/spring-boot-delegate-oas3.yaml b/bin/configs/spring-boot-delegate-oas3.yaml index 7d8631523d8a..8b604d558a9e 100644 --- a/bin/configs/spring-boot-delegate-oas3.yaml +++ b/bin/configs/spring-boot-delegate-oas3.yaml @@ -4,7 +4,7 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 - oas3: "true" + documentationProvider: springdoc artifactId: springboot-delegate hideGenerationTimestamp: "true" java8: true diff --git a/bin/configs/spring-boot-delegate.yaml b/bin/configs/spring-boot-delegate.yaml index 162094128db3..228b14d823e2 100644 --- a/bin/configs/spring-boot-delegate.yaml +++ b/bin/configs/spring-boot-delegate.yaml @@ -3,6 +3,7 @@ outputDir: samples/server/petstore/springboot-delegate inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: springboot-delegate hideGenerationTimestamp: "true" java8: true diff --git a/bin/configs/spring-boot-implicitHeaders-oas3.yaml b/bin/configs/spring-boot-implicitHeaders-oas3.yaml index 973561fad57e..3d9423cd3264 100644 --- a/bin/configs/spring-boot-implicitHeaders-oas3.yaml +++ b/bin/configs/spring-boot-implicitHeaders-oas3.yaml @@ -4,6 +4,7 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 + documentationProvider: springdoc oas3: "true" artifactId: springboot-implicitHeaders hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-implicitHeaders.yaml b/bin/configs/spring-boot-implicitHeaders.yaml index cb84abe664da..5457e89b8315 100644 --- a/bin/configs/spring-boot-implicitHeaders.yaml +++ b/bin/configs/spring-boot-implicitHeaders.yaml @@ -4,5 +4,6 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: artifactId: springboot-implicitHeaders + documentationProvider: springfox hideGenerationTimestamp: "true" implicitHeaders: true diff --git a/bin/configs/spring-boot-oas3.yaml b/bin/configs/spring-boot-oas3.yaml index 9a0f864b2713..21994a14ad48 100644 --- a/bin/configs/spring-boot-oas3.yaml +++ b/bin/configs/spring-boot-oas3.yaml @@ -4,7 +4,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 + documentationProvider: springdoc artifactId: springboot snapshotVersion: "true" - oas3: "true" hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-reactive-oas3.yaml b/bin/configs/spring-boot-reactive-oas3.yaml index b3fc8278491a..3e3fb91657bc 100644 --- a/bin/configs/spring-boot-reactive-oas3.yaml +++ b/bin/configs/spring-boot-reactive-oas3.yaml @@ -4,7 +4,7 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 - oas3: "true" + documentationProvider: springdoc artifactId: springboot-reactive reactive: "true" hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-reactive.yaml b/bin/configs/spring-boot-reactive.yaml index 3d0c92edbeea..b3edff7de11c 100644 --- a/bin/configs/spring-boot-reactive.yaml +++ b/bin/configs/spring-boot-reactive.yaml @@ -4,6 +4,7 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: artifactId: springboot-reactive + documentationProvider: springfox reactive: "true" hideGenerationTimestamp: "true" delegatePattern: "true" diff --git a/bin/configs/spring-boot-springdoc.yaml b/bin/configs/spring-boot-springdoc.yaml new file mode 100644 index 000000000000..47b1c195c36f --- /dev/null +++ b/bin/configs/spring-boot-springdoc.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/openapi3/server/petstore/spring-boot-springdoc +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + documentationProvider: springdoc + artifactId: spring-boot-springdoc + snapshotVersion: "true" + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-useoptional-oas3.yaml b/bin/configs/spring-boot-useoptional-oas3.yaml index 6fd5755ca31c..ac66d1df1480 100644 --- a/bin/configs/spring-boot-useoptional-oas3.yaml +++ b/bin/configs/spring-boot-useoptional-oas3.yaml @@ -4,7 +4,7 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 - oas3: "true" + documentationProvider: springdoc useOptional: true artifactId: spring-boot-useoptional hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-useoptional.yaml b/bin/configs/spring-boot-useoptional.yaml index 93a7924dcba5..1e028977898c 100644 --- a/bin/configs/spring-boot-useoptional.yaml +++ b/bin/configs/spring-boot-useoptional.yaml @@ -3,6 +3,7 @@ outputDir: samples/server/petstore/springboot-useoptional inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox useOptional: true artifactId: spring-boot-useoptional hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-virtualan.yaml b/bin/configs/spring-boot-virtualan.yaml index 3d580d05c8a2..c67ecf980ed6 100644 --- a/bin/configs/spring-boot-virtualan.yaml +++ b/bin/configs/spring-boot-virtualan.yaml @@ -4,6 +4,7 @@ library: spring-boot inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox apiPackage: org.openapitools.virtualan.api modelPackage: org.openapitools.virtualan.model virtualService: true diff --git a/bin/configs/spring-boot.yaml b/bin/configs/spring-boot.yaml index f752bc817e4f..fe2345e7126c 100644 --- a/bin/configs/spring-boot.yaml +++ b/bin/configs/spring-boot.yaml @@ -3,6 +3,7 @@ outputDir: samples/server/petstore/springboot inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: springboot snapshotVersion: "true" hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-cloud-async-oas3.yaml b/bin/configs/spring-cloud-async-oas3.yaml index 637e9b4d1626..59c9d22e695e 100644 --- a/bin/configs/spring-cloud-async-oas3.yaml +++ b/bin/configs/spring-cloud-async-oas3.yaml @@ -5,7 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 - oas3: "true" + documentationProvider: springdoc async: "true" java8: "true" artifactId: petstore-spring-cloud diff --git a/bin/configs/spring-cloud-async.yaml b/bin/configs/spring-cloud-async.yaml index 7f087b9e0bc9..b14f654366f6 100644 --- a/bin/configs/spring-cloud-async.yaml +++ b/bin/configs/spring-cloud-async.yaml @@ -4,6 +4,7 @@ library: spring-cloud inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox async: "true" java8: "true" artifactId: petstore-spring-cloud diff --git a/bin/configs/spring-cloud-date-time-oas3.yaml b/bin/configs/spring-cloud-date-time-oas3.yaml index 27cd8723133e..9e5724d2ac9d 100644 --- a/bin/configs/spring-cloud-date-time-oas3.yaml +++ b/bin/configs/spring-cloud-date-time-oas3.yaml @@ -5,8 +5,8 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/date-time-par templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 + documentationProvider: springdoc artifactId: spring-cloud-date-time-oas3 interfaceOnly: "true" singleContentTypes: "true" - hideGenerationTimestamp: "true" - oas3: "true" \ No newline at end of file + hideGenerationTimestamp: "true" \ No newline at end of file diff --git a/bin/configs/spring-cloud-date-time.yaml b/bin/configs/spring-cloud-date-time.yaml index 16686c8b9ac7..ff06030aab30 100644 --- a/bin/configs/spring-cloud-date-time.yaml +++ b/bin/configs/spring-cloud-date-time.yaml @@ -4,6 +4,7 @@ outputDir: samples/client/petstore/spring-cloud-date-time inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: spring-cloud-date-time interfaceOnly: "true" singleContentTypes: "true" diff --git a/bin/configs/spring-cloud-oas3-fakeapi.yaml b/bin/configs/spring-cloud-oas3-fakeapi.yaml index f12e8b601991..3f4e3c8ba3a3 100644 --- a/bin/configs/spring-cloud-oas3-fakeapi.yaml +++ b/bin/configs/spring-cloud-oas3-fakeapi.yaml @@ -5,8 +5,8 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 + documentationProvider: springdoc artifactId: spring-cloud-oas3 interfaceOnly: "true" singleContentTypes: "true" hideGenerationTimestamp: "true" - oas3: "true" diff --git a/bin/configs/spring-cloud-oas3.yaml b/bin/configs/spring-cloud-oas3.yaml index 3d627dcca254..c43b53303af2 100644 --- a/bin/configs/spring-cloud-oas3.yaml +++ b/bin/configs/spring-cloud-oas3.yaml @@ -5,8 +5,8 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 + documentationProvider: springdoc artifactId: spring-cloud-oas3 interfaceOnly: "true" singleContentTypes: "true" hideGenerationTimestamp: "true" - oas3: "true" diff --git a/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml b/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml index 64f048226e83..02c96627b645 100644 --- a/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml +++ b/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml @@ -5,6 +5,6 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-spring templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 - oas3: "true" + documentationProvider: springdoc artifactId: spring-cloud-spring-pageable hideGenerationTimestamp: 'true' diff --git a/bin/configs/spring-cloud-petstore-feign-spring-pageable.yaml b/bin/configs/spring-cloud-petstore-feign-spring-pageable.yaml index 366a1978822d..506a1c53be6b 100644 --- a/bin/configs/spring-cloud-petstore-feign-spring-pageable.yaml +++ b/bin/configs/spring-cloud-petstore-feign-spring-pageable.yaml @@ -4,5 +4,6 @@ library: spring-cloud inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: spring-cloud-spring-pageable hideGenerationTimestamp: 'true' diff --git a/bin/configs/spring-cloud.yaml b/bin/configs/spring-cloud.yaml index df13fabbf035..cd207cd64cd6 100644 --- a/bin/configs/spring-cloud.yaml +++ b/bin/configs/spring-cloud.yaml @@ -4,5 +4,6 @@ library: spring-cloud inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: petstore-spring-cloud hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-mvc-default-values.yaml b/bin/configs/spring-mvc-default-values.yaml index b1ae7fbd0484..e25aa41b503d 100644 --- a/bin/configs/spring-mvc-default-values.yaml +++ b/bin/configs/spring-mvc-default-values.yaml @@ -3,5 +3,6 @@ outputDir: samples/server/petstore/spring-mvc-default-value inputSpec: modules/openapi-generator/src/test/resources/3_0/issue_8535.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox hideGenerationTimestamp: "true" artifactId: spring-mvc-default-value \ No newline at end of file diff --git a/bin/configs/spring-mvc-j8-async.yaml b/bin/configs/spring-mvc-j8-async.yaml index cd03b0e427dc..287d05993ee4 100644 --- a/bin/configs/spring-mvc-j8-async.yaml +++ b/bin/configs/spring-mvc-j8-async.yaml @@ -4,6 +4,7 @@ library: spring-mvc inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox async: "true" java8: true artifactId: spring-mvc-server-j8-async diff --git a/bin/configs/spring-mvc-j8-localdatetime.yaml b/bin/configs/spring-mvc-j8-localdatetime.yaml index f8d6126c9f3c..c1e66bf80a63 100644 --- a/bin/configs/spring-mvc-j8-localdatetime.yaml +++ b/bin/configs/spring-mvc-j8-localdatetime.yaml @@ -4,6 +4,7 @@ library: spring-mvc inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox booleanGetterPrefix: get artifactId: spring-mvc-j8-localdatetime hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-mvc-no-nullable.yaml b/bin/configs/spring-mvc-no-nullable.yaml index f1d6585071c5..76cefce348f2 100644 --- a/bin/configs/spring-mvc-no-nullable.yaml +++ b/bin/configs/spring-mvc-no-nullable.yaml @@ -4,6 +4,7 @@ library: spring-mvc inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: spring-mvc-server-no-nullable openApiNullable: "false" serverPort: "8002" diff --git a/bin/configs/spring-mvc-petstore-server-spring-pageable.yaml b/bin/configs/spring-mvc-petstore-server-spring-pageable.yaml index bcb362e65db9..027a98cbff47 100644 --- a/bin/configs/spring-mvc-petstore-server-spring-pageable.yaml +++ b/bin/configs/spring-mvc-petstore-server-spring-pageable.yaml @@ -4,5 +4,6 @@ library: spring-mvc inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: spring-mvc-spring-pageable hideGenerationTimestamp: 'true' diff --git a/bin/configs/spring-mvc.yaml b/bin/configs/spring-mvc.yaml index 8eca9e650a2b..9093bb518c8f 100644 --- a/bin/configs/spring-mvc.yaml +++ b/bin/configs/spring-mvc.yaml @@ -4,6 +4,7 @@ library: spring-mvc inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox java8: true booleanGetterPrefix: get artifactId: spring-mvc-server diff --git a/bin/configs/spring-stubs-oas3.yaml b/bin/configs/spring-stubs-oas3.yaml index 1c725e53b33d..d5149f28adca 100644 --- a/bin/configs/spring-stubs-oas3.yaml +++ b/bin/configs/spring-stubs-oas3.yaml @@ -4,8 +4,8 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: groupId: org.openapitools.openapi3 + documentationProvider: springdoc artifactId: spring-stubs - oas3: "true" interfaceOnly: "true" singleContentTypes: "true" hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-stubs.yaml b/bin/configs/spring-stubs.yaml index 8c58e6838ea6..bdbefb1e58f5 100644 --- a/bin/configs/spring-stubs.yaml +++ b/bin/configs/spring-stubs.yaml @@ -3,6 +3,7 @@ outputDir: samples/client/petstore/spring-stubs inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: spring-stubs interfaceOnly: "true" singleContentTypes: "true" diff --git a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern-without-j8.yaml b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern-without-j8.yaml index 7e0c9882db50..7d16b4a1e762 100644 --- a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern-without-j8.yaml +++ b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern-without-j8.yaml @@ -6,5 +6,6 @@ templateDir: modules/openapi-generator/src/main/resources/JavaSpring delegatePattern: true java8: false additionalProperties: + documentationProvider: springfox artifactId: springboot-spring-pageable-delegatePattern-without-j8 hideGenerationTimestamp: 'true' diff --git a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml index 9c96151f04fc..c4d1eb5b6874 100644 --- a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml +++ b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml @@ -5,5 +5,6 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring delegatePattern: true additionalProperties: + documentationProvider: springfox artifactId: springboot-spring-pageable-delegatePattern hideGenerationTimestamp: 'true' diff --git a/bin/configs/springboot-petstore-server-spring-pageable-without-j8.yaml b/bin/configs/springboot-petstore-server-spring-pageable-without-j8.yaml index c87a6776a5f4..87c63968490e 100644 --- a/bin/configs/springboot-petstore-server-spring-pageable-without-j8.yaml +++ b/bin/configs/springboot-petstore-server-spring-pageable-without-j8.yaml @@ -5,5 +5,6 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e templateDir: modules/openapi-generator/src/main/resources/JavaSpring java8: false additionalProperties: + documentationProvider: springfox artifactId: springboot-spring-pageable-withoutj8 hideGenerationTimestamp: 'true' diff --git a/bin/configs/springboot-petstore-server-spring-pageable.yaml b/bin/configs/springboot-petstore-server-spring-pageable.yaml index ddeaaa6cb728..db518c226044 100644 --- a/bin/configs/springboot-petstore-server-spring-pageable.yaml +++ b/bin/configs/springboot-petstore-server-spring-pageable.yaml @@ -4,5 +4,6 @@ library: spring-boot inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: + documentationProvider: springfox artifactId: springboot-spring-pageable hideGenerationTimestamp: 'true' diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index a55d98db57a4..c0ebb548e2e8 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| |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| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -47,6 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |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| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| +|documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springfox**
Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -63,7 +65,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |modelPackage|package for generated models| |org.openapitools.model| -|oas3|Use OAS 3 Swagger annotations instead of OAS 2 annotations| |false| |openApiNullable|Enable OpenAPI Jackson Nullable library| |true| |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 94e1639fa0e2..c06ac0fa7072 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| |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| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -40,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |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| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| +|documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springfox**
Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -56,7 +58,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |modelPackage|package for generated models| |org.openapitools.model| -|oas3|Use OAS 3 Swagger annotations instead of OAS 2 annotations| |false| |openApiNullable|Enable OpenAPI Jackson Nullable library| |true| |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| diff --git a/modules/openapi-generator-maven-plugin/examples/spring.xml b/modules/openapi-generator-maven-plugin/examples/spring.xml index e1802203383a..e5ea3463f94b 100644 --- a/modules/openapi-generator-maven-plugin/examples/spring.xml +++ b/modules/openapi-generator-maven-plugin/examples/spring.xml @@ -40,6 +40,7 @@ + springfox true true 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 603de4781b96..05cb3233ebf4 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 @@ -32,6 +32,7 @@ import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.languages.features.DocumentationProviderFeatures; import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -48,7 +49,8 @@ import static org.openapitools.codegen.utils.StringUtils.*; -public abstract class AbstractJavaCodegen extends DefaultCodegen implements CodegenConfig { +public abstract class AbstractJavaCodegen extends DefaultCodegen implements CodegenConfig, + DocumentationProviderFeatures { private final Logger LOGGER = LoggerFactory.getLogger(AbstractJavaCodegen.class); private static final String ARTIFACT_VERSION_DEFAULT_VALUE = "1.0.0"; @@ -111,6 +113,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code protected List additionalModelTypeAnnotations = new LinkedList<>(); protected List additionalEnumTypeAnnotations = new LinkedList<>(); protected boolean openApiNullable = true; + protected DocumentationProvider documentationProvider; + protected AnnotationLibrary annotationLibrary; public AbstractJavaCodegen() { super(); @@ -259,12 +263,68 @@ public AbstractJavaCodegen() { snapShotVersion.setEnum(snapShotVersionOptions); cliOptions.add(snapShotVersion); + if (null != defaultDocumentationProvider()) { + CliOption documentationProviderCliOption = new CliOption(DOCUMENTATION_PROVIDER, + "Select the OpenAPI documentation provider.") + .defaultValue(defaultDocumentationProvider().toCliOptValue()); + supportedDocumentationProvider().forEach(dp -> + documentationProviderCliOption.addEnum(dp.toCliOptValue(), dp.getDescription())); + cliOptions.add(documentationProviderCliOption); + + CliOption annotationLibraryCliOption = new CliOption(ANNOTATION_LIBRARY, + "Select the complementary documentation annotation library.") + .defaultValue(defaultDocumentationProvider().getPreferredAnnotationLibrary().toCliOptValue()); + supportedAnnotationLibraries().forEach(al -> + annotationLibraryCliOption.addEnum(al.toCliOptValue(), al.getDescription())); + cliOptions.add(annotationLibraryCliOption); + } } @Override public void processOpts() { super.processOpts(); + if (null != defaultDocumentationProvider()) { + documentationProvider = DocumentationProvider.ofCliOption( + (String)additionalProperties.getOrDefault(DOCUMENTATION_PROVIDER, + defaultDocumentationProvider().toCliOptValue()) + ); + + if (! supportedDocumentationProvider().contains(documentationProvider)) { + String msg = String.format(Locale.ROOT, + "The [%s] Documentation Provider is not supported by this generator", + documentationProvider.toCliOptValue()); + throw new IllegalArgumentException(msg); + } + + annotationLibrary = AnnotationLibrary.ofCliOption( + (String) additionalProperties.getOrDefault(ANNOTATION_LIBRARY, + documentationProvider.getPreferredAnnotationLibrary().toCliOptValue()) + ); + + if (! supportedAnnotationLibraries().contains(annotationLibrary)) { + String msg = String.format(Locale.ROOT, "The Annotation Library [%s] is not supported by this generator", + annotationLibrary.toCliOptValue()); + throw new IllegalArgumentException(msg); + } + + if (! documentationProvider.supportedAnnotationLibraries().contains(annotationLibrary)) { + String msg = String.format(Locale.ROOT, + "The [%s] documentation provider does not support [%s] as complementary annotation library", + documentationProvider.toCliOptValue(), annotationLibrary.toCliOptValue()); + throw new IllegalArgumentException(msg); + } + + additionalProperties.put(DOCUMENTATION_PROVIDER, documentationProvider.toCliOptValue()); + additionalProperties.put(documentationProvider.getPropertyName(), true); + additionalProperties.put(ANNOTATION_LIBRARY, annotationLibrary.toCliOptValue()); + additionalProperties.put(annotationLibrary.getPropertyName(), true); + } else { + additionalProperties.put(DOCUMENTATION_PROVIDER, DocumentationProvider.NONE); + additionalProperties.put(ANNOTATION_LIBRARY, AnnotationLibrary.NONE); + } + + if (StringUtils.isEmpty(System.getenv("JAVA_POST_PROCESS_FILE"))) { LOGGER.info("Environment variable JAVA_POST_PROCESS_FILE not defined so the Java code may not be properly formatted. To define it, try 'export JAVA_POST_PROCESS_FILE=\"/usr/local/bin/clang-format -i\"' (Linux/Mac)"); LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); @@ -1753,6 +1813,26 @@ public void setOpenApiNullable(final boolean openApiNullable) { this.openApiNullable = openApiNullable; } + @Override + public DocumentationProvider getDocumentationProvider() { + return documentationProvider; + } + + @Override + public void setDocumentationProvider(DocumentationProvider documentationProvider) { + this.documentationProvider = documentationProvider; + } + + @Override + public AnnotationLibrary getAnnotationLibrary() { + return annotationLibrary; + } + + @Override + public void setAnnotationLibrary(AnnotationLibrary annotationLibrary) { + this.annotationLibrary = annotationLibrary; + } + @Override public String escapeQuotationMark(String input) { // remove " to avoid code injection @@ -1933,4 +2013,5 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc addImport(codegenModel, codegenModel.additionalPropertiesType); } } + } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index c6eeb212bee0..ec8853e4a969 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -89,7 +89,6 @@ public class SpringCodegen extends AbstractJavaCodegen public static final String IMPLICIT_HEADERS = "implicitHeaders"; public static final String OPENAPI_DOCKET_CONFIG = "swaggerDocketConfig"; public static final String API_FIRST = "apiFirst"; - public static final String OAS3 = "oas3"; public static final String SPRING_CONTROLLER = "useSpringController"; public static final String HATEOAS = "hateoas"; public static final String RETURN_SUCCESS_CODE = "returnSuccessCode"; @@ -122,7 +121,6 @@ public class SpringCodegen extends AbstractJavaCodegen protected boolean returnSuccessCode = false; protected boolean unhandledException = false; protected boolean useSpringController = false; - protected boolean oas3 = false; public SpringCodegen() { super(); @@ -198,7 +196,6 @@ public SpringCodegen() { CliOption.newBoolean(HATEOAS, "Use Spring HATEOAS library to allow adding HATEOAS links", hateoas)); cliOptions .add(CliOption.newBoolean(RETURN_SUCCESS_CODE, "Generated server returns 2xx code", returnSuccessCode)); - cliOptions.add(CliOption.newBoolean(OAS3, "Use OAS 3 Swagger annotations instead of OAS 2 annotations", oas3)); cliOptions.add(CliOption.newBoolean(SPRING_CONTROLLER, "Annotate the generated API as a Spring Controller", useSpringController)); cliOptions.add(CliOption.newBoolean(UNHANDLED_EXCEPTION_HANDLING, "Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).", @@ -239,6 +236,29 @@ public String getHelp() { return "Generates a Java SpringBoot Server application using the SpringFox integration."; } + @Override + public DocumentationProvider defaultDocumentationProvider() { + return DocumentationProvider.SPRINGDOC; + } + + public List supportedDocumentationProvider() { + List supportedProviders = new ArrayList<>(); + supportedProviders.add(DocumentationProvider.NONE); + supportedProviders.add(DocumentationProvider.SOURCE); + supportedProviders.add(DocumentationProvider.SPRINGFOX); + supportedProviders.add(DocumentationProvider.SPRINGDOC); + return supportedProviders; + } + + @Override + public List supportedAnnotationLibraries() { + List supportedLibraries = new ArrayList<>(); + supportedLibraries.add(AnnotationLibrary.NONE); + supportedLibraries.add(AnnotationLibrary.SWAGGER1); + supportedLibraries.add(AnnotationLibrary.SWAGGER2); + return supportedLibraries; + } + @Override public void processOpts() { final List> configOptions = additionalProperties.entrySet().stream() @@ -374,11 +394,6 @@ public void processOpts() { } writePropertyBack(SPRING_CONTROLLER, useSpringController); - if (additionalProperties.containsKey(OAS3)) { - this.setOas3(convertPropertyToBoolean(OAS3)); - } - writePropertyBack(OAS3, oas3); - if (additionalProperties.containsKey(RETURN_SUCCESS_CODE)) { this.setReturnSuccessCode(Boolean.parseBoolean(additionalProperties.get(RETURN_SUCCESS_CODE).toString())); } @@ -394,6 +409,7 @@ public void processOpts() { importMapping.put("Pageable", "org.springframework.data.domain.Pageable"); importMapping.put("DateTimeFormat", "org.springframework.format.annotation.DateTimeFormat"); importMapping.put("ApiIgnore", "springfox.documentation.annotations.ApiIgnore"); + importMapping.put("ParameterObject", "org.springdoc.api.annotations.ParameterObject"); if (useOptional) { writePropertyBack(USE_OPTIONAL, useOptional); @@ -518,15 +534,6 @@ public void processOpts() { additionalProperties.put(RESPONSE_WRAPPER, "Callable"); } - // Springfox cannot be used with oas3 or apiFirst or reactive. So, write the property back after determining - // whether it should be enabled or not. - boolean useSpringFox = false; - if (!apiFirst && !reactive && !oas3) { - useSpringFox = true; - additionalProperties.put("useSpringfox", true); - } - writePropertyBack("useSpringfox", useSpringFox); - // Some well-known Spring or Spring-Cloud response wrappers if (isNotEmpty(responseWrapper)) { additionalProperties.put("jdk8", false); @@ -885,10 +892,6 @@ public void setUseSpringController(boolean useSpringController) { this.useSpringController = useSpringController; } - public void setOas3(boolean oas3) { - this.oas3 = oas3; - } - public void setReturnSuccessCode(boolean returnSuccessCode) { this.returnSuccessCode = returnSuccessCode; } @@ -937,8 +940,8 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert @Override public CodegenModel fromModel(String name, Schema model) { CodegenModel codegenModel = super.fromModel(name, model); - if (oas3) { - // remove swagger2 imports + if (getAnnotationLibrary() != AnnotationLibrary.SWAGGER1) { + // remove swagger imports codegenModel.imports.remove("ApiModelProperty"); codegenModel.imports.remove("ApiModel"); } @@ -961,7 +964,16 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation // add org.springframework.data.domain.Pageable import when needed if (codegenOperation.vendorExtensions.containsKey("x-spring-paginated")) { codegenOperation.imports.add("Pageable"); - if (Boolean.TRUE.equals(additionalProperties.get("useSpringfox"))) { + if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) { + codegenOperation.imports.add("ApiIgnore"); + } + if (DocumentationProvider.SPRINGDOC.equals(getDocumentationProvider())) { + codegenOperation.imports.add("ParameterObject"); + } + } + + if (reactive) { + if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) { codegenOperation.imports.add("ApiIgnore"); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/DocumentationProviderFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/DocumentationProviderFeatures.java new file mode 100644 index 000000000000..b658ea0e4d9e --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/DocumentationProviderFeatures.java @@ -0,0 +1,173 @@ +package org.openapitools.codegen.languages.features; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.Objects; + +/** + * The DocumentationProvider Features support to additional properties to select the + * documentation provider and the annotation library to use during code generation. + * + * @author cachescrubber, 2022-01-08 + * @since 5.4.0 + */ +public interface DocumentationProviderFeatures { + + String DOCUMENTATION_PROVIDER = "documentationProvider"; + + String ANNOTATION_LIBRARY = "annotationLibrary"; + + /** + * Define the default documentation Provider for CliOpts processing. + * A NULL return value will disable the documentation provider support. + * Override in subclasses to customize. + * @return the default documentation provider + */ + default DocumentationProvider defaultDocumentationProvider() { + return null; + } + + /** + * Define the List of supported documentation Provider for CliOpts processing. + * Override in subclasses to customize. + * @return the list of supported documentation provider + */ + default List supportedDocumentationProvider() { + List supportedProviders = new ArrayList<>(); + supportedProviders.add(DocumentationProvider.NONE); + return supportedProviders; + } + + /** + * Define the list of supported annotation libraries for CliOpts processing. + * Override in subclasses to customize. + * @return the list of supported annotation libraries + */ + default List supportedAnnotationLibraries() { + List supportedLibraries = new ArrayList<>(); + supportedLibraries.add(AnnotationLibrary.NONE); + return supportedLibraries; + } + + DocumentationProvider getDocumentationProvider(); + + void setDocumentationProvider(DocumentationProvider documentationProvider); + + AnnotationLibrary getAnnotationLibrary(); + + void setAnnotationLibrary(AnnotationLibrary annotationLibrary); + + enum DocumentationProvider { + NONE("withoutDocumentationProvider", "Do not publish an OpenAPI specification.", + AnnotationLibrary.NONE, AnnotationLibrary.values()), + + SOURCE("sourceDocumentationProvider", "Publish the original input OpenAPI specification.", + AnnotationLibrary.NONE, AnnotationLibrary.values()), + + SWAGGER1("swagger1DocumentationProvider", "Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using Swagger-Core 1.x.", + AnnotationLibrary.SWAGGER1, AnnotationLibrary.SWAGGER1), + + SWAGGER2("swagger2DocumentationProvider", "Generate an OpenAPI 3 specification using Swagger-Core 2.x.", + AnnotationLibrary.SWAGGER2, AnnotationLibrary.SWAGGER2), + + SPRINGFOX("springFoxDocumentationProvider", "Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x.", + AnnotationLibrary.SWAGGER1, AnnotationLibrary.SWAGGER1), + + SPRINGDOC("springDocDocumentationProvider", "Generate an OpenAPI 3 specification using SpringDoc.", + AnnotationLibrary.SWAGGER2, AnnotationLibrary.SWAGGER2); + + private final String propertyName; + + private final String description; + + private final AnnotationLibrary preferredAnnotationLibrary; + + private final AnnotationLibrary[] supportedAnnotationLibraries; + + DocumentationProvider(String propertyName, String description, + AnnotationLibrary preferredAnnotationLibrary, + AnnotationLibrary... supportedAnnotationLibraries) { + this.propertyName = propertyName; + this.description = description; + this.preferredAnnotationLibrary = preferredAnnotationLibrary; + this.supportedAnnotationLibraries = supportedAnnotationLibraries; + } + + public static DocumentationProvider ofCliOption(String optVal) { + optVal = Objects.requireNonNull(optVal).toUpperCase(Locale.ROOT); + return valueOf(optVal); + } + + /** + * The property name should be used in the codegen model as a boolean property. + * + * @return the property name for this documentation provider + */ + public String getPropertyName() { + return propertyName; + } + + public String getDescription() { + return description; + } + + public AnnotationLibrary getPreferredAnnotationLibrary() { + return preferredAnnotationLibrary; + } + + public AnnotationLibrary[] getSupportedAnnotationLibraries() { + return supportedAnnotationLibraries; + } + + public List supportedAnnotationLibraries() { + return Arrays.asList(getSupportedAnnotationLibraries()); + } + + public String toCliOptValue() { + return name().toLowerCase(Locale.ROOT); + } + } + + enum AnnotationLibrary { + NONE("withoutAnnotationLibrary", "Do not annotate Model and Api with complementary annotations."), + + SWAGGER1("swagger1AnnotationLibrary", "Annotate Model and Api using the Swagger Annotations 1.x library."), + + SWAGGER2("swagger2AnnotationLibrary", "Annotate Model and Api using the Swagger Annotations 2.x library."), + + MICROPROFILE("microprofileAnnotationLibrary", "Annotate Model and Api using the Microprofile annotations."); + + private final String propertyName; + + private final String description; + + public static AnnotationLibrary ofCliOption(String optVal) { + optVal = Objects.requireNonNull(optVal).toUpperCase(Locale.ROOT); + return valueOf(optVal); + } + + /** + * The property name is used in the codegen model as a boolean property. + * + * @return the property name for this annotation library + */ + public String getPropertyName() { + return propertyName; + } + + public String getDescription() { + return description; + } + + AnnotationLibrary(String propertyName, String description) { + this.propertyName = propertyName; + this.description = description; + } + + public String toCliOptValue() { + return name().toLowerCase(Locale.ROOT); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache index 1cba2038d870..6aa973a6a65a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache @@ -1 +1 @@ -{{#allowableValues}}allowableValues ={{#oas3}} { {{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}} }{{/oas3}}{{^oas3}} "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/oas3}}{{/allowableValues}} \ No newline at end of file +{{#allowableValues}}allowableValues ={{#swagger2AnnotationLibrary}} { {{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}} }{{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/swagger1AnnotationLibrary}}{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index affa1fb385be..da913ae679a0 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -7,7 +7,7 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -{{#oas3}} +{{#swagger2AnnotationLibrary}} import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -16,10 +16,10 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; -{{/oas3}} -{{^oas3}} +{{/swagger2AnnotationLibrary}} +{{#swagger1AnnotationLibrary}} import io.swagger.annotations.*; -{{/oas3}} +{{/swagger1AnnotationLibrary}} {{#jdk8-no-delegate}} {{#virtualService}} import io.virtualan.annotation.ApiVirtual; @@ -75,12 +75,12 @@ import javax.annotation.Generated; {{#useSpringController}} @Controller {{/useSpringController}} -{{#oas3}} +{{#swagger2AnnotationLibrary}} @Tag(name = "{{{baseName}}}", description = "the {{{baseName}}} API") -{{/oas3}} -{{^oas3}} +{{/swagger2AnnotationLibrary}} +{{#swagger1AnnotationLibrary}} @Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API") -{{/oas3}} +{{/swagger1AnnotationLibrary}} {{#operations}} {{#virtualService}} @VirtualService @@ -126,7 +126,7 @@ public interface {{classname}} { {{#virtualService}} @ApiVirtual {{/virtualService}} - {{#oas3}} + {{#swagger2AnnotationLibrary}} @Operation( operationId = "{{{operationId}}}", {{#summary}} @@ -146,8 +146,8 @@ public interface {{classname}} { {{/authMethods}} }{{/hasAuthMethods}} ) - {{/oas3}} - {{^oas3}} + {{/swagger2AnnotationLibrary}} + {{#swagger1AnnotationLibrary}} @ApiOperation( tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }, value = "{{{summary}}}", @@ -174,20 +174,20 @@ public interface {{classname}} { @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}} {{/responses}} }) - {{/oas3}} + {{/swagger1AnnotationLibrary}} {{#implicitHeaders}} - {{#oas3}} + {{#swagger2AnnotationLibrary}} @Parameters({ {{#headerParams}} {{>paramDoc}}{{^-last}},{{/-last}} {{/headerParams}} - {{/oas3}} - {{^oas3}} + {{/swagger2AnnotationLibrary}} + {{#swagger1AnnotationLibrary}} @ApiImplicitParams({ {{#headerParams}} {{>implicitHeader}}{{^-last}},{{/-last}} {{/headerParams}} - {{/oas3}} + {{/swagger1AnnotationLibrary}} }) {{/implicitHeaders}} @RequestMapping( @@ -201,15 +201,15 @@ public interface {{classname}} { {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}( {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, - {{/hasParams}}{{#oas3}}@Parameter(hidden = true){{/oas3}}{{#useSpringfox}}@ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, - {{/hasParams}}{{#useSpringfox}}@ApiIgnore {{/useSpringfox}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}} + {{/hasParams}}{{#swagger2AnnotationLibrary}}@Parameter(hidden = true){{/swagger2AnnotationLibrary}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, + {{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore {{/springFoxDocumentationProvider}}{{#springDocDocumentationProvider}}@ParameterObject {{/springDocDocumentationProvider}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}} ){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} { {{#delegate-method}} return {{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, pageable{{/vendorExtensions.x-spring-paginated}}); } // Override this method - {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#useSpringfox}}@ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#useSpringfox}}@ApiIgnore{{/useSpringfox}} final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { + {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}} final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { {{/delegate-method}} {{^isDelegate}} {{>methodBody}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache index ca8076c56a47..374fe9eaa8c9 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache @@ -3,7 +3,7 @@ package {{package}}; {{^jdk8}} {{#imports}}import {{import}}; {{/imports}} -{{#oas3}} +{{#swagger2AnnotationLibrary}} import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; @@ -11,10 +11,10 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; -{{/oas3}} -{{^oas3}} +{{/swagger2AnnotationLibrary}} +{{^swagger1AnnotationLibrary}} import io.swagger.annotations.*; -{{/oas3}} +{{/swagger1AnnotationLibrary}} import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -132,7 +132,7 @@ public class {{classname}}Controller implements {{classname}} { public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}( {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, - {{/hasParams}}{{#useSpringfox}}@ApiIgnore {{/useSpringfox}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}} + {{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore {{/springFoxDocumentationProvider}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}} ) { {{^isDelegate}} {{^async}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache index f909a15b37df..189eccefbc83 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache @@ -1,35 +1,36 @@ package {{configPackage}}; -{{^useSpringfox}} +{{^springFoxDocumentationProvider}} +import org.springframework.context.annotation.Bean; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} import org.springframework.stereotype.Controller; -{{^useSpringfox}} +{{^springFoxDocumentationProvider}} import org.springframework.util.StreamUtils; import org.springframework.web.bind.annotation.GetMapping; -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} import org.springframework.web.bind.annotation.RequestMapping; -{{^useSpringfox}} +{{^springFoxDocumentationProvider}} import org.springframework.web.bind.annotation.ResponseBody; -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} {{#reactive}} +import org.springframework.context.annotation.Bean; import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.ServerResponse; {{/reactive}} -{{^useSpringfox}} +{{^springFoxDocumentationProvider}} import java.io.IOException; import java.io.InputStream; -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} {{#reactive}} import java.net.URI; {{/reactive}} -{{^useSpringfox}} +{{^springFoxDocumentationProvider}} import java.nio.charset.Charset; -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} {{#reactive}} import static org.springframework.web.reactive.function.server.RequestPredicates.GET; @@ -42,7 +43,7 @@ import static org.springframework.web.reactive.function.server.RouterFunctions.r @Controller public class HomeController { -{{^useSpringfox}} +{{^springFoxDocumentationProvider}} private static YAMLMapper yamlMapper = new YAMLMapper(); @Value("classpath:/openapi.yaml") @@ -67,20 +68,20 @@ public class HomeController { return yamlMapper.readValue(openapiContent(), Object.class); } -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} {{#reactive}} @Bean RouterFunction index() { return route( GET("/"), - req -> ServerResponse.temporaryRedirect(URI.create("{{#useSpringfox}}swagger-ui.html{{/useSpringfox}}{{^useSpringfox}}swagger-ui/index.html?url=../openapi.json{{/useSpringfox}}")).build() + req -> ServerResponse.temporaryRedirect(URI.create("{{#springFoxDocumentationProvider}}swagger-ui.html{{/springFoxDocumentationProvider}}{{^springFoxDocumentationProvider}}swagger-ui/index.html?url=../openapi.json{{/springFoxDocumentationProvider}}")).build() ); } {{/reactive}} {{^reactive}} @RequestMapping("/") public String index() { - return "redirect:{{#useSpringfox}}swagger-ui.html{{/useSpringfox}}{{^useSpringfox}}swagger-ui/index.html?url=../openapi.json{{/useSpringfox}}"; + return "redirect:{{#springFoxDocumentationProvider}}swagger-ui.html{{/springFoxDocumentationProvider}}{{^springFoxDocumentationProvider}}swagger-ui/index.html?url=../openapi.json{{/springFoxDocumentationProvider}}"; } {{/reactive}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/README.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/README.mustache index 196292339da4..b304cb8866d8 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/README.mustache @@ -8,10 +8,10 @@ This server was generated by the [OpenAPI Generator](https://openapi-generator.t By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. -{{#useSpringfox}} +{{#springFoxDocumentationProvider}} The underlying library integrating OpenAPI to SpringBoot is [springfox](https://github.com/springfox/springfox) -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} Start your server as a simple java application {{^reactive}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/application.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/application.mustache index 6eb4ae242983..06f041051b96 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/application.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/application.mustache @@ -1,6 +1,6 @@ -{{#useSpringfox}} +{{#springFoxDocumentationProvider}} springfox.documentation.swagger.v2.path=/api-docs -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} server.port={{serverPort}} spring.jackson.date-format={{basePackage}}.RFC3339DateFormat spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/openapi2SpringBoot.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/openapi2SpringBoot.mustache index 8180f6c50a01..a171e3cff16b 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/openapi2SpringBoot.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/openapi2SpringBoot.mustache @@ -12,9 +12,9 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; {{^reactive}} import org.springframework.web.servlet.config.annotation.CorsRegistry; - {{^useSpringfox}} + {{^springFoxDocumentationProvider}} import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; - {{/useSpringfox}} + {{/springFoxDocumentationProvider}} import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; {{^java8}} import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @@ -22,9 +22,9 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter {{/reactive}} {{#reactive}} import org.springframework.web.reactive.config.CorsRegistry; - {{^useSpringfox}} + {{^springFoxDocumentationProvider}} import org.springframework.web.reactive.config.ResourceHandlerRegistry; - {{/useSpringfox}} + {{/springFoxDocumentationProvider}} import org.springframework.web.reactive.config.WebFluxConfigurer; {{/reactive}} @@ -63,13 +63,13 @@ public class OpenAPI2SpringBoot implements CommandLineRunner { .allowedMethods("*") .allowedHeaders("Content-Type"); }*/ -{{^useSpringfox}} +{{^springFoxDocumentationProvider}} @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); } -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} }; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache index 05447fe9563d..c929876ffc44 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache @@ -9,12 +9,22 @@ {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} ${java.version} ${java.version} - {{#useSpringfox}} + {{#springFoxDocumentationProvider}} 2.9.2 - {{/useSpringfox}} - {{^useSpringfox}} - {{#oas3}}2.1.11{{/oas3}}{{^oas3}}1.6.3{{/oas3}} - {{/useSpringfox}} + {{/springFoxDocumentationProvider}} + {{#springDocDocumentationProvider}} + 1.6.4 + {{/springDocDocumentationProvider}} + {{^springFoxDocumentationProvider}} + {{^springDocDocumentationProvider}} + {{#swagger1AnnotationLibrary}} + 1.6.4 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + }2.1.12 + {{/swagger2AnnotationLibrary}} + {{/springDocDocumentationProvider}} + {{/springFoxDocumentationProvider}} {{#parentOverridden}} @@ -27,7 +37,7 @@ org.springframework.boot spring-boot-starter-parent - 2.5.8 + {{#springFoxDocumentationProvider}}2.5.8{{/springFoxDocumentationProvider}}{{^springFoxDocumentationProvider}}2.6.2{{/springFoxDocumentationProvider}} {{/parentOverridden}} @@ -82,30 +92,40 @@ org.springframework.data spring-data-commons - {{#useSpringfox}} + {{#springDocDocumentationProvider}} + + + org.springdoc + springdoc-openapi-ui + ${springdoc.version} + + {{/springDocDocumentationProvider}} + {{#springFoxDocumentationProvider}} io.springfox springfox-swagger2 ${springfox.version} - {{/useSpringfox}} - {{^useSpringfox}} - {{#oas3}} + {{/springFoxDocumentationProvider}} + {{^springFoxDocumentationProvider}} + {{^springDocDocumentationProvider}} + {{#swagger1AnnotationLibrary}} - io.swagger.core.v3 + io.swagger swagger-annotations - ${swagger-core-version} + ${swagger-annotations.version} - {{/oas3}} - {{^oas3}} + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} - io.swagger + io.swagger.core.v3 swagger-annotations - ${swagger-core-version} + ${swagger-annotations.version} - {{/oas3}} - {{/useSpringfox}} + {{/swagger2AnnotationLibrary}} + {{/springDocDocumentationProvider}} + {{/springFoxDocumentationProvider}} com.google.code.findbugs diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache index f9228dd345e2..64a0b7189bae 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache @@ -9,10 +9,22 @@ {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} ${java.version} ${java.version} - {{#oas3}}2.1.11{{/oas3}}{{^oas3}}1.6.3{{/oas3}} - {{#useSpringfox}} + {{#springFoxDocumentationProvider}} 2.9.2 - {{/useSpringfox}} + {{/springFoxDocumentationProvider}} + {{#springDocDocumentationProvider}} + 1.6.4 + {{/springDocDocumentationProvider}} + {{^springFoxDocumentationProvider}} + {{^springDocDocumentationProvider}} + {{#swagger1AnnotationLibrary}} + 1.6.4 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + }2.1.12 + {{/swagger2AnnotationLibrary}} + {{/springDocDocumentationProvider}} + {{/springFoxDocumentationProvider}} {{#parentOverridden}} @@ -47,30 +59,40 @@ {{/parentOverridden}} - {{#useSpringfox}} + {{#springDocDocumentationProvider}} + + + org.springdoc + springdoc-openapi-ui + ${springdoc.version} + + {{/springDocDocumentationProvider}} + {{#springFoxDocumentationProvider}} io.springfox springfox-swagger2 ${springfox.version} - {{/useSpringfox}} - {{^useSpringfox}} - {{#oas3}} + {{/springFoxDocumentationProvider}} + {{^springFoxDocumentationProvider}} + {{^springDocDocumentationProvider}} + {{#swagger1AnnotationLibrary}} - io.swagger.core.v3 + io.swagger swagger-annotations - ${swagger-core-version} + ${swagger-annotations.version} - {{/oas3}} - {{^oas3}} + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} - io.swagger + io.swagger.core.v3 swagger-annotations - ${swagger-core-version} + ${swagger-annotations.version} - {{/oas3}} - {{/useSpringfox}} + {{/swagger2AnnotationLibrary}} + {{/springDocDocumentationProvider}} + {{/springFoxDocumentationProvider}} com.google.code.findbugs diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/README.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/README.mustache index efc3e8921a6c..bdd21d95a70d 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/README.mustache @@ -6,9 +6,9 @@ Spring MVC Server ## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the Spring MVC framework. -{{#useSpringfox}} +{{#springFoxDocumentationProvider}} The underlying library integrating OpenAPI to Spring-MVC is [springfox](https://github.com/springfox/springfox) -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} You can view the server in swagger-ui by pointing to http://localhost:{{serverPort}}{{contextPath}}{{^contextPath}}/{{/contextPath}}/ \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/application.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/application.mustache index 67214287ed3d..655c870be613 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/application.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/application.mustache @@ -1,3 +1,3 @@ -{{#useSpringfox}} +{{#springFoxDocumentationProvider}} springfox.documentation.swagger.v2.path=/api-docs -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/openapiUiConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/openapiUiConfiguration.mustache index 8709512d54a9..a9b5410403d2 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/openapiUiConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/openapiUiConfiguration.mustache @@ -11,9 +11,9 @@ import org.openapitools.jackson.nullable.JsonNullableModule; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -{{#useSpringfox}} +{{#springFoxDocumentationProvider}} import org.springframework.context.annotation.Import; -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} import org.springframework.context.annotation.Bean; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.StringHttpMessageConverter; @@ -39,9 +39,9 @@ import javax.annotation.Generated; @ComponentScan(basePackages = {"{{apiPackage}}", "{{configPackage}}"}) @EnableWebMvc @PropertySource("classpath:application.properties") -{{#useSpringfox}} +{{#springFoxDocumentationProvider}} @Import(OpenAPIDocumentationConfig.class) -{{/useSpringfox}} +{{/springFoxDocumentationProvider}} public class OpenAPIUiConfiguration extends WebMvcConfigurerAdapter { private static final String[] SERVLET_RESOURCE_LOCATIONS = { "/" }; @@ -81,11 +81,11 @@ public class OpenAPIUiConfiguration extends WebMvcConfigurerAdapter { if (!registry.hasMappingForPattern("/**")) { registry.addResourceHandler("/**").addResourceLocations(RESOURCE_LOCATIONS); } - {{^useSpringfox}} + {{^springFoxDocumentationProvider}} if (!registry.hasMappingForPattern("/swagger-ui/**")) { registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); } - {{/useSpringfox}} + {{/springFoxDocumentationProvider}} } /*@Override diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache index f0f17f6b2088..3610261ac22a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache @@ -147,7 +147,7 @@ jakarta.xml.bind-api ${jakarta.xml.bind-version} - {{#useSpringfox}} + {{#springFoxDocumentationProvider}} io.springfox @@ -165,8 +165,8 @@ springfox-swagger-ui ${springfox-version} - {{/useSpringfox}} - {{^useSpringfox}} + {{/springFoxDocumentationProvider}} + {{^springFoxDocumentationProvider}} io.springfox springfox-swagger2 @@ -208,7 +208,7 @@ jackson-dataformat-yaml ${jackson-version} - {{/useSpringfox}} + {{/springFoxDocumentationProvider}} {{#withXml}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache index 18f1ca620719..9261660fe365 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache @@ -26,9 +26,9 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; {{/withXml}} {{/jackson}} -{{#oas3}} +{{#swagger2AnnotationLibrary}} import io.swagger.v3.oas.annotations.media.Schema; -{{/oas3}} +{{/swagger2AnnotationLibrary}} {{#withXml}} import javax.xml.bind.annotation.*; diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache index 7f3eb71e0b01..304e097c219f 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache @@ -1 +1 @@ -{{#oas3}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}, schema = @Schema(description = ""{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}})){{/oas3}}{{^oas3}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/oas3}} \ No newline at end of file +{{#swagger2AnnotationLibrary}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}, schema = @Schema(description = ""{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}})){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/swagger1AnnotationLibrary}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index dd1ac7f2b98a..c33f9ac03b4c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -3,7 +3,12 @@ */ {{>additionalModelTypeAnnotations}} {{#description}} -{{#oas3}}@Schema({{#name}}name = "{{name}}", {{/name}}{{/oas3}}{{^oas3}}@ApiModel({{/oas3}}description = "{{{.}}}") +{{#swagger1AnnotationLibrary}} +@ApiModel(description = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +@Schema({{#name}}name = "{{name}}", {{/name}}description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} {{/description}} {{#discriminator}} {{>typeInfoAnnotation}} @@ -130,12 +135,12 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} - {{#oas3}} + {{#swagger2AnnotationLibrary}} @Schema(name = "{{{baseName}}}", {{#isReadOnly}}accessMode = Schema.AccessMode.READ_ONLY, {{/isReadOnly}}{{#example}}example = "{{{.}}}", {{/example}}{{#description}}description = "{{{.}}}", {{/description}}required = {{{required}}}) - {{/oas3}} - {{^oas3}} + {{/swagger2AnnotationLibrary}} + {{#swagger1AnnotationLibrary}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") - {{/oas3}} + {{/swagger1AnnotationLibrary}} public {{>nullableDataType}} {{getter}}() { return {{name}}; } 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 a5b43b0e3b7d..456dea2f4001 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 @@ -43,6 +43,7 @@ import static org.openapitools.codegen.TestUtils.assertFileContains; import static org.openapitools.codegen.TestUtils.assertFileNotContains; import static org.openapitools.codegen.languages.SpringCodegen.RESPONSE_WRAPPER; +import static org.openapitools.codegen.languages.features.DocumentationProviderFeatures.DOCUMENTATION_PROVIDER; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; @@ -486,6 +487,7 @@ public void testMultipartBoot() throws IOException { final SpringCodegen codegen = new SpringCodegen(); codegen.setLibrary("spring-boot"); codegen.setDelegatePattern(true); + codegen.additionalProperties().put(DOCUMENTATION_PROVIDER, "springfox"); final Map files = generateFiles(codegen, "src/test/resources/3_0/form-multipart-binary-array.yaml"); @@ -687,6 +689,7 @@ public void doGeneratePathVariableForSimpleParam() throws IOException { SpringCodegen codegen = new SpringCodegen(); codegen.setOutputDir(output.getAbsolutePath()); codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + codegen.additionalProperties().put(DOCUMENTATION_PROVIDER, "springfox"); ClientOptInput input = new ClientOptInput(); input.openAPI(openAPI); @@ -800,6 +803,7 @@ public void testImportMappings() { Assert.assertEquals(codegen.importMapping().get("Pageable"), "org.springframework.data.domain.Pageable"); Assert.assertEquals(codegen.importMapping().get("DateTimeFormat"), "org.springframework.format.annotation.DateTimeFormat"); Assert.assertEquals(codegen.importMapping().get("ApiIgnore"), "springfox.documentation.annotations.ApiIgnore"); + Assert.assertEquals(codegen.importMapping().get("ParameterObject"), "org.springdoc.api.annotations.ParameterObject"); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/languages/features/DocumentationProviderFeaturesTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/languages/features/DocumentationProviderFeaturesTest.java new file mode 100644 index 000000000000..0954e79fb3a9 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/languages/features/DocumentationProviderFeaturesTest.java @@ -0,0 +1,50 @@ +package org.openapitools.codegen.languages.features; + +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.stream.Collectors; +import org.openapitools.codegen.languages.features.DocumentationProviderFeatures.AnnotationLibrary; +import org.openapitools.codegen.languages.features.DocumentationProviderFeatures.DocumentationProvider; +import org.testng.Assert; +import org.testng.annotations.Test; + +// Tests are not final, methods currently just generate documentation as MD tables. +public class DocumentationProviderFeaturesTest { + + @Test(priority = 0) + void generateDocumentationProviderTable() { + List providers = Arrays.asList(DocumentationProvider.values()); + StringBuilder sb = new StringBuilder(); + sb.append("### DocumentationProvider\n"); + sb.append("|Cli Option|Description|Property Name|Preferred Annotation Library|Supported Annotation Libraries|\n"); + sb.append("|----------|-----------|-------------|----------------------------|------------------------------|\n"); + providers.forEach(dp -> sb.append(String.format(Locale.ROOT, "|**%s**|%s|`%s`|%s|%s|\n", + dp.toCliOptValue(), + dp.getDescription(), + dp.getPropertyName(), + dp.getPreferredAnnotationLibrary().toCliOptValue(), + dp.supportedAnnotationLibraries().stream() + .map(AnnotationLibrary::toCliOptValue) + .collect(Collectors.joining(", ")) + ))); + sb.append("\n"); + Assert.assertTrue(sb.toString().contains("none")); + } + + @Test(priority = 1) + void generateAnnotationLibraryTable() { + List libraries = Arrays.asList(AnnotationLibrary.values()); + StringBuilder sb = new StringBuilder(); + sb.append("### AnnotationLibrary\n"); + sb.append("|Cli Option|Description|Property Name|\n"); + sb.append("|----------|-----------|-----------|\n"); + libraries.forEach(dp -> sb.append(String.format(Locale.ROOT, "|**%s**|%s|`%s`|\n", + dp.toCliOptValue(), + dp.getDescription(), + dp.getPropertyName() + ))); + Assert.assertTrue(sb.toString().contains("none")); + sb.append("\n"); + } +} \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/pom.xml b/samples/client/petstore/spring-cloud-async/pom.xml index 6b400a3539fe..d542d02ebc73 100644 --- a/samples/client/petstore/spring-cloud-async/pom.xml +++ b/samples/client/petstore/spring-cloud-async/pom.xml @@ -9,7 +9,6 @@ 1.8 ${java.version} ${java.version} - 1.6.3 2.9.2 diff --git a/samples/client/petstore/spring-cloud-date-time/pom.xml b/samples/client/petstore/spring-cloud-date-time/pom.xml index c01b2969fb37..36fac629b8d1 100644 --- a/samples/client/petstore/spring-cloud-date-time/pom.xml +++ b/samples/client/petstore/spring-cloud-date-time/pom.xml @@ -9,7 +9,6 @@ 1.8 ${java.version} ${java.version} - 1.6.3 2.9.2 diff --git a/samples/client/petstore/spring-cloud-spring-pageable/pom.xml b/samples/client/petstore/spring-cloud-spring-pageable/pom.xml index 622e4334036f..d6f807b454e5 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/pom.xml +++ b/samples/client/petstore/spring-cloud-spring-pageable/pom.xml @@ -9,7 +9,6 @@ 1.8 ${java.version} ${java.version} - 1.6.3 2.9.2 diff --git a/samples/client/petstore/spring-cloud/pom.xml b/samples/client/petstore/spring-cloud/pom.xml index 6b400a3539fe..d542d02ebc73 100644 --- a/samples/client/petstore/spring-cloud/pom.xml +++ b/samples/client/petstore/spring-cloud/pom.xml @@ -9,7 +9,6 @@ 1.8 ${java.version} ${java.version} - 1.6.3 2.9.2 diff --git a/samples/openapi3/client/petstore/spring-cloud-async/pom.xml b/samples/openapi3/client/petstore/spring-cloud-async/pom.xml index 950b9bbe3531..d236e4527106 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud-async/pom.xml @@ -9,7 +9,7 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot @@ -33,10 +33,11 @@ + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml b/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml index 9f8de9c14cdf..cd2a2017c6cf 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/pom.xml @@ -9,7 +9,7 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot @@ -33,10 +33,11 @@ + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml index 6cf023f501f2..899cb60d2d7c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/pom.xml @@ -9,7 +9,7 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot @@ -33,10 +33,11 @@ + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml index 648e8d7f9950..933cfb2a5ff7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/pom.xml @@ -9,7 +9,7 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot @@ -33,10 +33,11 @@ + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} 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 4ae25d24dfb3..1a58d97ea6ca 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 @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; +import org.springdoc.api.annotations.ParameterObject; import org.openapitools.model.Pet; import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; @@ -119,7 +120,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status, - final Pageable pageable + @ParameterObject final Pageable pageable ); @@ -151,7 +152,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags, - final Pageable pageable + @ParameterObject final Pageable pageable ); diff --git a/samples/openapi3/client/petstore/spring-cloud/pom.xml b/samples/openapi3/client/petstore/spring-cloud/pom.xml index 6cf023f501f2..899cb60d2d7c 100644 --- a/samples/openapi3/client/petstore/spring-cloud/pom.xml +++ b/samples/openapi3/client/petstore/spring-cloud/pom.xml @@ -9,7 +9,7 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot @@ -33,10 +33,11 @@ + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/client/petstore/spring-stubs/pom.xml b/samples/openapi3/client/petstore/spring-stubs/pom.xml index 5e1f049caf43..b2890ab9d519 100644 --- a/samples/openapi3/client/petstore/spring-stubs/pom.xml +++ b/samples/openapi3/client/petstore/spring-stubs/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.6.2 src/main/java @@ -28,10 +28,11 @@ org.springframework.data spring-data-commons + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator-ignore b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/.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/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/FILES b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/FILES new file mode 100644 index 000000000000..7de4a0d86c09 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/FILES @@ -0,0 +1,20 @@ +README.md +pom.xml +src/main/java/org/openapitools/OpenAPI2SpringBoot.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiController.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiController.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiController.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java +src/main/resources/application.properties +src/main/resources/openapi.yaml diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/README.md b/samples/openapi3/server/petstore/spring-boot-springdoc/README.md new file mode 100644 index 000000000000..5bbe4a495d99 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/README.md @@ -0,0 +1,16 @@ +# OpenAPI generated server + +Spring Boot Server + + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:8080/ + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/pom.xml b/samples/openapi3/server/petstore/spring-boot-springdoc/pom.xml new file mode 100644 index 000000000000..8cc169fadddd --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/pom.xml @@ -0,0 +1,72 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-boot-springdoc + jar + spring-boot-springdoc + 1.0.0-SNAPSHOT + + 1.8 + ${java.version} + ${java.version} + 1.6.4 + + + org.springframework.boot + spring-boot-starter-parent + 2.6.2 + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + org.springdoc + springdoc-openapi-ui + ${springdoc.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/OpenAPI2SpringBoot.java new file mode 100644 index 000000000000..cb088f451935 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -0,0 +1,63 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebMvcConfigurer webConfigurer() { + return new WebMvcConfigurer() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); + } + }; + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +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.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(); + } + + @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 this; + } +} \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} 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 new file mode 100644 index 000000000000..f27571c387be --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,393 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + operationId = "addPet", + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + produces = { "application/xml", "application/json" }, + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity addPet( + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet pet + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + @Operation( + operationId = "deletePet", + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + default ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + operationId = "findPetsByStatus", + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + operationId = "findPetsByTags", + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + operationId = "getPetById", + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /pet : Update an existing pet + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + operationId = "updatePet", + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + produces = { "application/xml", "application/json" }, + consumes = { "application/json", "application/xml" } + ) + default ResponseEntity updatePet( + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet pet + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + operationId = "updatePetWithForm", + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = { "application/x-www-form-urlencoded" } + ) + default ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "uploadFile", + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + default ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApiController.java new file mode 100644 index 000000000000..4ad9ef06158b --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApiController.java @@ -0,0 +1,27 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class PetApiController implements PetApi { + + private final NativeWebRequest request; + + @Autowired + public PetApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..04b786a8ba48 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,190 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + operationId = "deleteOrder", + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + default ResponseEntity deleteOrder( + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("orderId") String orderId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + operationId = "getInventory", + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = { "application/json" } + ) + default ResponseEntity> getInventory( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * 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 + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + operationId = "getOrderById", + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("orderId") Long orderId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /store/order : Place an order for a pet + * + * @param order order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + operationId = "placeOrder", + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = { "application/xml", "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity placeOrder( + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order order + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApiController.java new file mode 100644 index 000000000000..293d3035f805 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApiController.java @@ -0,0 +1,27 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class StoreApiController implements StoreApi { + + private final NativeWebRequest request; + + @Autowired + public StoreApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} 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 new file mode 100644 index 000000000000..3268f2475c06 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,304 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param user Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUser", + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user", + consumes = { "application/json" } + ) + default ResponseEntity createUser( + @Parameter(name = "User", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User user + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUsersWithArrayInput", + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray", + consumes = { "application/json" } + ) + default ResponseEntity createUsersWithArrayInput( + @Parameter(name = "User", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List user + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUsersWithListInput", + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList", + consumes = { "application/json" } + ) + default ResponseEntity createUsersWithListInput( + @Parameter(name = "User", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List user + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "deleteUser", + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + default ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "getUserByName", + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + operationId = "loginUser", + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = { "application/xml", "application/json" } + ) + default ResponseEntity loginUser( + @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + operationId = "logoutUser", + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + default ResponseEntity logoutUser( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "updateUser", + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}", + consumes = { "application/json" } + ) + default ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "User", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User user + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApiController.java new file mode 100644 index 000000000000..aab4767a50d0 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApiController.java @@ -0,0 +1,27 @@ +package org.openapitools.api; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class UserApiController implements UserApi { + + private final NativeWebRequest request; + + @Autowired + public UserApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..61d4ebb31830 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,53 @@ +package org.openapitools.configuration; + +import org.springframework.context.annotation.Bean; +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Controller; +import org.springframework.util.StreamUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + private static YAMLMapper yamlMapper = new YAMLMapper(); + + @Value("classpath:/openapi.yaml") + private Resource openapi; + + @Bean + public String openapiContent() throws IOException { + try(InputStream is = openapi.getInputStream()) { + return StreamUtils.copyToString(is, Charset.defaultCharset()); + } + } + + @GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi") + @ResponseBody + public String openapiYaml() throws IOException { + return openapiContent(); + } + + @GetMapping(value = "/openapi.json", produces = "application/json") + @ResponseBody + public Object openapiJson() throws IOException { + return yamlMapper.readValue(openapiContent(), Object.class); + } + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui/index.html?url=../openapi.json"; + } + + +} diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..823adb2ae4d8 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A category for a pet + */ + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + 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 + */ + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(name = "name", required = false) + 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/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..ea4f1e402648 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,132 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Describes the result of uploading an image resource + */ + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @Schema(name = "code", required = false) + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", required = false) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @Schema(name = "message", required = false) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..e624a0d7c1fe --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,245 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * An order for a pets from the pet store + */ + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + + @Schema(name = "petId", required = false) + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + + @Schema(name = "quantity", required = false) + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Valid + @Schema(name = "shipDate", required = false) + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + + @Schema(name = "status", description = "Order Status", required = false) + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + + @Schema(name = "complete", required = false) + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..ddff66759bac --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,261 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A pet for sale in the pet store + */ + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + 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 + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Valid + @Schema(name = "category", required = false) + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @Schema(name = "name", example = "doggie", required = true) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + 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 + */ + @NotNull + @Schema(name = "photoUrls", required = true) + 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 + */ + @Valid + @Schema(name = "tags", required = false) + 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 + */ + + @Schema(name = "status", description = "pet status in the store", required = false) + 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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..5c3ac82ba6e8 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A tag for a pet + */ + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + 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 + */ + + @Schema(name = "name", required = false) + 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/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..328569672eb4 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,252 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A User who is purchasing from the pet store + */ + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + + @Schema(name = "username", required = false) + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + + @Schema(name = "firstName", required = false) + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + + @Schema(name = "lastName", required = false) + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + + @Schema(name = "email", required = false) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + + @Schema(name = "password", required = false) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + + @Schema(name = "phone", required = false) + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + + @Schema(name = "userStatus", description = "User Status", required = false) + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/application.properties b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/application.properties new file mode 100644 index 000000000000..7e90813e59b2 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=8080 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false 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 new file mode 100644 index 000000000000..56703dfefb56 --- /dev/null +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml @@ -0,0 +1,893 @@ +openapi: 3.0.0 +info: + description: This is a sample server Petstore server. For this sample, you can use + the api key `special-key` to test the authorization filters. + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io +servers: +- url: http://petstore.swagger.io/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + post: + operationId: addPet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "405": + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + put: + operationId: updatePet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Pet not found + "405": + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - deprecated: true + description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + description: Invalid status value + security: + - petstore_auth: + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/findByTags: + get: + deprecated: true + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + description: Invalid tag value + security: + - petstore_auth: + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}: + delete: + operationId: deletePet + parameters: + - explode: false + in: header + name: api_key + required: false + schema: + type: string + style: simple + - description: Pet id to delete + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "400": + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + post: + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object' + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + responses: + "405": + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-contentType: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile + parameters: + - description: ID of pet to update + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object_1' + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /store/order: + post: + operationId: placeOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: store + /store/order/{orderId}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + explode: false + in: path + name: orderId + required: true + schema: + type: string + style: simple + responses: + "400": + description: Invalid ID supplied + "404": + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + explode: false + in: path + name: orderId + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Order not found + summary: Find purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Create user + tags: + - user + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/createWithArray: + post: + operationId: createUsersWithArrayInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Creates list of users with given input array + tags: + - user + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/createWithList: + post: + operationId: createUsersWithListInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Creates list of users with given input array + tags: + - user + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/login: + get: + operationId: loginUser + parameters: + - description: The user name for login + explode: true + in: query + name: username + required: true + schema: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ + type: string + style: form + - description: The password for login in clear text + explode: true + in: query + name: password + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + Set-Cookie: + description: Cookie authentication key for use with the `api_key` apiKey + authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple + X-Rate-Limit: + description: calls per hour allowed by the user + explode: false + schema: + format: int32 + type: integer + style: simple + X-Expires-After: + description: date in UTC when token expires + explode: false + schema: + format: date-time + type: string + style: simple + "400": + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/logout: + get: + operationId: logoutUser + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "400": + description: Invalid username supplied + "404": + description: User not found + security: + - api_key: [] + summary: Delete user + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + get: + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + description: Invalid username supplied + "404": + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + description: Invalid user supplied + "404": + description: User not found + security: + - api_key: [] + summary: Updated user + tags: + - user + x-contentType: application/json + x-accepts: application/json + x-tags: + - tag: user +components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' + schemas: + Order: + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + title: Pet Order + type: object + xml: + name: Order + Category: + description: A category for a pet + example: + name: name + id: 6 + properties: + id: + format: int64 + type: integer + name: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ + type: string + title: Pet category + type: object + xml: + name: Category + User: + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + title: a User + type: object + xml: + name: User + Tag: + description: A tag for a pet + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + title: Pet Tag + type: object + xml: + name: Tag + Pet: + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + deprecated: true + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + title: a Pet + type: object + xml: + name: Pet + ApiResponse: + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + title: An uploaded response + type: object + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml index 737d7740cd59..d6ebd909ee86 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/pom.xml @@ -9,12 +9,12 @@ 1.7 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.6.2 src/main/java @@ -34,10 +34,11 @@ org.springframework.data spring-data-commons + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7c04dd3bba6b..cac2bbc73b8f 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -8,6 +8,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 29b8c0d8176d..7081ba1a4304 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index aaed20e877f5..c28517ba229d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -8,6 +8,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 5b4cc8611ca9..97a3ec705b7b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 5d9974b56913..9b0ba8bd7203 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index 27741595f571..781b593f564e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/HomeController.java index 34bae16b8986..61d4ebb31830 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/HomeController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/HomeController.java @@ -1,8 +1,8 @@ package org.openapitools.configuration; +import org.springframework.context.annotation.Bean; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; diff --git a/samples/openapi3/server/petstore/springboot-delegate/pom.xml b/samples/openapi3/server/petstore/springboot-delegate/pom.xml index 35758ea64964..8edd9579ef5c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/pom.xml +++ b/samples/openapi3/server/petstore/springboot-delegate/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.6.2 src/main/java @@ -34,10 +34,11 @@ org.springframework.data spring-data-commons + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/HomeController.java index 34bae16b8986..61d4ebb31830 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/HomeController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/HomeController.java @@ -1,8 +1,8 @@ package org.openapitools.configuration; +import org.springframework.context.annotation.Bean; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml b/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml index 1034cd0499da..7759fcc3928a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.6.2 src/main/java @@ -34,10 +34,11 @@ org.springframework.data spring-data-commons + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/HomeController.java index 34bae16b8986..61d4ebb31830 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/HomeController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/HomeController.java @@ -1,8 +1,8 @@ package org.openapitools.configuration; +import org.springframework.context.annotation.Bean; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; diff --git a/samples/openapi3/server/petstore/springboot-reactive/pom.xml b/samples/openapi3/server/petstore/springboot-reactive/pom.xml index a6268c2794f7..098af25f1834 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/pom.xml +++ b/samples/openapi3/server/petstore/springboot-reactive/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.6.2 src/main/java @@ -34,10 +34,11 @@ org.springframework.data spring-data-commons + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java index b1e5bfc21ee5..fadcaeb03c60 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java @@ -1,14 +1,15 @@ package org.openapitools.configuration; +import org.springframework.context.annotation.Bean; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.context.annotation.Bean; import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.ServerResponse; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/pom.xml b/samples/openapi3/server/petstore/springboot-useoptional/pom.xml index 800e0576cb50..975547fc709c 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/pom.xml +++ b/samples/openapi3/server/petstore/springboot-useoptional/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.6.2 src/main/java @@ -34,10 +34,11 @@ org.springframework.data spring-data-commons + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/HomeController.java index 34bae16b8986..61d4ebb31830 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/HomeController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/HomeController.java @@ -1,8 +1,8 @@ package org.openapitools.configuration; +import org.springframework.context.annotation.Bean; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; diff --git a/samples/openapi3/server/petstore/springboot/pom.xml b/samples/openapi3/server/petstore/springboot/pom.xml index d0efb3028cea..4320644df2cc 100644 --- a/samples/openapi3/server/petstore/springboot/pom.xml +++ b/samples/openapi3/server/petstore/springboot/pom.xml @@ -9,12 +9,12 @@ 1.8 ${java.version} ${java.version} - 2.1.11 + 1.6.4 org.springframework.boot spring-boot-starter-parent - 2.5.8 + 2.6.2 src/main/java @@ -34,10 +34,11 @@ org.springframework.data spring-data-commons + - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/configuration/HomeController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/configuration/HomeController.java index 34bae16b8986..61d4ebb31830 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/configuration/HomeController.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/configuration/HomeController.java @@ -1,8 +1,8 @@ package org.openapitools.configuration; +import org.springframework.context.annotation.Bean; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index c9ae29ba1fea..ec8ea57868a8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index aa5e668384ee..4bac5c6a4d42 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -12,7 +12,6 @@ import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index e1119b1010d6..64dd84c74f47 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index ba115c2cd0a4..8c66ba7d8b56 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -4,7 +4,6 @@ import org.openapitools.model.Pet; import org.springframework.core.io.Resource; import java.util.Set; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index d25fe52ea15c..021d8d718350 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,7 +2,6 @@ import java.util.Map; import org.openapitools.model.Order; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index af6939bbb160..e72538504624 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -3,7 +3,6 @@ import java.util.List; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-reactive/README.md b/samples/server/petstore/springboot-reactive/README.md index 55dc732c1b00..b890fea09364 100644 --- a/samples/server/petstore/springboot-reactive/README.md +++ b/samples/server/petstore/springboot-reactive/README.md @@ -8,6 +8,8 @@ This server was generated by the [OpenAPI Generator](https://openapi-generator.t By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. +The underlying library integrating OpenAPI to SpringBoot is [springfox](https://github.com/springfox/springfox) + Start your server as a simple java application Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/pom.xml b/samples/server/petstore/springboot-reactive/pom.xml index 6f5e06c6e297..d543d7100354 100644 --- a/samples/server/petstore/springboot-reactive/pom.xml +++ b/samples/server/petstore/springboot-reactive/pom.xml @@ -9,7 +9,7 @@ 1.8 ${java.version} ${java.version} - 1.6.3 + 2.9.2 org.springframework.boot @@ -34,10 +34,11 @@ org.springframework.data spring-data-commons + - io.swagger - swagger-annotations - ${swagger-core-version} + io.springfox + springfox-swagger2 + ${springfox.version} diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/OpenAPI2SpringBoot.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/OpenAPI2SpringBoot.java index 254af0225142..a7a2c4e7dc40 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/OpenAPI2SpringBoot.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/OpenAPI2SpringBoot.java @@ -9,7 +9,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.web.reactive.config.CorsRegistry; -import org.springframework.web.reactive.config.ResourceHandlerRegistry; import org.springframework.web.reactive.config.WebFluxConfigurer; @SpringBootApplication @@ -47,11 +46,6 @@ public void addCorsMappings(CorsRegistry registry) { .allowedMethods("*") .allowedHeaders("Content-Type"); }*/ - - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/swagger-ui/3.14.2/"); - } }; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 0f78f2944335..de9aadfd5708 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.Client; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -56,7 +57,7 @@ default AnotherFakeApiDelegate getDelegate() { ) default Mono> call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().call123testSpecialTags(body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 575a4e23910b..c05f795e57b3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.Client; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; 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 5471ba1820dd..61bd43b6a67f 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 @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; @@ -65,7 +66,7 @@ default FakeApiDelegate getDelegate() { ) default Mono> createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody Mono xmlItem, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createXmlItem(xmlItem, exchange); } @@ -95,7 +96,7 @@ default Mono> createXmlItem( ) default Mono> fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterBooleanSerialize(body, exchange); } @@ -125,7 +126,7 @@ default Mono> fakeOuterBooleanSerialize( ) default Mono> fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterCompositeSerialize(body, exchange); } @@ -155,7 +156,7 @@ default Mono> fakeOuterCompositeSerialize( ) default Mono> fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterNumberSerialize(body, exchange); } @@ -185,7 +186,7 @@ default Mono> fakeOuterNumberSerialize( ) default Mono> fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterStringSerialize(body, exchange); } @@ -214,7 +215,7 @@ default Mono> fakeOuterStringSerialize( ) default Mono> testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testBodyWithFileSchema(body, exchange); } @@ -244,7 +245,7 @@ default Mono> testBodyWithFileSchema( default Mono> testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testBodyWithQueryParams(query, body, exchange); } @@ -275,7 +276,7 @@ default Mono> testBodyWithQueryParams( ) default Mono> testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testClientModel(body, exchange); } @@ -335,7 +336,7 @@ default Mono> testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, exchange); } @@ -380,7 +381,7 @@ default Mono> testEnumParameters( @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); } @@ -418,7 +419,7 @@ default Mono> testGroupParameters( @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, exchange); } @@ -446,7 +447,7 @@ default Mono> testGroupParameters( ) default Mono> testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono> param, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testInlineAdditionalProperties(param, exchange); } @@ -476,7 +477,7 @@ default Mono> testInlineAdditionalProperties( default Mono> testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testJsonFormData(param, param2, exchange); } @@ -512,7 +513,7 @@ default Mono> testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange); } @@ -552,7 +553,7 @@ default Mono> uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Flux requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, exchange); } 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 0193067433b9..f6d86d18abc0 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 @@ -1,5 +1,6 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6a78bd00fe93..a693af64814d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.Client; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -59,7 +60,7 @@ default FakeClassnameTestApiDelegate getDelegate() { ) default Mono> testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testClassname(body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index bd1f7f3542f8..527bedeecf90 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.Client; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 4277d5fc01bf..21c34a69aea3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import org.springframework.core.io.Resource; @@ -64,7 +65,7 @@ default PetApiDelegate getDelegate() { ) default Mono> addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().addPet(body, exchange); } @@ -101,7 +102,7 @@ default Mono> addPet( default Mono> deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deletePet(petId, apiKey, exchange); } @@ -140,7 +141,7 @@ default Mono> deletePet( ) default Mono>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByStatus(status, exchange); } @@ -180,7 +181,7 @@ default Mono>> findPetsByStatus( ) default Mono>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByTags(tags, exchange); } @@ -217,7 +218,7 @@ default Mono>> findPetsByTags( ) default Mono> getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getPetById(petId, exchange); } @@ -257,7 +258,7 @@ default Mono> getPetById( ) default Mono> updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updatePet(body, exchange); } @@ -295,7 +296,7 @@ default Mono> updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updatePetWithForm(petId, name, status, exchange); } @@ -335,7 +336,7 @@ default Mono> uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) Flux file, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().uploadFile(petId, additionalMetadata, file, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index b4c51ede9184..abdf3efc6215 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import org.springframework.core.io.Resource; 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 6d31ec918325..c3aef13167ed 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 @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import java.util.Map; import org.openapitools.model.Order; import io.swagger.annotations.*; @@ -56,7 +57,7 @@ default StoreApiDelegate getDelegate() { ) default Mono> deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteOrder(orderId, exchange); } @@ -88,7 +89,7 @@ default Mono> deleteOrder( produces = { "application/json" } ) default Mono>> getInventory( - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getInventory(exchange); } @@ -122,7 +123,7 @@ default Mono>> getInventory( ) default Mono> getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getOrderById(orderId, exchange); } @@ -153,7 +154,7 @@ default Mono> getOrderById( ) default Mono> placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().placeOrder(body, exchange); } 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 d4f1e2efbf99..ecc745c202ff 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 @@ -1,5 +1,6 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import java.util.Map; import org.openapitools.model.Order; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 923cedcc6469..d2efdab90238 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; @@ -55,7 +56,7 @@ default UserApiDelegate getDelegate() { ) default Mono> createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUser(body, exchange); } @@ -82,7 +83,7 @@ default Mono> createUser( ) default Mono> createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUsersWithArrayInput(body, exchange); } @@ -109,7 +110,7 @@ default Mono> createUsersWithArrayInput( ) default Mono> createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUsersWithListInput(body, exchange); } @@ -139,7 +140,7 @@ default Mono> createUsersWithListInput( ) default Mono> deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteUser(username, exchange); } @@ -172,7 +173,7 @@ default Mono> deleteUser( ) default Mono> getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getUserByName(username, exchange); } @@ -205,7 +206,7 @@ default Mono> getUserByName( default Mono> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().loginUser(username, password, exchange); } @@ -230,7 +231,7 @@ default Mono> loginUser( value = "/user/logout" ) default Mono> logoutUser( - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().logoutUser(exchange); } @@ -262,7 +263,7 @@ default Mono> logoutUser( default Mono> updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono body, - final ServerWebExchange exchange + @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updateUser(username, body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index 063cd6d0ee87..3e561778a3e7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java index b1e5bfc21ee5..60a69461eb5e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java @@ -1,21 +1,12 @@ package org.openapitools.configuration; -import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.core.io.Resource; import org.springframework.stereotype.Controller; -import org.springframework.util.StreamUtils; -import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.context.annotation.Bean; import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.ServerResponse; -import java.io.IOException; -import java.io.InputStream; import java.net.URI; -import java.nio.charset.Charset; import static org.springframework.web.reactive.function.server.RequestPredicates.GET; import static org.springframework.web.reactive.function.server.RouterFunctions.route; @@ -26,35 +17,11 @@ @Controller public class HomeController { - private static YAMLMapper yamlMapper = new YAMLMapper(); - - @Value("classpath:/openapi.yaml") - private Resource openapi; - - @Bean - public String openapiContent() throws IOException { - try(InputStream is = openapi.getInputStream()) { - return StreamUtils.copyToString(is, Charset.defaultCharset()); - } - } - - @GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi") - @ResponseBody - public String openapiYaml() throws IOException { - return openapiContent(); - } - - @GetMapping(value = "/openapi.json", produces = "application/json") - @ResponseBody - public Object openapiJson() throws IOException { - return yamlMapper.readValue(openapiContent(), Object.class); - } - @Bean RouterFunction index() { return route( GET("/"), - req -> ServerResponse.temporaryRedirect(URI.create("swagger-ui/index.html?url=../openapi.json")).build() + req -> ServerResponse.temporaryRedirect(URI.create("swagger-ui.html")).build() ); } diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/application.properties b/samples/server/petstore/springboot-reactive/src/main/resources/application.properties index 9d06609db665..ceca4a9e0d05 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/application.properties +++ b/samples/server/petstore/springboot-reactive/src/main/resources/application.properties @@ -1,3 +1,4 @@ +springfox.documentation.swagger.v2.path=/api-docs server.port=80 spring.jackson.date-format=org.openapitools.RFC3339DateFormat spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 26b35dd83986..7ae394a6c746 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 78cddbd6dd52..a9830bcc6483 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -12,7 +12,6 @@ import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 498a7ee2e459..477a1180d788 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 18e06dce43de..78913cd2534a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -5,7 +5,6 @@ import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; import org.springframework.core.io.Resource; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index 9cc8ee421f69..8fd7fe5fa872 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,7 +2,6 @@ import java.util.Map; import org.openapitools.model.Order; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java index 777032bef5d4..3bc638dbeb9d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -3,7 +3,6 @@ import java.util.List; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index c9ae29ba1fea..ec8ea57868a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index e0f6cf75c832..848fe0e982f8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -12,7 +12,6 @@ import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index e1119b1010d6..64dd84c74f47 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -1,7 +1,6 @@ package org.openapitools.api; import org.openapitools.model.Client; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 139d599af041..8e3fd4cebffc 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -5,7 +5,6 @@ import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; import org.springframework.core.io.Resource; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index d25fe52ea15c..021d8d718350 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,7 +2,6 @@ import java.util.Map; import org.openapitools.model.Order; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java index af6939bbb160..e72538504624 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -3,7 +3,6 @@ import java.util.List; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; -import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; From d737aa5fb895b9a05934cdcbf86e6e8603997ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20F=C3=A4hnlein?= Date: Sat, 22 Jan 2022 01:59:43 +0100 Subject: [PATCH 126/175] Update GlobalConfiguration.mustache (#11359) [csharp-netcore] corrected visibility of GlobalConfiguration mustache --- .../resources/csharp-netcore/GlobalConfiguration.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/GlobalConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/GlobalConfiguration.mustache index bdfa4b99cc13..93a9ab8aa2c7 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/GlobalConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/GlobalConfiguration.mustache @@ -12,7 +12,7 @@ namespace {{packageName}}.Client /// A customized implementation via partial class may reside in another file and may /// be excluded from automatic generation via a .openapi-generator-ignore file. /// - public partial class GlobalConfiguration : Configuration + {{>visibility}} partial class GlobalConfiguration : Configuration { #region Private Members @@ -56,4 +56,4 @@ namespace {{packageName}}.Client } } } -} \ No newline at end of file +} From e0bde821315732fde96020b95d1d3a09780c6c8d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 22 Jan 2022 09:03:50 +0800 Subject: [PATCH 127/175] update samples --- .../src/Org.OpenAPITools/Client/GlobalConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/GlobalConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/GlobalConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/GlobalConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/GlobalConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/GlobalConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/GlobalConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/GlobalConfiguration.cs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index c3b9ba0c212b..e16e13b60703 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index 4bc467ffa40c..cbee70bca372 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index 4bc467ffa40c..cbee70bca372 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index 4bc467ffa40c..cbee70bca372 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index 4bc467ffa40c..cbee70bca372 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index 4bc467ffa40c..cbee70bca372 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index 4bc467ffa40c..cbee70bca372 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index e1c00c89a03f..add21c02cd1b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} From 0358d6eb71e7ff4bb9c4db0d2fe52f56ad7397ba Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 22 Jan 2022 09:47:15 +0800 Subject: [PATCH 128/175] update api tests to work with nonPublicApi option (#11376) --- .../src/main/resources/csharp-netcore/api_test.mustache | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api_test.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api_test.mustache index 3f2f1de5bb37..78319978ac0c 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api_test.mustache @@ -28,11 +28,15 @@ namespace {{packageName}}.Test.Api /// public class {{classname}}Tests : IDisposable { + {{^nonPublicApi}} private {{classname}} instance; + {{/nonPublicApi}} public {{classname}}Tests() { + {{^nonPublicApi}} instance = new {{classname}}(); + {{/nonPublicApi}} } public void Dispose() From 938cc36d1b2ddcc100977cbf367f7fd9ebe2b7e4 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 22 Jan 2022 10:18:20 +0800 Subject: [PATCH 129/175] update node-fetch to newer version (#11378) --- .../Javascript-Flowtyped/package.mustache | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-flowtyped/lib/api.js | 2 +- .../javascript-flowtyped/package-lock.json | 5889 +++++------------ .../javascript-flowtyped/package.json | 2 +- 5 files changed, 1543 insertions(+), 4354 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache index a4552cdc5fbb..6a1cfec31790 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache @@ -24,7 +24,7 @@ }, {{/npmRepository}} "dependencies": { - "node-fetch": ">=2.6.1", + "node-fetch": ">=3.1.1", "portable-fetch": "^3.0.0" }, "devDependencies": { diff --git a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION index 4b448de535c7..0984c4c1ad21 100644 --- a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-flowtyped/lib/api.js b/samples/client/petstore/javascript-flowtyped/lib/api.js index d1896d867811..eca41f9154b8 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/api.js +++ b/samples/client/petstore/javascript-flowtyped/lib/api.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.UserApi = exports.UserApiFetchParamCreator = exports.StoreApi = exports.StoreApiFetchParamCreator = exports.PetApi = exports.PetApiFetchParamCreator = exports.RequiredError = exports.COLLECTION_FORMATS = void 0; +exports.UserApiFetchParamCreator = exports.UserApi = exports.StoreApiFetchParamCreator = exports.StoreApi = exports.RequiredError = exports.PetApiFetchParamCreator = exports.PetApi = exports.COLLECTION_FORMATS = void 0; var url = _interopRequireWildcard(require("url")); diff --git a/samples/client/petstore/javascript-flowtyped/package-lock.json b/samples/client/petstore/javascript-flowtyped/package-lock.json index 335a4fecf8bd..0384e828482e 100644 --- a/samples/client/petstore/javascript-flowtyped/package-lock.json +++ b/samples/client/petstore/javascript-flowtyped/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Unlicense", "dependencies": { - "node-fetch": ">=2.6.1", + "node-fetch": ">=3.1.1", "portable-fetch": "^3.0.0" }, "devDependencies": { @@ -24,13 +24,11 @@ } }, "node_modules/@babel/cli": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.14.8.tgz", - "integrity": "sha512-lcy6Lymft9Rpfqmrqdd4oTDdUx9ZwaAhAfywVrHG4771Pa6PPT0danJ1kDHBXYqh4HHSmIdA+nlmfxfxSDPtBg==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.16.8.tgz", + "integrity": "sha512-FTKBbxyk5TclXOGmwYyqelqP5IF6hMxaeJskd85jbR5jBfYlwqgwAbJwnixi1ZBbTqKfFuAA95mdmUFeSRwyJA==", "dev": true, "dependencies": { - "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.2", - "chokidar": "^3.4.0", "commander": "^4.0.1", "convert-source-map": "^1.1.0", "fs-readdir-recursive": "^1.1.0", @@ -47,7 +45,7 @@ "node": ">=6.9.0" }, "optionalDependencies": { - "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.2", + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", "chokidar": "^3.4.0" }, "peerDependencies": { @@ -55,41 +53,41 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "dependencies": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", - "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", + "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.0.tgz", - "integrity": "sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.0", - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helpers": "^7.14.8", - "@babel/parser": "^7.15.0", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.10.tgz", + "integrity": "sha512-pbiIdZbCiMx/MM6toR+OfXarYix3uz0oVsnNtfdAGTcCTu3w/JGF8JhirevXLBJUu0WguSZI12qpKnx7EeMyLA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.8", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.16.7", + "@babel/parser": "^7.16.10", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.10", + "@babel/types": "^7.16.8", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -106,12 +104,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", - "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", + "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", "dev": true, "dependencies": { - "@babel/types": "^7.15.0", + "@babel/types": "^7.16.8", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -120,39 +118,39 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz", - "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", "dev": true, "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", - "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", "dev": true, "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", - "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", "semver": "^6.3.0" }, "engines": { @@ -163,17 +161,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", - "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.10.tgz", + "integrity": "sha512-wDeej0pu3WN/ffTxMNCPW5UCiOav8IcLRxSIyp/9+IF2xJUM9h/OYjg0IJLHaL6F8oU8kqMz9nc1vryXhMsgXg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-split-export-declaration": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -183,12 +182,12 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", - "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", + "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-annotate-as-pure": "^7.16.7", "regexpu-core": "^4.7.1" }, "engines": { @@ -199,251 +198,264 @@ } }, "node_modules/@babel/helper-define-map": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.14.5.tgz", - "integrity": "sha512-spfQRnoChdYWwyFetQDBSDBgH42VskaquRI52kbLei5MjV7s3NPq30/sh2S3YdT20Ku/ZpaNnTVgmDo20NWylg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.16.7.tgz", + "integrity": "sha512-SoIOh18NdeBBQjiLF1H32jpDLkApTbUWwEXmqaxn1KEm7aqry4reaghMdCdkbdloVmMwUxM/uCcTmHWj9zJbxQ==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", - "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", "dev": true, "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", - "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-get-function-arity": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", - "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", - "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", - "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.15.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", - "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", - "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-simple-access": "^7.14.8", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.9", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", - "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", "dev": true, "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", - "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-wrap-function": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", - "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", "dev": true, "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", - "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "dev": true, "dependencies": { - "@babel/types": "^7.14.8" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", - "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", "dev": true, "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", - "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", - "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", - "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", + "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", "dev": true, "dependencies": { - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -452,9 +464,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", - "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.10.tgz", + "integrity": "sha512-Sm/S9Or6nN8uiFsQU1yodyDW3MWXQhFeqzMPM+t8MJjM+pLsnFVxFZzkpXKvUXh+Gz9cbMoYYs484+Jw/NTEFQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -464,13 +476,13 @@ } }, "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", - "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -508,12 +520,12 @@ } }, "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", - "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -537,12 +549,12 @@ } }, "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", - "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -553,13 +565,13 @@ } }, "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", - "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=4" @@ -581,12 +593,12 @@ } }, "node_modules/@babel/plugin-syntax-decorators": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.14.5.tgz", - "integrity": "sha512-c4sZMRWL4GSvP1EXy0woIP7m4jkVcEuG8R1TOZxPBPtp4FSM/kiPZub9UIs/Jrb5ZAOzvTUSGYrWsrSu1JvoPw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.16.7.tgz", + "integrity": "sha512-vQ+PxL+srA7g6Rx6I1e15m55gftknl2X8GCUW1JTlkTaXZLJOS0UcaY0eK9jYT7IYf4awn6qwyghVHLDz1WyMw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -608,12 +620,12 @@ } }, "node_modules/@babel/plugin-syntax-flow": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.14.5.tgz", - "integrity": "sha512-9WK5ZwKCdWHxVuU13XNT6X73FGmutAXeor5lGFq6qhOFtMFUF4jkbijuyUdZZlpYq6E2hZeZf/u3959X9wsv0Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.7.tgz", + "integrity": "sha512-UDo3YGQO0jH6ytzVwgSLv9i/CzMcUjbKenL67dTrAZPPv6GFAtDhe6jqnvmoKzC/7htNTohhos+onPtDMqJwaQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -635,12 +647,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz", - "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz", + "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -674,12 +686,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz", - "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", + "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -689,12 +701,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", - "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -704,14 +716,14 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", - "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5" + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" }, "engines": { "node": ">=6.9.0" @@ -721,12 +733,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", - "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -736,12 +748,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", - "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -770,12 +782,12 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", - "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -797,13 +809,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", - "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -813,12 +825,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", - "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -828,13 +840,13 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", - "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -844,13 +856,13 @@ } }, "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.14.5.tgz", - "integrity": "sha512-KhcolBKfXbvjwI3TV7r7TkYm8oNXHNBqGOy6JDVwtecFaRoKYsUUqJdS10q0YDKW1c6aZQgO+Ys3LfGkox8pXA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.16.7.tgz", + "integrity": "sha512-mzmCq3cNsDpZZu9FADYYyfZJIOrSONmHcop2XEKPdBNMa4PDC4eEvcOvzZaCNcjKu72v0XQlA5y1g58aLRXdYg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-flow": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-flow": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -860,12 +872,12 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", - "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -875,13 +887,14 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", - "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -891,12 +904,12 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", - "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -906,13 +919,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", - "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -932,14 +945,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", - "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -959,15 +972,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", - "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", "dev": true, "dependencies": { - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -987,13 +1000,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", - "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1003,12 +1016,12 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", - "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1018,12 +1031,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", - "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1033,13 +1046,13 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", - "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1049,12 +1062,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", - "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1089,16 +1102,16 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.9.tgz", - "integrity": "sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.7.tgz", + "integrity": "sha512-8D16ye66fxiE8m890w0BpPpngG9o9OVBBy0gH2E+2AR7qMR2ZpTYJEqLxAsoroenMId0p/wMW+Blc0meDgu0Ag==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-jsx": "^7.14.5", - "@babel/types": "^7.14.9" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-jsx": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1108,12 +1121,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.14.9.tgz", - "integrity": "sha512-Fqqu0f8zv9W+RyOnx29BX/RlEsBRANbOf5xs5oxb2aHP4FKbLXxIaVPUiCti56LAR1IixMH4EyaixhUsKqoBHw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.16.7.tgz", + "integrity": "sha512-oe5VuWs7J9ilH3BCCApGoYjHoSO48vkjX2CbA5bFVhIuO2HKxA3vyF7rleA4o6/4rTDbk6r8hBW7Ul8E+UZrpA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1123,12 +1136,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.14.5.tgz", - "integrity": "sha512-1TpSDnD9XR/rQ2tzunBVPThF5poaYT9GqP+of8fAtguYuI/dm2RkrMBDemsxtY0XBzvW7nXjYM0hRyKX9QYj7Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.16.7.tgz", + "integrity": "sha512-rONFiQz9vgbsnaMtQlZCjIRwhJvlrPET8TabIUK2hzlXw9B9s2Ieaxte1SCOOXMbWRHodbKixNf3BLcWVOQ8Bw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1138,9 +1151,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", - "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", "dev": true, "dependencies": { "regenerator-transform": "^0.14.2" @@ -1177,12 +1190,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", - "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1192,13 +1205,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.14.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", - "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" }, "engines": { "node": ">=6.9.0" @@ -1208,12 +1221,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", - "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1223,12 +1236,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", - "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1238,12 +1251,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", - "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1253,14 +1266,14 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.0.tgz", - "integrity": "sha512-WIIEazmngMEEHDaPTx0IZY48SaAmjVWe3TRSX7cmJXn0bEv9midFzAjxiruOWYIVf5iQ10vFx7ASDpgEO08L5w==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.8.tgz", + "integrity": "sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.15.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-typescript": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-typescript": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1270,13 +1283,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", - "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1349,14 +1362,14 @@ } }, "node_modules/@babel/preset-flow": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.14.5.tgz", - "integrity": "sha512-pP5QEb4qRUSVGzzKx9xqRuHUrM/jEzMqdrZpdMA+oUCRgd5zM1qGr5y5+ZgAL/1tVv1H0dyk5t4SKJntqyiVtg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.16.7.tgz", + "integrity": "sha512-6ceP7IyZdUYQ3wUVqyRSQXztd1YmFHWI4Xv11MIqAlE4WqxBSd/FZ61V9k+TS5Gd4mkHOtQtPp9ymRpxH4y1Ug==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-transform-flow-strip-types": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-flow-strip-types": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1404,32 +1417,33 @@ } }, "node_modules/@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", - "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.10.tgz", + "integrity": "sha512-yzuaYXoRJBGMlBhsMJoUW7G1UmSb/eXr/JHYM/MsOJgavJibLwASijW7oXBdw3NQ6T0bW7Ty5P/VarOs9cHmqw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.8", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.16.10", + "@babel/types": "^7.16.8", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1438,12 +1452,12 @@ } }, "node_modules/@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", + "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1451,29 +1465,16 @@ } }, "node_modules/@nicolo-ribaudo/chokidar-2": { - "version": "2.1.8-no-fsevents.2", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.2.tgz", - "integrity": "sha512-Fb8WxUFOBQVl+CX4MWet5o7eCc6Pj04rXIwVKZ6h1NnqTo45eOQW6aWyhG25NIODvWFwTDMwBsYxrQ3imxpetg==", + "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", "dev": true, - "optional": true, - "dependencies": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "glob-parent": "^5.1.2", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } + "optional": true }, "node_modules/@types/eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.0.tgz", + "integrity": "sha512-JUYa/5JwoqikCy7O7jKtuNe9Z4ZZt615G+1EKfaDGSNEpzaA2OwbV/G1v08Oa7fd1XzlFoSCvt9ePl9/6FyAug==", "dev": true, "peer": true, "dependencies": { @@ -1482,9 +1483,9 @@ } }, "node_modules/@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", "dev": true, "peer": true, "dependencies": { @@ -1507,9 +1508,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "16.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.1.tgz", - "integrity": "sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A==", + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz", + "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==", "dev": true, "peer": true }, @@ -1689,9 +1690,9 @@ "peer": true }, "node_modules/acorn": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", - "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true, "peer": true, "bin": { @@ -1702,9 +1703,9 @@ } }, "node_modules/acorn-import-assertions": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz", - "integrity": "sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA==", + "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, "peer": true, "peerDependencies": { @@ -1739,9 +1740,9 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "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" @@ -1760,27 +1761,16 @@ } }, "node_modules/anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "optional": true, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "node_modules/anymatch/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, - "optional": true, "dependencies": { - "remove-trailing-separator": "^1.0.1" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, "node_modules/argparse": { @@ -1792,76 +1782,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true, - "optional": true - }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "optional": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/babel-loader": { "version": "8.0.5", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz", @@ -1986,38 +1906,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "optional": true, - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "optional": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -2028,13 +1916,12 @@ } }, "node_modules/binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, - "optional": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/brace-expansion": { @@ -2048,38 +1935,28 @@ } }, "node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "optional": true, "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "fill-range": "^7.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/browserslist": { - "version": "4.16.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", - "integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "dev": true, "dependencies": { - "caniuse-lite": "^1.0.30001251", - "colorette": "^1.3.0", - "electron-to-chromium": "^1.3.811", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", - "node-releases": "^1.1.75" + "node-releases": "^2.0.1", + "picocolors": "^1.0.0" }, "bin": { "browserslist": "cli.js" @@ -2099,27 +1976,6 @@ "dev": true, "peer": true }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "optional": true, - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -2176,9 +2032,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001251", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", - "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "version": "1.0.30001301", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001301.tgz", + "integrity": "sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA==", "dev": true, "funding": { "type": "opencollective", @@ -2200,14 +2056,19 @@ } }, "node_modules/chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "dev": true, + "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", - "fsevents": "~2.3.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -2221,338 +2082,121 @@ "fsevents": "~2.3.2" } }, - "node_modules/chokidar/node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/chokidar/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==", + "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, + "peer": true, "engines": { - "node": ">=8" + "node": ">=6.0" } }, - "node_modules/chokidar/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "node_modules/chokidar/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==", + "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": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" + "color-name": "1.1.3" } }, - "node_modules/chokidar/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/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, - "node_modules/chokidar/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==", + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, "engines": { - "node": ">=0.12.0" + "node": ">= 6" } }, - "node_modules/chokidar/node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" + "safe-buffer": "~5.1.1" } }, - "node_modules/chokidar/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==", + "node_modules/cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "dev": true, "dependencies": { - "is-number": "^7.0.0" + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" }, "engines": { - "node": ">=8.0" + "node": ">=4" } }, - "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, - "peer": true, + "node_modules/data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", "engines": { - "node": ">=6.0" + "node": ">= 12" } }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, - "optional": true, "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "ms": "2.1.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true, - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "optional": true, - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", - "dev": true - }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true, - "optional": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true, - "optional": true - }, - "node_modules/cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "dependencies": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2565,24 +2209,10 @@ "node": ">= 0.4" } }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "optional": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/electron-to-chromium": { - "version": "1.3.814", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.814.tgz", - "integrity": "sha512-0mH03cyjh6OzMlmjauGg0TLd87ErIJqWiYxMcOLKf5w6p0YEOl7DJAj7BDlXEFmCguY5CQaKVOiMjAMODO2XDw==", + "version": "1.4.50", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.50.tgz", + "integrity": "sha512-g5X/6oVoqLyzKfsZ1HsJvxKoUAToFMCuq1USbmp/GPIwJDRYV1IEcv+plYTdh6h11hg140hycCBId0vf7rL0+Q==", "dev": true }, "node_modules/emoji-regex": { @@ -2609,9 +2239,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", - "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", + "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", "dev": true, "peer": true, "dependencies": { @@ -2632,22 +2262,25 @@ } }, "node_modules/es-abstract": { - "version": "1.18.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", - "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-symbols": "^1.0.2", "internal-slot": "^1.0.3", - "is-callable": "^1.2.3", + "is-callable": "^1.2.4", "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", "object-inspect": "^1.11.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", @@ -2663,9 +2296,9 @@ } }, "node_modules/es-module-lexer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", - "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==", + "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, "peer": true }, @@ -2745,9 +2378,9 @@ } }, "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "peer": true, "engines": { @@ -2774,271 +2407,131 @@ "node": ">=0.8.x" } }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "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, - "optional": true, - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } + "peer": true }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "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, - "optional": true, - "dependencies": { - "ms": "2.0.0" - } + "peer": true }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, + "node_modules/fetch-blob": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.4.tgz", + "integrity": "sha512-Eq5Xv5+VlSrYWEqKrusxY1C3Hm/hjeAsCGVG3ft7pZahlUAChpGZT/Ms1WmSLnEAisEXszjzu/s+ce6HZB2VHA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], "dependencies": { - "is-descriptor": "^0.1.0" + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" }, "engines": { - "node": ">=0.10.0" + "node": "^12.20 || >= 14.13" } }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "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, - "optional": true, "dependencies": { - "kind-of": "^3.0.2" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "node_modules/find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "dev": true, - "optional": true, "dependencies": { - "kind-of": "^3.0.2" + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, - "optional": true, "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "locate-path": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/expand-brackets/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "node_modules/flow-copy-source": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/flow-copy-source/-/flow-copy-source-2.0.9.tgz", + "integrity": "sha512-7zX/oHSIHe8YRGiA9QIcC4SW6KF667ikdmiDfbST15up1Ona8dn7Xy0PmSrfw6ceBWDww8sRKlCLKsztStpYkQ==", "dev": true, - "optional": true, + "dependencies": { + "chokidar": "^3.0.0", + "fs-extra": "^8.1.0", + "glob": "^7.0.0", + "kefir": "^3.7.3", + "yargs": "^15.0.1" + }, + "bin": { + "flow-copy-source": "bin/flow-copy-source.js" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8.0.0" } }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "optional": true + "dependencies": { + "is-callable": "^1.1.3" + } }, - "node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", "dependencies": { - "is-extendable": "^0.1.0" + "fetch-blob": "^3.1.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=12.20.0" } }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "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, - "optional": true, "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "optional": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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, - "peer": true - }, - "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, - "peer": true - }, - "node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "optional": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/flow-copy-source": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/flow-copy-source/-/flow-copy-source-2.0.9.tgz", - "integrity": "sha512-7zX/oHSIHe8YRGiA9QIcC4SW6KF667ikdmiDfbST15up1Ona8dn7Xy0PmSrfw6ceBWDww8sRKlCLKsztStpYkQ==", - "dev": true, - "dependencies": { - "chokidar": "^3.0.0", - "fs-extra": "^8.1.0", - "glob": "^7.0.0", - "kefir": "^3.7.3", - "yargs": "^15.0.1" - }, - "bin": { - "flow-copy-source": "bin/flow-copy-source.js" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "optional": true, - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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": ">=6 <7 || >=8" } }, "node_modules/fs-readdir-recursive": { @@ -3105,20 +2598,26 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, - "optional": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -3164,9 +2663,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, "node_modules/has": { @@ -3226,48 +2725,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "optional": true, - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "optional": true, - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -3331,29 +2788,6 @@ "loose-envify": "^1.0.0" } }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor/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, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -3373,16 +2807,15 @@ } }, "node_modules/is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "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, - "optional": true, "dependencies": { - "binary-extensions": "^1.0.0" + "binary-extensions": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/is-boolean-object": { @@ -3401,13 +2834,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "optional": true - }, "node_modules/is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -3421,9 +2847,9 @@ } }, "node_modules/is-core-module": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", - "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -3432,29 +2858,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-data-descriptor/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, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -3470,31 +2873,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-descriptor/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, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", @@ -3504,16 +2882,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3533,9 +2901,9 @@ } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "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" @@ -3545,9 +2913,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "engines": { "node": ">= 0.4" @@ -3557,16 +2925,12 @@ } }, "node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, "engines": { - "node": ">=0.10.0" + "node": ">=0.12.0" } }, "node_modules/is-number-object": { @@ -3584,19 +2948,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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, - "optional": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -3613,6 +2964,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -3651,37 +3011,22 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-windows": { + "node_modules/is-weakref": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jest-worker": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", - "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", + "node_modules/jest-worker": { + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.6.tgz", + "integrity": "sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw==", "dev": true, "peer": true, "dependencies": { @@ -3792,9 +3137,6 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.6" - }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -3805,19 +3147,6 @@ "integrity": "sha512-xWga7QCZsR2Wjy2vNL3Kq/irT+IwxwItEWycRRlT5yhqHZK2fmEhziP+LzcJBWSTAMranGKtGTQ6lFpyJS3+jA==", "dev": true }, - "node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/loader-runner": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", @@ -3907,29 +3236,6 @@ "semver": "bin/semver" } }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "optional": true, - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -3937,72 +3243,10 @@ "dev": true, "peer": true }, - "node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "optional": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/micromatch/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/micromatch/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/micromatch/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, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", "dev": true, "peer": true, "engines": { @@ -4010,13 +3254,13 @@ } }, "node_modules/mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", "dev": true, "peer": true, "dependencies": { - "mime-db": "1.49.0" + "mime-db": "1.51.0" }, "engines": { "node": ">= 0.6" @@ -4040,33 +3284,6 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "optional": true, - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mixin-deep/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -4085,66 +3302,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "optional": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/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, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -4152,18 +3309,45 @@ "dev": true, "peer": true }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, "node_modules/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.0.tgz", + "integrity": "sha512-8xeimMwMItMw8hRrOl3C9/xzU49HV/yE6ORew/l+dxWimO5A4Ra8ld2rerlJvc/O7et5Z1zrWsPX43v1QBjCxw==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, "engines": { - "node": "4.x || >=6.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, "node_modules/node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", + "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", "dev": true }, "node_modules/normalize-path": { @@ -4175,89 +3359,10 @@ "node": ">=0.10.0" } }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "optional": true, - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4272,19 +3377,6 @@ "node": ">= 0.4" } }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "optional": true, - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -4304,14 +3396,14 @@ } }, "node_modules/object.getownpropertydescriptors": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", - "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", + "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2" + "es-abstract": "^1.19.1" }, "engines": { "node": ">= 0.8" @@ -4320,19 +3412,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "optional": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4391,16 +3470,6 @@ "node": ">=4" } }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -4425,10 +3494,16 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "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.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "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" @@ -4476,23 +3551,6 @@ "is-stream": "^1.0.1" } }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.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, - "optional": true - }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -4513,35 +3571,16 @@ "safe-buffer": "^5.1.0" } }, - "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, - "optional": 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/readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "optional": true, "dependencies": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=0.10" + "node": ">=8.10.0" } }, "node_modules/regenerate": { @@ -4551,12 +3590,12 @@ "dev": true }, "node_modules/regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", + "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", "dev": true, "dependencies": { - "regenerate": "^1.4.0" + "regenerate": "^1.4.2" }, "engines": { "node": ">=4" @@ -4578,9 +3617,9 @@ } }, "node_modules/regenerator-transform/node_modules/@babel/runtime": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", - "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", + "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", "dev": true, "dependencies": { "regenerator-runtime": "^0.13.4" @@ -4595,59 +3634,18 @@ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "optional": true, - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regex-not/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regex-not/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", + "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", "dev": true, "dependencies": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^9.0.0", + "regjsgen": "^0.5.2", + "regjsparser": "^0.7.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" }, "engines": { "node": ">=4" @@ -4660,9 +3658,9 @@ "dev": true }, "node_modules/regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", + "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", "dev": true, "dependencies": { "jsesc": "~0.5.0" @@ -4680,33 +3678,6 @@ "jsesc": "bin/jsesc" } }, - "node_modules/remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true, - "optional": true - }, - "node_modules/repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4723,13 +3694,17 @@ "dev": true }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.1.tgz", + "integrity": "sha512-lfEImVbnolPuaSZuLQ52cAxPBHeI77sPwCOWRdy12UG/CNa8an7oBHH1R+Fp1/mUqSJi4c8TIP6FOIPSZAUrEQ==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4744,24 +3719,6 @@ "node": ">=4" } }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "deprecated": "https://github.com/lydell/resolve-url#deprecated", - "dev": true, - "optional": true - }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.12" - } - }, "node_modules/rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -4780,16 +3737,6 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "optional": true, - "dependencies": { - "ret": "~0.1.10" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -4839,22 +3786,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "optional": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -4878,148 +3809,6 @@ "node": ">=6" } }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "optional": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "optional": true, - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "optional": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/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, - "optional": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - }, "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -5029,24 +3818,10 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "optional": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "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, "peer": true, "dependencies": { @@ -5064,156 +3839,21 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "dev": true, - "optional": true - }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "optional": true, - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/split-string/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/split-string/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "optional": true, - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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, - "optional": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "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.0" + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" @@ -5246,12 +3886,12 @@ } }, "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "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.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" @@ -5269,10 +3909,22 @@ "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/tapable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", - "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, "peer": true, "engines": { @@ -5280,36 +3932,43 @@ } }, "node_modules/terser": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", - "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "dev": true, "peer": true, "dependencies": { "commander": "^2.20.0", "source-map": "~0.7.2", - "source-map-support": "~0.5.19" + "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" }, "engines": { "node": ">=10" + }, + "peerDependencies": { + "acorn": "^8.5.0" + }, + "peerDependenciesMeta": { + "acorn": { + "optional": true + } } }, "node_modules/terser-webpack-plugin": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", - "integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.0.tgz", + "integrity": "sha512-LPIisi3Ol4chwAaPP8toUJ3L4qCM1G0wao7L3qNv57Drezxj6+VEyySpPw4B1HSO2Eg/hDY/MNF5XihCAoqnsQ==", "dev": true, "peer": true, "dependencies": { - "jest-worker": "^27.0.2", - "p-limit": "^3.1.0", - "schema-utils": "^3.0.0", + "jest-worker": "^27.4.1", + "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.0", "source-map": "^0.6.1", - "terser": "^5.7.0" + "terser": "^5.7.2" }, "engines": { "node": ">= 10.13.0" @@ -5320,22 +3979,17 @@ }, "peerDependencies": { "webpack": "^5.1.0" - } - }, - "node_modules/terser-webpack-plugin/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "peer": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } } }, "node_modules/terser-webpack-plugin/node_modules/source-map": { @@ -5374,74 +4028,16 @@ "node": ">=4" } }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "optional": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "optional": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "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, - "optional": true, "dependencies": { - "is-plain-object": "^2.0.4" + "is-number": "^7.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.0" } }, "node_modules/unbox-primitive": { @@ -5460,167 +4056,63 @@ } }, "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "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": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "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": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" + "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": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "dev": true, "engines": { "node": ">=4" } }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "optional": true, - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.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/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "optional": true, - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "optional": true, - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "optional": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=4", - "yarn": "*" - } - }, - "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, - "peer": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "deprecated": "Please see https://github.com/lydell/urix#deprecated", - "dev": true, - "optional": true - }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" + "node": ">= 4.0.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "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, - "optional": true + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } }, "node_modules/util.promisify": { "version": "1.1.1", @@ -5639,9 +4131,9 @@ } }, "node_modules/watchpack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", - "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", + "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", "dev": true, "peer": true, "dependencies": { @@ -5652,10 +4144,18 @@ "node": ">=10.13.0" } }, + "node_modules/web-streams-polyfill": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.0.tgz", + "integrity": "sha512-EqPmREeOzttaLRm5HS7io98goBgZ7IVz79aDvqjD0kYXLtFZTc0T/U6wHTPKyIjb+MdN7DFIIX6hgdBEpWmfPA==", + "engines": { + "node": ">= 8" + } + }, "node_modules/webpack": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.51.1.tgz", - "integrity": "sha512-xsn3lwqEKoFvqn4JQggPSRxE4dhsRcysWTqYABAZlmavcoTmwlOb9b1N36Inbt/eIispSkuHa80/FJkDTPos1A==", + "version": "5.67.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.67.0.tgz", + "integrity": "sha512-LjFbfMh89xBDpUMgA1W9Ur6Rn/gnr2Cq1jjHFPo4v6a79/ypznSYbAyPgGhwsxBtMIaEmDD1oJoA7BEYw/Fbrw==", "dev": true, "peer": true, "dependencies": { @@ -5668,12 +4168,12 @@ "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.0", - "es-module-lexer": "^0.7.1", + "enhanced-resolve": "^5.8.3", + "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.4", + "graceful-fs": "^4.2.9", "json-parse-better-errors": "^1.0.2", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", @@ -5681,8 +4181,8 @@ "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" + "watchpack": "^2.3.1", + "webpack-sources": "^3.2.3" }, "bin": { "webpack": "bin/webpack.js" @@ -5701,9 +4201,9 @@ } }, "node_modules/webpack-sources": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.0.tgz", - "integrity": "sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw==", + "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, "peer": true, "engines": { @@ -5876,29 +4376,16 @@ "engines": { "node": ">=8" } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } }, "dependencies": { "@babel/cli": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.14.8.tgz", - "integrity": "sha512-lcy6Lymft9Rpfqmrqdd4oTDdUx9ZwaAhAfywVrHG4771Pa6PPT0danJ1kDHBXYqh4HHSmIdA+nlmfxfxSDPtBg==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.16.8.tgz", + "integrity": "sha512-FTKBbxyk5TclXOGmwYyqelqP5IF6hMxaeJskd85jbR5jBfYlwqgwAbJwnixi1ZBbTqKfFuAA95mdmUFeSRwyJA==", "dev": true, "requires": { - "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.2", + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", "chokidar": "^3.4.0", "commander": "^4.0.1", "convert-source-map": "^1.1.0", @@ -5910,35 +4397,35 @@ } }, "@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "requires": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.16.7" } }, "@babel/compat-data": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", - "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", + "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", "dev": true }, "@babel/core": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.0.tgz", - "integrity": "sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.0", - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helpers": "^7.14.8", - "@babel/parser": "^7.15.0", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.10.tgz", + "integrity": "sha512-pbiIdZbCiMx/MM6toR+OfXarYix3uz0oVsnNtfdAGTcCTu3w/JGF8JhirevXLBJUu0WguSZI12qpKnx7EeMyLA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.8", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.16.7", + "@babel/parser": "^7.16.10", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.10", + "@babel/types": "^7.16.8", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -5948,278 +4435,289 @@ } }, "@babel/generator": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", - "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", + "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", "dev": true, "requires": { - "@babel/types": "^7.15.0", + "@babel/types": "^7.16.8", "jsesc": "^2.5.1", "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz", - "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", - "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-compilation-targets": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", - "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "dev": true, "requires": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", "semver": "^6.3.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", - "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.10.tgz", + "integrity": "sha512-wDeej0pu3WN/ffTxMNCPW5UCiOav8IcLRxSIyp/9+IF2xJUM9h/OYjg0IJLHaL6F8oU8kqMz9nc1vryXhMsgXg==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-split-export-declaration": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", - "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", + "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-annotate-as-pure": "^7.16.7", "regexpu-core": "^4.7.1" } }, "@babel/helper-define-map": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.14.5.tgz", - "integrity": "sha512-spfQRnoChdYWwyFetQDBSDBgH42VskaquRI52kbLei5MjV7s3NPq30/sh2S3YdT20Ku/ZpaNnTVgmDo20NWylg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.16.7.tgz", + "integrity": "sha512-SoIOh18NdeBBQjiLF1H32jpDLkApTbUWwEXmqaxn1KEm7aqry4reaghMdCdkbdloVmMwUxM/uCcTmHWj9zJbxQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-explode-assignable-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", - "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", - "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-get-function-arity": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", - "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-hoist-variables": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", - "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", - "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", "dev": true, "requires": { - "@babel/types": "^7.15.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-imports": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", - "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-transforms": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", - "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.0", - "@babel/helper-simple-access": "^7.14.8", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.9", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-optimise-call-expression": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", - "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", - "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-wrap-function": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" } }, "@babel/helper-replace-supers": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", - "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.15.0", - "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-simple-access": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", - "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "dev": true, "requires": { - "@babel/types": "^7.14.8" + "@babel/types": "^7.16.7" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", - "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.0" } }, "@babel/helper-split-export-declaration": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", - "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.16.7" } }, "@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true }, "@babel/helper-wrap-function": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", - "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.14.5", - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" } }, "@babel/helpers": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", - "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", + "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", "dev": true, "requires": { - "@babel/template": "^7.14.5", - "@babel/traverse": "^7.15.0", - "@babel/types": "^7.15.0" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", - "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.10.tgz", + "integrity": "sha512-Sm/S9Or6nN8uiFsQU1yodyDW3MWXQhFeqzMPM+t8MJjM+pLsnFVxFZzkpXKvUXh+Gz9cbMoYYs484+Jw/NTEFQ==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", - "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, @@ -6245,12 +4743,12 @@ } }, "@babel/plugin-proposal-json-strings": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", - "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, @@ -6265,23 +4763,23 @@ } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", - "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", - "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-syntax-async-generators": { @@ -6294,12 +4792,12 @@ } }, "@babel/plugin-syntax-decorators": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.14.5.tgz", - "integrity": "sha512-c4sZMRWL4GSvP1EXy0woIP7m4jkVcEuG8R1TOZxPBPtp4FSM/kiPZub9UIs/Jrb5ZAOzvTUSGYrWsrSu1JvoPw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.16.7.tgz", + "integrity": "sha512-vQ+PxL+srA7g6Rx6I1e15m55gftknl2X8GCUW1JTlkTaXZLJOS0UcaY0eK9jYT7IYf4awn6qwyghVHLDz1WyMw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-syntax-dynamic-import": { @@ -6312,12 +4810,12 @@ } }, "@babel/plugin-syntax-flow": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.14.5.tgz", - "integrity": "sha512-9WK5ZwKCdWHxVuU13XNT6X73FGmutAXeor5lGFq6qhOFtMFUF4jkbijuyUdZZlpYq6E2hZeZf/u3959X9wsv0Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.7.tgz", + "integrity": "sha512-UDo3YGQO0jH6ytzVwgSLv9i/CzMcUjbKenL67dTrAZPPv6GFAtDhe6jqnvmoKzC/7htNTohhos+onPtDMqJwaQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-syntax-json-strings": { @@ -6330,12 +4828,12 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz", - "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz", + "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-syntax-object-rest-spread": { @@ -6357,50 +4855,50 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz", - "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", + "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", - "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", - "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5" + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", - "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", - "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-classes": { @@ -6420,12 +4918,12 @@ } }, "@babel/plugin-transform-computed-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", - "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-destructuring": { @@ -6438,80 +4936,81 @@ } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", - "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", - "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", - "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.14.5.tgz", - "integrity": "sha512-KhcolBKfXbvjwI3TV7r7TkYm8oNXHNBqGOy6JDVwtecFaRoKYsUUqJdS10q0YDKW1c6aZQgO+Ys3LfGkox8pXA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.16.7.tgz", + "integrity": "sha512-mzmCq3cNsDpZZu9FADYYyfZJIOrSONmHcop2XEKPdBNMa4PDC4eEvcOvzZaCNcjKu72v0XQlA5y1g58aLRXdYg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-flow": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-flow": "^7.16.7" } }, "@babel/plugin-transform-for-of": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", - "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", - "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", - "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", - "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "dependencies": { @@ -6527,14 +5026,14 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", - "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.15.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "dependencies": { @@ -6550,15 +5049,15 @@ } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", - "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, "dependencies": { @@ -6574,50 +5073,50 @@ } }, "@babel/plugin-transform-modules-umd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", - "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", - "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7" } }, "@babel/plugin-transform-new-target": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", - "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-object-super": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", - "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" } }, "@babel/plugin-transform-parameters": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", - "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-react-constant-elements": { @@ -6640,40 +5139,40 @@ } }, "@babel/plugin-transform-react-jsx": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.9.tgz", - "integrity": "sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.7.tgz", + "integrity": "sha512-8D16ye66fxiE8m890w0BpPpngG9o9OVBBy0gH2E+2AR7qMR2ZpTYJEqLxAsoroenMId0p/wMW+Blc0meDgu0Ag==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-jsx": "^7.14.5", - "@babel/types": "^7.14.9" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-jsx": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/plugin-transform-react-jsx-self": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.14.9.tgz", - "integrity": "sha512-Fqqu0f8zv9W+RyOnx29BX/RlEsBRANbOf5xs5oxb2aHP4FKbLXxIaVPUiCti56LAR1IixMH4EyaixhUsKqoBHw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.16.7.tgz", + "integrity": "sha512-oe5VuWs7J9ilH3BCCApGoYjHoSO48vkjX2CbA5bFVhIuO2HKxA3vyF7rleA4o6/4rTDbk6r8hBW7Ul8E+UZrpA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-react-jsx-source": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.14.5.tgz", - "integrity": "sha512-1TpSDnD9XR/rQ2tzunBVPThF5poaYT9GqP+of8fAtguYuI/dm2RkrMBDemsxtY0XBzvW7nXjYM0hRyKX9QYj7Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.16.7.tgz", + "integrity": "sha512-rONFiQz9vgbsnaMtQlZCjIRwhJvlrPET8TabIUK2hzlXw9B9s2Ieaxte1SCOOXMbWRHodbKixNf3BLcWVOQ8Bw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-regenerator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", - "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", "dev": true, "requires": { "regenerator-transform": "^0.14.2" @@ -6700,70 +5199,70 @@ } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", - "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-spread": { - "version": "7.14.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", - "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", - "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-template-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", - "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", - "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-typescript": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.0.tgz", - "integrity": "sha512-WIIEazmngMEEHDaPTx0IZY48SaAmjVWe3TRSX7cmJXn0bEv9midFzAjxiruOWYIVf5iQ10vFx7ASDpgEO08L5w==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.8.tgz", + "integrity": "sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.15.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-typescript": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-typescript": "^7.16.7" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", - "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/preset-env": { @@ -6826,14 +5325,14 @@ } }, "@babel/preset-flow": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.14.5.tgz", - "integrity": "sha512-pP5QEb4qRUSVGzzKx9xqRuHUrM/jEzMqdrZpdMA+oUCRgd5zM1qGr5y5+ZgAL/1tVv1H0dyk5t4SKJntqyiVtg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.16.7.tgz", + "integrity": "sha512-6ceP7IyZdUYQ3wUVqyRSQXztd1YmFHWI4Xv11MIqAlE4WqxBSd/FZ61V9k+TS5Gd4mkHOtQtPp9ymRpxH4y1Ug==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-transform-flow-strip-types": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-flow-strip-types": "^7.16.7" } }, "@babel/preset-react": { @@ -6869,67 +5368,55 @@ } }, "@babel/template": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", - "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/traverse": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", - "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.0", - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-hoist-variables": "^7.14.5", - "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.10.tgz", + "integrity": "sha512-yzuaYXoRJBGMlBhsMJoUW7G1UmSb/eXr/JHYM/MsOJgavJibLwASijW7oXBdw3NQ6T0bW7Ty5P/VarOs9cHmqw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.8", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.16.10", + "@babel/types": "^7.16.8", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", + "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" } }, "@nicolo-ribaudo/chokidar-2": { - "version": "2.1.8-no-fsevents.2", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.2.tgz", - "integrity": "sha512-Fb8WxUFOBQVl+CX4MWet5o7eCc6Pj04rXIwVKZ6h1NnqTo45eOQW6aWyhG25NIODvWFwTDMwBsYxrQ3imxpetg==", + "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", "dev": true, - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "glob-parent": "^5.1.2", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } + "optional": true }, "@types/eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.0.tgz", + "integrity": "sha512-JUYa/5JwoqikCy7O7jKtuNe9Z4ZZt615G+1EKfaDGSNEpzaA2OwbV/G1v08Oa7fd1XzlFoSCvt9ePl9/6FyAug==", "dev": true, "peer": true, "requires": { @@ -6938,9 +5425,9 @@ } }, "@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", "dev": true, "peer": true, "requires": { @@ -6963,9 +5450,9 @@ "peer": true }, "@types/node": { - "version": "16.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.1.tgz", - "integrity": "sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A==", + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz", + "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==", "dev": true, "peer": true }, @@ -7145,16 +5632,16 @@ "peer": true }, "acorn": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", - "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true, "peer": true }, "acorn-import-assertions": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz", - "integrity": "sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA==", + "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, "peer": true, "requires": {} @@ -7181,9 +5668,9 @@ "requires": {} }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "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": { @@ -7196,26 +5683,13 @@ } }, "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, - "optional": true, "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "optional": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, "argparse": { @@ -7227,55 +5701,6 @@ "sprintf-js": "~1.0.2" } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true, - "optional": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "optional": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true, - "optional": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true, - "optional": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true, - "optional": true - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true, - "optional": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "optional": true - }, "babel-loader": { "version": "8.0.5", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz", @@ -7386,34 +5811,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "optional": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -7421,11 +5818,10 @@ "dev": true }, "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true, - "optional": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true }, "brace-expansion": { "version": "1.1.11", @@ -7438,35 +5834,25 @@ } }, "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "optional": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "fill-range": "^7.0.1" } }, "browserslist": { - "version": "4.16.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", - "integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001251", - "colorette": "^1.3.0", - "electron-to-chromium": "^1.3.811", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", - "node-releases": "^1.1.75" + "node-releases": "^2.0.1", + "picocolors": "^1.0.0" } }, "buffer-from": { @@ -7476,24 +5862,6 @@ "dev": true, "peer": true }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "optional": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -7535,9 +5903,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001251", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", - "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "version": "1.0.30001301", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001301.tgz", + "integrity": "sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA==", "dev": true }, "chalk": { @@ -7552,9 +5920,9 @@ } }, "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "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", @@ -7565,75 +5933,6 @@ "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" - }, - "dependencies": { - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "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 - }, - "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" - } - }, - "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" - } - }, - "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-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "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" - } - }, - "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" - } - } } }, "chrome-trace-event": { @@ -7643,72 +5942,6 @@ "dev": true, "peer": true }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "optional": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true - } - } - } - } - }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -7720,17 +5953,6 @@ "wrap-ansi": "^6.2.0" } }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "optional": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -7746,12 +5968,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "colorette": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", - "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", - "dev": true - }, "commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -7764,13 +5980,6 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true, - "optional": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -7786,20 +5995,6 @@ "safe-buffer": "~5.1.1" } }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true, - "optional": true - }, "cosmiconfig": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", @@ -7812,10 +6007,15 @@ "parse-json": "^4.0.0" } }, + "data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==" + }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -7827,13 +6027,6 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true, - "optional": true - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -7843,21 +6036,10 @@ "object-keys": "^1.0.12" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, "electron-to-chromium": { - "version": "1.3.814", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.814.tgz", - "integrity": "sha512-0mH03cyjh6OzMlmjauGg0TLd87ErIJqWiYxMcOLKf5w6p0YEOl7DJAj7BDlXEFmCguY5CQaKVOiMjAMODO2XDw==", + "version": "1.4.50", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.50.tgz", + "integrity": "sha512-g5X/6oVoqLyzKfsZ1HsJvxKoUAToFMCuq1USbmp/GPIwJDRYV1IEcv+plYTdh6h11hg140hycCBId0vf7rL0+Q==", "dev": true }, "emoji-regex": { @@ -7881,9 +6063,9 @@ } }, "enhanced-resolve": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", - "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", + "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", "dev": true, "peer": true, "requires": { @@ -7901,22 +6083,25 @@ } }, "es-abstract": { - "version": "1.18.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", - "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-symbols": "^1.0.2", "internal-slot": "^1.0.3", - "is-callable": "^1.2.3", + "is-callable": "^1.2.4", "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", "object-inspect": "^1.11.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", @@ -7926,9 +6111,9 @@ } }, "es-module-lexer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", - "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==", + "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, "peer": true }, @@ -7979,157 +6164,32 @@ "dev": true, "peer": true, "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "peer": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "peer": true - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "peer": true - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "optional": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.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, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - } - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "optional": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "estraverse": "^5.2.0" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^1.0.0" - } + "peer": true } } }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "peer": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "peer": true + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -8144,17 +6204,22 @@ "dev": true, "peer": true }, + "fetch-blob": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.4.tgz", + "integrity": "sha512-Eq5Xv5+VlSrYWEqKrusxY1C3Hm/hjeAsCGVG3ft7pZahlUAChpGZT/Ms1WmSLnEAisEXszjzu/s+ce6HZB2VHA==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "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, - "optional": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "to-regex-range": "^5.0.1" } }, "find-cache-dir": { @@ -8199,21 +6264,12 @@ "is-callable": "^1.1.3" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true, - "optional": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "optional": true, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", "requires": { - "map-cache": "^0.2.2" + "fetch-blob": "^3.1.2" } }, "fs-extra": { @@ -8275,17 +6331,20 @@ "has-symbols": "^1.0.1" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, - "optional": true + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } }, "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -8319,9 +6378,9 @@ "dev": true }, "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, "has": { @@ -8360,41 +6419,6 @@ "has-symbols": "^1.0.2" } }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "optional": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "optional": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -8449,25 +6473,6 @@ "loose-envify": "^1.0.0" } }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - }, - "dependencies": { - "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, - "optional": true - } - } - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -8484,13 +6489,12 @@ } }, "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "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, - "optional": true, "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "^2.0.0" } }, "is-boolean-object": { @@ -8503,13 +6507,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "optional": true - }, "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -8517,33 +6514,14 @@ "dev": true }, "is-core-module": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", - "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "dev": true, "requires": { "has": "^1.0.3" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - }, - "dependencies": { - "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, - "optional": true - } - } - }, "is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -8553,40 +6531,12 @@ "has-tostringtag": "^1.0.0" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "dependencies": { - "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, - "optional": true - } - } - }, "is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", "dev": true }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "optional": true - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -8600,29 +6550,25 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "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-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true }, "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, "is-number-object": { "version": "1.0.6", @@ -8633,16 +6579,6 @@ "has-tostringtag": "^1.0.0" } }, - "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, - "optional": true, - "requires": { - "isobject": "^3.0.1" - } - }, "is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -8653,6 +6589,12 @@ "has-tostringtag": "^1.0.0" } }, + "is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -8676,31 +6618,19 @@ "has-symbols": "^1.0.2" } }, - "is-windows": { + "is-weakref": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "optional": true + "requires": { + "call-bind": "^1.0.2" + } }, "jest-worker": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", - "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.6.tgz", + "integrity": "sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw==", "dev": true, "peer": true, "requires": { @@ -8793,16 +6723,6 @@ "integrity": "sha512-xWga7QCZsR2Wjy2vNL3Kq/irT+IwxwItEWycRRlT5yhqHZK2fmEhziP+LzcJBWSTAMranGKtGTQ6lFpyJS3+jA==", "dev": true }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, "loader-runner": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", @@ -8875,23 +6795,6 @@ } } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true, - "optional": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "optional": true, - "requires": { - "object-visit": "^1.0.0" - } - }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -8899,73 +6802,21 @@ "dev": true, "peer": true }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "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, - "optional": true - } - } - }, "mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", "dev": true, "peer": true }, "mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", "dev": true, "peer": true, "requires": { - "mime-db": "1.49.0" + "mime-db": "1.51.0" } }, "minimatch": { @@ -8983,29 +6834,6 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "optional": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -9021,56 +6849,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "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, - "optional": true - } - } - }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -9078,15 +6856,25 @@ "dev": true, "peer": true }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.0.tgz", + "integrity": "sha512-8xeimMwMItMw8hRrOl3C9/xzU49HV/yE6ORew/l+dxWimO5A4Ra8ld2rerlJvc/O7et5Z1zrWsPX43v1QBjCxw==", + "requires": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + } }, "node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", + "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", "dev": true }, "normalize-path": { @@ -9095,75 +6883,10 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "optional": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true - } - } - } - } - }, "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true }, "object-keys": { @@ -9172,16 +6895,6 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "optional": true, - "requires": { - "isobject": "^3.0.0" - } - }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -9195,24 +6908,14 @@ } }, "object.getownpropertydescriptors": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", - "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", + "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "optional": true, - "requires": { - "isobject": "^3.0.1" + "es-abstract": "^1.19.1" } }, "once": { @@ -9258,13 +6961,6 @@ "json-parse-better-errors": "^1.0.1" } }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true, - "optional": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -9283,10 +6979,16 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "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.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pify": { @@ -9321,22 +7023,8 @@ "encoding": "^0.1.11", "is-stream": "^1.0.1" } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true, - "optional": 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, - "optional": true + } + } }, "punycode": { "version": "2.1.1", @@ -9355,32 +7043,13 @@ "safe-buffer": "^5.1.0" } }, - "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, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "optional": true, "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" + "picomatch": "^2.2.1" } }, "regenerate": { @@ -9390,12 +7059,12 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", + "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", "dev": true, "requires": { - "regenerate": "^1.4.0" + "regenerate": "^1.4.2" } }, "regenerator-runtime": { @@ -9414,9 +7083,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", - "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", + "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -9430,52 +7099,18 @@ } } }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", + "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", "dev": true, "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^9.0.0", + "regjsgen": "^0.5.2", + "regjsparser": "^0.7.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" } }, "regjsgen": { @@ -9485,9 +7120,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", + "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -9501,27 +7136,6 @@ } } }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true, - "optional": true - }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true, - "optional": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "optional": true - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -9535,13 +7149,14 @@ "dev": true }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.1.tgz", + "integrity": "sha512-lfEImVbnolPuaSZuLQ52cAxPBHeI77sPwCOWRdy12UG/CNa8an7oBHH1R+Fp1/mUqSJi4c8TIP6FOIPSZAUrEQ==", "dev": true, "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -9550,20 +7165,6 @@ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true, - "optional": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "optional": true - }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -9579,16 +7180,6 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "optional": true, - "requires": { - "ret": "~0.1.10" - } - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -9628,19 +7219,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - } - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -9658,151 +7236,16 @@ "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "optional": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.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, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "optional": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.2.0" - } - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "optional": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "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, "peer": true, "requires": { @@ -9819,135 +7262,21 @@ } } }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "dev": true, - "optional": true - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^3.0.0" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "optional": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": 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, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "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.0" + "strip-ansi": "^6.0.1" } }, "string.prototype.trimend": { @@ -9971,12 +7300,12 @@ } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "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.0" + "ansi-regex": "^5.0.1" } }, "supports-color": { @@ -9988,23 +7317,29 @@ "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 + }, "tapable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", - "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, "peer": true }, "terser": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", - "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "dev": true, "peer": true, "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", - "source-map-support": "~0.5.19" + "source-map-support": "~0.5.20" }, "dependencies": { "commander": { @@ -10024,30 +7359,19 @@ } }, "terser-webpack-plugin": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", - "integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.0.tgz", + "integrity": "sha512-LPIisi3Ol4chwAaPP8toUJ3L4qCM1G0wao7L3qNv57Drezxj6+VEyySpPw4B1HSO2Eg/hDY/MNF5XihCAoqnsQ==", "dev": true, "peer": true, "requires": { - "jest-worker": "^27.0.2", - "p-limit": "^3.1.0", - "schema-utils": "^3.0.0", + "jest-worker": "^27.4.1", + "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.0", "source-map": "^0.6.1", - "terser": "^5.7.0" + "terser": "^5.7.2" }, "dependencies": { - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "peer": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -10063,61 +7387,13 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "optional": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "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, - "optional": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "^7.0.0" } }, "unbox-primitive": { @@ -10133,103 +7409,39 @@ } }, "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "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": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "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": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" } }, "unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "dev": true }, "unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "dev": true }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "optional": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, "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 }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "optional": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "optional": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "optional": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true, - "optional": true - } - } - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true, - "optional": true - }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -10240,27 +7452,6 @@ "punycode": "^2.1.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true, - "optional": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true, - "optional": true - }, "util.promisify": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.1.tgz", @@ -10275,9 +7466,9 @@ } }, "watchpack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", - "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", + "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", "dev": true, "peer": true, "requires": { @@ -10285,10 +7476,15 @@ "graceful-fs": "^4.1.2" } }, + "web-streams-polyfill": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.0.tgz", + "integrity": "sha512-EqPmREeOzttaLRm5HS7io98goBgZ7IVz79aDvqjD0kYXLtFZTc0T/U6wHTPKyIjb+MdN7DFIIX6hgdBEpWmfPA==" + }, "webpack": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.51.1.tgz", - "integrity": "sha512-xsn3lwqEKoFvqn4JQggPSRxE4dhsRcysWTqYABAZlmavcoTmwlOb9b1N36Inbt/eIispSkuHa80/FJkDTPos1A==", + "version": "5.67.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.67.0.tgz", + "integrity": "sha512-LjFbfMh89xBDpUMgA1W9Ur6Rn/gnr2Cq1jjHFPo4v6a79/ypznSYbAyPgGhwsxBtMIaEmDD1oJoA7BEYw/Fbrw==", "dev": true, "peer": true, "requires": { @@ -10301,12 +7497,12 @@ "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.0", - "es-module-lexer": "^0.7.1", + "enhanced-resolve": "^5.8.3", + "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.4", + "graceful-fs": "^4.2.9", "json-parse-better-errors": "^1.0.2", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", @@ -10314,14 +7510,14 @@ "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" + "watchpack": "^2.3.1", + "webpack-sources": "^3.2.3" } }, "webpack-sources": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.0.tgz", - "integrity": "sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw==", + "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, "peer": true }, @@ -10462,13 +7658,6 @@ "camelcase": "^5.0.0", "decamelize": "^1.2.0" } - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "peer": true } } } diff --git a/samples/client/petstore/javascript-flowtyped/package.json b/samples/client/petstore/javascript-flowtyped/package.json index a3dd89f5cbf1..393540acf328 100644 --- a/samples/client/petstore/javascript-flowtyped/package.json +++ b/samples/client/petstore/javascript-flowtyped/package.json @@ -19,7 +19,7 @@ "build:flow": "flow-copy-source -v -i '**/__tests__/**' src lib" }, "dependencies": { - "node-fetch": ">=2.6.1", + "node-fetch": ">=3.1.1", "portable-fetch": "^3.0.0" }, "devDependencies": { From 28cc28626531158ce0517dcaabb160208d62aba3 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Sat, 22 Jan 2022 06:11:04 -0500 Subject: [PATCH 130/175] [typescript] Default auth method support and optional param object when all params optional (#11321) * add default auth * private * default when optional params and fix types * build samples * remove extra space * re-add space before default empty * switch to default authentication method support in config * generated samples * null check chaining * generate samples * remove extra spaces * regen samples * formatting fixes * more samples * remove from abstract methods * samples * add default to inversify as well * samples again * exclude inversify * samples once more * samples --- .../resources/typescript/api/api.mustache | 18 +++- .../resources/typescript/auth/auth.mustache | 12 +++ .../typescript/types/ObjectParamAPI.mustache | 2 +- .../composed-schemas/apis/DefaultApi.ts | 20 +++- .../builds/composed-schemas/auth/auth.ts | 3 + .../composed-schemas/types/ObjectParamAPI.ts | 6 +- .../typescript/builds/default/apis/PetApi.ts | 93 +++++++++++++------ .../builds/default/apis/StoreApi.ts | 31 ++++++- .../typescript/builds/default/apis/UserApi.ts | 81 ++++++++++++---- .../typescript/builds/default/auth/auth.ts | 3 + .../builds/default/types/ObjectParamAPI.ts | 4 +- .../typescript/builds/deno/apis/PetApi.ts | 93 +++++++++++++------ .../typescript/builds/deno/apis/StoreApi.ts | 31 ++++++- .../typescript/builds/deno/apis/UserApi.ts | 81 ++++++++++++---- .../typescript/builds/deno/auth/auth.ts | 3 + .../builds/deno/types/ObjectParamAPI.ts | 4 +- .../builds/inversify/apis/PetApi.ts | 61 ++++++------ .../builds/inversify/apis/StoreApi.ts | 15 ++- .../builds/inversify/apis/UserApi.ts | 49 ++++++---- .../builds/inversify/types/ObjectParamAPI.ts | 4 +- .../typescript/builds/jquery/apis/PetApi.ts | 93 +++++++++++++------ .../typescript/builds/jquery/apis/StoreApi.ts | 31 ++++++- .../typescript/builds/jquery/apis/UserApi.ts | 81 ++++++++++++---- .../typescript/builds/jquery/auth/auth.ts | 3 + .../builds/jquery/types/ObjectParamAPI.ts | 4 +- .../builds/object_params/apis/PetApi.ts | 93 +++++++++++++------ .../builds/object_params/apis/StoreApi.ts | 31 ++++++- .../builds/object_params/apis/UserApi.ts | 81 ++++++++++++---- .../builds/object_params/auth/auth.ts | 3 + .../object_params/types/ObjectParamAPI.ts | 4 +- 30 files changed, 762 insertions(+), 276 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 4ccded577e47..0ca805593105 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -1,7 +1,7 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi{{extensionForDeno}}'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi{{extensionForDeno}}'; import {Configuration} from '../configuration{{extensionForDeno}}'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http{{extensionForDeno}}'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http{{extensionForDeno}}'; {{#platforms}} {{#node}} import * as FormData from "form-data"; @@ -11,6 +11,7 @@ import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer{{extensionForDeno}}'; import {ApiException} from './exception{{extensionForDeno}}'; import {canConsumeForm, isCodeInRange} from '../util{{extensionForDeno}}'; +import {SecurityAuthentication} from '../auth/auth'; {{#useInversify}} import { injectable } from "inversify"; @@ -151,15 +152,22 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory { {{/bodyParam}} {{#hasAuthMethods}} - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; {{/hasAuthMethods}} {{#authMethods}} // Apply auth methods authMethod = _config.authMethods["{{name}}"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } {{/authMethods}} + + {{^useInversify}} + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + {{/useInversify}} return requestContext; } diff --git a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache index bfb303e741ed..09ff0ca2bb9a 100644 --- a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache @@ -107,6 +107,9 @@ export class {{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication {{/authMethods}} export type AuthMethods = { + {{^useInversify}} + "default"?: SecurityAuthentication, + {{/useInversify}} {{#authMethods}} "{{name}}"?: SecurityAuthentication{{^-last}},{{/-last}} {{/authMethods}} @@ -114,6 +117,9 @@ export type AuthMethods = { {{#useInversify}} export const authMethodServices = { + {{^useInversify}} + "default"?: SecurityAuthentication, + {{/useInversify}} {{#authMethods}} "{{name}}": {{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication{{^-last}},{{/-last}} {{/authMethods}} @@ -126,6 +132,9 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + {{^useInversify}} + "default"?: SecurityAuthentication, + {{/useInversify}} {{#authMethods}} "{{name}}"?: {{#isApiKey}}ApiKeyConfiguration{{/isApiKey}}{{#isBasicBasic}}HttpBasicConfiguration{{/isBasicBasic}}{{#isBasicBearer}}HttpBearerConfiguration{{/isBasicBearer}}{{#isOAuth}}OAuth2Configuration{{/isOAuth}}{{^-last}},{{/-last}} {{/authMethods}} @@ -141,6 +150,9 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + {{^useInversify}} + authMethods["default"] = config["default"] + {{/useInversify}} {{#authMethods}} if (config["{{name}}"]) { diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache index d44164bd0191..9a6390337188 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache @@ -47,7 +47,7 @@ export class Object{{classname}} { {{/summary}} * @param param the request object */ - public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { + public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { return this.api.{{nickname}}({{#allParams}}param.{{paramName}}, {{/allParams}} options){{^useRxJS}}.toPromise(){{/useRxJS}}; } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts index 59a3ac169736..a2c52ae901ea 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts @@ -1,10 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { Cat } from '../models/Cat'; @@ -44,6 +45,11 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -74,6 +80,11 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -104,6 +115,11 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts index fa859aaa0981..49340932e11b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts @@ -24,6 +24,7 @@ export interface TokenProvider { export type AuthMethods = { + "default"?: SecurityAuthentication, } export type ApiKeyConfiguration = string; @@ -32,6 +33,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, } /** @@ -44,6 +46,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] return authMethods; } \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts index d94a613229e6..84ebc7d8c699 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts @@ -50,21 +50,21 @@ export class ObjectDefaultApi { /** * @param param the request object */ - public filePost(param: DefaultApiFilePostRequest, options?: Configuration): Promise { + public filePost(param: DefaultApiFilePostRequest = {}, options?: Configuration): Promise { return this.api.filePost(param.inlineObject, options).toPromise(); } /** * @param param the request object */ - public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest, options?: Configuration): Promise { + public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest = {}, options?: Configuration): Promise { return this.api.petsFilteredPatch(param.petByAgePetByType, options).toPromise(); } /** * @param param the request object */ - public petsPatch(param: DefaultApiPetsPatchRequest, options?: Configuration): Promise { + public petsPatch(param: DefaultApiPetsPatchRequest = {}, options?: Configuration): Promise { return this.api.petsPatch(param.catDog, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index ff3b13bc8455..e85797baebc1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; @@ -51,11 +52,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -88,11 +94,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -125,11 +136,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -162,11 +178,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -195,11 +216,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -239,11 +265,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -304,11 +335,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -371,11 +407,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; 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 46cf6d33efc7..821e181892ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { Order } from '../models/Order'; @@ -39,6 +40,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -58,11 +64,16 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -91,6 +102,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -127,6 +143,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 99a7c43b2e5c..9a87f64e9c58 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { User } from '../models/User'; @@ -49,11 +50,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -91,11 +97,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -133,11 +144,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -166,11 +182,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -198,6 +219,11 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -240,6 +266,11 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -258,11 +289,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -309,11 +345,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts index 1f1d1ecac678..a67ed0e90ccb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts @@ -66,6 +66,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -76,6 +77,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -90,6 +92,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( 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 829c9d0363a8..a590e3ca4923 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index 9ae92b9b2120..f11b208baf24 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -1,10 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi.ts'; import {Configuration} from '../configuration.ts'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; +import {SecurityAuthentication} from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse.ts'; @@ -49,11 +50,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -86,11 +92,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -123,11 +134,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -160,11 +176,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -193,11 +214,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -237,11 +263,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -302,11 +333,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -369,11 +405,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; 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 767734aed21e..f83700b35cfb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -1,10 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi.ts'; import {Configuration} from '../configuration.ts'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; +import {SecurityAuthentication} from '../auth/auth'; import { Order } from '../models/Order.ts'; @@ -37,6 +38,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -56,11 +62,16 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -89,6 +100,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -125,6 +141,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index 7caf789d015d..f2de9aeb598a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -1,10 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi.ts'; import {Configuration} from '../configuration.ts'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; +import {SecurityAuthentication} from '../auth/auth'; import { User } from '../models/User.ts'; @@ -47,11 +48,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -89,11 +95,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -131,11 +142,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -164,11 +180,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -196,6 +217,11 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -238,6 +264,11 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -256,11 +287,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -307,11 +343,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts index e7609dabbece..85086dde5fae 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts @@ -64,6 +64,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -74,6 +75,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -88,6 +90,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( 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 ebcd714f27c5..a6988e3ef191 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 9b8cd23af11e..81a75d96bcec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { injectable } from "inversify"; @@ -53,12 +54,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -90,12 +92,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -127,12 +130,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -164,12 +168,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -197,12 +202,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -241,12 +247,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -306,12 +313,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -373,12 +381,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } 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 356d2cfbc4d0..4115b9dc6d9e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { injectable } from "inversify"; @@ -41,6 +42,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + return requestContext; } @@ -60,12 +62,13 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -93,6 +96,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + return requestContext; } @@ -129,6 +133,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index 3991a33b383b..124034df9888 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { injectable } from "inversify"; @@ -51,12 +52,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -93,12 +95,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -135,12 +138,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -168,12 +172,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -200,6 +205,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + return requestContext; } @@ -242,6 +248,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + return requestContext; } @@ -260,12 +267,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } @@ -311,12 +319,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } + return requestContext; } 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 829c9d0363a8..a590e3ca4923 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index a2b9813749e5..fe20e750a839 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -1,10 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; @@ -49,11 +50,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -86,11 +92,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -123,11 +134,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -160,11 +176,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -193,11 +214,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -237,11 +263,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -302,11 +333,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -369,11 +405,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; 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 a8bc438d420d..020bb0407068 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -1,10 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { Order } from '../models/Order'; @@ -37,6 +38,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -56,11 +62,16 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -89,6 +100,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -125,6 +141,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 3f493441c39d..75cb0453992e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -1,10 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { User } from '../models/User'; @@ -47,11 +48,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -89,11 +95,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -131,11 +142,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -164,11 +180,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -196,6 +217,11 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -238,6 +264,11 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -256,11 +287,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -307,11 +343,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts index d8924a4216c2..ed2aa2bfe6db 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts @@ -64,6 +64,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -74,6 +75,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -88,6 +90,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( 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 829c9d0363a8..a590e3ca4923 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index ff3b13bc8455..e85797baebc1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; @@ -51,11 +52,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -88,11 +94,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -125,11 +136,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -162,11 +178,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -195,11 +216,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -239,11 +265,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -304,11 +335,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -371,11 +407,16 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["petstore_auth"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; 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 46cf6d33efc7..821e181892ba 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 @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { Order } from '../models/Order'; @@ -39,6 +40,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -58,11 +64,16 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -91,6 +102,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -127,6 +143,11 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 99a7c43b2e5c..9a87f64e9c58 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -1,12 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; import { User } from '../models/User'; @@ -49,11 +50,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -91,11 +97,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -133,11 +144,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -166,11 +182,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -198,6 +219,11 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -240,6 +266,11 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -258,11 +289,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -309,11 +345,16 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["api_key"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/auth/auth.ts index 1f1d1ecac678..a67ed0e90ccb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/auth/auth.ts @@ -66,6 +66,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -76,6 +77,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -90,6 +92,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( 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 829c9d0363a8..a590e3ca4923 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 @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } From 78f4748c0682971bcf085107c1f803c39cb088e4 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 23 Jan 2022 14:16:46 -0800 Subject: [PATCH 131/175] Adds generator default template engine (#11366) * Revert "Revert "Has generators set default template engine (#11245)" (#11316)" This reverts commit 57987424a4eaa22d73337388489cd86d7f42a023. * Only loads in the default template engine if the config file contains the generatorName * Only sets templatingEngineName using condif default in one place * Adds config files that lack generatorName * Revert "Adds config files that lack generatorName" This reverts commit 7dafc93c0f02c037d9be5d2c0a3ee7377c8b479d. * Adds generator default templating engine to the generator metadata --- bin/configs/python-experimental.yaml | 1 - docs/generators/ada-server.md | 1 + docs/generators/ada.md | 1 + docs/generators/android.md | 1 + docs/generators/apache2.md | 1 + docs/generators/apex.md | 1 + docs/generators/asciidoc.md | 1 + docs/generators/aspnetcore.md | 1 + docs/generators/avro-schema.md | 1 + docs/generators/bash.md | 1 + docs/generators/c.md | 1 + docs/generators/clojure.md | 1 + docs/generators/cpp-pistache-server.md | 1 + docs/generators/cpp-qt-client.md | 1 + docs/generators/cpp-qt-qhttpengine-server.md | 1 + docs/generators/cpp-restbed-server.md | 1 + docs/generators/cpp-restsdk.md | 1 + docs/generators/cpp-tiny.md | 1 + docs/generators/cpp-tizen.md | 1 + docs/generators/cpp-ue4.md | 1 + docs/generators/crystal.md | 1 + docs/generators/csharp-dotnet2.md | 1 + docs/generators/csharp-nancyfx.md | 1 + docs/generators/csharp-netcore-functions.md | 1 + docs/generators/csharp-netcore.md | 1 + docs/generators/csharp.md | 1 + docs/generators/cwiki.md | 1 + docs/generators/dart-dio-next.md | 1 + docs/generators/dart-dio.md | 1 + docs/generators/dart-jaguar.md | 1 + docs/generators/dart.md | 1 + docs/generators/dynamic-html.md | 1 + docs/generators/eiffel.md | 1 + docs/generators/elixir.md | 1 + docs/generators/elm.md | 1 + docs/generators/erlang-client.md | 1 + docs/generators/erlang-proper.md | 1 + docs/generators/erlang-server.md | 1 + docs/generators/flash-deprecated.md | 1 + docs/generators/fsharp-functions.md | 1 + docs/generators/fsharp-giraffe-server.md | 1 + docs/generators/go-deprecated.md | 1 + docs/generators/go-echo-server.md | 1 + docs/generators/go-gin-server.md | 1 + docs/generators/go-server.md | 1 + docs/generators/go.md | 1 + docs/generators/graphql-nodejs-express-server.md | 1 + docs/generators/graphql-schema.md | 1 + docs/generators/groovy.md | 1 + docs/generators/haskell-http-client.md | 1 + docs/generators/haskell-yesod.md | 1 + docs/generators/haskell.md | 1 + docs/generators/html.md | 1 + docs/generators/html2.md | 1 + docs/generators/java-camel.md | 1 + docs/generators/java-inflector.md | 1 + docs/generators/java-micronaut-client.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/javascript-apollo.md | 1 + docs/generators/javascript-closure-angular.md | 1 + docs/generators/javascript-flowtyped.md | 1 + docs/generators/javascript.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/jmeter.md | 1 + docs/generators/k6.md | 1 + docs/generators/kotlin-server-deprecated.md | 1 + docs/generators/kotlin-server.md | 1 + docs/generators/kotlin-spring.md | 1 + docs/generators/kotlin-vertx.md | 1 + docs/generators/kotlin.md | 1 + docs/generators/ktorm-schema.md | 1 + docs/generators/lua.md | 1 + docs/generators/markdown.md | 1 + docs/generators/mysql-schema.md | 1 + docs/generators/nim.md | 1 + docs/generators/nodejs-express-server.md | 1 + docs/generators/objc.md | 1 + docs/generators/ocaml.md | 1 + docs/generators/openapi-yaml.md | 1 + docs/generators/openapi.md | 1 + docs/generators/perl.md | 1 + docs/generators/php-dt.md | 1 + docs/generators/php-laravel.md | 1 + docs/generators/php-lumen.md | 1 + docs/generators/php-mezzio-ph.md | 1 + docs/generators/php-silex-deprecated.md | 1 + docs/generators/php-slim-deprecated.md | 1 + docs/generators/php-slim4.md | 1 + docs/generators/php-symfony.md | 1 + docs/generators/php.md | 1 + docs/generators/plantuml.md | 1 + docs/generators/powershell.md | 1 + docs/generators/protobuf-schema.md | 1 + docs/generators/python-aiohttp.md | 1 + docs/generators/python-blueplanet.md | 1 + docs/generators/python-experimental.md | 1 + docs/generators/python-fastapi.md | 1 + docs/generators/python-flask.md | 1 + docs/generators/python-legacy.md | 1 + docs/generators/python.md | 1 + docs/generators/r.md | 1 + docs/generators/ruby-on-rails.md | 1 + docs/generators/ruby-sinatra.md | 1 + docs/generators/ruby.md | 1 + docs/generators/rust-server.md | 1 + docs/generators/rust.md | 1 + docs/generators/scala-akka-http-server.md | 1 + docs/generators/scala-akka.md | 1 + docs/generators/scala-finch.md | 1 + docs/generators/scala-gatling.md | 1 + docs/generators/scala-httpclient-deprecated.md | 1 + docs/generators/scala-lagom-server.md | 1 + docs/generators/scala-play-server.md | 1 + docs/generators/scala-sttp.md | 1 + docs/generators/scalatra.md | 1 + docs/generators/scalaz.md | 1 + docs/generators/spring.md | 1 + docs/generators/swift4-deprecated.md | 1 + docs/generators/swift5.md | 1 + docs/generators/typescript-angular.md | 1 + docs/generators/typescript-angularjs-deprecated.md | 1 + docs/generators/typescript-aurelia.md | 1 + docs/generators/typescript-axios.md | 1 + docs/generators/typescript-fetch.md | 1 + docs/generators/typescript-inversify.md | 1 + docs/generators/typescript-jquery.md | 1 + docs/generators/typescript-nestjs.md | 1 + docs/generators/typescript-node.md | 1 + docs/generators/typescript-redux-query.md | 1 + docs/generators/typescript-rxjs.md | 1 + docs/generators/typescript.md | 1 + docs/generators/wsdl-schema.md | 1 + .../java/org/openapitools/codegen/cmd/ConfigHelp.java | 1 + .../openapitools/codegen/config/WorkflowSettings.java | 2 +- .../java/org/openapitools/codegen/CodegenConfig.java | 2 ++ .../java/org/openapitools/codegen/DefaultCodegen.java | 5 +++++ .../codegen/config/CodegenConfigurator.java | 10 ++++++---- .../languages/PythonExperimentalClientCodegen.java | 5 +++++ 151 files changed, 164 insertions(+), 6 deletions(-) diff --git a/bin/configs/python-experimental.yaml b/bin/configs/python-experimental.yaml index 1a8ea6e002c2..dd204f44938d 100644 --- a/bin/configs/python-experimental.yaml +++ b/bin/configs/python-experimental.yaml @@ -2,7 +2,6 @@ generatorName: python-experimental outputDir: samples/openapi3/client/petstore/python-experimental inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/python-experimental -templatingEngineName: handlebars additionalProperties: packageName: petstore_api recursionLimit: "1234" diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index 4dcede68c0d5..63c530a26cb8 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -10,6 +10,7 @@ title: Documentation for the ada-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Ada | | +| generator default templating engine | mustache | | | helpTxt | Generates an Ada server implementation (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 12fd0187cfa2..8bb28aefe706 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -10,6 +10,7 @@ title: Documentation for the ada Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Ada | | +| generator default templating engine | mustache | | | helpTxt | Generates an Ada client implementation (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/android.md b/docs/generators/android.md index 36a0bc0406db..650b819bea61 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -10,6 +10,7 @@ title: Documentation for the android Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates an Android client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 5b8e5d4e4565..8cc8e289328f 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -10,6 +10,7 @@ title: Documentation for the apache2 Generator | generator stability | STABLE | | | generator type | CONFIG | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates an Apache2 Config file with the permissions | | ## CONFIG OPTIONS diff --git a/docs/generators/apex.md b/docs/generators/apex.md index 2c815c449601..f92f9e57177a 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -10,6 +10,7 @@ title: Documentation for the apex Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Apex | | +| generator default templating engine | mustache | | | helpTxt | Generates an Apex API client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index b966cd6e179f..712f00d17b46 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -10,6 +10,7 @@ title: Documentation for the asciidoc Generator | generator stability | STABLE | | | generator type | DOCUMENTATION | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates asciidoc markup based documentation. | | ## CONFIG OPTIONS diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 1488ec9672fd..6956ac6d9c1a 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -10,6 +10,7 @@ title: Documentation for the aspnetcore Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | C# | | +| generator default templating engine | mustache | | | helpTxt | Generates an ASP.NET Core Web API server. | | ## CONFIG OPTIONS diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index d8929e448ea3..8ea48f628820 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -10,6 +10,7 @@ title: Documentation for the avro-schema Generator | generator stability | BETA | | | generator type | SCHEMA | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Avro model (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/bash.md b/docs/generators/bash.md index d7053aaa12ca..8a4f10696e34 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -10,6 +10,7 @@ title: Documentation for the bash Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Bash | | +| generator default templating engine | mustache | | | helpTxt | Generates a Bash client script based on cURL. | | ## CONFIG OPTIONS diff --git a/docs/generators/c.md b/docs/generators/c.md index 700b9c59efd4..3bab335a5f65 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -10,6 +10,7 @@ title: Documentation for the c Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | C | | +| generator default templating engine | mustache | | | helpTxt | Generates a C (libcurl) client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 512688ead462..542a27c2998b 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -10,6 +10,7 @@ title: Documentation for the clojure Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Clojure | | +| generator default templating engine | mustache | | | helpTxt | Generates a Clojure client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index 534d5a52f482..e561cac7c5a2 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -10,6 +10,7 @@ title: Documentation for the cpp-pistache-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | C++ | | +| generator default templating engine | mustache | | | helpTxt | Generates a C++ API server (based on Pistache) | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-qt-client.md b/docs/generators/cpp-qt-client.md index 9ea981421a50..a03ff5bc48b1 100644 --- a/docs/generators/cpp-qt-client.md +++ b/docs/generators/cpp-qt-client.md @@ -10,6 +10,7 @@ title: Documentation for the cpp-qt-client Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | C++ | | +| generator default templating engine | mustache | | | helpTxt | Generates a Qt C++ client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-qt-qhttpengine-server.md b/docs/generators/cpp-qt-qhttpengine-server.md index 12fd8dc3a638..5de00c766389 100644 --- a/docs/generators/cpp-qt-qhttpengine-server.md +++ b/docs/generators/cpp-qt-qhttpengine-server.md @@ -10,6 +10,7 @@ title: Documentation for the cpp-qt-qhttpengine-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | C++ | | +| generator default templating engine | mustache | | | helpTxt | Generates a Qt C++ Server using the QHTTPEngine HTTP Library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index f5037c7ac5d8..c499ba8e28dd 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -10,6 +10,7 @@ title: Documentation for the cpp-restbed-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | C++ | | +| generator default templating engine | mustache | | | helpTxt | Generates a C++ API Server with Restbed (https://github.com/Corvusoft/restbed). | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 700f1c657d19..5cad57183bc6 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -10,6 +10,7 @@ title: Documentation for the cpp-restsdk Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | C++ | | +| generator default templating engine | mustache | | | helpTxt | Generates a C++ API client with C++ REST SDK (https://github.com/Microsoft/cpprestsdk). | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-tiny.md b/docs/generators/cpp-tiny.md index 08a7e4f69190..ca65611bf81f 100644 --- a/docs/generators/cpp-tiny.md +++ b/docs/generators/cpp-tiny.md @@ -10,6 +10,7 @@ title: Documentation for the cpp-tiny Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | C++ | | +| generator default templating engine | mustache | | | helpTxt | Generates a C++ Arduino REST API client. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index c81dec1d03a0..9b5f89bb2c71 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -10,6 +10,7 @@ title: Documentation for the cpp-tizen Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | C++ | | +| generator default templating engine | mustache | | | helpTxt | Generates a Samsung Tizen C++ client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md index 563f1325a4c1..f619e7eaf7b5 100644 --- a/docs/generators/cpp-ue4.md +++ b/docs/generators/cpp-ue4.md @@ -10,6 +10,7 @@ title: Documentation for the cpp-ue4 Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | C++ | | +| generator default templating engine | mustache | | | helpTxt | Generates a Unreal Engine 4 C++ Module (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/crystal.md b/docs/generators/crystal.md index 0961a1e05143..45aaac6e9e56 100644 --- a/docs/generators/crystal.md +++ b/docs/generators/crystal.md @@ -10,6 +10,7 @@ title: Documentation for the crystal Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | Crystal | | +| generator default templating engine | mustache | | | helpTxt | Generates a Crystal client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index 539eb8282e69..274150134c9d 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -10,6 +10,7 @@ title: Documentation for the csharp-dotnet2 Generator | generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | C# | | +| generator default templating engine | mustache | | | helpTxt | Generates a C# .Net 2.0 client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index 076cf18395c9..37d2be9eb02e 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -10,6 +10,7 @@ title: Documentation for the csharp-nancyfx Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | C# | | +| generator default templating engine | mustache | | | helpTxt | Generates a C# NancyFX Web API server. | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp-netcore-functions.md b/docs/generators/csharp-netcore-functions.md index eca318215d87..c694b4626ffa 100644 --- a/docs/generators/csharp-netcore-functions.md +++ b/docs/generators/csharp-netcore-functions.md @@ -10,6 +10,7 @@ title: Documentation for the csharp-netcore-functions Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | C# | | +| generator default templating engine | mustache | | | helpTxt | Generates a csharp server. | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index ad581afc56b7..d693fdf9e441 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -10,6 +10,7 @@ title: Documentation for the csharp-netcore Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | C# | | +| generator default templating engine | mustache | | | helpTxt | Generates a C# client library (.NET Standard, .NET Core). | | ## CONFIG OPTIONS diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 656b537a2c08..0dd162bc8d60 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -10,6 +10,7 @@ title: Documentation for the csharp Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | C# | | +| generator default templating engine | mustache | | | helpTxt | Generates a CSharp client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 19997fc3e8db..1f74c2420beb 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -9,6 +9,7 @@ title: Documentation for the cwiki Generator | generator name | cwiki | pass this to the generate command after -g | | generator stability | STABLE | | | generator type | DOCUMENTATION | | +| generator default templating engine | mustache | | | helpTxt | Generates confluence wiki markup. | | ## CONFIG OPTIONS diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index 0bb7adfd786a..d247192fd97c 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -10,6 +10,7 @@ title: Documentation for the dart-dio-next Generator | generator stability | EXPERIMENTAL | | | generator type | CLIENT | | | generator language | Dart | | +| generator default templating engine | mustache | | | helpTxt | Generates a Dart Dio client library with null-safety. | | ## CONFIG OPTIONS diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 00aa3d7e8693..b94bed6bcc73 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -10,6 +10,7 @@ title: Documentation for the dart-dio Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Dart | | +| generator default templating engine | mustache | | | helpTxt | Generates a Dart Dio client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index aa68db809fec..0f6aed48cbe3 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -10,6 +10,7 @@ title: Documentation for the dart-jaguar Generator | generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Dart | | +| generator default templating engine | mustache | | | helpTxt | Generates a Dart Jaguar client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 190fd2cd8ae0..5c8c4ffac8b8 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -10,6 +10,7 @@ title: Documentation for the dart Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Dart | | +| generator default templating engine | mustache | | | helpTxt | Generates a Dart 2.x client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index d7c58fc68690..e9d3b13c8d06 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -9,6 +9,7 @@ title: Documentation for the dynamic-html Generator | generator name | dynamic-html | pass this to the generate command after -g | | generator stability | STABLE | | | generator type | DOCUMENTATION | | +| generator default templating engine | mustache | | | helpTxt | Generates a dynamic HTML site. | | ## CONFIG OPTIONS diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index c462e16da445..ff72e722de98 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -10,6 +10,7 @@ title: Documentation for the eiffel Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Eiffel | | +| generator default templating engine | mustache | | | helpTxt | Generates a Eiffel client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index a71bf4df0a77..6bd748e76aee 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -10,6 +10,7 @@ title: Documentation for the elixir Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Elixir | | +| generator default templating engine | mustache | | | helpTxt | Generates an elixir client library (alpha). | | ## CONFIG OPTIONS diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 99ddd6afb208..78b5e8ef63e2 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -10,6 +10,7 @@ title: Documentation for the elm Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Elm | | +| generator default templating engine | mustache | | | helpTxt | Generates an Elm client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index 31c0a53e8050..f1708efec379 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -10,6 +10,7 @@ title: Documentation for the erlang-client Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Erlang | | +| generator default templating engine | mustache | | | helpTxt | Generates an Erlang client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 08ca60c92f17..ead391057ce0 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -10,6 +10,7 @@ title: Documentation for the erlang-proper Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Erlang | | +| generator default templating engine | mustache | | | helpTxt | Generates an Erlang library with PropEr generators (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index 77677a3d6c1c..944c2be8cedf 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -10,6 +10,7 @@ title: Documentation for the erlang-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Erlang | | +| generator default templating engine | mustache | | | helpTxt | Generates an Erlang server library (beta) using OpenAPI Generator (https://openapi-generator.tech). By default, it will also generate service classes, which can be disabled with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/flash-deprecated.md b/docs/generators/flash-deprecated.md index 1ac45d4a6d3b..7969d5f8e0ef 100644 --- a/docs/generators/flash-deprecated.md +++ b/docs/generators/flash-deprecated.md @@ -10,6 +10,7 @@ title: Documentation for the flash-deprecated Generator | generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Flash | | +| generator default templating engine | mustache | | | helpTxt | Generates a Flash (ActionScript) client library (beta). IMPORTANT: this generator has been deprecated in v5.x | | ## CONFIG OPTIONS diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 80f49c5c4f46..dbb88f99e33f 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -10,6 +10,7 @@ title: Documentation for the fsharp-functions Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | F# | | +| generator default templating engine | mustache | | | helpTxt | Generates a fsharp-functions server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index 289cf42a68a5..8c98bc32942c 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -10,6 +10,7 @@ title: Documentation for the fsharp-giraffe-server Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | F# | | +| generator default templating engine | mustache | | | helpTxt | Generates a F# Giraffe server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/go-deprecated.md b/docs/generators/go-deprecated.md index 978447f56b93..e72c7b7f8475 100644 --- a/docs/generators/go-deprecated.md +++ b/docs/generators/go-deprecated.md @@ -10,6 +10,7 @@ title: Documentation for the go-deprecated Generator | generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Go | | +| generator default templating engine | mustache | | | helpTxt | Generates a Go client library (beta). NOTE: this generator has been deprecated. Please use `go` client generator instead. | | ## CONFIG OPTIONS diff --git a/docs/generators/go-echo-server.md b/docs/generators/go-echo-server.md index dc3fd01982d1..7e638bc7c673 100644 --- a/docs/generators/go-echo-server.md +++ b/docs/generators/go-echo-server.md @@ -10,6 +10,7 @@ title: Documentation for the go-echo-server Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | Go | | +| generator default templating engine | mustache | | | helpTxt | Generates a go-echo server. (Beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index d7989246b6bc..035d0bfeda3a 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -10,6 +10,7 @@ title: Documentation for the go-gin-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Go | | +| generator default templating engine | mustache | | | helpTxt | Generates a Go server library with the gin framework using OpenAPI-Generator.By default, it will also generate service classes. | | ## CONFIG OPTIONS diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index f17d5eb11062..d57d712e1540 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -10,6 +10,7 @@ title: Documentation for the go-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Go | | +| generator default templating engine | mustache | | | helpTxt | Generates a Go server library using OpenAPI-Generator. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/go.md b/docs/generators/go.md index 066b561c154b..782f6f05abda 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -10,6 +10,7 @@ title: Documentation for the go Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Go | | +| generator default templating engine | mustache | | | helpTxt | Generates a Go client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index 593c0488ded2..a1ab7ae06e9e 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -10,6 +10,7 @@ title: Documentation for the graphql-nodejs-express-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Javascript | | +| generator default templating engine | mustache | | | helpTxt | Generates a GraphQL Node.js Express server (beta) including it's types, queries, mutations, (resolvers) | | ## CONFIG OPTIONS diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index bb2fb9502653..84837ae7c6f5 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -10,6 +10,7 @@ title: Documentation for the graphql-schema Generator | generator stability | STABLE | | | generator type | SCHEMA | | | generator language | GraphQL | | +| generator default templating engine | mustache | | | helpTxt | Generates GraphQL schema files (beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 2506900b8f34..06b15957dde0 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -10,6 +10,7 @@ title: Documentation for the groovy Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Groovy | | +| generator default templating engine | mustache | | | helpTxt | Generates a Groovy API client. | | ## CONFIG OPTIONS diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index 13d7e7b478de..50fe695fa919 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -10,6 +10,7 @@ title: Documentation for the haskell-http-client Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Haskell | | +| generator default templating engine | mustache | | | helpTxt | Generates a Haskell http-client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/haskell-yesod.md b/docs/generators/haskell-yesod.md index f1bc1a3e40e9..fcb8ce3d49c3 100644 --- a/docs/generators/haskell-yesod.md +++ b/docs/generators/haskell-yesod.md @@ -10,6 +10,7 @@ title: Documentation for the haskell-yesod Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | Haskell | | +| generator default templating engine | mustache | | | helpTxt | Generates a haskell-yesod server. | | ## CONFIG OPTIONS diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index cd49e615f466..4ac8e5c7fbf1 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -10,6 +10,7 @@ title: Documentation for the haskell Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Haskell | | +| generator default templating engine | mustache | | | helpTxt | Generates a Haskell server and client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/html.md b/docs/generators/html.md index 056f8ccb7bd4..fe176f2cc732 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -9,6 +9,7 @@ title: Documentation for the html Generator | generator name | html | pass this to the generate command after -g | | generator stability | STABLE | | | generator type | DOCUMENTATION | | +| generator default templating engine | mustache | | | helpTxt | Generates a static HTML file. | | ## CONFIG OPTIONS diff --git a/docs/generators/html2.md b/docs/generators/html2.md index d4fa263b9799..92f3425056f5 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -9,6 +9,7 @@ title: Documentation for the html2 Generator | generator name | html2 | pass this to the generate command after -g | | generator stability | STABLE | | | generator type | DOCUMENTATION | | +| generator default templating engine | mustache | | | helpTxt | Generates a static HTML file. | | ## CONFIG OPTIONS diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index c0ebb548e2e8..4a8a1392133b 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -10,6 +10,7 @@ title: Documentation for the java-camel Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java Camel server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index dfd33352a15b..50f1bfb48173 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -10,6 +10,7 @@ title: Documentation for the java-inflector Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java Inflector Server application. | | ## CONFIG OPTIONS diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index de17d8a65936..00bb283b8c73 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -10,6 +10,7 @@ title: Documentation for the java-micronaut-client Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java Micronaut Client. | | ## CONFIG OPTIONS diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 8bcecf519c60..b02b75270d88 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -10,6 +10,7 @@ title: Documentation for the java-msf4j Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java Micro Service based on WSO2 Microservices Framework for Java (MSF4J) | | ## CONFIG OPTIONS diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index cb1dd0866f5e..4e1183c50be8 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -10,6 +10,7 @@ title: Documentation for the java-pkmst Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a PKMST SpringBoot Server application using the SpringFox integration. Also enables EurekaServerClient / Zipkin / Spring-Boot admin | | ## CONFIG OPTIONS diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 444b2b3f08b2..b262f6e44425 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -10,6 +10,7 @@ title: Documentation for the java-play-framework Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java Play Framework Server application. | | ## CONFIG OPTIONS diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 7800643d4636..e8c9d5c33bc9 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -10,6 +10,7 @@ title: Documentation for the java-undertow-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java Undertow Server application (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 83d720aedfaf..24fe9e99f2bc 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -10,6 +10,7 @@ title: Documentation for the java-vertx-web Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java Vert.x-Web Server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 98b7527553e3..873382854ae1 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -10,6 +10,7 @@ title: Documentation for the java-vertx Generator | generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a java-Vert.X Server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/java.md b/docs/generators/java.md index 719a6645747b..132437fd9bd6 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -10,6 +10,7 @@ title: Documentation for the java Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more. | | ## CONFIG OPTIONS diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index 3e1091b4d654..e91486057e11 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -10,6 +10,7 @@ title: Documentation for the javascript-apollo Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | Javascript | | +| generator default templating engine | mustache | | | helpTxt | Generates a JavaScript client library (beta) using Apollo RESTDatasource. | | ## CONFIG OPTIONS diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index 054f051f2321..2f78d0e865ed 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -10,6 +10,7 @@ title: Documentation for the javascript-closure-angular Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Javascript | | +| generator default templating engine | mustache | | | helpTxt | Generates a Javascript AngularJS client library (beta) annotated with Google Closure Compiler annotations(https://developers.google.com/closure/compiler/docs/js-for-compiler?hl=en) | | ## CONFIG OPTIONS diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 0fb54da17cdd..48e249aa7f61 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -10,6 +10,7 @@ title: Documentation for the javascript-flowtyped Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Javascript | | +| generator default templating engine | mustache | | | helpTxt | Generates a Javascript client library (beta) using Flow types and Fetch API. | | ## CONFIG OPTIONS diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index f4d7273d1e8e..aa5f7aaaca60 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -10,6 +10,7 @@ title: Documentation for the javascript Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Javascript | | +| generator default templating engine | mustache | | | helpTxt | Generates a JavaScript client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 5730e2350d7f..4388a69e60c4 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -10,6 +10,7 @@ title: Documentation for the jaxrs-cxf-cdi Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java JAXRS Server according to JAXRS 2.0 specification, assuming an Apache CXF runtime and a Java EE runtime with CDI enabled. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index efe13a9fc6e9..6d53881cb178 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -10,6 +10,7 @@ title: Documentation for the jaxrs-cxf-client Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java JAXRS Client based on Apache CXF framework. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 02c43fd43909..65495572e1fb 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -10,6 +10,7 @@ title: Documentation for the jaxrs-cxf-extended Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Extends jaxrs-cxf with options to generate a functional mock server. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index fbb1f8066a50..1818ba5b42ef 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -10,6 +10,7 @@ title: Documentation for the jaxrs-cxf Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java JAXRS Server application based on Apache CXF framework. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 4a882e778e27..aa4bf2ebf96f 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -10,6 +10,7 @@ title: Documentation for the jaxrs-jersey Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java JAXRS Server application based on Jersey framework. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 9bac2055e79a..a3ed32580cac 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -10,6 +10,7 @@ title: Documentation for the jaxrs-resteasy-eap Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java JAXRS-Resteasy Server application. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index f9600dc744c9..6ff30a6051e1 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -10,6 +10,7 @@ title: Documentation for the jaxrs-resteasy Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java JAXRS-Resteasy Server application. | | ## CONFIG OPTIONS diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 2f6a30961acc..9c8059ccd143 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -10,6 +10,7 @@ title: Documentation for the jaxrs-spec Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java JAXRS Server according to JAXRS 2.0 specification. | | ## CONFIG OPTIONS diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 3f3b35458624..83b447c97321 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -10,6 +10,7 @@ title: Documentation for the jmeter Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a JMeter .jmx file. | | ## CONFIG OPTIONS diff --git a/docs/generators/k6.md b/docs/generators/k6.md index f26f01cfa31c..8cbeda61021b 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -10,6 +10,7 @@ title: Documentation for the k6 Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | k6 | | +| generator default templating engine | mustache | | | helpTxt | Generates a k6 script (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin-server-deprecated.md b/docs/generators/kotlin-server-deprecated.md index d2d71faffd81..3e7884c9e66d 100644 --- a/docs/generators/kotlin-server-deprecated.md +++ b/docs/generators/kotlin-server-deprecated.md @@ -10,6 +10,7 @@ title: Documentation for the kotlin-server-deprecated Generator | generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | Kotlin | | +| generator default templating engine | mustache | | | helpTxt | Generates a Kotlin server (Ktor v1.1.3). IMPORTANT: this generator has been deprecated. Please migrate to `kotlin-server` which supports Ktor v1.5.2+. | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 8e48bda46da6..4d79d17024f5 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -10,6 +10,7 @@ title: Documentation for the kotlin-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Kotlin | | +| generator default templating engine | mustache | | | helpTxt | Generates a Kotlin server. | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index a773df36b052..20a0ab7cd696 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -10,6 +10,7 @@ title: Documentation for the kotlin-spring Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Kotlin | | +| generator default templating engine | mustache | | | helpTxt | Generates a Kotlin Spring application. | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 17c3415382cc..123104743a05 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -10,6 +10,7 @@ title: Documentation for the kotlin-vertx Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | Kotlin | | +| generator default templating engine | mustache | | | helpTxt | Generates a kotlin-vertx server. | | ## CONFIG OPTIONS diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index a942e2e3f9b8..64c36540bea0 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -10,6 +10,7 @@ title: Documentation for the kotlin Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Kotlin | | +| generator default templating engine | mustache | | | helpTxt | Generates a Kotlin client. | | ## CONFIG OPTIONS diff --git a/docs/generators/ktorm-schema.md b/docs/generators/ktorm-schema.md index f7ff70e5590e..4ee604175190 100644 --- a/docs/generators/ktorm-schema.md +++ b/docs/generators/ktorm-schema.md @@ -10,6 +10,7 @@ title: Documentation for the ktorm-schema Generator | generator stability | BETA | | | generator type | SCHEMA | | | generator language | Ktorm | | +| generator default templating engine | mustache | | | helpTxt | Generates a kotlin-ktorm schema (beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/lua.md b/docs/generators/lua.md index 18ec54ad4c09..cf2ece49ed11 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -10,6 +10,7 @@ title: Documentation for the lua Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | Lua | | +| generator default templating engine | mustache | | | helpTxt | Generates a Lua client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 71e1e6ac51ac..c930ef6fd68b 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -9,6 +9,7 @@ title: Documentation for the markdown Generator | generator name | markdown | pass this to the generate command after -g | | generator stability | BETA | | | generator type | DOCUMENTATION | | +| generator default templating engine | mustache | | | helpTxt | Generates a markdown documentation. | | ## CONFIG OPTIONS diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 1abe0062392e..656452b91a69 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -10,6 +10,7 @@ title: Documentation for the mysql-schema Generator | generator stability | STABLE | | | generator type | SCHEMA | | | generator language | Mysql | | +| generator default templating engine | mustache | | | helpTxt | Generates a MySQL schema based on the model or schema defined in the OpenAPI specification (v2, v3). | | ## CONFIG OPTIONS diff --git a/docs/generators/nim.md b/docs/generators/nim.md index fa5828934193..2cf0c86e25a6 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -10,6 +10,7 @@ title: Documentation for the nim Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | Nim | | +| generator default templating engine | mustache | | | helpTxt | Generates a nim client (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index 62d154361a4d..ec3e45fa4eeb 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -10,6 +10,7 @@ title: Documentation for the nodejs-express-server Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | Javascript | | +| generator default templating engine | mustache | | | helpTxt | Generates a NodeJS Express server (alpha). IMPORTANT: this generator may subject to breaking changes without further notice). | | ## CONFIG OPTIONS diff --git a/docs/generators/objc.md b/docs/generators/objc.md index f15b6bcb49f1..b76a06f29a36 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -10,6 +10,7 @@ title: Documentation for the objc Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Objective-C | | +| generator default templating engine | mustache | | | helpTxt | Generates an Objective-C client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index eaa087b13c63..fec524c3f16e 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -10,6 +10,7 @@ title: Documentation for the ocaml Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | OCaml | | +| generator default templating engine | mustache | | | helpTxt | Generates an OCaml client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index c12743b43839..854f487d3434 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -9,6 +9,7 @@ title: Documentation for the openapi-yaml Generator | generator name | openapi-yaml | pass this to the generate command after -g | | generator stability | STABLE | | | generator type | DOCUMENTATION | | +| generator default templating engine | mustache | | | helpTxt | Creates a static openapi.yaml file (OpenAPI spec v3). | | ## CONFIG OPTIONS diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index f6ea2597cf0f..75573383de47 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -9,6 +9,7 @@ title: Documentation for the openapi Generator | generator name | openapi | pass this to the generate command after -g | | generator stability | STABLE | | | generator type | DOCUMENTATION | | +| generator default templating engine | mustache | | | helpTxt | Creates a static openapi.json file (OpenAPI spec v3.0). | | ## CONFIG OPTIONS diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 8a2245c05dde..9fd91025c364 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -10,6 +10,7 @@ title: Documentation for the perl Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Perl | | +| generator default templating engine | mustache | | | helpTxt | Generates a Perl client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-dt.md b/docs/generators/php-dt.md index 3642ebb5f0af..ad004234dcc8 100644 --- a/docs/generators/php-dt.md +++ b/docs/generators/php-dt.md @@ -10,6 +10,7 @@ title: Documentation for the php-dt Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates a PHP client relying on Data Transfer ( https://github.com/Articus/DataTransfer ) and compliant with PSR-7, PSR-11, PSR-17 and PSR-18. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index 8a62c49894b1..bdce19bad5e3 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -10,6 +10,7 @@ title: Documentation for the php-laravel Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates a PHP laravel server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 54148245f772..ad7f5afc0612 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -10,6 +10,7 @@ title: Documentation for the php-lumen Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates a PHP Lumen server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-mezzio-ph.md b/docs/generators/php-mezzio-ph.md index 3905506371fc..18854d244ef2 100644 --- a/docs/generators/php-mezzio-ph.md +++ b/docs/generators/php-mezzio-ph.md @@ -10,6 +10,7 @@ title: Documentation for the php-mezzio-ph Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates PHP server stub using Mezzio ( https://docs.mezzio.dev/mezzio/ ) and Path Handler ( https://github.com/Articus/PathHandler ). | | ## CONFIG OPTIONS diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md index ed0b98d2907c..38d5c63f1125 100644 --- a/docs/generators/php-silex-deprecated.md +++ b/docs/generators/php-silex-deprecated.md @@ -10,6 +10,7 @@ title: Documentation for the php-silex-deprecated Generator | generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates a PHP Silex server library. IMPORTANT NOTE: this generator is no longer actively maintained. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index a3f433a625b9..4163fda38ef2 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -10,6 +10,7 @@ title: Documentation for the php-slim-deprecated Generator | generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates a PHP Slim Framework server library. IMPORTANT NOTE: this generator (Slim 3.x) is no longer actively maintained so please use 'php-slim4' generator instead. | | ## CONFIG OPTIONS diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index cd8ab1f3468b..0c56d968d14d 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -10,6 +10,7 @@ title: Documentation for the php-slim4 Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates a PHP Slim 4 Framework server library(with Mock server). | | ## CONFIG OPTIONS diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 22184a49be2e..e602a0570af1 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -10,6 +10,7 @@ title: Documentation for the php-symfony Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates a PHP Symfony server bundle. | | ## CONFIG OPTIONS diff --git a/docs/generators/php.md b/docs/generators/php.md index fc04a4b5d813..f7a74f48c6ae 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -10,6 +10,7 @@ title: Documentation for the php Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | PHP | | +| generator default templating engine | mustache | | | helpTxt | Generates a PHP client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md index 51dee6f7e470..033b995b72bd 100644 --- a/docs/generators/plantuml.md +++ b/docs/generators/plantuml.md @@ -9,6 +9,7 @@ title: Documentation for the plantuml Generator | generator name | plantuml | pass this to the generate command after -g | | generator stability | BETA | | | generator type | DOCUMENTATION | | +| generator default templating engine | mustache | | | helpTxt | Generates a plantuml documentation. | | ## CONFIG OPTIONS diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index 4c56c6e27fae..f35ad8599ac6 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -10,6 +10,7 @@ title: Documentation for the powershell Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | PowerShell | | +| generator default templating engine | mustache | | | helpTxt | Generates a PowerShell API client (beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index 913489defe97..eb8d398cba93 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -10,6 +10,7 @@ title: Documentation for the protobuf-schema Generator | generator stability | BETA | | | generator type | SCHEMA | | | generator language | Protocol Buffers (Protobuf) | | +| generator default templating engine | mustache | | | helpTxt | Generates gRPC and protocol buffer schema files (beta) | | ## CONFIG OPTIONS diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 7578a6be2901..0fea01b13bd5 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -11,6 +11,7 @@ title: Documentation for the python-aiohttp Generator | generator type | SERVER | | | generator language | Python | | | generator language version | 3.5.2+ | | +| generator default templating engine | mustache | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index 1759a675b6c2..2445094ea2f6 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -11,6 +11,7 @@ title: Documentation for the python-blueplanet Generator | generator type | SERVER | | | generator language | Python | | | generator language version | 2.7+ and 3.5.2+ | | +| generator default templating engine | mustache | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 0d46556daf7f..956038d2ac01 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -11,6 +11,7 @@ title: Documentation for the python-experimental Generator | generator type | CLIENT | | | generator language | Python | | | generator language version | >=3.9 | | +| generator default templating engine | handlebars | | | helpTxt | Generates a Python client library

Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | | ## CONFIG OPTIONS diff --git a/docs/generators/python-fastapi.md b/docs/generators/python-fastapi.md index 2464a81f1bcf..163a85e50410 100644 --- a/docs/generators/python-fastapi.md +++ b/docs/generators/python-fastapi.md @@ -11,6 +11,7 @@ title: Documentation for the python-fastapi Generator | generator type | SERVER | | | generator language | Python | | | generator language version | 3.7 | | +| generator default templating engine | mustache | | | helpTxt | Generates a Python FastAPI server (beta). Models are defined with the pydantic library | | ## CONFIG OPTIONS diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 21e2ab52495f..8cf4ec6e7a9d 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -11,6 +11,7 @@ title: Documentation for the python-flask Generator | generator type | SERVER | | | generator language | Python | | | generator language version | 2.7 and 3.5.2+ | | +| generator default templating engine | mustache | | | helpTxt | Generates a Python server library using the Connexion project. By default, it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable. | | ## CONFIG OPTIONS diff --git a/docs/generators/python-legacy.md b/docs/generators/python-legacy.md index 8b4a7e2a9484..08c0c42c0024 100644 --- a/docs/generators/python-legacy.md +++ b/docs/generators/python-legacy.md @@ -11,6 +11,7 @@ title: Documentation for the python-legacy Generator | generator type | CLIENT | | | generator language | Python | | | generator language version | 2.7 and 3.4+ | | +| generator default templating engine | mustache | | | helpTxt | Generates a Python client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/python.md b/docs/generators/python.md index b6a2df4f9c2b..1910f46d5445 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -11,6 +11,7 @@ title: Documentation for the python Generator | generator type | CLIENT | | | generator language | Python | | | generator language version | >=3.6 | | +| generator default templating engine | mustache | | | helpTxt | Generates a Python client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/r.md b/docs/generators/r.md index b5eef889bfa2..d034e8620787 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -10,6 +10,7 @@ title: Documentation for the r Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | R | | +| generator default templating engine | mustache | | | helpTxt | Generates a R client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index 84b67956163b..ecb8a858a81a 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -10,6 +10,7 @@ title: Documentation for the ruby-on-rails Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Ruby | | +| generator default templating engine | mustache | | | helpTxt | Generates a Ruby on Rails (v5) server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index 56aff137de1d..a9655ea8e536 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -10,6 +10,7 @@ title: Documentation for the ruby-sinatra Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Ruby | | +| generator default templating engine | mustache | | | helpTxt | Generates a Ruby Sinatra server library. | | ## CONFIG OPTIONS diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index c635612e0909..f0188be575fa 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -10,6 +10,7 @@ title: Documentation for the ruby Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Ruby | | +| generator default templating engine | mustache | | | helpTxt | Generates a Ruby client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index d894959db872..52f2b52909d1 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -10,6 +10,7 @@ title: Documentation for the rust-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Rust | | +| generator default templating engine | mustache | | | helpTxt | Generates a Rust client/server library (beta) using the openapi-generator project. | | ## CONFIG OPTIONS diff --git a/docs/generators/rust.md b/docs/generators/rust.md index cc2f93c4b89c..0f45ded34387 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -10,6 +10,7 @@ title: Documentation for the rust Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Rust | | +| generator default templating engine | mustache | | | helpTxt | Generates a Rust client library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md index 172d71db74f1..3cbb4c8fb1db 100644 --- a/docs/generators/scala-akka-http-server.md +++ b/docs/generators/scala-akka-http-server.md @@ -10,6 +10,7 @@ title: Documentation for the scala-akka-http-server Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a scala-akka-http server (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index b3a160f5dea3..b6ba593dcc45 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -10,6 +10,7 @@ title: Documentation for the scala-akka Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a Scala client library (beta) base on Akka/Spray. | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 2b732d98f070..5ace1e1652f8 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -10,6 +10,7 @@ title: Documentation for the scala-finch Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a Scala server application with Finch. | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 51e3084079c3..e3be5dfa0b50 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -10,6 +10,7 @@ title: Documentation for the scala-gatling Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a gatling simulation library (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 3b7d7a9ef288..35d8e770dbec 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -10,6 +10,7 @@ title: Documentation for the scala-httpclient-deprecated Generator | generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a Scala client library (beta). IMPORTANT: This generator is no longer actively maintained and will be deprecated. PLease use 'scala-akka' generator instead. | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index bc8984497d14..0014d87fedb0 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -10,6 +10,7 @@ title: Documentation for the scala-lagom-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a Lagom API server (Beta) in scala | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index 4a78dfb82719..58562232a924 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -10,6 +10,7 @@ title: Documentation for the scala-play-server Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a Scala server application (beta) with Play Framework. | | ## CONFIG OPTIONS diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index d1ef1d48cdc2..ad67f76194db 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -10,6 +10,7 @@ title: Documentation for the scala-sttp Generator | generator stability | BETA | | | generator type | CLIENT | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a Scala client library (beta) based on Sttp. | | ## CONFIG OPTIONS diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 03a957f6ef8a..2a8b10482dc8 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -10,6 +10,7 @@ title: Documentation for the scalatra Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a Scala server application with Scalatra. | | ## CONFIG OPTIONS diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index 81af6b8eb8fb..6916c86fe9f9 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -10,6 +10,7 @@ title: Documentation for the scalaz Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Scala | | +| generator default templating engine | mustache | | | helpTxt | Generates a Scalaz client library (beta) that uses http4s | | ## CONFIG OPTIONS diff --git a/docs/generators/spring.md b/docs/generators/spring.md index c06ac0fa7072..d778596fbf1f 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -10,6 +10,7 @@ title: Documentation for the spring Generator | generator stability | STABLE | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java SpringBoot Server application using the SpringFox integration. | | ## CONFIG OPTIONS diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index f2eaf80a50bf..dd39ea987763 100644 --- a/docs/generators/swift4-deprecated.md +++ b/docs/generators/swift4-deprecated.md @@ -10,6 +10,7 @@ title: Documentation for the swift4-deprecated Generator | generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Swift | | +| generator default templating engine | mustache | | | helpTxt | Generates a Swift 4.x client library (Deprecated and will be removed in 5.x releases. Please use `swift5` instead.) | | ## CONFIG OPTIONS diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 4183ade72155..5f79e7ae5c31 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -10,6 +10,7 @@ title: Documentation for the swift5 Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Swift | | +| generator default templating engine | mustache | | | helpTxt | Generates a Swift 5.x client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index b92521c6a3e9..29e49049c075 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-angular Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript Angular (6.x - 13.x) client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-angularjs-deprecated.md b/docs/generators/typescript-angularjs-deprecated.md index 5f9e08c77c46..1097c4cd2f58 100644 --- a/docs/generators/typescript-angularjs-deprecated.md +++ b/docs/generators/typescript-angularjs-deprecated.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-angularjs-deprecated Generator | generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript AngularJS client library. This generator has been deprecated and will be removed in the future release. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index eb24409651ac..1acd1fca0316 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-aurelia Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript client library for the Aurelia framework (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 05e51236f5e8..0bbf056acc10 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-axios Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript client library using axios. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index bdd09c095250..b0a8a58c143a 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-fetch Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript client library using Fetch API (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index c79ad504731c..a6df7b684148 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-inversify Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates Typescript services using Inversify IOC | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 4cdac527636e..f9614b9384f0 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-jquery Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript jquery client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-nestjs.md b/docs/generators/typescript-nestjs.md index bfab1479590e..0e00ef4f247d 100644 --- a/docs/generators/typescript-nestjs.md +++ b/docs/generators/typescript-nestjs.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-nestjs Generator | generator stability | EXPERIMENTAL | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript Nestjs 6.x client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index f017b86055fc..54dcee733075 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-node Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript NodeJS client library. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index c7d325a40fa1..f219e8a3e5e6 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-redux-query Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript client library using redux-query API (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 2e4febab52ac..93aca0c5f812 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -10,6 +10,7 @@ title: Documentation for the typescript-rxjs Generator | generator stability | STABLE | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript client library using Rxjs API. | | ## CONFIG OPTIONS diff --git a/docs/generators/typescript.md b/docs/generators/typescript.md index 4172f40be71a..4ce5f1ba11a5 100644 --- a/docs/generators/typescript.md +++ b/docs/generators/typescript.md @@ -10,6 +10,7 @@ title: Documentation for the typescript Generator | generator stability | EXPERIMENTAL | | | generator type | CLIENT | | | generator language | Typescript | | +| generator default templating engine | mustache | | | helpTxt | Generates a TypeScript client library using Fetch API (beta). | | ## CONFIG OPTIONS diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md index b0ec68601925..e54072e73355 100644 --- a/docs/generators/wsdl-schema.md +++ b/docs/generators/wsdl-schema.md @@ -10,6 +10,7 @@ title: Documentation for the wsdl-schema Generator | generator stability | BETA | | | generator type | SCHEMA | | | generator language | Web Services Description Language (WSDL) | | +| generator default templating engine | mustache | | | helpTxt | Generates WSDL files. | | ## CONFIG OPTIONS diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index 73858d84691d..3bfd97c90a41 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -311,6 +311,7 @@ private void generateMdMetadata(StringBuilder sb, CodegenConfig config) { if (config.generatorLanguageVersion() != null) { sb.append("| generator language version | "+config.generatorLanguageVersion()+" | |").append(newline); } + sb.append("| generator default templating engine | "+config.defaultTemplatingEngine()+" | |").append(newline); sb.append("| helpTxt | "+config.getHelp()+" | |").append(newline); sb.append(newline); diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java index e2feddb98222..64e426fa68a3 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java @@ -46,7 +46,7 @@ public class WorkflowSettings { public static final boolean DEFAULT_ENABLE_MINIMAL_UPDATE = false; public static final boolean DEFAULT_STRICT_SPEC_BEHAVIOR = true; public static final boolean DEFAULT_GENERATE_ALIAS_AS_MODEL = false; - public static final String DEFAULT_TEMPLATING_ENGINE_NAME = "mustache"; + public static final String DEFAULT_TEMPLATING_ENGINE_NAME = null; // this is set by the generator public static final Map DEFAULT_GLOBAL_PROPERTIES = Collections.unmodifiableMap(new HashMap<>()); private String inputSpec; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 2207e3170fbf..952d3a841f27 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -305,6 +305,8 @@ public interface CodegenConfig { Schema unaliasSchema(Schema schema, Map usedImportMappings); + public String defaultTemplatingEngine(); + public GeneratorLanguage generatorLanguage(); /* 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 3270e831c629..1ff9e2ddd095 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 @@ -7384,6 +7384,11 @@ private List getComposedProperties(List xOfCollection, return xOf; } + @Override + public String defaultTemplatingEngine() { + return "mustache"; + } + @Override public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.JAVA; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index b5bd0b23c332..2bb65a478655 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -79,8 +79,8 @@ public CodegenConfigurator() { } - @SuppressWarnings("DuplicatedCode") public static CodegenConfigurator fromFile(String configFile, Module... modules) { + // NOTE: some config parameters may be missing from the configFile and may be passed in as command line args if (isNotEmpty(configFile)) { DynamicSettings settings = readDynamicSettings(configFile, modules); @@ -482,15 +482,17 @@ public Context toContext() { Validate.notEmpty(generatorName, "generator name must be specified"); Validate.notEmpty(inputSpec, "input spec must be specified"); + GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); + CodegenConfig config = CodegenConfigLoader.forName(generatorSettings.getGeneratorName()); if (isEmpty(templatingEngineName)) { - // Built-in templates are mustache, but allow users to use a simplified handlebars engine for their custom templates. - workflowSettingsBuilder.withTemplatingEngineName("mustache"); + // if templatingEngineName is empty check the config for a default + String defaultTemplatingEngine = config.defaultTemplatingEngine(); + workflowSettingsBuilder.withTemplatingEngineName(defaultTemplatingEngine); } else { workflowSettingsBuilder.withTemplatingEngineName(templatingEngineName); } // at this point, all "additionalProperties" are set, and are now immutable per GeneratorSettings instance. - GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); WorkflowSettings workflowSettings = workflowSettingsBuilder.build(); if (workflowSettings.isVerbose()) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index ca237e47ecab..5424080f0d7b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -2086,6 +2086,11 @@ public CodegenOperation fromOperation(String path, return co; } + @Override + public String defaultTemplatingEngine() { + return "handlebars"; + } + @Override public String generatorLanguageVersion() { return ">=3.9"; }; } From e9d69f2b45a079e2800f655ebd38e79e415dd08d Mon Sep 17 00:00:00 2001 From: sullis Date: Sun, 23 Jan 2022 18:42:27 -0800 Subject: [PATCH 132/175] [java] javaparser 3.24.0 (#11382) --- modules/openapi-generator/pom.xml | 2 +- .../org/openapitools/codegen/TestUtils.java | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 2efa246d0446..e7fd2c138e98 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -338,7 +338,7 @@ com.github.javaparser javaparser-core - 3.14.11 + 3.24.0 test diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java index 7c7ee64361d4..337f0c73a824 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java @@ -5,8 +5,9 @@ import static org.testng.Assert.assertTrue; import static org.testng.Assert.assertFalse; -import com.github.javaparser.ParseProblemException; -import com.github.javaparser.StaticJavaParser; +import com.github.javaparser.JavaParser; +import com.github.javaparser.ParserConfiguration; +import com.github.javaparser.ParseResult; import com.github.javaparser.ast.CompilationUnit; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.Components; @@ -150,13 +151,11 @@ public static void validateJavaSourceFiles(List files) { } public static void assertValidJavaSourceCode(String javaSourceCode, String filename) { - try { - CompilationUnit compilation = StaticJavaParser.parse(javaSourceCode); - assertTrue(compilation.getTypes().size() > 0, "File: " + filename); - } - catch (ParseProblemException ex) { - fail("Java parse problem: " + filename, ex); - } + ParserConfiguration config = new ParserConfiguration(); + config.setLanguageLevel(ParserConfiguration.LanguageLevel.JAVA_11); + JavaParser parser = new JavaParser(config); + ParseResult parseResult = parser.parse(javaSourceCode); + assertTrue(parseResult.isSuccessful(), String.valueOf(parseResult.getProblems())); } public static void assertFileContains(Path path, String... lines) { From 57e3ed293021872ec2cddea80ce5f13c52145371 Mon Sep 17 00:00:00 2001 From: sullis Date: Sun, 23 Jan 2022 18:46:07 -0800 Subject: [PATCH 133/175] [java] JavaClientCodegenTest validateJavaSourceFiles (#11379) --- .../codegen/java/JavaClientCodegenTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 4b2f0b6e4a06..47b490e46ef2 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 @@ -585,6 +585,8 @@ public void testAuthorizationScopeValues_Issue6733() throws IOException { generator.setGenerateMetadata(false); List files = generator.opts(clientOptInput).generate(); + validateJavaSourceFiles(files); + Assert.assertEquals(files.size(), 1); files.forEach(File::deleteOnExit); } @@ -678,6 +680,8 @@ public void testImportMapping() throws IOException { List files = generator.opts(clientOptInput).generate(); files.forEach(File::deleteOnExit); + validateJavaSourceFiles(files); + Assert.assertEquals(files.size(), 1); TestUtils.ensureContainsFile(files, output, "src/main/java/org/openapitools/client/model/ParentType.java"); @@ -920,6 +924,7 @@ public void testRestTemplateFormMultipart() throws IOException { List files = generator.opts(configurator.toClientOptInput()).generate(); files.forEach(File::deleteOnExit); + validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); TestUtils.assertFileContains(defaultApi, @@ -968,6 +973,7 @@ public void testWebClientFormMultipart() throws IOException { List files = generator.opts(configurator.toClientOptInput()).generate(); files.forEach(File::deleteOnExit); + validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); TestUtils.assertFileContains(defaultApi, @@ -1046,6 +1052,7 @@ public void testRestTemplateWithUseAbstractionForFiles() throws IOException { List files = generator.opts(configurator.toClientOptInput()).generate(); files.forEach(File::deleteOnExit); + validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); TestUtils.assertFileContains(defaultApi, @@ -1174,6 +1181,7 @@ public void testWebClientWithUseAbstractionForFiles() throws IOException { List files = generator.opts(configurator.toClientOptInput()).generate(); files.forEach(File::deleteOnExit); + validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); TestUtils.assertFileContains(defaultApi, @@ -1245,6 +1253,8 @@ public void testWebClientWithFreeFormInQueryParameters() throws IOException { .generate(); files.forEach(File::deleteOnExit); + validateJavaSourceFiles(files); + final Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/ApiClient.java"); TestUtils.assertFileContains(defaultApi, "value instanceof Map"); } From 549715ebf2d3b0a92e1198b8be18a94ff04f301f Mon Sep 17 00:00:00 2001 From: aderito7 Date: Mon, 24 Jan 2022 05:12:59 +0200 Subject: [PATCH 134/175] [docs] use correct separator (#11386) --- docs/configuration.md | 2 +- modules/openapi-generator-gradle-plugin/README.adoc | 2 +- modules/openapi-generator-maven-plugin/README.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index aa7d1b5c9b23..b5590ec21ad4 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -36,7 +36,7 @@ _How_ you provide values to options also depends on the tool. OpenAPI Generator openApiGenerate { globalProperties = [ apis: "", - models: "User,Pet" + models: "User:Pet" ] } ``` diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index f3ba58cc7c1c..51f6e08e15f9 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -398,7 +398,7 @@ openApiGenerate { // other settings omitted globalProperties = [ apis: "", - models: "User,Pet" + models: "User:Pet" ] } ---- diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index 9a9abb68620e..be709bea8af8 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -116,12 +116,12 @@ For configuration options documented as a **map** above, the key/value options m ``` This configuration node location will match that of the plugin configuration examples at the top of this document and in the section below. Here, `option` matches in option name in the first column in the table from the previous section. -The `key` and `value` text are any values you'd like to provide for that option. As an example, to configure `globalProperties` to match the `--global-property models=User,Pet` example from our [Selective Generation](https://openapi-generator.tech/docs/customization#selective-generation) documentation, see below. +The `key` and `value` text are any values you'd like to provide for that option. As an example, to configure `globalProperties` to match the `--global-property models=User:Pet` example from our [Selective Generation](https://openapi-generator.tech/docs/customization#selective-generation) documentation, see below. ```xml - User,Pet + User:Pet ``` @@ -131,7 +131,7 @@ Not that some of these environment variable options may overwrite or conflict wi ```xml true - User,Pet + User:Pet ``` From 0fc3f65ce33ff4b9074a325a05614655558fcc2a Mon Sep 17 00:00:00 2001 From: sullis Date: Sun, 23 Jan 2022 23:23:55 -0800 Subject: [PATCH 135/175] mockito 4.2.0 (#11387) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6df240be4008..0dd62e012c48 100644 --- a/pom.xml +++ b/pom.xml @@ -1606,7 +1606,7 @@ 3.0.0 2.5.3 3.7.1 - 3.12.4 + 4.2.0 3.12.0 0.10 1.3 From 7f07fa5ba0ea933b2cc9f4b565b187bd521b09ca Mon Sep 17 00:00:00 2001 From: vanjur <41238964+vanjur@users.noreply.github.com> Date: Mon, 24 Jan 2022 02:38:19 -0600 Subject: [PATCH 136/175] [Python] Some regex patterns can generate invalid code. #6675 (#10920) * fix issue 6675 & add javadoc * fix formatting issue * update JUnit test for 6675 * build & update samples for PR * clean package and regenerating samples * add progress for fix to issue 10957 * Revert "add progress for fix to issue 10957" This reverts commit 8240c7ccb17141f7551ab34eda864ab4e068ebd8. * fix version issues * fix more versioning issues * fix discrepancies with backslashes * update samples Co-authored-by: William Cheng --- .../languages/PythonLegacyClientCodegen.java | 14 ++++++++++++++ .../python/PythonLegacyClientCodegenTest.java | 3 +++ .../src/test/resources/3_0/issue_1517.yaml | 5 +++++ 3 files changed, 22 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java index 7fc09f0cbfad..bdaa9a06ef32 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java @@ -311,6 +311,13 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert * The OpenAPI pattern spec follows the Perl convention and style of modifiers. Python * does not support this in as natural a way so it needs to convert it. See * https://docs.python.org/2/howto/regex.html#compilation-flags for details. + * + * @param pattern (the String pattern to convert from python to Perl convention) + * @param vendorExtensions (list of custom x-* properties for extra functionality-see https://swagger.io/docs/specification/openapi-extensions/) + * @return void + * @throws IllegalArgumentException if pattern does not follow the Perl /pattern/modifiers convention + * + * Includes fix for issue #6675 */ public void postProcessPattern(String pattern, Map vendorExtensions) { if (pattern != null) { @@ -321,6 +328,13 @@ public void postProcessPattern(String pattern, Map vendorExtensi throw new IllegalArgumentException("Pattern must follow the Perl " + "/pattern/modifiers convention. " + pattern + " is not valid."); } + + //check for instances of extra backslash that could cause compile issues and remove + int firstBackslash = pattern.indexOf("\\"); + int bracket = pattern.indexOf("["); + if (firstBackslash == 0 || firstBackslash == 1 || firstBackslash == bracket+1) { + pattern = pattern.substring(0,firstBackslash)+pattern.substring(firstBackslash+1); + } String regex = pattern.substring(1, i).replace("'", "\\'"); List modifiers = new ArrayList(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonLegacyClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonLegacyClientCodegenTest.java index d3bff53a8eaf..72dbdda27abe 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonLegacyClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonLegacyClientCodegenTest.java @@ -91,6 +91,9 @@ public void testRegularExpressionOpenAPISchemaVersion3() { Assert.assertEquals(op.allParams.get(4).pattern, "/^pattern\\/\\d{3}$/"); // pattern_with_modifiers '/^pattern\d{3}$/i Assert.assertEquals(op.allParams.get(5).pattern, "/^pattern\\d{3}$/i"); + // pattern_with_backslash_after_bracket '/^[\pattern\d{3}$/i' + // added to test fix for issue #6675 + Assert.assertEquals(op.allParams.get(6).pattern, "/^[\\pattern\\d{3}$/i"); } diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_1517.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_1517.yaml index 038a637608f1..788b46a6dd58 100644 --- a/modules/openapi-generator/src/test/resources/3_0/issue_1517.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/issue_1517.yaml @@ -45,6 +45,11 @@ paths: schema: type: string pattern: '/^pattern\d{3}$/i' + - name: pattern_with_backslash_after_bracket + in: header + schema: + type: string + pattern: '/^[\pattern\d{3}$/i' responses: '200': From a68babe86db3866241daf62c4b3727a6678e7d12 Mon Sep 17 00:00:00 2001 From: sullis Date: Mon, 24 Jan 2022 01:07:43 -0800 Subject: [PATCH 137/175] migrate to official Apache Maven Wrapper (#11381) https://maven.apache.org/wrapper/index.html https://github.com/apache/maven-wrapper-plugin --- .mvn/wrapper/maven-wrapper.jar | Bin 50710 -> 58727 bytes .mvn/wrapper/maven-wrapper.properties | 20 +++++++++++++++-- mvnw | 18 ++++++++++------ mvnw.cmd | 30 +++++++++++++++----------- 4 files changed, 48 insertions(+), 20 deletions(-) mode change 100755 => 100644 .mvn/wrapper/maven-wrapper.jar mode change 100755 => 100644 mvnw.cmd diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar old mode 100755 new mode 100644 index 2cc7d4a55c0cd0092912bf49ae38b3a9e3fd0054..c1dd12f17644411d6e840bd5a10c6ecda0175f18 GIT binary patch literal 58727 zcmb5W18`>1vNjyPv28mO+cqb*Z6_1kwr$(?#I}=(ZGUs`Jr}3`|DLbDUA3!L?dtC8 zUiH*ktDo+@6r@4HP=SCTA%WmZqm^Ro`Ls)bfPkcdfq?#g1(Fq27W^S8Cq^$TC?_c< zs-#ROD;6C)1wFuk7<3)nGuR^#!H;n&3*IjzXg+s8Z_S!!E0jUq(`}Itt=YdYa5Z_s z&e>2={87knpF*PKNzU;lsbk#P(l^WBvb$yEz)z+nYH43pKodrDkMp@h?;n{;K}hl>Fb^ zqx}C0|D7kg|Cj~3f7hn_zkAE}|6t|cZT|S5Hvb#3nc~C14u5UI{6#F<|FkJ0svs&S zA}S{=DXLT*BM1$`2rK%`D@vEw9l9%*=92X_2g?Fwfi=6Zfpr7+<~sgP#Bav+Df2ts zwtu~70zhqV?mrzM)}r7mMS`Hk_)NrI5K%CTtQtDxqw5iv5F0!ksIon{qqpPVnU?ds zN$|Vm{MHKEReUy>1kVfT-$3))Js0p2W_LFy3cjjZ7za0R zPdBH>y&pb0vr1|ckDpt2p$IQhwnPs5G*^b-y}sg4W!ALn}a`pY0JIa$H0$eV2T8WjWD= zWaENacQhlTyK4O!+aOXBurVR2k$eb8HVTCxy-bcHlZ4Xr!`juLAL#?t6|Ba!g9G4I zSwIt2Lla>C?C4wAZ8cKsZl9-Yd3kqE`%!5HlGdJJaFw0mu#--&**L-i|BcIdc3B$;0FC;FbE-dunVZ; zdIQ=tPKH4iJQQ=$5BeEMLov_Hn>gXib|9nOr}>eZt@B4W^m~>Zp#xhn1dax+?hS!AchWJ4makWZs@dQUeXQ zsI2+425_{X@t2KN zIbqec#)Jg5==VY3^YBeJ2B+%~^Y8|;F!mE8d(`UgNl2B9o>Ir5)qbBr)a?f%nrP zQyW(>FYPZjCVKDOU;Bw#PqPF1CCvp)dGdA&57a5hD&*vIc)jA)Z-!y5pS{5W6%#prH16zgD8s zexvpF#a|=*acp>L^lZ(PT)GiA8BJL-9!r8S$ZvXRKMVtiGe`+!@O%j<1!@msc177U zTDy>WOZu)W5anPrweQyjIu3IJC|ngdjZofGbdW&oj^DJlC7$;|xafB45evT|WBgGf-b|9y0J`fe0W-vw6xh}` z=(Tnq(-K0O{;VUcKe2y63{HXc+`R_#HLwnZ0rzWO*b#VeSuC4NG!H_ApCypbt1qx( z6y7Q$5(JOpQ&pTkc^0f}A0Kq*?;g9lEfzeE?5e2MBNZB)^8W1)YgdjsVyN+I9EZlh z3l}*}*)cFl=dOq|DvF=!ui$V%XhGQ%bDn3PK9 zV%{Y|VkAdt^d9~y4laGDqSwLd@pOnS&^@sI7}YTIb@El1&^_sq+{yAGf0|rq5TMp# z6d~;uAZ(fY3(eH=+rcbItl2=u6mf|P{lD4kiRCv;>GtFaHR3gim?WU9RjHmFZLm+m z+j<}_exaOQ1a}=K#voc~En+Mk_<(L!?1e#Uay~|H5q)LjD*yE6xFYQ-Wx{^iH1@pP zC0De#D6I26&W{;J40sZB!=%{c?XdO?YQvnTMA3TwfhAm@bvkX*(x?JTs*dFDv^=2X z284}AK)1nRn+8(Q2P?f)e>0~;NUI9%p%fnv1wBVpoXL+9OE`Vv1Y7=+nub$o7AN>y zB?R(^G8PYcMk4bxe7XItq@48QqWKb8fa*i9-N)=wdU-Q^=}!nFgTr_uT=Z=9pq z`{7!$U|+fnXFcsJ4GNm3JQQCN+G85k$)ZLhF{NbIy{REj84}Zt;0fe#>MARW)AoSb zrBpwF37ZVBMd>wZn_hAadI*xu8)Y#`aMbwRIA2n^-OS~M58_@j?#P1|PXJ1XBC9{4 zT^8*|xu<@(JlSOT*ILrVGr+7$nZN`Z3GxJJO@nY&mHsv^^duAh*lCu5q+S6zWA+`- z%^*y#)O7ko_RwGJl;bcEpP03FOrhlLWs`V_OUCrR-g>NJz*pN|itmN6O@Hw05Zq;Xtif%+sp4Py0{<7<^c zeoHHhRq>2EtYy9~2dZywm&OSk`u2ECWh6dJY?;fT-3-$U`!c(o$&hhPC%$~fT&bw3 zyj+8aXD;G!p*>BC6rpvx#6!|Qaic;KEv5>`Y+R(6F^1eIeYG6d1q3D3OL{7%7iw3R zwO)W7gMh27ASSB>-=OfP(YrKqBTNFv4hL@Im~~ombbSu44p~VoH$H-6+L_JW>Amkl zhDU~|r77?raaxD!-c$Ta?WAAi{w3T}YV=+S?1HQGC0+{Bny_^b+4Jum}oW4c=$ z#?D<}Ds{#d5v`L`${Pee;W84X*osNQ96xsKp^EAzuUh9#&zDX=eqdAp$UY)EGrkU% z(6m35n=46B$TNnejNSlih_!<)Iu@K!PW5S@Ya^0OK+EMWM=1w=GUKW^(r59U%i?d zzbo?|V4tDWGHHsrAQ}}ma#<`9r=M8%XF#%a=@Hn(p3wFBlkZ2L@8=*@J-^zuyF0aN zzJ7f!Jf8I+^6Tt$e+IIh zb80@?7y#Iz3w-0VEjgbHurqI>$qj<@n916)&O340!_5W9DtwR)P5mk6v2ljyK*DG5 zYjzE~m`>tq8HYXl%1JJ%e-%BqV4kRdPUZB1Cm$BQZr(fzp_@rn_W+;GwI$?L2Y4;b z)}c5D$#LT}2W8Si<`EHKIa_X+>+2PF(C*u~F=8E!jL(=IdQxY40%|( zoNg2Z&Aob@LEui-lJ#@)Ts)tE0_!*3{Uk)r{;-IZpX`N4mZX`#E|A;viQWImB6flI z?M_|xHCXV$5LOY-!U1_O1k;OWa=EchwlDCK4xHwBW2jE-6&%}og+9NILu${v10Z^Z#* zap|)B9a-AMU~>$r)3&|dQuP#MA$jnw54w*Ax~*_$iikp+j^OR8I5Fo<_UR#B-c>$? zeg)=;w^sGeAMi<3RGDRj$jA30Qq$e|zf2z;JyQ}tkU)ZI_k6tY%(`#AvL)p)iYXUy z5W9Su3NJ8mVyy)WqzFSk&vZM!;kUh8dVeA-myqcV%;xUne`PbHCPpvH?br`U2Y&dM zV!nJ!^n%`!H&!QSlpzLWnZpgi;#P0OAleH+<CfLa?&o|kyw1}W%6Pij zp$Vv5=;Z0LFN|j9i&9>zqX>*VnV3h#>n!2L?5gO6HJS3~kpy5G zYAVPMaB-FJOk3@OrxL(*-O~OB9^d{!G0K>wlzXuBm*$&%p1O#6SQ*?Q0CETLQ->XpfkW7< zj&Nep(}eAH1u$wWFvLV*lA{JOltP_%xKXC*a8DB&;{fD&2bATy>rC^kFY+$hFS7us;Y) zy_H?cv9XTHYz<4C<0b`WKC#{nJ15{F=oaq3x5}sYApT?Po+(Cmmo#dHZFO^{M#d~d znRT=TFATGVO%z_FNG-@G;9az|udZ>t@5l+A-K)BUWFn_|T#K3=d3EXRNqHyi#>;hX z*JQ`pT3#&tH>25laFlL6Rllu(seA*OboEd%rxMtz3@5v-+{qDP9&BcoS$2fgjgvp$ zc8!3=p0p@Ee1$u{Gg}Kkxg@M*qgZfYLlnD88{uwG1T?zxCbBR+x(RK$JB(eWJH#~; zZoY6L+esVRV?-*QmRCG}h`rB*Lv=uE%URF@+#l-g!Artx>Y9D;&G=jY2n2`J z{6-J%WX~Glx*QBmOOJ(RDRIzhfk&ibsm1t&&7aU{1P3U0uM%F2zJb4~50uby_ng+# zN)O9lK=dkJpxsUo7u8|e`Y~mmbxOTDn0i!i;d;ml#orN(Lc=j+n422NoSnlH6?0<0?th-qB7u}`5My%#?ES}>@RldOQz}WILz<$+cN~&ET zwUI01HCB((TyU$Ej8bxsE8oLmT-c7gA1Js?Iq`QMzIHV|)v)n2 zT_L(9x5%8*wU(C`VapaHoicWcm|0X@9TiNtbc|<4N6_H1F6&qgEEj=vjegFt;hC7- zLG7_=vedRFZ6Chbw!{#EpAlM?-sc#pc<~j#537n)M%RT)|L}y(ggi_-SLpsE3qi3V z=EEASxc>a{Su)jXcRS41Z@Mxk&0B7B<(?Izt5wpyyIBO|-M}ex8BhbIgi*X4 zDZ+Yk1<6&=PoZ=U-!9`!?sBVpYF#Y!JK<`fx}bXN651o0VVaW;t6ASVF@gq-mIDV_)?F^>rq1XX0NYy~(G=I6x%Fi5C2rMtvs z%P`g2>0{xLUy~#ye)%QAz^NkD5GUyPYl}K#;e-~UQ96`I$U0D!sMdQ>;%+c0h>k*Y z)sD1mi_@|rZnQ+zbWq~QxFlBQXj8WEY7NKaOYjUxAkGB8S#;l@b^C?;twRKl=mt0< zazifrBs`(q7_r14u1ZS`66VmsLpV>b5U!ktX>g4Nq~VPq6`%`3iCdr(>nS~uxxylU z>h(2p$XPJVh9BDpRLLzTDlNdp+oq8sOUlJ#{6boG`k)bwnsw5iy@#d{f_De-I|}vx6evw;ch97=;kLvM)-DBGwl6%fA%JItoMeyqjCR*_5Q70yd!KN zh=>ek8>f#~^6CJR0DXp0;7ifZjjSGBn}Cl{HeX!$iXMbtAU$F+;`%A<3TqbN#PCM& z&ueq$cB%pu2oMm_-@*aYzgn9`OiT@2ter*d+-$Aw42(@2Ng4mKG%M-IqX?q%3R|_( zN|&n$e1L#Ev=YMX5F53!O%))qDG3D(0rsOHblk;9ghWyqEOpg)mC$OduqpHAuIxr_>*|zy+|=EmOFn zFM+Ni%@CymLS-3vRWn=rVk?oZEz0V#y356IE6HR5#>7EigxZ05=cA|4<_tC8jyBJ| zgg!^kNwP7S^ooIj6riI9x`jFeQfRr4JCPumr<82M zto$j^Qb~MPmJ-|*2u{o7?yI8BI``zDaOCg2tG_5X;w<|uj5%oDthnLx-l4l)fmUGx z6N^jR|DC);yLi4q-ztTkf>*U$@2^w5(lhxu=OC|=WuTTp^!?2Nn27R`2FY_ zLHY-zFS}r+4|XyZw9b0D3)DmS!Gr+-LSdI}m{@-gL%^8CFSIYL?UZaCVd)2VI3|ay zwue39zshVrB+s2lp*};!gm<79@0HkjhgF^>`UhoR9Mi`aI#V#fI@x&1K3f&^8kaq% zkHVg$CTBoaGqEjrL)k*Y!rtiD2iQLYZ%|B}oBl8GHvR%n>HiIQN*+$mCN>I=c7H2N z&K4$4e@E^ff-cVHCbrHNMh4Dy|2Q;M{{xu|DYjeaRh2FK5QK!bG_K`kbBk$l$S4UF zq?F-%7UrX_Q?9M)a#WvcZ^R-fzJB5IFP>3uEoeCAAhN5W-ELRB&zsCnWY6#E?!)E56Pe+bxHjGF6;R9Hps)+t092-bf4 z_Wieg+0u5JL++k)#i0r?l`9*k)3ZlHOeMJ1DTdx9E1J2@BtdD3qX;&S_wMExOGv$T zl^T%oxb+)vq6vJvR`8{+YOsc@8}wSXpoK%v0k@8X*04Se3<8f)rE|fRXAoT!$6MdrKSuzeK@L*yug?MQs8oTbofqW)Df# zC2J3irHAaX_e~SGlBoRhEW`W6Z}&YX|5IMfzskAt{B*m z*w=3i!;x5Gfgc~>y9fPXFAPMhO@Si}SQESjh`P|dlV5HPRo7j(hV=$o8UMIT7~7+k z*@Sd>f%#{ARweJYhQs~ECpHie!~YXL|FJA;KS4m|CKFnT{fN`Ws>N?CcV@(>7WMPYN} z1}Wg+XU2(Yjpq7PJ|aSn;THEZ{4s8*@N!dz&bjys_Zk7%HiD+56;cF26`-a zEIo!B(T|L*uMXUvqJs&54`^@sUMtH-i~rOM9%$xGXTpmow$DxI>E5!csP zAHe|);0w%`I<==_Zw9t$e}?R+lIu%|`coRum(1p~*+20mBc?Z=$+z<0n&qS0-}|L4 zrgq|(U*eB%l3nfC=U1Y?(Tf@0x8bhdtsU2w&Y-WvyzkiyJ>GZqUP6c+<_p0`ZOnIK z#a~ynuzRWxO6c;S@*}B1pTjLJQHi(+EuE2;gG*p^Fq%6UoE1x95(^BY$H$$soSf=vpJ)_3E zp&$l=SiNaeoNLAK8x%XaHp3-So@F7 z3NMRRa@%k+Z$a%yb25ud&>Cdcb<+}n>=jZ`91)a z{wcA(j$%z#RoyB|&Z+B4%7Pe*No`pAX0Y;Ju4$wvJE{VF*Qej8C}uVF=xFpG^rY6Y+9mcz$T9^x(VP3uY>G3Zt&eU{pF*Bu<4j9MPbi4NMC=Z$kS6DMW9yN#vhM&1gd1t}8m(*YY9 zh2@s)$1p4yYT`~lYmU>>wKu+DhlnI1#Xn4(Rnv_qidPQHW=w3ZU!w3(@jO*f;4;h? zMH0!08(4=lT}#QA=eR(ZtW1=~llQij7)L6n#?5iY_p>|_mLalXYRH!x#Y?KHyzPB^ z6P3YRD}{ou%9T%|nOpP_??P;Rmra7$Q*Jz-f?42PF_y>d)+0Q^)o5h8@7S=je}xG# z2_?AdFP^t{IZHWK)9+EE_aPtTBahhUcWIQ7Awz?NK)ck2n-a$gplnd4OKbJ;;tvIu zH4vAexlK2f22gTALq5PZ&vfFqqERVT{G_d`X)eGI%+?5k6lRiHoo*Vc?ie6dx75_t z6hmd#0?OB9*OKD7A~P$e-TTv3^aCdZys6@`vq%Vi_D8>=`t&q9`Jn1=M#ktSC>SO3 z1V?vuIlQs6+{aHDHL?BB&3baSv;y#07}(xll9vs9K_vs2f9gC9Biy+9DxS77=)c z6dMbuokO-L*Te5JUSO$MmhIuFJRGR&9cDf)@y5OQu&Q$h@SW-yU&XQd9;_x;l z<`{S&Hnl!5U@%I~5p)BZspK894y7kVQE7&?t7Z|OOlnrCkvEf7$J5dR?0;Jt6oANc zMnb_Xjky|2ID#fhIB2hs-48Er>*M?56YFnjC)ixiCes%fgT?C|1tQupZ0Jon>yr|j z6M66rC(=;vw^orAMk!I1z|k}1Ox9qOILGJFxU*ZrMSfCe?)wByP=U73z+@Pfbcndc=VzYvSUnUy z+-B+_n`=f>kS8QBPwk+aD()=#IqkdxHPQMJ93{JGhP=48oRkmJyQ@i$pk(L&(p6<0 zC9ZEdO*i+t`;%(Ctae(SjV<@i%r5aune9)T4{hdzv33Uo9*K=V18S$6VVm^wgEteF za0zCLO(9~!U9_z@Qrh&rS|L0xG}RWoE1jXiEsrTgIF4qf#{0rl zE}|NGrvYLMtoORV&FWaFadDNCjMt|U8ba8|z&3tvd)s7KQ!Od*Kqe(48&C7=V;?`SQV)Qc?6L^k_vNUPbJ>>!5J?sDYm5kR&h_RZk)MfZ1 znOpQ|T;Me(%mdBJR$sbEmp3!HKDDSmMDnVpeo{S13l#9e6OImR$UPzjd-eCwmMwyT zm5~g6DIbY<_!8;xEUHdT(r_OQ<6QCE9Jy|QLoS>d(B zW6GRzX)~&Mx}})ITysFzl5_6JM*~ciBfVP(WF_r zY>z4gw&AxB%UV3Y{Y6z*t*o!p@~#u3X_t{Q9Us8ar8_9?N% zN&M~6y%2R(mAZ~@Tg1Oapt?vDr&fHuJ=V$wXstq|)eIG_4lB#@eU>fniJh zwJY<8yH5(+SSQ=$Y=-$2f$@^Ak#~kaR^NYFsi{XGlFCvK(eu{S$J(owIv17|p-%0O zL-@NyUg!rx0$Uh~JIeMX6JJE>*t<7vS9ev#^{AGyc;uio_-Je1?u#mA8+JVczhA2( zhD!koe;9$`Qgaxlcly4rdQ1VlmEHUhHe9TwduB+hm3wH2o27edh?|vrY{=;1Doy4& zIhP)IDd91@{`QQqVya(ASth4}6OY z-9BQj2d-%+-N7jO8!$QPq%o$9Fy8ja{4WT$gRP+b=Q1I48g-g|iLNjbhYtoNiR*d- z{sB}~8j*6*C3eM8JQj5Jn?mD#Gd*CrVEIDicLJ-4gBqUwLA-bp58UXko;M|ql+i5` zym-&U5BIS9@iPg#fFbuXCHrprSQKRU0#@yd%qrX1hhs*85R}~hahfFDq=e@bX))mf zWH%mXxMx|h5YhrTy;P_Xi_IDH*m6TYv>|hPX*_-XTW0G9iu!PqonQneKKaCVvvF^% zgBMDpN7!N?|G5t`v{neLaCFB{OyIl>qJQ_^0MJXQ zY2%-si~ej?F^%ytIIHU(pqT+3d+|IQ{ss#!c91R{2l*00e3ry!ha|XIsR%!q=E^Fal`6Oxu`K0fmPM?P6ZgzH7|TVQhl;l2 z)2w0L9CsN-(adU5YsuUw19OY_X69-!=7MIJ^(rUNr@#9l6aB8isAL^M{n2oD0FAHk97;X* z-INjZ5li`a|NYNt9gL2WbKT!`?%?lB^)J)9|025nBcBtEmWBRXQwi21EGg8>!tU>6Wf}S3p!>7vHNFSQR zgC>pb^&OHhRQD~7Q|gh5lV)F6i++k4Hp_F2L2WrcxH&@wK}QgVDg+y~o0gZ=$j&^W zz1aP8*cvnEJ#ffCK!Kz{K>yYW`@fc8ByF9X4XmyIv+h!?4&$YKl*~`ToalM{=Z_#^ zUs<1Do+PA*XaH;&0GW^tDjrctWKPmCF-qo7jGL)MK=XP*vt@O4wN1Y!8o`{DN|Rh) znK?nvyU&`ATc@U*l}=@+D*@l^gYOj&6SE|$n{UvyPwaiRQ_ua2?{Vfa|E~uqV$BhH z^QNqA*9F@*1dA`FLbnq;=+9KC@9Mel*>6i_@oVab95LHpTE)*t@BS>}tZ#9A^X7nP z3mIo+6TpvS$peMe@&=g5EQF9Mi9*W@Q`sYs=% z`J{3llzn$q;2G1{N!-#oTfQDY`8>C|n=Fu=iTk443Ld>>^fIr4-!R3U5_^ftd>VU> zij_ix{`V$I#k6!Oy2-z#QFSZkEPrXWsYyFURAo`Kl$LkN>@A?_);LE0rZIkmjb6T$ zvhc#L-Cv^4Ex*AIo=KQn!)A4;7K`pu-E+atrm@Cpmpl3e>)t(yo4gGOX18pL#xceU zbVB`#5_@(k{4LAygT1m#@(7*7f5zqB)HWH#TCrVLd9}j6Q>?p7HX{avFSb?Msb>Jg z9Q9DChze~0Psl!h0E6mcWh?ky! z$p#@LxUe(TR5sW2tMb#pS1ng@>w3o|r~-o4m&00p$wiWQ5Sh-vx2cv5nemM~Fl1Pn z@3ALEM#_3h4-XQ&z$#6X&r~U-&ge+HK6$)-`hqPj0tb|+kaKy*LS5@a9aSk!=WAEB z7cI`gaUSauMkEbg?nl0$44TYIwTngwzvUu0v0_OhpV;%$5Qgg&)WZm^FN=PNstTzW z5<}$*L;zrw>a$bG5r`q?DRc%V$RwwnGIe?m&(9mClc}9i#aHUKPLdt96(pMxt5u`F zsVoku+IC|TC;_C5rEU!}Gu*`2zKnDQ`WtOc3i#v}_9p>fW{L4(`pY;?uq z$`&LvOMMbLsPDYP*x|AVrmCRaI$UB?QoO(7mlBcHC};gA=!meK)IsI~PL0y1&{Dfm6! zxIajDc1$a0s>QG%WID%>A#`iA+J8HaAGsH z+1JH=+eX5F(AjmZGk|`7}Gpl#jvD6_Z!&{*kn@WkECV-~Ja@tmSR|e_L@9?N9 z3hyyry*D0!XyQh_V=8-SnJco#P{XBd1+7<5S3FA)2dFlkJY!1OO&M7z9uO?$#hp8K z><}uQS-^-B;u7Z^QD!7#V;QFmx0m%{^xtl3ZvPyZdi;^O&c;sNC4CHxzvvOB8&uHl zBN;-lu+P=jNn`2k$=vE0JzL{v67psMe_cb$LsmVfxA?yG z^q7lR00E@Ud3)mBPnT0KM~pwzZiBREupva^PE3~e zBgQ9oh@kcTk2)px3Hv^VzTtMzCG?*X(TDZ1MJ6zx{v- z;$oo46L#QNjk*1przHSQn~Ba#>3BG8`L)xla=P{Ql8aZ!A^Z6rPv%&@SnTI7FhdzT z-x7FR0{9HZg8Bd(puRlmXB(tB?&pxM&<=cA-;RT5}8rI%~CSUsR^{Dr%I2WAQghoqE5 zeQ874(T`vBC+r2Mi(w`h|d zA4x%EfH35I?h933@ic#u`b+%b+T?h=<}m@x_~!>o35p|cvIkkw07W=Ny7YcgssA_^ z|KJQrnu||Nu9@b|xC#C5?8Pin=q|UB?`CTw&AW0b)lKxZVYrBw+whPwZJCl}G&w9r zr7qsqm>f2u_6F@FhZU0%1Ioc3X7bMP%by_Z?hds`Q+&3P9-_AX+3CZ=@n!y7udAV2 zp{GT6;VL4-#t0l_h~?J^;trk1kxNAn8jdoaqgM2+mL&?tVy{I)e`HT9#Tr}HKnAfO zAJZ82j0+49)E0+=x%#1_D;sKu#W>~5HZV6AnZfC`v#unnm=hLTtGWz+21|p)uV+0= zDOyrLYI2^g8m3wtm-=pf^6N4ebLJbV%x`J8yd1!3Avqgg6|ar z=EM0KdG6a2L4YK~_kgr6w5OA;dvw0WPFhMF7`I5vD}#giMbMzRotEs&-q z^ji&t1A?l%UJezWv?>ijh|$1^UCJYXJwLX#IH}_1K@sAR!*q@j(({4#DfT|nj}p7M zFBU=FwOSI=xng>2lYo5*J9K3yZPwv(=7kbl8Xv0biOba>vik>6!sfwnH(pglq1mD-GrQi8H*AmfY*J7&;hny2F zupR}4@kzq+K*BE%5$iX5nQzayWTCLJ^xTam-EEIH-L2;huPSy;32KLb>>4 z#l$W^Sx7Q5j+Sy*E;1eSQQuHHWOT;1#LjoYpL!-{7W3SP4*MXf z<~>V7^&sY|9XSw`B<^9fTGQLPEtj=;<#x^=;O9f2{oR+{Ef^oZ z@N>P$>mypv%_#=lBSIr_5sn zBF-F_WgYS81vyW6$M;D_PoE&%OkNV1&-q+qgg~`A7s}>S`}cn#E$2m z%aeUXwNA(^3tP=;y5%pk#5Yz&H#AD`Jph-xjvZm_3KZ|J>_NR@croB^RUT~K;Exu5%wC}1D4nov3+@b8 zKyU5jYuQ*ZpTK23xXzpN51kB+r*ktnQJ7kee-gP+Ij0J_#rFTS4Gux;pkVB;n(c=6 zMks#)ZuXUcnN>UKDJ-IP-u2de1-AKdHxRZDUGkp)0Q#U$EPKlSLQSlnq)OsCour)+ zIXh@3d!ImInH7VrmR>p8p4%n;Tf6l2jx1qjJu>e3kf5aTzU)&910nXa-g0xn$tFa& z2qZ7UAl*@5o=PAh`6L${6S-0?pe3thPB4pahffb$#nL8ncN(Nyos`}r{%{g64Ji^= zK8BIywT0-g4VrhTt}n~Y;3?FGL74h?EG*QfQy0A8u>BtXuI{C-BYu*$o^}U1)z;8d zVN(ssw?oCbebREPD~I$-t7}`_5{{<0d10So7Pc2%EREdpMWIJI&$|rq<0!LL+BQM4 zn7)cq=qy|8YzdO(?NOsVRk{rW)@e7g^S~r^SCawzq3kj#u(5@C!PKCK0cCy zT@Tey2IeDYafA2~1{gyvaIT^a-Yo9kx!W#P-k6DfasKEgFji`hkzrmJ#JU^Yb%Nc~ zc)+cIfTBA#N0moyxZ~K!`^<>*Nzv-cjOKR(kUa4AkAG#vtWpaD=!Ku&;(D#(>$&~B zI?V}e8@p%s(G|8L+B)&xE<({g^M`#TwqdB=+oP|5pF3Z8u>VA!=w6k)zc6w2=?Q2` zYCjX|)fRKI1gNj{-8ymwDOI5Mx8oNp2JJHG3dGJGg!vK>$ji?n>5qG)`6lEfc&0uV z)te%G&Q1rN;+7EPr-n8LpNz6C6N0*v{_iIbta7OTukSY zt5r@sO!)rjh0aAmShx zd3=DJ3c(pJXGXzIh?#RR_*krI1q)H$FJ#dwIvz);mn;w6Rlw+>LEq4CN6pP4AI;!Y zk-sQ?O=i1Mp5lZX3yka>p+XCraM+a!1)`F`h^cG>0)f0OApGe(^cz-WoOno-Y(EeB zVBy3=Yj}ak7OBj~V259{&B`~tbJCxeVy@OEE|ke4O2=TwIvf-=;Xt_l)y`wuQ-9#D z(xD-!k+2KQzr`l$7dLvWf*$c8=#(`40h6d$m6%!SB1JzK+tYQihGQEwR*-!cM>#LD>x_J*w(LZbcvHW@LTjM?RSN z0@Z*4$Bw~Ki3W|JRI-r3aMSepJNv;mo|5yDfqNLHQ55&A>H5>_V9<_R!Ip`7^ylX=D<5 zr40z>BKiC@4{wSUswebDlvprK4SK2!)w4KkfX~jY9!W|xUKGTVn}g@0fG94sSJGV- z9@a~d2gf5s>8XT@`If?Oway5SNZS!L5=jpB8mceuf2Nd%aK2Zt|2FVcg8~7O{VPgI z#?H*_Kl!9!B}MrK1=O!Aw&faUBluA0v#gWVlAmZt;QN7KC<$;;%p`lmn@d(yu9scs zVjomrund9+p!|LWCOoZ`ur5QXPFJtfr_b5%&Ajig2dI6}s&Fy~t^j}()~4WEpAPL= zTj^d;OoZTUf?weuf2m?|R-7 z*C4M6ZhWF(F@2}nsp85rOqt+!+uZz3$ReX#{MP5-r6b`ztXDWl$_mcjFn*{sEx7f*O(ck+ou8_?~a_2Ztsq6qB|SPw26k!tLk{Q~Rz z$(8F1B;zK-#>AmmDC7;;_!;g&CU7a?qiIT=6Ts0cbUNMT6yPRH9~g zS%x{(kxYd=D&GKCkx;N21sU;OI8@4vLg2}L>Lb{Qv`B*O0*j>yJd#`R5ypf^lp<7V zCc|+>fYgvG`ROo>HK+FAqlDm81MS>&?n2E-(;N7}oF>3T9}4^PhY=Gm`9i(DPpuS- zq)>2qz!TmZ6q8;&M?@B;p1uG6RM_Y8zyId{-~XQD_}bXL{Jp7w`)~IR{l5a2?7!Vg zp!OfP4E$Ty_-K3VY!wdGj%2RL%QPHTL)uKfO5Am5<$`5 zHCBtvI~7q-ochU`=NJF*pPx@^IhAk&ZEA>w$%oPGc-}6~ywV~3-0{>*sb=|ruD{y$ ze%@-m`u28vKDaf*_rmN`tzQT>&2ltg-lofR8~c;p;E@`zK!1lkgi?JR0 z+<61+rEupp7F=mB=Ch?HwEjuQm}1KOh=o@ zMbI}0J>5}!koi&v9?!B?4FJR88jvyXR_v{YDm}C)lp@2G2{a{~6V5CwSrp6vHQsfb-U<{SSrQ zhjRbS;qlDTA&TQ2#?M(4xsRXFZ^;3A+_yLw>o-9GJ5sgsauB`LnB-hGo9sJ~tJ`Q>=X7sVmg<=Fcv=JDe*DjP-SK-0mJ7)>I zaLDLOU*I}4@cro&?@C`hH3tiXmN`!(&>@S2bFyAvI&axlSgd=!4IOi#+W;sS>lQ28 zd}q&dew9=x;5l0kK@1y9JgKWMv9!I`*C;((P>8C@JJRGwP5EL;JAPHi5fI|4MqlLU z^4D!~w+OIklt7dx3^!m6Be{Lp55j{5gSGgJz=hlNd@tt_I>UG(GP5s^O{jFU;m~l0 zfd`QdE~0Ym=6+XN*P`i0ogbgAJVjD9#%eBYJGIbDZ4s(f-KRE_>8D1Dv*kgO1~NSn zigx8f+VcA_xS)V-O^qrs&N9(}L!_3HAcegFfzVAntKxmhgOtsb4k6qHOpGWq6Q0RS zZO=EomYL%;nKgmFqxD<68tSGFOEM^u0M(;;2m1#4GvSsz2$jawEJDNWrrCrbO<}g~ zkM6516erswSi_yWuyR}}+h!VY?-F!&Y5Z!Z`tkJz&`8AyQ=-mEXxkQ%abc`V1s>DE zLXd7!Q6C)`7#dmZ4Lm?>CTlyTOslb(wZbi|6|Pl5fFq3y^VIzE4DALm=q$pK>-WM> z@ETsJj5=7=*4 z#Q8(b#+V=~6Gxl?$xq|?@_yQJ2+hAYmuTj0F76c(B8K%;DPhGGWr)cY>SQS>s7%O- zr6Ml8h`}klA=1&wvbFMqk}6fml`4A%G=o@K@8LHifs$)}wD?ix~Id@9-`;?+I7 zOhQN(D)j=^%EHN16(Z3@mMRM5=V)_z(6y^1b?@Bn6m>LUW7}?nupv*6MUVPSjf!Ym zMPo5YoD~t(`-c9w)tV%RX*mYjAn;5MIsD?0L&NQ#IY`9k5}Fr#5{CeTr)O|C2fRhY z4zq(ltHY2X)P*f?yM#RY75m8c<%{Y?5feq6xvdMWrNuqnR%(o(uo8i|36NaN<#FnT ze-_O*q0DXqR>^*1sAnsz$Ueqe5*AD@Htx?pWR*RP=0#!NjnaE-Gq3oUM~Kc9MO+o6 z7qc6wsBxp7GXx+hwEunnebz!|CX&`z{>loyCFSF-zg za}zec;B1H7rhGMDfn+t9n*wt|C_0-MM~XO*wx7-`@9~-%t?IegrHM(6oVSG^u?q`T zO<+YuVbO2fonR-MCa6@aND4dBy^~awRZcp!&=v+#kH@4jYvxt=)zsHV0;47XjlvDC8M1hSV zm!GB(KGLwSd{F-?dmMAe%W0oxkgDv8ivbs__S{*1U}yQ=tsqHJYI9)jduSKr<63$> zp;a-B^6Hg3OLUPi1UwHnptVSH=_Km$SXrCM2w8P z%F#Boi&CcZ5vAGjR1axw&YNh~Q%)VDYUDZ6f^0;>W7_sZr&QvRWc2v~p^PqkA%m=S zCwFUg2bNM(DaY>=TLmOLaDW&uH;Za?8BAwQo4+Xy4KXX;Z}@D5+}m)U#o?3UF}+(@jr$M4ja*`Y9gy~Y`0 z6Aex1*3ng@2er)@{%E9a3A;cts9cAor=RWt7ege)z=$O3$d5CX&hORZ3htL>jj5qT zW#KGQ;AZ|YbS0fvG~Y)CvVwXnBLJkSps7d~v;cj$D3w=rB9Tx>a&4>(x00yz!o*SOd*M!yIwx;NgqW?(ysFv8XLxs6Lrh8-F`3FO$}V{Avztc4qmZ zoz&YQR`*wWy_^&k-ifJ&N8Qh=E-fH6e}-}0C{h~hYS6L^lP>=pLOmjN-z4eQL27!6 zIe2E}knE;dxIJ_!>Mt|vXj%uGY=I^8(q<4zJy~Q@_^p@JUNiGPr!oUHfL~dw9t7C4I9$7RnG5p9wBpdw^)PtGwLmaQM=KYe z;Dfw@%nquH^nOI6gjP+K@B~0g1+WROmv1sk1tV@SUr>YvK7mxV3$HR4WeQ2&Y-{q~ z4PAR&mPOEsTbo~mRwg&EJE2Dj?TOZPO_@Z|HZX9-6NA!%Pb3h;G3F5J+30BoT8-PU z_kbx`I>&nWEMtfv(-m>LzC}s6q%VdBUVI_GUv3@^6SMkEBeVjWplD5y58LyJhikp4VLHhyf?n%gk0PBr(PZ3 z+V`qF971_d@rCO8p#7*#L0^v$DH>-qB!gy@ut`3 zy3cQ8*t@@{V7F*ti(u{G4i55*xY9Erw3{JZ8T4QPjo5b{n=&z4P^}wxA;x85^fwmD z6mEq9o;kx<5VneT_c-VUqa|zLe+BFgskp_;A)b>&EDmmP7Gx#nU-T@;O+(&&n7ljK zqK7&yV!`FIJAI+SaA6y=-H=tT`zWvBlaed!3X^_Lucc%Q=kuiG%65@@6IeG}e@`ieesOL} zKHBJBso6u&7gzlrpB%_yy<>TFwDI>}Ec|Gieb4=0fGwY|3YGW2Dq46=a1 zVo`Vi%yz+L9)9hbb%FLTC@-G(lODgJ(f&WmSCK9zV3-IV7XI<{2j}ms_Vmb!os)06 zhVIZPZF)hW--kWTCyDVRd2T&t|P&aDrtO5kzXy<*A+5$k7$>4+y%;% znYN-t#1^#}Z6d+ahj*Gzor+@kBD7@f|IGNR$4U=Y0J2#D2)YSxUCtiC1weJg zLp0Q&JFrt|In8!~1?fY0?=fPyaqPy$iQXJDhHP>N%B42Yck`Qz-OM_~GMuWow)>=Q z0pCCC7d0Z^Ipx29`}P3;?b{dO?7z0e{L|O*Z}nxi>X|RL8XAw$1eOLKd5j@f{RQ~Y zG?7$`hy@s7IoRF2@KA%2ZM6{ru9T5Gj)iDCz};VvlG$WuT+>_wCTS~J6`I9D{nsrU z2;X#OyopBgo778Q>D%_E>rMN~Po~d5H<`8|Zcv}F`xL5~NCVLX4Wkg007HhMgj9Pa z94$km3A+F&LzOJlpeFR*j+Y%M!Qm42ziH~cKM&3b;15s)ycD@3_tL-dk{+xP@J7#o z-)bYa-gd2esfy<&-nrj>1{1^_L>j&(MA1#WNPg3UD?reL*}V{ag{b!uT755x>mfbZ z0PzwF+kx91`qqOn`1>xw@801XAJlH>{`~|pyi6J;3s=cTOfelA&K5HX#gBp6s<|r5 zjSSj+CU*-TulqlnlP`}?)JkJ_7fg){;bRlXf+&^e8CWwFqGY@SZ=%NmLCXpYb+}7* z$4k}%iFUi^kBdeJg^kHt)f~<;Ovlz!9frq20cIj>2eIcG(dh57ry;^E^2T)E_8#;_9iJT>4sdCB_db|zO?Z^*lBN zNCs~f+Jkx%EUgkN2-xFF?B%TMr4#)%wq?-~+Nh;g9=n3tM>i5ZcH&nkVcPXgYRjG@ zf(Y7WN@hGV7o0bjx_2@bthJ`hjXXpfaes_(lWIw!(QK_nkyqj?{j#uFKpNVpV@h?7_WC3~&%)xHR1kKo`Cypj15#%0m z-o0GXem63g^|IltM?eZV=b+Z2e8&Z1%{0;*zmFc62mNqLTy$Y_c|9HiH0l>K z+mAx7DVYoHhXfdCE8Bs@j=t0f*uM++Idd25BgIm`Ad;I_{$mO?W%=JF82blr8rl>yMk6?pM z^tMluJ-ckG_}OkxP91t2o>CQ_O8^VZn$s$M_APWIXBGBq0Lt^YrTD5(Vwe2ta4y#DEYa(W~=eLOy7rD^%Vd$kL27M)MSpwgoP3P{ z!yS$zc|uP{yzaIqCwE!AfYNS;KW|OdP1Q%!LZviA0e^WDsIS5#= z!B{TW)VB)VHg{LoS#W7i6W>*sFz!qr^YS0t2kh90y=Je5{p>8)~D@dLS@QM(F# zIp{6M*#(@?tsu1Rq-Mdq+eV}ibRSpv#976C_5xlI`$#1tN`sK1?)5M+sj=OXG6dNu zV1K{y>!i0&9w8O{a>`IA#mo(3a zf*+Q=&HW7&(nX8~C1tiHZj%>;asBEp$p_Q!@Y0T8R~OuPEy3Lq@^t$8=~(FhPVmJJ z#VF8`(fNzK-b%Iin7|cxWP0xr*M&zoz|fCx@=Y!-0j_~cuxsDHHpmSo)qOalZ$bRl z2F$j0k3llJ$>28HH3l_W(KjF^!@LwtLej_b9;i;{ku2x+&WA@jKTO0ad71@_Yta!{ z2oqhO4zaU433LK371>E{bZ?+3kLZ9WQ2+3PTZAP90%P13Yy3lr3mhmy|>eN6(SHs1C%Q39p)YsUr7(kuaoIJGJhXV-PyG zjnxhcAC;fqY@6;MWWBnRK6ocG`%T&0&*k95#yK7DFtZV?;cy;!RD_*YJjsb6Q`$;K zy)&X{P`*5xEgjTQ9r=oh0|>Z_yeFm?ev!p z7q;JA4mtu@qa39v%6i)Z4%qwdxcHuOMO;a1wFMP_290FqH1OsmCG{ zq^afYrz2BQyQ0*JGE}1h!W9fKgk$b!)|!%q(1x?5=}PpmZQ$e;2EB*k4%+&+u;(E* z2n@=9HsqMv;4>Nn^2v&@4T-YTkd`TdWU^U*;sA5|r7TjZGnLY*xC=_K-GmDfkWEGC z;oN&!c1xB-<4J7=9 zJ(BedZwZhG4|64<=wvCn4)}w%Zx_TEs6ehmjVG&p5pi46r zg=3-3Q~;v55KR&8CfG;`Lv6NsXB}RqPVyNeKAfj9=Ol>fQlEUl2cH7=mPV!68+;jgtKvo5F#8&9m? z``w+#S5UR=QHFGM~noocC zVFa#v2%oo{%;wi~_~R2ci}`=B|0@ zinDfNxV3%iHIS(7{h_WEXqu!v~`CMH+7^SkvLe_3i}=pyDRah zN#L)F-`JLj6BiG}sj*WBmrdZuVVEo86Z<6VB}s)T$ZcWvG?i0cqI}WhUq2Y#{f~x# zi1LjxSZCwiKX}*ETGVzZ157=jydo*xC^}mJ<+)!DDCd4sx?VM%Y;&CTpw5;M*ihZ| zJ!FBJj0&j&-oJs?9a_I$;jzd%7|pdsQ3m`bPBe$nLoV1!YV8?Pw~0D zmSD-5Ue60>L$Rw;yk{_2d~v@CnvZa%!7{{7lb$kxWx!pzyh;6G~RbN5+|mFTbxcxf!XyfbLI^zMQSb6P~xzESXmV{9 zCMp)baZSz%)j&JWkc|Gq;_*$K@zQ%tH^91X2|Byv>=SmWR$7-shf|_^>Ll;*9+c(e z{N%43;&e8}_QGW+zE0m0myb-@QU%=Qo>``5UzB(lH0sK=E``{ZBl2Ni^-QtDp0ME1 zK88E-db_XBZQaU}cuvkCgH7crju~9eE-Y`os~0P-J=s;aS#wil$HGdK;Ut?dSO71ssyrdm{QRpMAV2nXslvlIE#+Oh>l7y_~?;}F!;ENCR zO+IG#NWIRI`FLntsz^FldCkky2f!d-%Pij9iLKr>IfCK);=}}?(NL%#4PfE(4kPQN zSC%BpZJ*P+PO5mHw0Wd%!zJsn&4g<$n#_?(=)JnoR2DK(mCPHp6e6VdV>?E5KCUF@ zf7W9wm%G#Wfm*NxTWIcJX-qtR=~NFxz4PSmDVAU8(B2wIm#IdHae-F{3jKQFiX?8NlKEhXR2Z|JCUd@HMnNVwqF~V9YJtD+T zQlOroDX-mg2% zBKV^Q5m5ECK{nWjJ7FHOSUi*a-C_?S_yo~G5HuRZH6R``^dS3Bh6u!nD`kFbxYThD zw~2%zL4tHA26rcdln4^=A(C+f9hLlcuMCv{8`u;?uoEVbU=YVNkBP#s3KnM@Oi)fQ zt_F3VjY)zASub%Q{Y?XgzlD3M5#gUBUuhW;$>uBSJH9UBfBtug*S|-;h?|L#^Z&uE zB&)spqM89dWg9ZrXi#F{KtL@r9g^xeR8J+$EhL~2u@cf`dS{8GUC76JP0hHtCKRg0 zt*rVyl&jaJAez;!fb!yX^+So4-8XMNpP@d3H*eF%t_?I|zN^1Iu5aGBXSm+}eCqn3 z^+vzcM*J>wV-FJRrx@^5;l>h0{OYT)lg{dr8!{s7(i{5T|3bivDoTonV1yo1@nVPR zXxEgGg^x5KHgp?=$xBwm_cKHeDurCgO>$B$GSO`Cd<~J8@>ni>Z-Ef!3+ck(MHVy@ z@#<*kCOb5S$V+Fvc@{Qv$oLfnOAG&YO5z_E2j6E z7a+c(>-`H)>g+6DeY1Y*ag-B6>Cl@@VhkZY@Uihe!{LlRpuTsmIsN4;+UDsHd954n9WZV6qq*{qZ5j<W)`UorOmXtVnLo3T{t#h3q^fooqQ~A+EY<$TDG4RKP*cK0liX95STt= zToC<2M2*(H1tZ)0s|v~iSAa^F-9jMwCy4cK0HM*3$@1Q`Pz}FFYm`PGP0wuamWrt*ehz3(|Fn%;0;K4}!Q~cx{0U0L=cs6lcrY^Y%Vf_rXpQIw~DfxB-72tZU6gdK8C~ea6(2P@kGH}!2N?>r(Ca{ zsI!6B!alPl%j1CHq97PTVRng$!~?s2{+6ffC#;X2z(Xb#9GsSYYe@9zY~7Dc7Hfgh z5Tq!})o30pA3ywg<9W3NpvUs;E%Cehz=s?EfLzcV0H?b{=q?vJCih2y%dhls6w3j$ zk9LB0L&(15mtul3T^QSK7KIZVTod#Sc)?1gzY~M=?ay87V}6G?F>~AIv()-N zD3rHX`;r;L{9N|Z8REN}OZB&SZ|5a80B%dQd-CNESP7HnuNn43T~Agcl1YOF@#W03 z1b*t!>t5G@XwVygHYczDIC|RdMB+ z$s5_5_W-EXN-u_5Pb{((!+8xa+?@_#dwtYHeJ_49Dql%3Fv0yXeV?!cC&Iqx@s~P%$X6%1 zYzS9pqaUv&aBQqO zBQs7d63FZIL1B&<8^oni%CZOdf6&;^oNqQ-9j-NBuQ^|9baQuZ^Jtyt&?cHq$Q9JE z5D>QY1?MU7%VVbvjysl~-a&ImiE(uFwHo{!kp;Jd`OLE!^4k8ID{`e-&>2uB7XB~= z+nIQGZ8-Sbfa}OrVPL}!mdieCrs3Nq8Ic_lpTKMIJ{h>XS$C3`h~ z?p2AbK~%t$t(NcOq5ZB3V|`a0io8A))v_PMt)Hg3x+07RL>i zGUq@t&+VV`kj55_snp?)Y@0rKZr`riC`9Q(B1P^nxffV9AvBLPrE<8D>ZP{HCDY@JIvYcYNRz8 z0Rf+Q0riSU@KaVpK)0M{2}Wuh!o~t*6>)EZSCQD{=}N4Oxjo1KO-MNpPYuPABh}E|rM!=TSl^F%NV^dg+>WNGi@Q5C z%JGsP#em`4LxDdIzA@VF&`2bLDv%J)(7vedDiXDqx{y6$Y0o~j*nVY73pINPCY?9y z$Rd&^64MN)Pkxr-CuZ+WqAJx6vuIAwmjkN{aPkrJ0I4F5-Bl}$hRzhRhZ^xN&Oe5$ za4Wrh6PyFfDG+Nzd8NTp2})j>pGtyejb&;NkU3C5-_H;{?>xK1QQ9S`xaHoMgee=2 zEbEh+*I!ggW@{T{qENlruZT)ODp~ZXHBc_Ngqu{jyC#qjyYGAQsO8VT^lts$z0HP+ z2xs^QjUwWuiEh863(PqO4BAosmhaK`pEI{-geBD9UuIn8ugOt-|6S(xkBLeGhW~)< z8aWBs0)bzOnY4wC$yW{M@&(iTe{8zhDnKP<1yr9J8akUK)1svAuxC)}x-<>S!9(?F zcA?{_C?@ZV2Aei`n#l(9zu`WS-hJsAXWt(SGp4(xg7~3*c5@odW;kXXbGuLOFMj{d z{gx81mQREmRAUHhfp#zoWh>z}GuS|raw1R#en%9R3hSR`qGglQhaq>#K!M%tooG;? zzjo}>sL7a3M5jW*s8R;#Y8b(l;%*I$@YH9)YzWR!T6WLI{$8ScBvw+5&()>NhPzd! z{>P(yk8{(G&2ovV^|#1HbcVMvXU&;0pk&6CxBTvBAB>#tK~qALsH`Ad1P0tAKWHv+BR8Fv4!`+>Obu1UX^Ov zmOpuS@Ui|NK4k-)TbG?+9T$)rkvq+?=0RDa=xdmY#JHLastjqPXdDbShqW>7NrHZ7 z7(9(HjM1-Ef(^`%3TlhySDJ27vQ?H`xr9VOM%0ANsA|A3-jj|r`KAo%oTajX3>^E` zq{Nq+*dAH{EQyjZw_d4E!54gka%phEHEm}XI5o%$)&Z+*4qj<_EChj#X+kA1t|O3V@_RzoBA(&rgxwAF+zhjMY6+Xi>tw<6k+vgz=?DPJS^! zei4z1%+2HDqt}Ow+|2v^3IZQkTR<&IRxc0IZ_-Di>CErQ+oFQ~G{;lJSzvh9rKkAiSGHlAB$1}ZRdR^v zs2OS)Pca>Ap(RaSs7lM2GfJ#%F`}$!)K4#RaGJ_tY}6PMzY{5uHi}HjU>Qb~wlXQ) zdd(`#gdDgN_cat+Q#1q&iH{`26k}U3UR5(?FXM>Jm{W%IKpM4Jo{`3aEHN)XI&Bwx zs}a_P|M)fwG1Tybl)Rkw#D__n_uM+eDn*}}uN4z)3dq)U)n>pIk&pbWpPt@TXlB?b z8AAgq!2_g-!QL>xdU4~4f6CB06j6@M?60$f;#gpb)X1N0YO*%fw2W`m=M@%ZGWPx; z)r*>C$WLCDX)-_~S%jEx%dBpzU6HNHNQ%gLO~*egm7li)zfi|oMBt1pwzMA$x@ zu{Ht#H}ZBZwaf0Ylus3KCZ*qfyfbTUYGuOQI9>??gLrBPf-0XB84}sCqt5Q(O$M& zoJ+1hx4Wp#z?uex+Q1crm2ai?kci;AE!yriBr}c@tQdCnhs$P-CE8jdP&uriF`WFt>D9wO9fCS0WzaqUKjV_uRWg>^hIC!n-~q=1K87NAECZb^W?R zjbI&9pJ)4SSxiq06Zasv*@ATm7ghLgGw3coL-dn6@_D-UhvwPXC3tLC)q3xA2`^D{ z&=G&aeSCN)6{2W6l@cg&2`cCja~D2N{_>ZQ)(5oSf!ns1i9szOif~I8@;2b)f2yQ5 zCqr{lGy5(^+d!<0g??wFzH^wuv=~0)g55&^7m8Ptk3y$OU|eI7 zIovLvNCoY%N(aW#=_C%GDqEO|hH3O9&iCp+LU=&CJ(=JYDGI;&ag&NKq}d;B`TonC zK+-t8V5KjcmDyMR@jvDs|7lkga4>TQej$5B+>A`@{zE&?j-QbQWk4J*eP2@%RzQ{J z?h`1~zwArwi^D7k9~%xtyf(2&$=GsP*n-fTKneej-y6y(3nNfC7|0{drDx{zz~cSs z<_+d2#ZDst@+`w{mwzmn?dM2aB;E;bS-Opq$%w@WnDwa$hUGL90u9c=as)+_6aO10 zLR|CR8nr<2DQTvkaH0QDsyn@TYCs7Nk3lN}Ix$)JM0*zf=0Ad$w9j723W#%{r8V&`{wx-8kSv#)mZ{FU%UZDIi zvbgLHyJ>z0BZe`GNM$Q;D6D48#zc9s(4^SGr>u-arE}okN62N{zuwX)@FL5>$ib=b z5Wtm~!ojD3X|g59lw%^hE?dL;c^bgVtBOkJxQR{Eb*nR1wVM&fJQ{<))bn9e3bSlu z3E-qpLbAE(S^I4mVn`?lycoV!yO!Qj_4qYgsg7tXR)Gu2%1)5FZu&lY7x>bU`eE}x zSZ5c`z~^&$9V?eEH!^Rp-Fz3WiCvEgf`Tq}CnWRZY+@jZ{2NewmyGUM6|xa3Sh7)v zj6d&NWUVqu9f-&W)tQ>Y%Ea!e76@y!Vm*aQp|wU5u<%knNvHZ!U}`fp*_)mIWba=j z*w9~{f5pD;zCmEWePjM#ERNiNjv!SnM-&rGpB9Nmiv}J+hwB&0f_+x?%*lgJFRHsqfFDPwyvh8<*xLT0u_BeEHw{q+UGj=$4udEx)Vq#sV zKB3+_C!RUKy?ac3-`+}dL2!D_2(5=8&@hBf`-AbU`-<_3>Ilqkg6qSI>9G(@Kx?g<0h0K&31$AR>R%d}{%DyXPss$&c^ja7NR z$0AN7Fl$>VpGxqHW15CjxAa6DUVmCpQNbOwBv8D^Y{bXg28> zEQE9xl?CWh0gS6%Y=G4Cy($Vb>jBb2f_dm#0_B<_Ce`|~Obt_Xp^nkR zK%o_`{h1XkWn}i|5Dp#q8D(;k;2|+{DAG{2gJgPNQ=KZ=FKY@d>QEu6W;oLsE(1}< zpnwSEj(K{Bu^#CXdi7L_$!X`QOx^tA1c{&-XTHo3G?3(H*&VM~*Aud?8%FU=dE&kV zJ$SqZoj^g@(q9x;7B30J$(-qUml{?3e+I^Cf?X0PpLr}m zS}W9`QaCwINRU&D5>j9O*j6S}R1`7{5+{d-xUlI~)U!^4+*b5tkuon-Msz03Z{{Kp zH!GAXoyr#1K;t5o#h#a%Lzj3XQGqM0TRnfu$(fsQe^wb_?W!m!+7r55q>svWN`k~T zS(gk9bi|@+8wg;dR<&0f;MpwQbY27$N{{laPQk3@3uCz$w1&jq)`uW*yn!Pe-V^%Q zR9)cW;UB~ODlwolWFAX?ik#_|v)AtHNwoq72E9Jg#v2e5SErf+7nTleI8&}%tn6hf zuz#5YtRs94Ui&E_1PakHfo+^t-{#ewhO*j5ls-zhm^C{kCARNEB1aORsxE!1SXBRz z6Oc-^#|0W6=7AJ;I|}pH#qby@i^C+Vsu9?zdtkE{0`oO_Hw|N=Lz9Is8j}R zI+8thGK?(KSZ5ZW4nQG1`v(=0Jd*0gIlavVihzo#fPaa=}(Rqdxl3^6O8K+{MqU`;1iTJ$<^k)Nms(A$j?A-wHJKvh9 zUHW3}JkE;x?FETPV8DFTxFLY8eSAd%C8vp?P_EuaMakmyFN_e?Hf|LBctnncUb}zF zIGP4WqtKCydoov~Bi<_I%y%$l+})!;SQVcP?>)9wM3q-GE6t9*LfoePBlo{gx~~e{g_XM5PQ8Y5dsuG%3Xq}I&qcY6 zTCo?<6E%)O$A2torq3-g8j3?GGd){+VHg@gM6Kw|E($M9}3HVIyL1D9321C zu#6~~h<<*=V7*ria%j^d5A;S^E;n!mOnFppfi+4)!BQ@#O2<|WH$RS~)&2Qol|@ff zFR#zmU(|jaqCXPA@q?UhrgbMO7zNXQYA@8$E+;4Bz7g=&zV-)=&08J_noLAz#ngz$ zA)8L8MrbXIDZuFsR_M(DsdX)s$}yH!*bLr{s$YWl5J?alLci=I#p`&MbL4`5bC}=2 z^8-(u4v2hs9*us}hjB!uiiY6vvv&QWJcVLTJ=SFG=lpR+S4Cd91l}oZ+B-*ehY2Ic_85)SRSa% zMEL~a3xrvH8ZnMIC!{9@pfOT7lrhxMf^8N20{CJXg}M35=`50S;6g-JYwjwj!K{^) z5Bohf6_G6z=+0V8&>F8xLbJ4mkCVu^g66#h&?tL z9odv&iW21IAh~y9D-DupKP-NcernF2(*RsFkAsM<$<>@-Cl1?&XAi4+Mh2Zm@2x#u zWH&J^1=8G|`|H2%94bnjUZyI>QACu9FS}^$lbtzzCz4AMspqGYEwFFM<%G!Oc$+;7 z3r_L!H~PR}5n8+3-&4v*fFr$uK{y_VamM0*TKn^))nQsn5U?7Iv?`4|Oy&m6himAG z%=a;2ji3f_RtDPqkwR>ISxhnS0f)E`ITo}TR!zIxPwECZy#jzo%q{BNYtd!<IP_S+=*yDOk1GgwLqe!d9esV@3$iVAm1!8RoE| zqnTz;5a)B(~~KcP)c>?+ysFAlAGF4EBor6)K{K*Kn>B(&QtMAkR^ynG%k%UbJpKM zI$}qQXXP3PISHe_vTFssbcL`irhG2zN7J((3ZFmh*bnPuiK~=#YG=820hXqOON#HI<0bvIT{z&SaqRvqaMG-d5<06zdP?-kIH{%UMR$Xn@S}Hx3 zFjg}6no}vN_512D+RIn-mo9^_Li-)WI5%VigYt{Jd!RyI%d|-LqJU$y3aJ*a$y6$1 zjyTuIF2&t>1rPlw&k5OVLhrYBvk5Vl8T(*Gd?Alqi}> z<@-`X_o@9EOB8Ik&?|;lvKHFU@#O+?T!kEf&oJUaLzN;>!}!!e1WIs(T}V#Irf$AK z42`x`z-9ogxd@%CS;D5S z2M^b;Pu)q)c&_KBO!va-4xnI57L7V@*_I_r4vU)z>xk5z6PDVqg92R7_iZH|VlO_B z#8R`5HZVn?ou>czd>gZ~s;w4ZkzVXJNP8FiezlB5JXe6Z-OLsDw%N7!(135!Vl2Lb zLYI79?U{h#W-_#W6hf`<$BQHJCu5ehv?IF+-uxUqt~j!ZW1cxfiEJal^q7~RMWQ0a z2CEaPa1_p|P6qRmmeKgas*N}@(2tH%U37-<5i(DSnVOFFxg-Sv%7&{hPeRh{U`&ufGz=V|JdYQ2sG5 zk%3JimSwQFP=Yr?u_beSG^B$nnh$4hrxb4lpTTiUFRQEZ3ulr+L3m;>;Io?D;jG6Wjj!b)nsZds<6 zX@cD%+aVr!ra~F7HYr`TB!|y-t)HSb^FQt zbo+_XP44IWJGGxg73JyhBjKMSv`77ngDOw}6Eve6ZIol$Q5s65d(1-sP{BU{1_y)7 zF8sh5A~jxRHk=wq3c5i3*e&otCd9>cstT?IQ&D4slC-&^q!ut1;WAQ}fE}Y+jU}r{ zmpSI%sW?})RAm8}$WUU+V$PmQOF5gSKOGQ2;LF-E(gd<67rYu2K| zom8mOppa%XJ6C(@I7-*opqLn73e9BMFStaBER?suJ{jte1$vA%z?$_`Em=a=(?T-q z*A=VZOQ`P{co!*UUKyV@Rd-c#*wmb7v<%rN=TGFmWmqhbj#&+?X|3bZYAjbNGTv~O zs7SIYi3VgW6@?=PGnbNNZIWaY^*+ChW&a)A$uqH8xxehwx2`<1w6mag?zuHbsVJiO$a)tQ zuBBoR>rLfhpA@)Qf`8BwRMx886%9HP5rOR%YCy9pQ|^Xw!=Mcnwx8j=(ZE)P-tJ&s zON&Nsr%14jS@K+IvrJj720NkCR*C(j&aI$EFCV)w$9M<#LdihyRKdzTjJPI|t9_S} z--#oF#;F?Y1KN%_yE);Bxv}9PWZphz_g5mReOKR`y%9UZ=n}GXWw?E$T1%NAfK1Ad z|0$Lp^;sntA>}=ybW)mkxNv1?hkZ`<8hCemcT5 zYl6$I^bhXDzPlz<>6zOy3Fu*3?>#q$;1fJ>nuxyx#&<&x6Y}j zCU&VmtCJ`;aYN+qP}nwr%s2ZQC|Z**axS^?iGu+x^{{>FIv!k0#HaXtEG=*C7kPe!mMnknbn}TKpp6Xv9 zVvq&%A3nmY^N*XTg&+=wO>(|{uTwm;ZP9@+M)6%T zwXPh-&{+aAfv^ZCzOEb;yj>A=f5Pbu)7T{9PT3u>#w*%?K8jqEF%I>A?q;E%CXn)f z|0ohNa5DMv@HVk^vT(L=HBtH*Vzo81L?)M=g7)>@j*vUx?S zxqZo23n3vn@K-Q@bx3lLT+5=fB_oz8+p?P;@*UU<-u)jb5WFEXzoc+8*EC5P6(HWr zY$mfFr=L&G>(jvl8US2fLQqTzHtAGizfR*;W4-kN2^I>L3KkXgx=e*}+i*N($}{?c zi=Q67G)oEMW{|Gdsm{)|V)5Evo}KLj%}gIe>98FFoNTLrJX z-ACRdewnT1w#Egct%wpGg~q%?!$}>$_UJPC4SP0^)G_$d4jN0jBEx}+rcd*^aDtnx zewG{`m!oSbQ?A~FZ6L{&V0hUE+b$DxjO_;oskFha>@gzy(jDnzGO>z3Tzz|i&Dakg zFid5$;SFxINis^4JzK5XIVabKoP`=ZWp|p|t{hTi8n|#XE=-rINwJ*blo?=%Se(qw zkW7x5Qs(LV5RVGxu2e&4);c73lY#0(iZo1x=MY;7mW`uUQIY+$_PqH`4a`6O#urwU zE6(FrvyExmB{c5z*YAj_P&t??F1t6TN2N!$N#~02u(t(PDVyD)$mL3hqKQ4E91N#GOIngPr&pUb-f_Z4*XV8`p1pq+mzrUlUY=4~i|3RDo;Lo36U}uwm zaOah}mO8c@%J*~~{Up7_7->8|3x<}WemgaMA}h>xD17Fey@V9;LgjQFSBS(A<+2kCP9( zlkD%;oXzWtZ_hgu0IxeTjH`6=vi|t_04Btl32=g8swD1oZguWr4|lx0RuXoDHbh27 z+ks?gkVWYnr~_{h+PzQjQ(#8kaJai4We{F!JuqCzU0t*+H{n6i3;K<>_6XUn1n)}) zJ?}JCUPYhT9S1Hi-M+$(Z**%fz7Z%IiMN6%kD>wh%r4#C?Ge4{>w9o??Vbehy9!3@ zffZs8?LGxyWQr@yB(|%~Aa>fVj3$O=i{K*f;?h-a@-ce{(cY8qByOCA1r0;NC}}gr zcC^fCa$Ot`42n>`ehclOAqBo7L&D6Mi=;M5!pd@jj$H z?U7LQWX_u7bHpBzF7L-s4*`C)`dUrbEIgKy5=QHsi7%#&WYozvQOXrNcG{~HIIM%x zV^eEHrB=(%$-FXVCvH@A@|nvmh`|agsu9s1UhmdPdKflZa7m&1G`3*tdUI5$9Z>*F zYy|l8`o!QqR9?pP4D7|Lqz&~*Rl-kIL8%z?mi`BQh9Pk9a$Z}_#nRe4NIwqEYR(W0 z1lAKVtT#ZTXK2pwfcCP%Apfo#EVU|strP=o4bbt3j zP?k0Bn$A&Xv$GTun3!izxU#IXsK1GQt;F0k`Tglr{z>v2>gCINX!vfs`aqag!S*AG5Z`y-# zUv_u&J4r;|EA`r!-gsoYGn<^nSZLH-nj1SRGc0MRG%LWVL)PckFn9z!ebIJ}eg+ix zIJo7GN;j1s$D6!({bYW)auypcB~eAWN;vhF%(l=|RR})$TOn;ldq^@8ZPi<%Xz~{Z zQQ|KAJ@JHaX!Ka2nhP%Cb^I}V6_C|e1SjOQpcPMMwfNz#U@Az|+rmH*Zn=cYJu-KR z{>f++Z~P=jm)4-7^yc#52U4qeNcBRYb!hhT3Q7Ngu5t@CvY*ygxu^Eh?2l6= zhdqN{QEaP(!p>1p1*toD!TllHH6EH~S%l9`mG62dyAd+?}1(vf@N*x^6vhEFU<-RqS7#12*q-xtU z5d|F^n%WSAQHnm-vL)4L-VvoUVvO0kvhpIg57Wf@9p;lYS5YfrG9jtrr?E<_JL{q% z7uPQ52{)aP{7<_v^&=J)?_|}Ep*`{dH-=cDt*65^%LodzPSH@+Z~;7sAL}ZECxQv+;z*f;(?k)>-Lp@jBh9%J`XotGJO(HcJc!21iZ98g zS-O!L9vpE(xMx1mf9DIcy8J5)hGpT!o|C8H4)o-_$BR!bDb^zNiWIT6UA{5}dYySM zHQT8>e*04zk1)?F99$dp5F^2Htt*jJ=( zH(#XwfEZ`EErdI~k(THhgbwNK9a(()+Ha1EBDWVRLSB?0Q;=5Y(M0?PRJ>2M#uzuD zmf5hDxfxr%P1;dy0k|ogO(?oahcJqGgVJmb=m16RKxNU3!xpt19>sEsWYvwP{J!u& zhdu+RFZ4v8PVYnwc{fM7MuBs+CsdV}`PdHl)2nn0;J!OA&)^P23|uK)87pmdZ@8~F$W)lLA}u#meb zcl7EI?ng$CAA;AN+8y~9?aon#I*BgYxWleUO+W3YsQxAUF@2;Lu-m#U?F(tFRNIYA zvXuKXpMuxLjHEn&4;#P|=^k+?^~TbcB2pzqPMEz1N%;UDcf{z2lSiwvJs(KhoK+3^2 zfrmK%Z-ShDHo^OUl@cfy#(cE=fZvfHxbQ!Chs#(vIsL%hf55_zyx>0|h2JT=|7JWo z+Uth3y@G;48O|plybV_jER4KV{y{$yL5wc#-5H&w(6~)&1NfQe9WP99*Kc+Z^!6u7 zj`vK@fV-8(sZW=(Si)_WUKp0uKT$p8mKTgi$@k}(Ng z#xPo-5i8eZl6VB8Bk%2=&`o=v+G7g|dW47~gh}b3hDtjW%w)47v#X!VYM}Z7hG1GI zj16;ufr@1^yZ*w3R&6pB8PMbuz%kQ%r=|F4+a!Gw2RBX6RD5c!3fU@+QCq#X7W@Q5 zuVQ}Uu0dzN+2mSX5)KV%CsU;2FL%B6YT`10$8JR^#;jOO1x?t()Q_gI zxpQr2HI0_^@ge0hNt&MQAI`yJ1Zhd-fpR{rdNmRkEEDu7SpB)QOP4ajV;UBZZZK<6 zWds;!f+|}iP-kqWAH#1@QisJpjcg`+s80!LhAG@(eMad|zcln~oE8}9l5!K{^zf~( zd=HArZ5+Mryc$uNa`@|GSdOX=y}8GZc-%p8W@OM)uk2DfmhQXCU1E#y3XJ>|+XdW2 z)FQLeK38}u_D(5E{GV|YT^rI4qds2{-r<@@@@SG@u&4LbC z5o|KKqVM{?wk$5>2?t*I?IHdh~gljn_2m2zqZNJEEz4Mb$o&I3_UAg#$B{0u$uF4-q}{ zzs5+k@qOe08!CGLGmy3eRrcuqsgB*B>i8c3>3=T^Hv>nL{{u)jtNc6tLbL7KxfUr; z=Pp14Nz+ggjuwd~*oRJ)xWwGwdge+~b!E%c3Gzw6`vT>CCxE0t6v5Z`tw1oKCcm68A~Dbc zgbhP6bkWwSQ=#5EsX*O9Sm^}EwmQQzt2V2phrqqe2y)w8;|&t6W?lUSOTjeU%PKXC z3Kw$|>1YrfgUf6^)h(|d9SRFO_0&Cvpk<+i83DLS_}jgt~^YFwg0XWQSKW?cnBUVU}$R9F3Uo;N#%+js-gOY@`B4+9DH zYuN|s&@2{9&>eH?p1WVQcdDx&V(%-kz&oSSnvqzcXC3VsggWet1#~bRj5lBJDo#zF zSz))FHQd8>3iSw{63m`Pgy_jkkj9LTmJ&!J(V0E~&}HJ4@nXp<(miz$sb;(I<8s!7 zZyezu!-+X81r03486gAlx@n#aKx_93DREBtNcYln*8oliQ zbh0~SkAgHXX%C6}HwN(TRwaK2k_$Y}PxKId;jYt=S1Bf<8s@(IL?k3u1(f^V%TYO1 zA_jPf*V)SLEZFWS#y>M&p$LoSk+%ubs`)H%WEZf=F)RKh&x;i)uLIGJ94~A4m$(;S z;1rQC{m>--`WHFcaFA&5#7~vz|5S;{fB(7pPnG;@$D~C0pZYNEG?B8X*GB2e4{Qk; za1oop8OvHqs1Lk6B`AuYOv4`y`IgM315iTr{VUVc9WeOG;xE z%eDQgE4rb_B%vuT>N?^K zRvPnQwG%7RjO26+DY!OXWjgBu4^!)W-+ob_G&nX++))pD->QdRCo0spZN?Y*J#@-q z)fk-fJvZYz8)GSxYc^oXYIM;Pw}ftHW+a3dis#dXx^OS^m-~FlwcVr6MXv78fNI!i z51K-2t&!&IZ4(GF=mT@;qIp!&R(I@UiWPPz)%Us&(FdAAGxZ-+6^UZ7em`J-F#_3r zLkHym@VAnZFM$J~?0b@&O`l4YXyvOQ+OqalbZ0{g{qD{neY_xno1ZpXlSJWM=Mv(~ zvK{?O>AcXpbd}+hn{~*>weZwDTURX*M^9RkOO#DUfRW1;comKg1bn+mlsrNY8XDyW zgWg9~AWb_1^D8zsD4bL(1J4oinVy0Fimrh&AC}Itl;IH*p4eU_I;SWkOI!9tAbi3B zO@0=q#LHAc>z?ve8Q&hsF(sR9lgf_99_5Kvuug<^&0}Y&m)YjI?bITGIuh}AJO|>z zc*`Mly$>TA={AIT#d%JuMpXHDt($qkc*3UTf-wS$8^awqDD^|EAeA{FoeyJfWM@QX zk>vJ4L|8DU7jg_fB^3Qvz*V$QmDl*AXdw6@KSckh#qxjLCM8Nba!dTkJgr(S@~Z0a zt8%|W!a~3zG4Y&X6xbLtt^JK5;JT($B`_9bv(BjRTfG_Y`tg3k-}%sQoY@F|=}}${ zwmW%Ub6jPd)$;NA0=b7w!^2dE-qvI4)AVr`yvkabJcGwvuQ2rAoRlTjvCC^-$2BG} ziy0<6nt8;J67rymwm&wVZ8E7Krouv2Ir@-GQ%ui6PR42KHKms3MK&Z$zp{_XAVvrd znK4cbg)Ggh5k(4SlFOM9yyRUlVH1oo%|6Lu9%ZxZW28!c9Z%H5#E?B?7H7ulcUtirB<{s@jnS(-R@we z^R#{Mn$#JXd~5sw9rU&~e3fYTx!T&hY{S<~7hviG-T$<4OPcG6eA0KOHJbTz^(`i~ z_WON4ILDLdi}Ra@cWXKLqyd0nPi06vnrU-)-{)Xp&|2gV>E{Uc>Td`@f@=WYJYZ^- zw&+fjnmyeRoK-unBVvX>g>wO3!ey<+X#z@8GNc9MD}khMO>TV{4`z zx4%!9|H6k|Ue;`M{G6d!p#LL+_@6WMpWgF7jk*%$D_JB3c%D`~YmHRJD1UNDLh;Tf zYbbKcv9R(81c4yK+g+1Ril{5w#?E}+NVz>d@n48C-T-(L?9a9W`JV*{dan-sH*P3_Hnt~iRv)}ye;7$b}^4l%ixphDK`G#b!4R4qoouT@*A zZ)kQa)e94??k7N>tqoRl>h(9DFq&92=z|F!LJrh-97EoFL|Wt2v}>(zG1*#aiYA_^ zM_&%_G^g*O8x650e>m!#MDmwRub!irY>^^|L=!4^%lBr;?}mvgP3y~^mSdKSm^R~WAt7T0_ck0mA`GS)J^SYTo6^vQ|vuM7!92&@$BhtcQ^Z4h2)aN zh~EQthyjn1(eI~$FtuHH!|x(iHU{9k40k5nPBwB)X@8Lo$P6u81EeoNOGRct%a-LM_4y3Ts z7ki0PWAO^Es6c%M*SSRn)2|NAoUsKyL%))uVx7?5lkrk`njxs4q@M~x+8%jr7xV;- z|KC=g3aTZO|y|g~oHXB6b42(|J_&fP2Y`*;L07H2d>{~JP zFNGl$MYUG(Qy3dR?9Bfdg8#peGRiVP8VYn@)6T1bj*v)s6q*7<6P(ZVm4ZnTA;rOHSd>P`_5uT0+azWdV`gIvLaJ1o*DB}&W6LCgX|BycgF5qd z!)}dT#A~4*6{1=Bd5VV(Qa2h4x9m#2X711z(ZN>i&cn`BopG*5P`CD*HfYiQmXNGk zhgqcHPBrJP$Z@PLZ4}d-8^}%X^LtUDHq&;~3}lUyrxxl@|IS={GP&6-qq&Iy5gKW- zC@$}`EEZd}DOSeSD+v_x5r_tpBWfN0gDa21p(@TAIrgWQFo7NO@slI6XOAML_lN;3 zEv~}LlMbGWKu}0s$tO-vR)wD!=olGcA?}vU;lRu4+Zf z?nCD7hBmA5`U9P#W8-*0V1=OT-NI0k&_`UZ87DbpYq_=DBdyNDchZ<|V1f%dbaa7i zf~R+6Xt%G)VXlM@8REfP3u#7UPadWYOBMsQ56fHRv!0p9R6q>Rbx!n|IY0goLb%{+ zzy|5WXk+(d@ChzOWatIV1lc1F!(uEOfEmMd;v`|$Kt3X2Uws;%@OV!E86PN?CeHV& z=4#TX{J8RWaH`)!J<8AUs#Ar{6Am^8M{S( zc%K7y2YbcLUz+*eDTXdthNE)Lm^P&*e^eV zilOS9)TVKgr9_^_M!TJ^44v<YF2NO=h(oOr5jYxVTxWk0XJ8n0{F_SOH%49WMk*Sg7`g6B(=^< z*rLAW;8I5;1?;Fh{N=f;kxjLpj}u^mD|k8lih|G4#}wEG1j`HIG( z8y;BMR3cE01e?(+k8NLR|Z+)#>qR^iMZc=BkcixWSKYmkaHpIFN?s%*74kc&wxwB zrtbYBGz9%pvV6E(uli6j)5ir%#lQkjb3dvlX*rw5tLv#Z>OZm@`Bf2t{r>u^&lRCg z11*w4A;Lyb@q~I(UQMdvrmi=)$OCVYnk+t;^r>c#G8`h!o`YcqH8gU}9po>S=du9c*l_g~>doGE0IcWrED`rvE=z~Ywv@;O-##+DMmBR>lb!~_7 zR`BUxf?+5fruGkiwwu|HbWP^Jzui=9t^Pmg#NmGvp(?!d)5EY<%rIhD=9w5u)G z%IE9*4yz9o$1)VZJQuppnkY)lK!TBiW`sGyfH16#{EV>_Im$y783ui)a;-}3CPRt- zmxO@Yt$vIOrD}k_^|B2lDb2%nl2OWg6Y)59a?)gy#YtpS+gXx?_I|RZ&XPO`M!yl7 z;2IS@aT4!^l`Tped5UGWStOw5PrH#`=se%(ox%gmJUBk18PsN$*-J8S%r51Y$i!4N zQ!rW%cgj44jA~_x%%smSTU2WG_W0c&PB$A5*kl8{$|865+lSIX~uyDT`uI7qnS!BPAg1Wwrc0e)8Usf zv9^E38H&hWSp5!@K8Qinl|)9 zEB?NMaxZK^GB!PUf1TBw+`H&jFSNI=Q@v5$Ryf-y^#IuXO#vsM5R+9@qz#z0fD0GP z9|Hj#E>?<=HTcsF$`xn`je~D&3kF1Qi%dfH{sKh!~(IpgjkDGQn zQx2F9rv{*x2$(@P9v?|JZY)^b9cd+SO6_1#63n-HAY3fE&s(G031g2@Q^a@63@o?I zE_^r%aUvMhsOi=tkW;}Shom;+Nc%cdktxtkh|>BIneNRGIK{m_1`lDB*U=m|M^HGl zWF#z8NRBduQcF-G43k2-5YrD}6~rn2DKdpV0gD%Kl{02J{G3<4zSJ1GFFSXFehumq zyPvyjMp2SLpdE5dG#@%A>+R3%AhLAwyqxjvGd{I7J`Iw{?=KKPRzyrdFeU}Qj{rm{351DoP_;vx zMo*s+!Gwgn;${(LXXO(xyI@$ULPZI|uzYR%`>MmW6Hcr1y2aM5b$grFwW_(9Fzz$Q z$&8dKNdWvBkK=iYWA|0}s1B7>8J$g*Ij_+S9vC1#jy~uA8nr)yY)a+ zoJ=e>Lp`7v3^tQN<&6UpDi{c1b}F~fJ$9r=p=@U^J_7bOck$5}ncVjYB0yEjbWrhe@E`j64yN3X?=k_F3BalH$aN zV=94?wDNv=BKLB<1*xU|65Zl!%51r5sHQ?qCggCw;$2QfCZ$lN40WPL=n^{Prf^QS zjbZ&1MRGgiZ2T)}DpiluFr#q*!AZJ$1v#d10YQ{>wQ5px!y28-1hCZ7lwvQnQYN*U zOg9BpvB0A$WUzFs+KWk1qLiGTrDT-0>DUpFl??l(FqWVz_3_Xzqg9vTpagp- zZcJ!5W?|0G%W|AJVVHJ7`u6@<4yyqMGHj@kpv`P+LV<)%PM__Rz&oq~t-*vV12@NR zoEVPz<2D>O==MlNI`;l8Gmv49&|1`FR!}2`NLRCqA{@`imLz6zrjS4ui0)O;!Pu&?KPAcX)?tDPS26uKvR(ry(p{6kiXPoZbnQ!vx6dLu zZCaj~Ocr$h##KqsD;9;ZiUwhmUd%5lrwczWr1Yn6V>+IK=>51;N7JDkrm1NY-ZBes z;FxeOTb^HAyA+~P2}WvSSu_fzt_K=(m4wUp%c*^hF zEJ+1dP0{0B8bryXR+qApLz43iu?ga<5QQxTa$1gMCBq0W=4|DTv4nY4T*-^Im%>U~ z)98;hc(d7vk0zAML$WnPWsqK>=O-FZSLI3_WQKr*PCK=(i6LelZ$$}XXrD5cb~VXz zT%egX>8e;KZs@jcD>cL9VP(Q}b0r~ST$Mc%mr1cC8mqRUQc|N^9@Weu$Z|KeczK7HhSFeFV0i)MQmwrn7CBL=p`_9n?nh320m}6-MSv3L7I*<*56GR zZ`zI^1zyC7F#*zVL@M)F2+oqxydaiQz?|ODmqs|Ub8%&KXk9P3P7<4tM?X{~!;Ygw zt=h7)AYGDO9F&wV=BhCyD9exr#YM_-<;Fo~iE>IBEXK$%;JCUAEr;lR&3S_DUy_E) z#!oCYdENVE9OaaeaIrPk-odMtvdFG;ocA#`L6AifMu0og^?Oy9F|Et9q6 z8;3_|9+Io@hqYoN;58x1K&OP!9Vd#dzhTRjB2kI?%31ceHb#Q~WqJV5lw;@b>4@Rd z={z1S`d05YdWC*RLc7sR0bVGSytn-a3`JZL3|d8KC?vj_70Vi4ohP9QbU&Q4?Zjd0 zSZA?KbqLBsJg(qj>fycto3`zN-)lDe4{Ij-QfoBn@rT_tTszA+CnM~xWmE(4zfpCQ z;zPJfl3=ctrggYM!KQg;V{J;utMMF9&BfOe!<{wU0ph?-VQ%cv3B%fFiW?6xBPdf0 zD-HhEU?0C`G@7e+b-=8fj=TP3mdz&SIQ}Nd`*G#DTz9Y@b zaoDF}Gx7ZhPzpDhi^fA7WZ)EAEFv;N2*bKp0T za0t<^1|Zc#`A+?s$!$8eO4CK~PUFECC3BwNR4f)!V&-Y>$xg(%T{MtrH|CPcO(Lf> zE_meE1?6S-qlV^p2fh! zT11Ub)hHw!_mpFDMIAFB`%Yal+`1IXV>b?%!q^Ps%8nh8wtjVGlF-!5x*D29WJ4=M zZ7X(QvKe$YZNgM(HibD7+VO5Q29?@HzS?k$c|3B@JI6dlLgu5S&LbU4=4p-Yn||z@ z4p05vq*k*pbOV9QjVTMp8`c$?t@~!$8&5AP_sz@tk%a$nWHMh-Gm{WS5+q)5W6pU# za@YZXJCLTpZ}zb=$HCYbIm->?Hu6XIBz_d7)n1+3eSLzGVoNQCTHcu9qS2@({0sxc zu<-mhx@Xz_*(S1DEL|d0`YV7uNevL*Y6|DAQmvSp{4DzPL@>hqJ?`FjvIU;<&}YEKDmFUGSBYjRmK{Km-1m%-t=fFfI9kV|POH|SxvO=P+><+1JK_lt5F6fTPf8PXU+lYEJz__** z&>`4F2F8EWE+k7ZsZx9%!?A56{lsk1juYw5zN)V+g$d^Q^Gm}fnHKA6L^36=`e;p% zp{;JD$X3%}O7qINR*2<>a422}_hmc=)-A7B-1#2v85jN5K31t0DtmqON-Dim`XIR; zOo`KRv)gtn?stp*`^f>}UDnGYGnJAbl(4srd>(5fo2#oqi>#bus86EHfeItFIu$+% z;lE|3gjQA`BXHEE5JdcjCoethN`@NEc~zm6CYf@LJ|hT^1>l}gRl7oDHMnw!*5*IC z@@Mi=gO=lZSnWln`dX^4Bd{9zYG{HNIX-87A#5OM%xu*%V?7K3j3CHcN*t!zNK4N4 z!U2?a>0`8m8}UQshILC0g6-k>8~;SRIJ?vQKDj z@U{DrstWIT7ufyRYox^&*IyHYb$3wtB}V^0sS|1OyK#sDc%sh+(gy&NT9j4Aa7J0C zPe$02TylMjad&|{_oe3`zx)Cqns?6qThYue6U=~j5+l0Po4`bX*&9V@a<-O;;vCzm z(af&;e<^}?5$7&MRW$eb*P< zX|33QmDvFSDFK-qMz|RF|Eedum@~W zt~8C1@i8@LammTr)rAgKm8X_SczCg@+@LeWpcmx;VL;iLQJ;t%Z*|XbNWUnHX|o=Q z%bsXc%bw=pk~8%3aV-w(7E$co9_cHQ$!}Ep6YcoCb7~GQBWl#4D!T8A5!P*tSl4FK zK2CX0mjmosg6TSK@-E-He{dm0?9h{&v~}OX15xgF<1-w4DCypYo22%@;uRq`ZFld- z{Uqof@a@P5dW@kfF-`1B1(!R>(DHb&$UXY%Gd+6r?w8klhP&ldzG*6#l#VuM&`)ki z)f$+Rp?YYog9u==<#MC%1daG#%3EOX9A{7$`_(s#_4mV`xZaB+6YlX`H4{}vq;)TF zo~fR@do6EZIR?413A$V6o^fq&QV7P(bB(9m1969szOosyhZRYciAWXe4@u-}s(LeJpuIkSx)XvjXmvVEseG zJvWN4s|$6r;s(3F+cgeh4DMEq??h!$eb^5h#`whT5d03qfYpol8dCim)A^NG1-H}} z!b)V8DTL2Q8@R2p`y4@CeSVj9;8B5#O?jfl-j<$Quv?Ztwp*)GvQ~|W8i6?-ZV@Lf z8$04U_1m{2|AIu+rd8KW`Qk|P1w(}d%}cjG6cxsTJ3Y&*J^_@bQgXwILWY7w zx+z)v81rZv-|mi>y#p$4S7AA760X?)P&0e{iKcWq4xvv@KA@EWjPGdt8CKvh4}p}~ zdUVzuzkBlU2Z+*hTK214><61~h~9zQ3k+-{Pv~w`#4|YdjTFKc{===9Ml7EMFmE!f zH}U3O{Z`DuJrBZbz~OjSVlD6uZSEeNK8epja_LanEh8v;_$Eg9?g*9ihMoat$#qd^ z?;x?a*y3-pW#6|kF^<$w;2^~s!fc;3D~#&#WYZfK@3;bO{MvmN?>qy%_%v`BVCgfC zdwL~(H14Gr6w(1CX|R;zhZh%?*Q{hxJH`MV2)@Jg$pbqjZeL+LO7^vwgi!@3yn@NT zU91-{;BWIi8bV-j-YR|A9Qs?M?e7Ru&Onl1(Sz(kxAw?LEbd+Le%Z43rZgb2h2m|e z^rblc;4r+}?@tC(YIBB_qpQL?_kg{;zO#6JD9{;HSUgf@zIZ)}Bh4wFZIs>meSd}f z4iF~nD$KAV6CVEw+{YOPrW~~y~Y=?snG4dE3edN$~SXh`!c_F zUsQ1M;ARz&v0mIbfP}aLWZ&cBPU+DU{l+0}_>9DZGL{@}lF6QCtgAg;EWUu`D$Evm znblG}kC!}Mw)bR~U;+S}T9TVc6lXWR!LNMm)nmxr*ORkv#&UO$_WQpt0WdX{A=bjC zV^lB~(r;y!C4$Rk0fWUR|09O?KBos@aFQjUx{ODABcj}h5~ObwM_cS>5;iI^I- zPVEP9qrox2CFbG`T5r_GwQQpoI0>mVc_|$o>zdY5vbE~B%oK26jZ)m=1nu_uLEvZ< z8QI_G?ejz`;^ap+REYQzBo}7CnlSHE_DI5qrR!yVx3J1Jl;`UaLnKp2G$R__fAe;R(9%n zC)#)tvvo-9WUBL~r_=XlhpWhM=WS6B0DItw{1160xd;M(JxX_-a&i%PXO@}rnu73_ zObHBZrH%R!#~pjEp~P?qIj4MdAx@sv;E96Doi$eO-~)oUz%Z0Tr4K`-jl06Il!9{s zdjF*1r{XU?)C(%XKPm;UnpnDGD%QL3pgo0ust~+sB0pa|v37>E1dp*Odn)n=DY;5j zDzSAkU9B6F$;|##_mrDe#%hd7pC1u`{9ZKeDdtkyl&4>H=e)Fq@}$UffPt1#cjYZg zd%O%xpg4~brEr>AnKT)kF@`cdX4tMlZ#Vk!l1Xz!G970p`Gkv^lk-|>jmt0W5Wu6woGf?hNA zXO2?BG)<{`NsYAY#3|L^x*=rS7uWU~s<*UhTC8AYc#lGP-=Aw1I)@y(<` znQb^nL~$rlDbsdAc4nc#{+$_;Z4iY;Pi0i9Q;>ZB3+IjWLg_r40-Fso^xF<*_s7Tj zujFrMH{vW3PmCndjQIscnQE%`Qj|E2kidi#c&PcWIMyH+e#7!l`<$_)*pDP$!49pY6w!bN)j8~A1wV%gIakf+vA04 zV)_Q=QMPSj6$M2Ar#KhhxsbZUOq3nZHh8m0?Fr}I6N(Fk zkhXM(f57yOa8vn^97J+g9ISPa=-**6^8ZX&g=z+m&6~x<1>)MyM&tpbWhSf8#+Pcd4rVK#)NSw>1eLKHTO z44A@sc_}Ypi#ggFRbDRFV(IhOnRU&XPrQYh9`mVMo-^U$&AwsXooSRUFqJ7)XUXCK zFpt;gJ}9QTN9xy9$=3OnRkjgUuQZ`X)!}LBm~WUIEKuK-Z%}f?2?+MKucWU<3)>9G zxsz~2pHut1AmH<@66;LdCB9+dSpojE4ggrYS?%icv*Rpi?G0Q($^`(g<1&Z){O_5B$@f#;I2-+Qa1P$a@=u-vOY5vqo z|6G67X;*A|V86ZET9OpFB&02twZtc2K}~ASoQpM_p{vJ{-XvA8UmQa4Ed%fS{D@g( zr_aY0gKw*=2SIGznXXKFo$r0x3)@bq8@4od^U(L0-jvTsK@qYOWX?2G_>N+?;r{TU2{M>V0zid zB_Zu?WSnRl@k?oE*gsgv;jH@+ z-}BDGyR-ls7$dz{e( ztv7lI2|OxNkLD4zc3xGA`!d7LiSdOys4H!8aA(_c0Nm*uLjS4TW%Z3v>am1nwQ_lI zIs85Uufd;cv-(4wi(Js;QsL#|qdv)n;r_?puaK*1>zTC@d=#sK+q1YF_Q(5B%%3TtI8&bNs_e8vIb;oc|Rk`F~u?|A?jj{c={?{Env{mW#q@8 z)#WEgt4B6b&X2?o3=b`ilz;)-h$t4;hsxPDo-%5C(7m#c9tZF-U`vcx0HnVtf_X(}4Tg}4wx(=y!@T7{)4;I_p95mBhikg-|U9z35q`|!1+Zz@97 z(PFE5jCv|=t;^=(CLqYp)k90rV4ZSiFDAhD8YOCzv{}1WDuB?epORibW36);q(Aig ze27@D?lN-ZyjuB4GsebA$;+(KGiOtCe6Bfd%GKRty>dBS1GUe}MXgnu61UdgO=m1& zE(eECPF_%J-lU{;R)eQJot;;}Wch$-8Z|lxN*AAdc;bkpbD`W}F=Z}^Cy(SKyfF#+ zQSalA%JDDAu|77$M3E|kv==3vx~pFPw_<+9xgcE#oigh*>#QsA2}sTYO7uY(h@dhR zHJBi^bb-`1?<1cGFZJa8Akzs{H^$N<)5@hlXeKwt9hD5^5K&`pdHOI92p<7XhS?>| z(5h9KYctN|H+W~Xh2N4W+yjMyBm(AdewjX?PBuRU$^J zS#+U($K6rhFFzf z0q*kJ>B6xI1qAti?H@X@dxtB7_vT+Nj@PNxr?CSK#xqE6jh5S{`nH#zzvjOId=i1X zK(Yjl!7KF(73GXYLVkQA5irn|v-ArCqwi)CM8X&m!#@NQ3bqmQlfurU4qT`zl_m^C zhpk?mfVvy9L|)*+bW8&NY4lG$@0_PKfO9+~(zrbn?wECGi7472W{H&dRPZum^Qf z73C-TR6$#q>XJgYnUgV!WkbmRas;`TY#7CxPXIEGwT6VPBDKbyr#|C2M%q|7l#Ql< zuM}j=2{D+?SxT8?ZJn&Z%cRN8Gu@y(`zV(lfj1T%g44(d#-g&@O0FL5;I9=?bW>!M z%c3J&e}GThdean-<||jUh zlLP`UeKBhhrQ?HHjM3}kfO7Z=EKB%+rs*t+nuBoeuD2yk%n32SA?-s)4+DsTV7U&K zyKQO2b2*tQT}#((=#fkb%hkRkt^%tY&VK$hcs91+hld zJ%lgC!ooILC&|(Z9$zzk=Q0*%&l7wwyf%nv=`C=OcPjb|Q%@9*XkPGFrn+bxp?t^D z!_qO=e-;bnT)^0d|Ex9X&svN9S8M&R>5l*5Df2H@r2l)VfBO@LqeVw`Fz6TSwAt^I z5Wu6A>LNnF7hq4Ow=7D7LEDv3A))d5!M=lT3ConlFN`5eTQMexVVs* zH0tx-*R+-B@&Lp`0V4j6Uy=LJmLQRY_6tH4vnV{_am%kkv|{CYkF}4Wn6U+|9Xre$ zJkO;_=dtw`@aEs|^GlO-zvpp-73H;PYk}V5RrH83G4SVkRJ0YSluQa8pKejcqB4u~ z^9^lDR|?7vEo|jITtaIFI6}1;vTI6n(d0kDGQUJuk>>sqdd7#VBF;?_dM5i<+VMEq zc>habJK}_0eEsOkdwv48d43jKMnqYFMnYDU&c?vi#Fp+S)sxo1-oVJ*g!X^^K! z>z!G8?KfU{qOnLHhaEF4QRHgOpfvoo7@=FG(2ZefYJk- zZuA9ubiTTP9jw9Uzpx8FfJBFt+NNE9dTlM!$g$|lTD za4LMNxWhw8!AV(x;U`IV-(bK@iQ%#QSmq8D$YqLgt?V#|~% z;{ST}6aQbOoewMKYzZT@8|Qq z@9SNBu1UErolMjrhJW-Id&7y<0I<+Z-lr`IHMh1;M)n@g|hx_T-maO`s{Tuhax}EjC zS;1kdL*A3BW5YZXgD|0zm)g3_3vMs>5xgHUhQDl19lfQWMcfLTsw$)amgDs>bW*Oe+$UK^`ioL%F0Ua5vb%II+EGS>*I zw)AmqcWBZpWH&Aswk_FJT=J|^Gn=MfnDTIzMdnoRUB91MeW?e>+C)g3_FDN8rN$(? zL+kH!*L}rq`MK`KDt^v4nUJg3Ce-`IW0Ph0?|}Puq5WIS_a7iEO;~mGQqqo=Ey;ND zhBXA^$ZrCc#&0}dMA&@)&TCq5PMzgJPafZCg-6$R zRqJ2+_t+dGUAY@~xPzU3`od7-(8nnuMfM-4#u`Q~`l-CUGC7u*^5VwH`ot;Ck#R1% zRr%?;!NrB$w^}NW=GGR}m!3a9bh#wXrq?fF7j-IS?E_!GaD3KYzcXhCUHhjEl-6b# zCmIF#4y@HN=^#uIz zRFl8D)Ri1<(Kr~Hoi_MtXWP8^AyTKxi1)ew88bV{*Ok8w8YLXBFW0sRJ<(vU{$ym| zz)feLQbz3k;_}2_{-bW`h~t&2$ObtlbS?k2k|5Kbu?FZLDMTVW_Z6p#A)c)`3DD?a*hxHS2Zj zcIiebfsINfWvwY7Z{YOlIQ61b`j=%6{>MPs+`()Q{wq0z0?|jwRN(1IrMQsj40BHx zvBC_Xfcr;55&}MeoP_@#nz$avCh%FJfE5NNAE~fW@L7~f8Y=?Wno31128EYOK8+O! zc4Vaj-DCsB6CPH$?pQQVbb_(tg^x{$STYM_WKLtrh-_-Hq-M%Ubpt6$mCHY!B{ISD zz}grIo^bNVDw4={SA2*nDNq5`e@ZO5r4TbQpHM)~qfD9!s0h(Jf>vYd;I~j<2fD4)_>ctbwNX6S*8>i^*4 zYKI5<4}d;hM!!N|A$@eg09J|HV;!UUVIau_I~dxZp#?a3u0G)pts6GKdCNk>FKxdh_`Xu!>zO3Kv?u+W6cYJPy!@=PuY868>3|Zg} z$7galV~M`d!q(`I{;CJsq6G9>W0}H6gVY`q7S@9s8ak1r{>}*Q0JyH&f!f8(NZxhC zkn|KS64r^A1fniFel2KkxYByk%erCx9UgFLI)`yuA)X z8SU?6kj!numPNCAj}>1ipax(t{%rxU;6`(Nqt$~Z4~76TQ$9d8l`yJ}rniII%HbH= zlS_7o!qB{55at^>N!Voer%)`KMh9Yd@Z?~nc19*hs)NGN954`O9zA&&vJHbm&|D@E za(&z6A=3NfC;>I)hlI@ulP8E@W-ziGe{iCf_mHvWGldxw8{ng-hI({EtOdALnD9zG ze)fU?I(DNt)Bzdd9Cs^>!|+2!xv1SK=I zJ+y_;=Sq-zqD~GKy@{5(my&aPgFfGY&_mayR_)?dF_^Fwc-n!UAG+fQQGfjWE-1MF YM{}PByk10KD_nuQ4E7Du?}+~TKh4V)`~Uy| literal 50710 zcmbTd1CVCTmM+|7+wQV$+qP}n>auOywyU~q+qUhh+uxis_~*a##hm*_WW?9E7Pb7N%LRFiwbEGCJ0XP=%-6oeT$XZcYgtzC2~q zk(K08IQL8oTl}>>+hE5YRgXTB@fZ4TH9>7=79e`%%tw*SQUa9~$xKD5rS!;ZG@ocK zQdcH}JX?W|0_Afv?y`-NgLum62B&WSD$-w;O6G0Sm;SMX65z)l%m1e-g8Q$QTI;(Q z+x$xth4KFvH@Bs6(zn!iF#nenk^Y^ce;XIItAoCsow38eq?Y-Auh!1in#Rt-_D>H^ z=EjbclGGGa6VnaMGmMLj`x3NcwA43Jb(0gzl;RUIRAUDcR1~99l2SAPkVhoRMMtN} zXvC<tOmX83grD8GSo_Lo?%lNfhD#EBgPo z*nf@ppMC#B!T)Ae0RG$mlJWmGl7CkuU~B8-==5i;rS;8i6rJ=PoQxf446XDX9g|c> zU64ePyMlsI^V5Jq5A+BPe#e73+kpc_r1tv#B)~EZ;7^67F0*QiYfrk0uVW;Qb=NsG zN>gsuCwvb?s-KQIppEaeXtEMdc9dy6Dfduz-tMTms+i01{eD9JE&h?Kht*$eOl#&L zJdM_-vXs(V#$Ed;5wyNWJdPNh+Z$+;$|%qR(t`4W@kDhd*{(7-33BOS6L$UPDeE_53j${QfKN-0v-HG z(QfyvFNbwPK%^!eIo4ac1;b>c0vyf9}Xby@YY!lkz-UvNp zwj#Gg|4B~?n?G^{;(W;|{SNoJbHTMpQJ*Wq5b{l9c8(%?Kd^1?H1om1de0Da9M;Q=n zUfn{f87iVb^>Exl*nZ0hs(Yt>&V9$Pg`zX`AI%`+0SWQ4Zc(8lUDcTluS z5a_KerZWe}a-MF9#Cd^fi!y3%@RFmg&~YnYZ6<=L`UJ0v={zr)>$A;x#MCHZy1st7 ztT+N07NR+vOwSV2pvWuN1%lO!K#Pj0Fr>Q~R40{bwdL%u9i`DSM4RdtEH#cW)6}+I-eE< z&tZs+(Ogu(H_;$a$!7w`MH0r%h&@KM+<>gJL@O~2K2?VrSYUBbhCn#yy?P)uF3qWU z0o09mIik+kvzV6w>vEZy@&Mr)SgxPzUiDA&%07m17udz9usD82afQEps3$pe!7fUf z0eiidkJ)m3qhOjVHC_M(RYCBO%CZKZXFb8}s0-+}@CIn&EF(rRWUX2g^yZCvl0bI} zbP;1S)iXnRC&}5-Tl(hASKqdSnO?ASGJ*MIhOXIblmEudj(M|W!+I3eDc}7t`^mtg z)PKlaXe(OH+q-)qcQ8a@!llRrpGI8DsjhoKvw9T;TEH&?s=LH0w$EzI>%u;oD@x83 zJL7+ncjI9nn!TlS_KYu5vn%f*@qa5F;| zEFxY&B?g=IVlaF3XNm_03PA)=3|{n-UCgJoTr;|;1AU9|kPE_if8!Zvb}0q$5okF$ zHaJdmO&gg!9oN|M{!qGE=tb|3pVQ8PbL$}e;NgXz<6ZEggI}wO@aBP**2Wo=yN#ZC z4G$m^yaM9g=|&!^ft8jOLuzc3Psca*;7`;gnHm}tS0%f4{|VGEwu45KptfNmwxlE~ z^=r30gi@?cOm8kAz!EylA4G~7kbEiRlRIzwrb~{_2(x^$-?|#e6Bi_**(vyr_~9Of z!n>Gqf+Qwiu!xhi9f53=PM3`3tNF}pCOiPU|H4;pzjcsqbwg*{{kyrTxk<;mx~(;; z1NMrpaQ`57yn34>Jo3b|HROE(UNcQash!0p2-!Cz;{IRv#Vp5!3o$P8!%SgV~k&Hnqhp`5eLjTcy93cK!3Hm-$`@yGnaE=?;*2uSpiZTs_dDd51U%i z{|Zd9ou-;laGS_x=O}a+ zB||za<795A?_~Q=r=coQ+ZK@@ zId~hWQL<%)fI_WDIX#=(WNl!Dm$a&ROfLTd&B$vatq!M-2Jcs;N2vps$b6P1(N}=oI3<3luMTmC|0*{ zm1w8bt7vgX($!0@V0A}XIK)w!AzUn7vH=pZEp0RU0p?}ch2XC-7r#LK&vyc2=-#Q2 z^L%8)JbbcZ%g0Du;|8=q8B>X=mIQirpE=&Ox{TiuNDnOPd-FLI^KfEF729!!0x#Es z@>3ursjFSpu%C-8WL^Zw!7a0O-#cnf`HjI+AjVCFitK}GXO`ME&on|^=~Zc}^LBp9 zj=-vlN;Uc;IDjtK38l7}5xxQF&sRtfn4^TNtnzXv4M{r&ek*(eNbIu!u$>Ed%` z5x7+&)2P&4>0J`N&ZP8$vcR+@FS0126s6+Jx_{{`3ZrIMwaJo6jdrRwE$>IU_JTZ} z(||hyyQ)4Z1@wSlT94(-QKqkAatMmkT7pCycEB1U8KQbFX&?%|4$yyxCtm3=W`$4fiG0WU3yI@c zx{wfmkZAYE_5M%4{J-ygbpH|(|GD$2f$3o_Vti#&zfSGZMQ5_f3xt6~+{RX=$H8at z?GFG1Tmp}}lmm-R->ve*Iv+XJ@58p|1_jRvfEgz$XozU8#iJS})UM6VNI!3RUU!{5 zXB(+Eqd-E;cHQ>)`h0(HO_zLmzR3Tu-UGp;08YntWwMY-9i^w_u#wR?JxR2bky5j9 z3Sl-dQQU$xrO0xa&>vsiK`QN<$Yd%YXXM7*WOhnRdSFt5$aJux8QceC?lA0_if|s> ze{ad*opH_kb%M&~(~&UcX0nFGq^MqjxW?HJIP462v9XG>j(5Gat_)#SiNfahq2Mz2 zU`4uV8m$S~o9(W>mu*=h%Gs(Wz+%>h;R9Sg)jZ$q8vT1HxX3iQnh6&2rJ1u|j>^Qf`A76K%_ubL`Zu?h4`b=IyL>1!=*%!_K)=XC z6d}4R5L+sI50Q4P3upXQ3Z!~1ZXLlh!^UNcK6#QpYt-YC=^H=EPg3)z*wXo*024Q4b2sBCG4I# zlTFFY=kQ>xvR+LsuDUAk)q%5pEcqr(O_|^spjhtpb1#aC& zghXzGkGDC_XDa%t(X`E+kvKQ4zrQ*uuQoj>7@@ykWvF332)RO?%AA&Fsn&MNzmFa$ zWk&&^=NNjxLjrli_8ESU)}U|N{%j&TQmvY~lk!~Jh}*=^INA~&QB9em!in_X%Rl1&Kd~Z(u z9mra#<@vZQlOY+JYUwCrgoea4C8^(xv4ceCXcejq84TQ#sF~IU2V}LKc~Xlr_P=ry zl&Hh0exdCbVd^NPCqNNlxM3vA13EI8XvZ1H9#bT7y*U8Y{H8nwGpOR!e!!}*g;mJ#}T{ekSb}5zIPmye*If(}}_=PcuAW#yidAa^9-`<8Gr0 z)Fz=NiZ{)HAvw{Pl5uu)?)&i&Us$Cx4gE}cIJ}B4Xz~-q7)R_%owbP!z_V2=Aq%Rj z{V;7#kV1dNT9-6R+H}}(ED*_!F=~uz>&nR3gb^Ce%+0s#u|vWl<~JD3MvS0T9thdF zioIG3c#Sdsv;LdtRv3ml7%o$6LTVL>(H`^@TNg`2KPIk*8-IB}X!MT0`hN9Ddf7yN z?J=GxPL!uJ7lqwowsl?iRrh@#5C$%E&h~Z>XQcvFC*5%0RN-Opq|=IwX(dq(*sjs+ zqy99+v~m|6T#zR*e1AVxZ8djd5>eIeCi(b8sUk)OGjAsKSOg^-ugwl2WSL@d#?mdl zib0v*{u-?cq}dDGyZ%$XRY=UkQwt2oGu`zQneZh$=^! zj;!pCBWQNtvAcwcWIBM2y9!*W|8LmQy$H~5BEx)78J`4Z0(FJO2P^!YyQU{*Al+fs z){!4JvT1iLrJ8aU3k0t|P}{RN)_^v%$$r;+p0DY7N8CXzmS*HB*=?qaaF9D@#_$SN zSz{moAK<*RH->%r7xX~9gVW$l7?b|_SYI)gcjf0VAUJ%FcQP(TpBs; zg$25D!Ry_`8xpS_OJdeo$qh#7U+cepZ??TII7_%AXsT$B z=e)Bx#v%J0j``00Zk5hsvv6%T^*xGNx%KN-=pocSoqE5_R)OK%-Pbu^1MNzfds)mL zxz^F4lDKV9D&lEY;I+A)ui{TznB*CE$=9(wgE{m}`^<--OzV-5V4X2w9j(_!+jpTr zJvD*y6;39&T+==$F&tsRKM_lqa1HC}aGL0o`%c9mO=fts?36@8MGm7Vi{Y z^<7m$(EtdSr#22<(rm_(l_(`j!*Pu~Y>>xc>I9M#DJYDJNHO&4=HM%YLIp?;iR&$m z#_$ZWYLfGLt5FJZhr3jpYb`*%9S!zCG6ivNHYzNHcI%khtgHBliM^Ou}ZVD7ehU9 zS+W@AV=?Ro!=%AJ>Kcy9aU3%VX3|XM_K0A+ZaknKDyIS3S-Hw1C7&BSW5)sqj5Ye_ z4OSW7Yu-;bCyYKHFUk}<*<(@TH?YZPHr~~Iy%9@GR2Yd}J2!N9K&CN7Eq{Ka!jdu; zQNB*Y;i(7)OxZK%IHGt#Rt?z`I|A{q_BmoF!f^G}XVeTbe1Wnzh%1g>j}>DqFf;Rp zz7>xIs12@Ke0gr+4-!pmFP84vCIaTjqFNg{V`5}Rdt~xE^I;Bxp4)|cs8=f)1YwHz zqI`G~s2~qqDV+h02b`PQpUE#^^Aq8l%y2|ByQeXSADg5*qMprEAE3WFg0Q39`O+i1 z!J@iV!`Y~C$wJ!5Z+j5$i<1`+@)tBG$JL=!*uk=2k;T<@{|s1$YL079FvK%mPhyHV zP8^KGZnp`(hVMZ;s=n~3r2y;LTwcJwoBW-(ndU-$03{RD zh+Qn$ja_Z^OuMf3Ub|JTY74s&Am*(n{J3~@#OJNYuEVVJd9*H%)oFoRBkySGm`hx! zT3tG|+aAkXcx-2Apy)h^BkOyFTWQVeZ%e2@;*0DtlG9I3Et=PKaPt&K zw?WI7S;P)TWED7aSH$3hL@Qde?H#tzo^<(o_sv_2ci<7M?F$|oCFWc?7@KBj-;N$P zB;q!8@bW-WJY9do&y|6~mEruZAVe$!?{)N9rZZxD-|oltkhW9~nR8bLBGXw<632!l z*TYQn^NnUy%Ds}$f^=yQ+BM-a5X4^GHF=%PDrRfm_uqC zh{sKwIu|O0&jWb27;wzg4w5uA@TO_j(1X?8E>5Zfma|Ly7Bklq|s z9)H`zoAGY3n-+&JPrT!>u^qg9Evx4y@GI4$n-Uk_5wttU1_t?6><>}cZ-U+&+~JE) zPlDbO_j;MoxdLzMd~Ew|1o^a5q_1R*JZ=#XXMzg?6Zy!^hop}qoLQlJ{(%!KYt`MK z8umEN@Z4w!2=q_oe=;QttPCQy3Nm4F@x>@v4sz_jo{4m*0r%J(w1cSo;D_hQtJs7W z><$QrmG^+<$4{d2bgGo&3-FV}avg9zI|Rr(k{wTyl3!M1q+a zD9W{pCd%il*j&Ft z5H$nENf>>k$;SONGW`qo6`&qKs*T z2^RS)pXk9b@(_Fw1bkb)-oqK|v}r$L!W&aXA>IpcdNZ_vWE#XO8X`#Yp1+?RshVcd zknG%rPd*4ECEI0wD#@d+3NbHKxl}n^Sgkx==Iu%}HvNliOqVBqG?P2va zQ;kRJ$J6j;+wP9cS za#m;#GUT!qAV%+rdWolk+)6kkz4@Yh5LXP+LSvo9_T+MmiaP-eq6_k;)i6_@WSJ zlT@wK$zqHu<83U2V*yJ|XJU4farT#pAA&@qu)(PO^8PxEmPD4;Txpio+2)#!9 z>&=i7*#tc0`?!==vk>s7V+PL#S1;PwSY?NIXN2=Gu89x(cToFm))7L;< z+bhAbVD*bD=}iU`+PU+SBobTQ%S!=VL!>q$rfWsaaV}Smz>lO9JXT#`CcH_mRCSf4%YQAw`$^yY z3Y*^Nzk_g$xn7a_NO(2Eb*I=^;4f!Ra#Oo~LLjlcjke*k*o$~U#0ZXOQ5@HQ&T46l z7504MUgZkz2gNP1QFN8Y?nSEnEai^Rgyvl}xZfMUV6QrJcXp;jKGqB=D*tj{8(_pV zqyB*DK$2lgYGejmJUW)*s_Cv65sFf&pb(Yz8oWgDtQ0~k^0-wdF|tj}MOXaN@ydF8 zNr={U?=;&Z?wr^VC+`)S2xl}QFagy;$mG=TUs7Vi2wws5zEke4hTa2)>O0U?$WYsZ z<8bN2bB_N4AWd%+kncgknZ&}bM~eDtj#C5uRkp21hWW5gxWvc6b*4+dn<{c?w9Rmf zIVZKsPl{W2vQAlYO3yh}-{Os=YBnL8?uN5(RqfQ=-1cOiUnJu>KcLA*tQK3FU`_bM zM^T28w;nAj5EdAXFi&Kk1Nnl2)D!M{@+D-}bIEe+Lc4{s;YJc-{F#``iS2uk;2!Zp zF9#myUmO!wCeJIoi^A+T^e~20c+c2C}XltaR!|U-HfDA=^xF97ev}$l6#oY z&-&T{egB)&aV$3_aVA51XGiU07$s9vubh_kQG?F$FycvS6|IO!6q zq^>9|3U^*!X_C~SxX&pqUkUjz%!j=VlXDo$!2VLH!rKj@61mDpSr~7B2yy{>X~_nc zRI+7g2V&k zd**H++P9dg!-AOs3;GM`(g<+GRV$+&DdMVpUxY9I1@uK28$az=6oaa+PutlO9?6#? zf-OsgT>^@8KK>ggkUQRPPgC7zjKFR5spqQb3ojCHzj^(UH~v+!y*`Smv)VpVoPwa6 zWG18WJaPKMi*F6Zdk*kU^`i~NNTfn3BkJniC`yN98L-Awd)Z&mY? zprBW$!qL-OL7h@O#kvYnLsfff@kDIegt~?{-*5A7JrA;#TmTe?jICJqhub-G@e??D zqiV#g{)M!kW1-4SDel7TO{;@*h2=_76g3NUD@|c*WO#>MfYq6_YVUP+&8e4|%4T`w zXzhmVNziAHazWO2qXcaOu@R1MrPP{t)`N)}-1&~mq=ZH=w=;-E$IOk=y$dOls{6sRR`I5>|X zpq~XYW4sd;J^6OwOf**J>a7u$S>WTFPRkjY;BfVgQst)u4aMLR1|6%)CB^18XCz+r ztkYQ}G43j~Q&1em(_EkMv0|WEiKu;z2zhb(L%$F&xWwzOmk;VLBYAZ8lOCziNoPw1 zv2BOyXA`A8z^WH!nXhKXM`t0;6D*-uGds3TYGrm8SPnJJOQ^fJU#}@aIy@MYWz**H zvkp?7I5PE{$$|~{-ZaFxr6ZolP^nL##mHOErB^AqJqn^hFA=)HWj!m3WDaHW$C)i^ z9@6G$SzB=>jbe>4kqr#sF7#K}W*Cg-5y6kun3u&0L7BpXF9=#7IN8FOjWrWwUBZiU zT_se3ih-GBKx+Uw0N|CwP3D@-C=5(9T#BH@M`F2!Goiqx+Js5xC92|Sy0%WWWp={$(am!#l~f^W_oz78HX<0X#7 zp)p1u~M*o9W@O8P{0Qkg@Wa# z2{Heb&oX^CQSZWSFBXKOfE|tsAm#^U-WkDnU;IowZ`Ok4!mwHwH=s|AqZ^YD4!5!@ zPxJj+Bd-q6w_YG`z_+r;S86zwXb+EO&qogOq8h-Ect5(M2+>(O7n7)^dP*ws_3U6v zVsh)sk^@*c>)3EML|0<-YROho{lz@Nd4;R9gL{9|64xVL`n!m$-Jjrx?-Bacp!=^5 z1^T^eB{_)Y<9)y{-4Rz@9_>;_7h;5D+@QcbF4Wv7hu)s0&==&6u)33 zHRj+&Woq-vDvjwJCYES@$C4{$?f$Ibi4G()UeN11rgjF+^;YE^5nYprYoJNoudNj= zm1pXSeG64dcWHObUetodRn1Fw|1nI$D9z}dVEYT0lQnsf_E1x2vBLql7NrHH!n&Sq z6lc*mvU=WS6=v9Lrl}&zRiu_6u;6g%_DU{9b+R z#YHqX7`m9eydf?KlKu6Sb%j$%_jmydig`B*TN`cZL-g!R)iE?+Q5oOqBFKhx z%MW>BC^(F_JuG(ayE(MT{S3eI{cKiwOtPwLc0XO*{*|(JOx;uQOfq@lp_^cZo=FZj z4#}@e@dJ>Bn%2`2_WPeSN7si^{U#H=7N4o%Dq3NdGybrZgEU$oSm$hC)uNDC_M9xc zGzwh5Sg?mpBIE8lT2XsqTt3j3?We8}3bzLBTQd639vyg^$0#1epq8snlDJP2(BF)K zSx30RM+{f+b$g{9usIL8H!hCO117Xgv}ttPJm9wVRjPk;ePH@zxv%j9k5`TzdXLeT zFgFX`V7cYIcBls5WN0Pf6SMBN+;CrQ(|EsFd*xtwr#$R{Z9FP`OWtyNsq#mCgZ7+P z^Yn$haBJ)r96{ZJd8vlMl?IBxrgh=fdq_NF!1{jARCVz>jNdC)H^wfy?R94#MPdUjcYX>#wEx+LB#P-#4S-%YH>t-j+w zOFTI8gX$ard6fAh&g=u&56%3^-6E2tpk*wx3HSCQ+t7+*iOs zPk5ysqE}i*cQocFvA68xHfL|iX(C4h*67@3|5Qwle(8wT&!&{8*{f%0(5gH+m>$tq zp;AqrP7?XTEooYG1Dzfxc>W%*CyL16q|fQ0_jp%%Bk^k!i#Nbi(N9&T>#M{gez_Ws zYK=l}adalV(nH}I_!hNeb;tQFk3BHX7N}}R8%pek^E`X}%ou=cx8InPU1EE0|Hen- zyw8MoJqB5=)Z%JXlrdTXAE)eqLAdVE-=>wGHrkRet}>3Yu^lt$Kzu%$3#(ioY}@Gu zjk3BZuQH&~7H+C*uX^4}F*|P89JX;Hg2U!pt>rDi(n(Qe-c}tzb0#6_ItoR0->LSt zR~UT<-|@TO%O`M+_e_J4wx7^)5_%%u+J=yF_S#2Xd?C;Ss3N7KY^#-vx+|;bJX&8r zD?|MetfhdC;^2WG`7MCgs>TKKN=^=!x&Q~BzmQio_^l~LboTNT=I zC5pme^P@ER``p$2md9>4!K#vV-Fc1an7pl>_|&>aqP}+zqR?+~Z;f2^`a+-!Te%V? z;H2SbF>jP^GE(R1@%C==XQ@J=G9lKX+Z<@5}PO(EYkJh=GCv#)Nj{DkWJM2}F&oAZ6xu8&g7pn1ps2U5srwQ7CAK zN&*~@t{`31lUf`O;2w^)M3B@o)_mbRu{-`PrfNpF!R^q>yTR&ETS7^-b2*{-tZAZz zw@q5x9B5V8Qd7dZ!Ai$9hk%Q!wqbE1F1c96&zwBBaRW}(^axoPpN^4Aw}&a5dMe+*Gomky_l^54*rzXro$ z>LL)U5Ry>~FJi=*{JDc)_**c)-&faPz`6v`YU3HQa}pLtb5K)u%K+BOqXP0)rj5Au$zB zW1?vr?mDv7Fsxtsr+S6ucp2l#(4dnr9sD*v+@*>g#M4b|U?~s93>Pg{{a5|rm2xfI z`>E}?9S@|IoUX{Q1zjm5YJT|3S>&09D}|2~BiMo=z4YEjXlWh)V&qs;*C{`UMxp$9 zX)QB?G$fPD6z5_pNs>Jeh{^&U^)Wbr?2D6-q?)`*1k@!UvwQgl8eG$r+)NnFoT)L6 zg7lEh+E6J17krfYJCSjWzm67hEth24pomhz71|Qodn#oAILN)*Vwu2qpJirG)4Wnv}9GWOFrQg%Je+gNrPl8mw7ykE8{ z=|B4+uwC&bpp%eFcRU6{mxRV32VeH8XxX>v$du<$(DfinaaWxP<+Y97Z#n#U~V zVEu-GoPD=9$}P;xv+S~Ob#mmi$JQmE;Iz4(){y*9pFyW-jjgdk#oG$fl4o9E8bo|L zWjo4l%n51@Kz-n%zeSCD`uB?T%FVk+KBI}=ve zvlcS#wt`U6wrJo}6I6Rwb=1GzZfwE=I&Ne@p7*pH84XShXYJRgvK)UjQL%R9Zbm(m zxzTQsLTON$WO7vM)*vl%Pc0JH7WhP;$z@j=y#avW4X8iqy6mEYr@-}PW?H)xfP6fQ z&tI$F{NNct4rRMSHhaelo<5kTYq+(?pY)Ieh8*sa83EQfMrFupMM@nfEV@EmdHUv9 z35uzIrIuo4#WnF^_jcpC@uNNaYTQ~uZWOE6P@LFT^1@$o&q+9Qr8YR+ObBkpP9=F+$s5+B!mX2~T zAuQ6RenX?O{IlLMl1%)OK{S7oL}X%;!XUxU~xJN8xk z`xywS*naF(J#?vOpB(K=o~lE;m$zhgPWDB@=p#dQIW>xe_p1OLoWInJRKbEuoncf; zmS1!u-ycc1qWnDg5Nk2D)BY%jmOwCLC+Ny>`f&UxFowIsHnOXfR^S;&F(KXd{ODlm z$6#1ccqt-HIH9)|@fHnrKudu!6B$_R{fbCIkSIb#aUN|3RM>zuO>dpMbROZ`^hvS@ z$FU-;e4W}!ubzKrU@R*dW*($tFZ>}dd*4_mv)#O>X{U@zSzQt*83l9mI zI$8O<5AIDx`wo0}f2fsPC_l>ONx_`E7kdXu{YIZbp1$(^oBAH({T~&oQ&1{X951QW zmhHUxd)t%GQ9#ak5fTjk-cahWC;>^Rg7(`TVlvy0W@Y!Jc%QL3Ozu# zDPIqBCy&T2PWBj+d-JA-pxZlM=9ja2ce|3B(^VCF+a*MMp`(rH>Rt6W1$;r{n1(VK zLs>UtkT43LR2G$AOYHVailiqk7naz2yZGLo*xQs!T9VN5Q>eE(w zw$4&)&6xIV$IO^>1N-jrEUg>O8G4^@y+-hQv6@OmF@gy^nL_n1P1-Rtyy$Bl;|VcV zF=p*&41-qI5gG9UhKmmnjs932!6hceXa#-qfK;3d*a{)BrwNFeKU|ge?N!;zk+kB! zMD_uHJR#%b54c2tr~uGPLTRLg$`fupo}cRJeTwK;~}A>(Acy4k-Xk&Aa1&eWYS1ULWUj@fhBiWY$pdfy+F z@G{OG{*v*mYtH3OdUjwEr6%_ZPZ3P{@rfbNPQG!BZ7lRyC^xlMpWH`@YRar`tr}d> z#wz87t?#2FsH-jM6m{U=gp6WPrZ%*w0bFm(T#7m#v^;f%Z!kCeB5oiF`W33W5Srdt zdU?YeOdPG@98H7NpI{(uN{FJdu14r(URPH^F6tOpXuhU7T9a{3G3_#Ldfx_nT(Hec zo<1dyhsVsTw;ZkVcJ_0-h-T3G1W@q)_Q30LNv)W?FbMH+XJ* zy=$@39Op|kZv`Rt>X`zg&at(?PO^I=X8d9&myFEx#S`dYTg1W+iE?vt#b47QwoHI9 zNP+|3WjtXo{u}VG(lLUaW0&@yD|O?4TS4dfJI`HC-^q;M(b3r2;7|FONXphw-%7~* z&;2!X17|05+kZOpQ3~3!Nb>O94b&ZSs%p)TK)n3m=4eiblVtSx@KNFgBY_xV6ts;NF;GcGxMP8OKV^h6LmSb2E#Qnw ze!6Mnz7>lE9u{AgQ~8u2zM8CYD5US8dMDX-5iMlgpE9m*s+Lh~A#P1er*rF}GHV3h z=`STo?kIXw8I<`W0^*@mB1$}pj60R{aJ7>C2m=oghKyxMbFNq#EVLgP0cH3q7H z%0?L93-z6|+jiN|@v>ix?tRBU(v-4RV`}cQH*fp|)vd3)8i9hJ3hkuh^8dz{F5-~_ zUUr1T3cP%cCaTooM8dj|4*M=e6flH0&8ve32Q)0dyisl))XkZ7Wg~N}6y`+Qi2l+e zUd#F!nJp{#KIjbQdI`%oZ`?h=5G^kZ_uN`<(`3;a!~EMsWV|j-o>c?x#;zR2ktiB! z);5rrHl?GPtr6-o!tYd|uK;Vbsp4P{v_4??=^a>>U4_aUXPWQ$FPLE4PK$T^3Gkf$ zHo&9$U&G`d(Os6xt1r?sg14n)G8HNyWa^q8#nf0lbr4A-Fi;q6t-`pAx1T*$eKM*$ z|CX|gDrk#&1}>5H+`EjV$9Bm)Njw&7-ZR{1!CJTaXuP!$Pcg69`{w5BRHysB$(tWUes@@6aM69kb|Lx$%BRY^-o6bjH#0!7b;5~{6J+jKxU!Kmi# zndh@+?}WKSRY2gZ?Q`{(Uj|kb1%VWmRryOH0T)f3cKtG4oIF=F7RaRnH0Rc_&372={_3lRNsr95%ZO{IX{p@YJ^EI%+gvvKes5cY+PE@unghjdY5#9A!G z70u6}?zmd?v+{`vCu-53_v5@z)X{oPC@P)iA3jK$`r zSA2a7&!^zmUiZ82R2=1cumBQwOJUPz5Ay`RLfY(EiwKkrx%@YN^^XuET;tE zmr-6~I7j!R!KrHu5CWGSChO6deaLWa*9LLJbcAJsFd%Dy>a!>J`N)Z&oiU4OEP-!Ti^_!p}O?7`}i7Lsf$-gBkuY*`Zb z7=!nTT;5z$_5$=J=Ko+Cp|Q0J=%oFr>hBgnL3!tvFoLNhf#D0O=X^h+x08iB;@8pXdRHxX}6R4k@i6%vmsQwu^5z zk1ip`#^N)^#Lg#HOW3sPI33xqFB4#bOPVnY%d6prwxf;Y-w9{ky4{O6&94Ra8VN@K zb-lY;&`HtxW@sF!doT5T$2&lIvJpbKGMuDAFM#!QPXW87>}=Q4J3JeXlwHys?!1^#37q_k?N@+u&Ns20pEoBeZC*np;i;M{2C0Z4_br2gsh6eL z#8`#sn41+$iD?^GL%5?cbRcaa-Nx0vE(D=*WY%rXy3B%gNz0l?#noGJGP728RMY#q z=2&aJf@DcR?QbMmN)ItUe+VM_U!ryqA@1VVt$^*xYt~-qvW!J4Tp<-3>jT=7Zow5M z8mSKp0v4b%a8bxFr>3MwZHSWD73D@+$5?nZAqGM#>H@`)mIeC#->B)P8T$zh-Pxnc z8)~Zx?TWF4(YfKuF3WN_ckpCe5;x4V4AA3(i$pm|78{%!q?|~*eH0f=?j6i)n~Hso zmTo>vqEtB)`%hP55INf7HM@taH)v`Fw40Ayc*R!T?O{ziUpYmP)AH`euTK!zg9*6Z z!>M=$3pd0!&TzU=hc_@@^Yd3eUQpX4-33}b{?~5t5lgW=ldJ@dUAH%`l5US1y_`40 zs(X`Qk}vvMDYYq+@Rm+~IyCX;iD~pMgq^KY)T*aBz@DYEB={PxA>)mI6tM*sx-DmGQHEaHwRrAmNjO!ZLHO4b;;5mf@zzlPhkP($JeZGE7 z?^XN}Gf_feGoG~BjUgVa*)O`>lX=$BSR2)uD<9 z>o^|nb1^oVDhQbfW>>!;8-7<}nL6L^V*4pB=>wwW+RXAeRvKED(n1;R`A6v$6gy0I(;Vf?!4;&sgn7F%LpM}6PQ?0%2Z@b{It<(G1CZ|>913E0nR2r^Pa*Bp z@tFGi*CQ~@Yc-?{cwu1 zsilf=k^+Qs>&WZG(3WDixisHpR>`+ihiRwkL(3T|=xsoNP*@XX3BU8hr57l3k;pni zI``=3Nl4xh4oDj<%>Q1zYXHr%Xg_xrK3Nq?vKX3|^Hb(Bj+lONTz>4yhU-UdXt2>j z<>S4NB&!iE+ao{0Tx^N*^|EZU;0kJkx@zh}S^P{ieQjGl468CbC`SWnwLRYYiStXm zOxt~Rb3D{dz=nHMcY)#r^kF8|q8KZHVb9FCX2m^X*(|L9FZg!5a7((!J8%MjT$#Fs)M1Pb zq6hBGp%O1A+&%2>l0mpaIzbo&jc^!oN^3zxap3V2dNj3x<=TwZ&0eKX5PIso9j1;e zwUg+C&}FJ`k(M|%%}p=6RPUq4sT3-Y;k-<68ciZ~_j|bt>&9ZLHNVrp#+pk}XvM{8 z`?k}o-!if>hVlCP9j%&WI2V`5SW)BCeR5>MQhF)po=p~AYN%cNa_BbV6EEh_kk^@a zD>4&>uCGCUmyA-c)%DIcF4R6!>?6T~Mj_m{Hpq`*(wj>foHL;;%;?(((YOxGt)Bhx zuS+K{{CUsaC++%}S6~CJ=|vr(iIs-je)e9uJEU8ZJAz)w166q)R^2XI?@E2vUQ!R% zn@dxS!JcOimXkWJBz8Y?2JKQr>`~SmE2F2SL38$SyR1^yqj8_mkBp)o$@+3BQ~Mid z9U$XVqxX3P=XCKj0*W>}L0~Em`(vG<>srF8+*kPrw z20{z(=^w+ybdGe~Oo_i|hYJ@kZl*(9sHw#Chi&OIc?w`nBODp?ia$uF%Hs(X>xm?j zqZQ`Ybf@g#wli`!-al~3GWiE$K+LCe=Ndi!#CVjzUZ z!sD2O*;d28zkl))m)YN7HDi^z5IuNo3^w(zy8 zszJG#mp#Cj)Q@E@r-=NP2FVxxEAeOI2e=|KshybNB6HgE^(r>HD{*}S}mO>LuRGJT{*tfTzw_#+er-0${}%YPe@CMJ1Ng#j#)i)SnY@ss3gL;g zg2D~#Kpdfu#G;q1qz_TwSz1VJT(b3zby$Vk&;Y#1(A)|xj`_?i5YQ;TR%jice5E;0 zYHg;`zS5{S*9xI6o^j>rE8Ua*XhIw{_-*&@(R|C(am8__>+Ws&Q^ymy*X4~hR2b5r zm^p3sw}yv=tdyncy_Ui7{BQS732et~Z_@{-IhHDXAV`(Wlay<#hb>%H%WDi+K$862nA@BDtM#UCKMu+kM`!JHyWSi?&)A7_ z3{cyNG%a~nnH_!+;g&JxEMAmh-Z}rC!o7>OVzW&PoMyTA_g{hqXG)SLraA^OP**<7 zjWbr7z!o2n3hnx7A=2O=WL;`@9N{vQIM@&|G-ljrPvIuJHYtss0Er0fT5cMXNUf1B z7FAwBDixt0X7C3S)mPe5g`YtME23wAnbU)+AtV}z+e8G;0BP=bI;?(#|Ep!vVfDbK zvx+|CKF>yt0hWQ3drchU#XBU+HiuG*V^snFAPUp-5<#R&BUAzoB!aZ+e*KIxa26V}s6?nBK(U-7REa573wg-jqCg>H8~>O{ z*C0JL-?X-k_y%hpUFL?I>0WV{oV`Nb)nZbJG01R~AG>flIJf)3O*oB2i8~;!P?Wo_ z0|QEB*fifiL6E6%>tlAYHm2cjTFE@*<);#>689Z6S#BySQ@VTMhf9vYQyLeDg1*F} zjq>i1*x>5|CGKN{l9br3kB0EHY|k4{%^t7-uhjd#NVipUZa=EUuE5kS1_~qYX?>hJ z$}!jc9$O$>J&wnu0SgfYods^z?J4X;X7c77Me0kS-dO_VUQ39T(Kv(Y#s}Qqz-0AH z^?WRL(4RzpkD+T5FG_0NyPq-a-B7A5LHOCqwObRJi&oRi(<;OuIN7SV5PeHU$<@Zh zPozEV`dYmu0Z&Tqd>t>8JVde9#Pt+l95iHe$4Xwfy1AhI zDM4XJ;bBTTvRFtW>E+GzkN)9k!hA5z;xUOL2 zq4}zn-DP{qc^i|Y%rvi|^5k-*8;JZ~9a;>-+q_EOX+p1Wz;>i7c}M6Nv`^NY&{J-> z`(mzDJDM}QPu5i44**2Qbo(XzZ-ZDu%6vm8w@DUarqXj41VqP~ zs&4Y8F^Waik3y1fQo`bVUH;b=!^QrWb)3Gl=QVKr+6sxc=ygauUG|cm?|X=;Q)kQ8 zM(xrICifa2p``I7>g2R~?a{hmw@{!NS5`VhH8+;cV(F>B94M*S;5#O`YzZH1Z%yD? zZ61w(M`#aS-*~Fj;x|J!KM|^o;MI#Xkh0ULJcA?o4u~f%Z^16ViA27FxU5GM*rKq( z7cS~MrZ=f>_OWx8j#-Q3%!aEU2hVuTu(7`TQk-Bi6*!<}0WQi;_FpO;fhpL4`DcWp zGOw9vx0N~6#}lz(r+dxIGZM3ah-8qrqMmeRh%{z@dbUD2w15*_4P?I~UZr^anP}DB zU9CCrNiy9I3~d#&!$DX9e?A});BjBtQ7oGAyoI$8YQrkLBIH@2;lt4E^)|d6Jwj}z z&2_E}Y;H#6I4<10d_&P0{4|EUacwFHauvrjAnAm6yeR#}f}Rk27CN)vhgRqEyPMMS7zvunj2?`f;%?alsJ+-K+IzjJx>h8 zu~m_y$!J5RWAh|C<6+uiCNsOKu)E72M3xKK(a9Okw3e_*O&}7llNV!=P87VM2DkAk zci!YXS2&=P0}Hx|wwSc9JP%m8dMJA*q&VFB0yMI@5vWoAGraygwn){R+Cj6B1a2Px z5)u(K5{+;z2n*_XD!+Auv#LJEM)(~Hx{$Yb^ldQmcYF2zNH1V30*)CN_|1$v2|`LnFUT$%-tO0Eg|c5$BB~yDfzS zcOXJ$wpzVK0MfTjBJ0b$r#_OvAJ3WRt+YOLlJPYMx~qp>^$$$h#bc|`g0pF-Ao43? z>*A+8lx>}L{p(Tni2Vvk)dtzg$hUKjSjXRagj)$h#8=KV>5s)J4vGtRn5kP|AXIz! zPgbbVxW{2o4s-UM;c#We8P&mPN|DW7_uLF!a|^0S=wr6Esx9Z$2|c1?GaupU6$tb| zY_KU`(_29O_%k(;>^|6*pZURH3`@%EuKS;Ns z1lujmf;r{qAN&Q0&m{wJSZ8MeE7RM5+Sq;ul_ z`+ADrd_Um+G37js6tKsArNB}n{p*zTUxQr>3@wA;{EUbjNjlNd6$Mx zg0|MyU)v`sa~tEY5$en7^PkC=S<2@!nEdG6L=h(vT__0F=S8Y&eM=hal#7eM(o^Lu z2?^;05&|CNliYrq6gUv;|i!(W{0N)LWd*@{2q*u)}u*> z7MQgk6t9OqqXMln?zoMAJcc zMKaof_Up})q#DzdF?w^%tTI7STI^@8=Wk#enR*)&%8yje>+tKvUYbW8UAPg55xb70 zEn5&Ba~NmOJlgI#iS8W3-@N%>V!#z-ZRwfPO1)dQdQkaHsiqG|~we2ALqG7Ruup(DqSOft2RFg_X%3w?6VqvV1uzX_@F(diNVp z4{I|}35=11u$;?|JFBEE*gb;T`dy+8gWJ9~pNsecrO`t#V9jW-6mnfO@ff9od}b(3s4>p0i30gbGIv~1@a^F2kl7YO;DxmF3? zWi-RoXhzRJV0&XE@ACc?+@6?)LQ2XNm4KfalMtsc%4!Fn0rl zpHTrHwR>t>7W?t!Yc{*-^xN%9P0cs0kr=`?bQ5T*oOo&VRRu+1chM!qj%2I!@+1XF z4GWJ=7ix9;Wa@xoZ0RP`NCWw0*8247Y4jIZ>GEW7zuoCFXl6xIvz$ezsWgKdVMBH> z{o!A7f;R-@eK9Vj7R40xx)T<2$?F2E<>Jy3F;;=Yt}WE59J!1WN367 zA^6pu_zLoZIf*x031CcwotS{L8bJE(<_F%j_KJ2P_IusaZXwN$&^t716W{M6X2r_~ zaiMwdISX7Y&Qi&Uh0upS3TyEIXNDICQlT5fHXC`aji-c{U(J@qh-mWl-uMN|T&435 z5)a1dvB|oe%b2mefc=Vpm0C%IUYYh7HI*;3UdgNIz}R##(#{(_>82|zB0L*1i4B5j-xi9O4x10rs_J6*gdRBX=@VJ+==sWb&_Qc6tSOowM{BX@(zawtjl zdU!F4OYw2@Tk1L^%~JCwb|e#3CC>srRHQ*(N%!7$Mu_sKh@|*XtR>)BmWw!;8-mq7 zBBnbjwx8Kyv|hd*`5}84flTHR1Y@@uqjG`UG+jN_YK&RYTt7DVwfEDXDW4U+iO{>K zw1hr{_XE*S*K9TzzUlJH2rh^hUm2v7_XjwTuYap|>zeEDY$HOq3X4Tz^X}E9z)x4F zs+T?Ed+Hj<#jY-`Va~fT2C$=qFT-5q$@p9~0{G&eeL~tiIAHXA!f6C(rAlS^)&k<- zXU|ZVs}XQ>s5iONo~t!XXZgtaP$Iau;JT%h)>}v54yut~pykaNye4axEK#5@?TSsQ zE;Jvf9I$GVb|S`7$pG)4vgo9NXsKr?u=F!GnA%VS2z$@Z(!MR9?EPcAqi5ft)Iz6sNl`%kj+_H-X`R<>BFrBW=fSlD|{`D%@Rcbu2?%>t7i34k?Ujb)2@J-`j#4 zLK<69qcUuniIan-$A1+fR=?@+thwDIXtF1Tks@Br-xY zfB+zblrR(ke`U;6U~-;p1Kg8Lh6v~LjW@9l2P6s+?$2!ZRPX`(ZkRGe7~q(4&gEi<$ch`5kQ?*1=GSqkeV z{SA1EaW_A!t{@^UY2D^YO0(H@+kFVzZaAh0_`A`f(}G~EP~?B|%gtxu&g%^x{EYSz zk+T;_c@d;+n@$<>V%P=nk36?L!}?*=vK4>nJSm+1%a}9UlmTJTrfX4{Lb7smNQn@T zw9p2%(Zjl^bWGo1;DuMHN(djsEm)P8mEC2sL@KyPjwD@d%QnZ$ zMJ3cnn!_!iP{MzWk%PI&D?m?C(y2d|2VChluN^yHya(b`h>~GkI1y;}O_E57zOs!{ zt2C@M$^PR2U#(dZmA-sNreB@z-yb0Bf7j*yONhZG=onhx>t4)RB`r6&TP$n zgmN*)eCqvgriBO-abHQ8ECN0bw?z5Bxpx z=jF@?zFdVn?@gD5egM4o$m`}lV(CWrOKKq(sv*`mNcHcvw&Xryfw<{ch{O&qc#WCTXX6=#{MV@q#iHYba!OUY+MGeNTjP%Fj!WgM&`&RlI^=AWTOqy-o zHo9YFt!gQ*p7{Fl86>#-JLZo(b^O`LdFK~OsZBRR@6P?ad^Ujbqm_j^XycM4ZHFyg ziUbIFW#2tj`65~#2V!4z7DM8Z;fG0|APaQ{a2VNYpNotB7eZ5kp+tPDz&Lqs0j%Y4tA*URpcfi z_M(FD=fRGdqf430j}1z`O0I=;tLu81bwJXdYiN7_&a-?ly|-j*+=--XGvCq#32Gh(=|qj5F?kmihk{%M&$}udW5)DHK zF_>}5R8&&API}o0osZJRL3n~>76nUZ&L&iy^s>PMnNcYZ|9*1$v-bzbT3rpWsJ+y{ zPrg>5Zlery96Um?lc6L|)}&{992{_$J&=4%nRp9BAC6!IB=A&=tF>r8S*O-=!G(_( zwXbX_rGZgeiK*&n5E;f=k{ktyA1(;x_kiMEt0*gpp_4&(twlS2e5C?NoD{n>X2AT# zY@Zp?#!b1zNq96MQqeO*M1MMBin5v#RH52&Xd~DO6-BZLnA6xO1$sou(YJ1Dlc{WF zVa%2DyYm`V#81jP@70IJ;DX@y*iUt$MLm)ByAD$eUuji|5{ptFYq(q)mE(5bOpxjM z^Q`AHWq44SG3`_LxC9fwR)XRVIp=B%<(-lOC3jI#bb@dK(*vjom!=t|#<@dZql%>O z15y^{4tQoeW9Lu%G&V$90x6F)xN6y_oIn;!Q zs)8jT$;&;u%Y>=T3hg34A-+Y*na=|glcStr5D;&5*t5*DmD~x;zQAV5{}Ya`?RRGa zT*t9@$a~!co;pD^!J5bo?lDOWFx%)Y=-fJ+PDGc0>;=q=s?P4aHForSB+)v0WY2JH z?*`O;RHum6j%#LG)Vu#ciO#+jRC3!>T(9fr+XE7T2B7Z|0nR5jw@WG)kDDzTJ=o4~ zUpeyt7}_nd`t}j9BKqryOha{34erm)RmST)_9Aw)@ zHbiyg5n&E{_CQR@h<}34d7WM{s{%5wdty1l+KX8*?+-YkNK2Be*6&jc>@{Fd;Ps|| z26LqdI3#9le?;}risDq$K5G3yoqK}C^@-8z^wj%tdgw-6@F#Ju{Sg7+y)L?)U$ez> zoOaP$UFZ?y5BiFycir*pnaAaY+|%1%8&|(@VB)zweR%?IidwJyK5J!STzw&2RFx zZV@qeaCB01Hu#U9|1#=Msc8Pgz5P*4Lrp!Q+~(G!OiNR{qa7|r^H?FC6gVhkk3y7=uW#Sh;&>78bZ}aK*C#NH$9rX@M3f{nckYI+5QG?Aj1DM)@~z_ zw!UAD@gedTlePB*%4+55naJ8ak_;))#S;4ji!LOqY5VRI){GMwHR~}6t4g>5C_#U# ztYC!tjKjrKvRy=GAsJVK++~$|+s!w9z3H4G^mACv=EErXNSmH7qN}%PKcN|8%9=i)qS5+$L zu&ya~HW%RMVJi4T^pv?>mw*Gf<)-7gf#Qj|e#w2|v4#t!%Jk{&xlf;$_?jW*n!Pyx zkG$<18kiLOAUPuFfyu-EfWX%4jYnjBYc~~*9JEz6oa)_R|8wjZA|RNrAp%}14L7fW zi7A5Wym*K+V8pkqqO-X#3ft{0qs?KVt^)?kS>AicmeO&q+~J~ zp0YJ_P~_a8j= zsAs~G=8F=M{4GZL{|B__UorX@MRNQLn?*_gym4aW(~+i13knnk1P=khoC-ViMZk+x zLW(l}oAg1H`dU+Fv**;qw|ANDSRs>cGqL!Yw^`; zv;{E&8CNJcc)GHzTYM}f&NPw<6j{C3gaeelU#y!M)w-utYEHOCCJo|Vgp7K6C_$14 zqIrLUB0bsgz^D%V%fbo2f9#yb#CntTX?55Xy|Kps&Xek*4_r=KDZ z+`TQuv|$l}MWLzA5Ay6Cvsa^7xvwXpy?`w(6vx4XJ zWuf1bVSb#U8{xlY4+wlZ$9jjPk)X_;NFMqdgq>m&W=!KtP+6NL57`AMljW+es zzqjUjgz;V*kktJI?!NOg^s_)ph45>4UDA!Vo0hn>KZ+h-3=?Y3*R=#!fOX zP$Y~+14$f66ix?UWB_6r#fMcC^~X4R-<&OD1CSDNuX~y^YwJ>sW0j`T<2+3F9>cLo z#!j57$ll2K9(%$4>eA7(>FJX5e)pR5&EZK!IMQzOfik#FU*o*LGz~7u(8}XzIQRy- z!U7AlMTIe|DgQFmc%cHy_9^{o`eD%ja_L>ckU6$O4*U**o5uR7`FzqkU8k4gxtI=o z^P^oGFPm5jwZMI{;nH}$?p@uV8FT4r=|#GziKXK07bHJLtK}X%I0TON$uj(iJ`SY^ zc$b2CoxCQ>7LH@nxcdW&_C#fMYBtTxcg46dL{vf%EFCZ~eErMvZq&Z%Lhumnkn^4A zsx$ay(FnN7kYah}tZ@0?-0Niroa~13`?hVi6`ndno`G+E8;$<6^gsE-K3)TxyoJ4M zb6pj5=I8^FD5H@`^V#Qb2^0cx7wUz&cruA5g>6>qR5)O^t1(-qqP&1g=qvY#s&{bx zq8Hc%LsbK1*%n|Y=FfojpE;w~)G0-X4i*K3{o|J7`krhIOd*c*$y{WIKz2n2*EXEH zT{oml3Th5k*vkswuFXdGDlcLj15Nec5pFfZ*0?XHaF_lVuiB%Pv&p7z)%38}%$Gup zVTa~C8=cw%6BKn_|4E?bPNW4PT7}jZQLhDJhvf4z;~L)506IE0 zX!tWXX(QOQPRj-p80QG79t8T2^az4Zp2hOHziQlvT!|H)jv{Ixodabzv6lBj)6WRB z{)Kg@$~~(7$-az?lw$4@L%I&DI0Lo)PEJJziWP33a3azb?jyXt1v0N>2kxwA6b%l> zZqRpAo)Npi&loWbjFWtEV)783BbeIAhqyuc+~>i7aQ8shIXt)bjCWT6$~ro^>99G} z2XfmT0(|l!)XJb^E!#3z4oEGIsL(xd; zYX1`1I(cG|u#4R4T&C|m*9KB1`UzKvho5R@1eYtUL9B72{i(ir&ls8g!pD ztR|25xGaF!4z5M+U@@lQf(12?xGy`!|3E}7pI$k`jOIFjiDr{tqf0va&3pOn6Pu)% z@xtG2zjYuJXrV)DUrIF*y<1O1<$#54kZ#2;=X51J^F#0nZ0(;S$OZDt_U2bx{RZ=Q zMMdd$fH|!s{ zXq#l;{`xfV`gp&C>A`WrQU?d{!Ey5(1u*VLJt>i27aZ-^&2IIk=zP5p+{$q(K?2(b z8?9h)kvj9SF!Dr zoyF}?V|9;6abHxWk2cEvGs$-}Pg}D+ZzgkaN&$Snp%;5m%zh1E#?Wac-}x?BYlGN#U#Mek*}kek#I9XaHt?mz3*fDrRTQ#&#~xyeqJk1QJ~E$7qsw6 z?sV;|?*=-{M<1+hXoj?@-$y+(^BJ1H~wQ9G8C0#^aEAyhDduNX@haoa=PuPp zYsGv8UBfQaRHgBgLjmP^eh>fLMeh{8ic)?xz?#3kX-D#Z{;W#cd_`9OMFIaJg-=t`_3*!YDgtNQ2+QUEAJB9M{~AvT$H`E)IKmCR21H532+ata8_i_MR@ z2Xj<3w<`isF~Ah$W{|9;51ub*f4#9ziKrOR&jM{x7I_7()O@`F*5o$KtZ?fxU~g`t zUovNEVKYn$U~VX8eR)qb`7;D8pn*Pp$(otYTqL)5KH$lUS-jf}PGBjy$weoceAcPp z&5ZYB$r&P$MN{0H0AxCe4Qmd3T%M*5d4i%#!nmBCN-WU-4m4Tjxn-%j3HagwTxCZ9 z)j5vO-C7%s%D!&UfO>bi2oXiCw<-w{vVTK^rVbv#W=WjdADJy8$khnU!`ZWCIU`># zyjc^1W~pcu>@lDZ{zr6gv%)2X4n27~Ve+cQqcND%0?IFSP4sH#yIaXXYAq^z3|cg` z`I3$m%jra>e2W-=DiD@84T!cb%||k)nPmEE09NC%@PS_OLhkrX*U!cgD*;;&gIaA(DyVT4QD+q_xu z>r`tg{hiGY&DvD-)B*h+YEd+Zn)WylQl}<4>(_NlsKXCRV;a)Rcw!wtelM2_rWX`j zTh5A|i6=2BA(iMCnj_fob@*eA;V?oa4Z1kRBGaU07O70fb6-qmA$Hg$ps@^ka1=RO zTbE_2#)1bndC3VuK@e!Sftxq4=Uux}fDxXE#Q5_x=E1h>T5`DPHz zbH<_OjWx$wy7=%0!mo*qH*7N4tySm+R0~(rbus`7;+wGh;C0O%x~fEMkt!eV>U$`i z5>Q(o z=t$gPjgGh0&I7KY#k50V7DJRX<%^X z>6+ebc9efB3@eE2Tr){;?_w`vhgF>`-GDY(YkR{9RH(MiCnyRtd!LxXJ75z+?2 zGi@m^+2hKJ5sB1@Xi@s_@p_Kwbc<*LQ_`mr^Y%j}(sV_$`J(?_FWP)4NW*BIL~sR>t6 zM;qTJZ~GoY36&{h-Pf}L#y2UtR}>ZaI%A6VkU>vG4~}9^i$5WP2Tj?Cc}5oQxe2=q z8BeLa$hwCg_psjZyC2+?yX4*hJ58Wu^w9}}7X*+i5Rjqu5^@GzXiw#SUir1G1`jY% zOL=GE_ENYxhcyUrEt9XlMNP6kx6h&%6^u3@zB8KUCAa18T(R2J`%JjWZ z!{7cXaEW+Qu*iJPu+m>QqW}Lo$4Z+!I)0JNzZ&_M%=|B1yejFRM04bGAvu{=lNPd+ zJRI^DRQ(?FcVUD+bgEcAi@o(msqys9RTCG#)TjI!9~3-dc`>gW;HSJuQvH~d`MQs86R$|SKXHh zqS9Qy)u;T`>>a!$LuaE2keJV%;8g)tr&Nnc;EkvA-RanHXsy)D@XN0a>h}z2j81R; zsUNJf&g&rKpuD0WD@=dDrPHdBoK42WoBU|nMo17o(5^;M|dB4?|FsAGVrSyWcI`+FVw^vTVC`y}f(BwJl zrw3Sp151^9=}B})6@H*i4-dIN_o^br+BkcLa^H56|^2XsT0dESw2 zMX>(KqNl=x2K5=zIKg}2JpGAZu{I_IO}0$EQ5P{4zol**PCt3F4`GX}2@vr8#Y)~J zKb)gJeHcFnR@4SSh%b;c%J`l=W*40UPjF#q{<}ywv-=vHRFmDjv)NtmC zQx9qm)d%0zH&qG7AFa3VAU1S^(n8VFTC~Hb+HjYMjX8r#&_0MzlNR*mnLH5hi}`@{ zK$8qiDDvS_(L9_2vHgzEQ${DYSE;DqB!g*jhJghE&=LTnbgl&Xepo<*uRtV{2wDHN z)l;Kg$TA>Y|K8Lc&LjWGj<+bp4Hiye_@BfU(y#nF{fpR&|Ltbye?e^j0}8JC4#xi% zv29ZR%8%hk=3ZDvO-@1u8KmQ@6p%E|dlHuy#H1&MiC<*$YdLkHmR#F3ae;bKd;@*i z2_VfELG=B}JMLCO-6UQy^>RDE%K4b>c%9ki`f~Z2Qu8hO7C#t%Aeg8E%+}6P7Twtg z-)dj(w}_zFK&86KR@q9MHicUAucLVshUdmz_2@32(V`y3`&Kf8Q2I)+!n0mR=rrDU zXvv^$ho;yh*kNqJ#r1}b0|i|xRUF6;lhx$M*uG3SNLUTC@|htC z-=fsw^F%$qqz4%QdjBrS+ov}Qv!z00E+JWas>p?z@=t!WWU3K*?Z(0meTuTOC7OTx zU|kFLE0bLZ+WGcL$u4E}5dB0g`h|uwv3=H6f+{5z9oLv-=Q45+n~V4WwgO=CabjM% zBAN+RjM65(-}>Q2V#i1Na@a0`08g&y;W#@sBiX6Tpy8r}*+{RnyGUT`?XeHSqo#|J z^ww~c;ou|iyzpErDtlVU=`8N7JSu>4M z_pr9=tX0edVn9B}YFO2y(88j#S{w%E8vVOpAboK*27a7e4Ekjt0)hIX99*1oE;vex z7#%jhY=bPijA=Ce@9rRO(Vl_vnd00!^TAc<+wVvRM9{;hP*rqEL_(RzfK$er_^SN; z)1a8vo8~Dr5?;0X0J62Cusw$A*c^Sx1)dom`-)Pl7hsW4i(r*^Mw`z5K>!2ixB_mu z*Ddqjh}zceRFdmuX1akM1$3>G=#~|y?eYv(e-`Qy?bRHIq=fMaN~fB zUa6I8Rt=)jnplP>yuS+P&PxeWpJ#1$F`iqRl|jF$WL_aZFZl@kLo&d$VJtu&w?Q0O zzuXK>6gmygq(yXJy0C1SL}T8AplK|AGNUOhzlGeK_oo|haD@)5PxF}rV+5`-w{Aag zus45t=FU*{LguJ11Sr-28EZkq;!mJO7AQGih1L4rEyUmp>B!%X0YemsrV3QFvlgt* z5kwlPzaiJ+kZ^PMd-RRbl(Y?F*m`4*UIhIuf#8q>H_M=fM*L_Op-<_r zBZagV=4B|EW+KTja?srADTZXCd3Yv%^Chfpi)cg{ED${SI>InNpRj5!euKv?=Xn92 zsS&FH(*w`qLIy$doc>RE&A5R?u zzkl1sxX|{*fLpXvIW>9d<$ePROttn3oc6R!sN{&Y+>Jr@yeQN$sFR z;w6A<2-0%UA?c8Qf;sX7>>uKRBv3Ni)E9pI{uVzX|6Bb0U)`lhLE3hK58ivfRs1}d zNjlGK0hdq0qjV@q1qI%ZFMLgcpWSY~mB^LK)4GZ^h_@H+3?dAe_a~k*;9P_d7%NEFP6+ zgV(oGr*?W(ql?6SQ~`lUsjLb%MbfC4V$)1E0Y_b|OIYxz4?O|!kRb?BGrgiH5+(>s zoqM}v*;OBfg-D1l`M6T6{K`LG+0dJ1)!??G5g(2*vlNkm%Q(MPABT$r13q?|+kL4- zf)Mi5r$sn;u41aK(K#!m+goyd$c!KPl~-&-({j#D4^7hQkV3W|&>l_b!}!z?4($OA z5IrkfuT#F&S1(`?modY&I40%gtroig{YMvF{K{>5u^I51k8RriGd${z)=5k2tG zM|&Bp5kDTfb#vfuTTd?)a=>bX=lokw^y9+2LS?kwHQIWI~pYgy7 zb?A-RKVm_vM5!9?C%qYdfRAw& zAU7`up~%g=p@}pg#b7E)BFYx3g%(J36Nw(Dij!b>cMl@CSNbrW!DBDbTD4OXk!G4x zi}JBKc8HBYx$J~31PXH+4^x|UxK~(<@I;^3pWN$E=sYma@JP|8YL`L(zI6Y#c%Q{6 z*APf`DU$S4pr#_!60BH$FGViP14iJmbrzSrOkR;f3YZa{#E7Wpd@^4E-zH8EgPc-# zKWFPvh%WbqU_%ZEt`=Q?odKHc7@SUmY{GK`?40VuL~o)bS|is$Hn=<=KGHOsEC5tB zFb|q}gGlL97NUf$G$>^1b^3E18PZ~Pm9kX%*ftnolljiEt@2#F2R5ah$zbXd%V_Ev zyDd{1o_uuoBga$fB@Fw!V5F3jIr=a-ykqrK?WWZ#a(bglI_-8pq74RK*KfQ z0~Dzus7_l;pMJYf>Bk`)`S8gF!To-BdMnVw5M-pyu+aCiC5dwNH|6fgRsIKZcF&)g zr}1|?VOp}I3)IR@m1&HX1~#wsS!4iYqES zK}4J{Ei>;e3>LB#Oly>EZkW14^@YmpbgxCDi#0RgdM${&wxR+LiX}B+iRioOB0(pDKpVEI;ND?wNx>%e|m{RsqR_{(nmQ z3ZS}@t!p4a(BKx_-CYwrcyJ5u1TO9bcXti$8sy>xcLKqKCc#~UOZYD{llKTSFEjJ~ zyNWt>tLU}*>^`TvPxtP%F`ZJQw@W0^>x;!^@?k_)9#bF$j0)S3;mH-IR5y82l|%=F z2lR8zhP?XNP-ucZZ6A+o$xOyF!w;RaLHGh57GZ|TCXhJqY~GCh)aXEV$1O&$c}La1 zjuJxkY9SM4av^Hb;i7efiYaMwI%jGy`3NdY)+mcJhF(3XEiSlU3c|jMBi|;m-c?~T z+x0_@;SxcoY=(6xNgO$bBt~Pj8`-<1S|;Bsjrzw3@zSjt^JC3X3*$HI79i~!$RmTz zsblZsLYs7L$|=1CB$8qS!tXrWs!F@BVuh?kN(PvE5Av-*r^iYu+L^j^m9JG^#=m>@ z=1soa)H*w6KzoR$B8mBCXoU;f5^bVuwQ3~2LKg!yxomG1#XPmn(?YH@E~_ED+W6mxs%x{%Z<$pW`~ON1~2XjP5v(0{C{+6Dm$00tsd3w=f=ZENy zOgb-=f}|Hb*LQ$YdWg<(u7x3`PKF)B7ZfZ6;1FrNM63 z?O6tE%EiU@6%rVuwIQjvGtOofZBGZT1Sh(xLIYt9c4VI8`!=UJd2BfLjdRI#SbVAX ziT(f*RI^T!IL5Ac>ql7uduF#nuCRJ1)2bdvAyMxp-5^Ww5p#X{rb5)(X|fEhDHHW{ zw(Lfc$g;+Q`B0AiPGtmK%*aWfQQ$d!*U<|-@n2HZvCWSiw^I>#vh+LyC;aaVWGbmkENr z&kl*8o^_FW$T?rDYLO1Pyi%>@&kJKQoH2E0F`HjcN}Zlnx1ddoDA>G4Xu_jyp6vuT zPvC}pT&Owx+qB`zUeR|4G;OH(<<^_bzkjln0k40t`PQxc$7h(T8Ya~X+9gDc8Z9{Z z&y0RAU}#_kQGrM;__MK9vwIwK^aoqFhk~dK!ARf1zJqHMxF2?7-8|~yoO@_~Ed;_wvT%Vs{9RK$6uUQ|&@#6vyBsFK9eZW1Ft#D2)VpQRwpR(;x^ zdoTgMqfF9iBl%{`QDv7B0~8{8`8k`C4@cbZAXBu00v#kYl!#_Wug{)2PwD5cNp?K^ z9+|d-4z|gZ!L{57>!Ogfbzchm>J1)Y%?NThxIS8frAw@z>Zb9v%3_3~F@<=LG%r*U zaTov}{{^z~SeX!qgSYow`_5)ij*QtGp4lvF`aIGQ>@3ZTkDmsl#@^5*NGjOuu82}o zzLF~Q9SW+mP=>88%eSA1W4_W7-Q>rdq^?t=m6}^tDPaBRGFLg%ak93W!kOp#EO{6& zP%}Iff5HZQ9VW$~+9r=|Quj#z*=YwcnssS~9|ub2>v|u1JXP47vZ1&L1O%Z1DsOrDfSIMHU{VT>&>H=9}G3i@2rP+rx@eU@uE8rJNec zij~#FmuEBj03F1~ct@C@$>y)zB+tVyjV3*n`mtAhIM0$58vM9jOQC}JJOem|EpwqeMuYPxu3sv}oMS?S#o6GGK@8PN59)m&K4Dc&X% z(;XL_kKeYkafzS3Wn5DD>Yiw{LACy_#jY4op(>9q>>-*9@C0M+=b#bknAWZ37^(Ij zq>H%<@>o4a#6NydoF{_M4i4zB_KG)#PSye9bk0Ou8h%1Dtl7Q_y#7*n%g)?m>xF~( zjqvOwC;*qvN_3(*a+w2|ao0D?@okOvg8JskUw(l7n`0fncglavwKd?~l_ryKJ^Ky! zKCHkIC-o7%fFvPa$)YNh022lakMar^dgL=t#@XLyNHHw!b?%WlM)R@^!)I!smZL@k zBi=6wE5)2v&!UNV(&)oOYW(6Qa!nUjDKKBf-~Da=#^HE4(@mWk)LPvhyN3i4goB$3K8iV7uh zsv+a?#c4&NWeK(3AH;ETrMOIFgu{_@%XRwCZ;L=^8Ts)hix4Pf3yJRQ<8xb^CkdmC z?c_gB)XmRsk`9ch#tx4*hO=#qS7={~Vb4*tTf<5P%*-XMfUUYkI9T1cEF;ObfxxI-yNuA=I$dCtz3ey znVkctYD*`fUuZ(57+^B*R=Q}~{1z#2!ca?)+YsRQb+lt^LmEvZt_`=j^wqig+wz@n@ z`LIMQJT3bxMzuKg8EGBU+Q-6cs5(@5W?N>JpZL{$9VF)veF`L5%DSYTNQEypW%6$u zm_~}T{HeHj1bAlKl8ii92l9~$dm=UM21kLemA&b$;^!wB7#IKWGnF$TVq!!lBlG4 z{?Rjz?P(uvid+|i$VH?`-C&Gcb3{(~Vpg`w+O);Wk1|Mrjxrht0GfRUnZqz2MhrXa zqgVC9nemD5)H$to=~hp)c=l9?#~Z_7i~=U-`FZxb-|TR9@YCxx;Zjo-WpMNOn2)z) zFPGGVl%3N$f`gp$gPnWC+f4(rmts%fidpo^BJx72zAd7|*Xi{2VXmbOm)1`w^tm9% znM=0Fg4bDxH5PxPEm{P3#A(mxqlM7SIARP?|2&+c7qmU8kP&iApzL|F>Dz)Ixp_`O zP%xrP1M6@oYhgo$ZWwrAsYLa4 z|I;DAvJxno9HkQrhLPQk-8}=De{9U3U%)dJ$955?_AOms!9gia%)0E$Mp}$+0er@< zq7J&_SzvShM?e%V?_zUu{niL@gt5UFOjFJUJ}L?$f%eU%jUSoujr{^O=?=^{19`ON zlRIy8Uo_nqcPa6@yyz`CM?pMJ^^SN^Fqtt`GQ8Q#W4kE7`V9^LT}j#pMChl!j#g#J zr-=CCaV%xyFeQ9SK+mG(cTwW*)xa(eK;_Z(jy)woZp~> zA(4}-&VH+TEeLzPTqw&FOoK(ZjD~m{KW05fiGLe@E3Z2`rLukIDahE*`u!ubU)9`o zn^-lyht#E#-dt~S>}4y$-mSbR8{T@}22cn^refuQ08NjLOv?JiEWjyOnzk<^R5%gO zhUH_B{oz~u#IYwVnUg8?3P*#DqD8#X;%q%HY**=I>>-S|!X*-!x1{^l#OnR56O>iD zc;i;KS+t$koh)E3)w0OjWJl_aW2;xF=9D9Kr>)(5}4FqUbk# zI#$N8o0w;IChL49m9CJTzoC!|u{Ljd%ECgBOf$}&jA^$(V#P#~)`&g`H8E{uv52pp zwto`xUL-L&WTAVREEm$0g_gYPL(^vHq(*t1WCH_6alhkeW&GCZ3hL)|{O-jiFOBrF z!EW=Jej|dqQitT6!B-7&io2K)WIm~Q)v@yq%U|VpV+I?{y0@Yd%n8~-NuuM*pM~KA z85YB};IS~M(c<}4Hxx>qRK0cdl&e?t253N%vefkgds>Ubn8X}j6Vpgs>a#nFq$osY z1ZRwLqFv=+BTb=i%D2Wv>_yE0z}+niZ4?rE|*a3d7^kndWGwnFqt+iZ(7+aln<}jzbAQ(#Z2SS}3S$%Bd}^ zc9ghB%O)Z_mTZMRC&H#)I#fiLuIkGa^`4e~9oM5zKPx?zjkC&Xy0~r{;S?FS%c7w< zWbMpzc(xSw?9tGxG~_l}Acq}zjt5ClaB7-!vzqnlrX;}$#+PyQ9oU)_DfePh2E1<7 ztok6g6K^k^DuHR*iJ?jw?bs_whk|bx`dxu^nC6#e{1*m~z1eq7m}Cf$*^Eua(oi_I zAL+3opNhJteu&mWQ@kQWPucmiP)4|nFG`b2tpC;h{-PI@`+h?9v=9mn|0R-n8#t=+Z*FD(c5 zjj79Jxkgck*DV=wpFgRZuwr%}KTm+dx?RT@aUHJdaX-ODh~gByS?WGx&czAkvkg;x zrf92l8$Or_zOwJVwh>5rB`Q5_5}ef6DjS*$x30nZbuO3dijS*wvNEqTY5p1_A0gWr znH<(Qvb!os14|R)n2Ost>jS2;d1zyLHu`Svm|&dZD+PpP{Bh>U&`Md;gRl64q;>{8MJJM$?UNUd`aC>BiLe>*{ zJY15->yW+<3rLgYeTruFDtk1ovU<$(_y7#HgUq>)r0{^}Xbth}V#6?%5jeFYt;SG^ z3qF)=uWRU;Jj)Q}cpY8-H+l_n$2$6{ZR?&*IGr{>ek!69ZH0ZoJ*Ji+ezzlJ^%qL3 zO5a`6gwFw(moEzqxh=yJ9M1FTn!eo&qD#y5AZXErHs%22?A+JmS&GIolml!)rZTnUDM3YgzYfT#;OXn)`PWv3Ta z!-i|-Wojv*k&bC}_JJDjiAK(Ba|YZgUI{f}TdEOFT2+}nPmttytw7j%@bQZDV1vvj z^rp{gRkCDmYJHGrE1~e~AE!-&6B6`7UxVQuvRrfdFkGX8H~SNP_X4EodVd;lXd^>eV1jN+Tt4}Rsn)R0LxBz0c=NXU|pUe!MQQFkGBWbR3&(jLm z%RSLc#p}5_dO{GD=DEFr=Fc% z85CBF>*t!6ugI?soX(*JNxBp+-DdZ4X0LldiK}+WWGvXV(C(Ht|!3$psR=&c*HIM=BmX;pRIpz@Ale{9dhGe(U2|Giv;# zOc|;?p67J=Q(kamB*aus=|XP|m{jN^6@V*Bpm?ye56Njh#vyJqE=DweC;?Rv7faX~ zde03n^I~0B2vUmr;w^X37tVxUK?4}ifsSH5_kpKZIzpYu0;Kv}SBGfI2AKNp+VN#z`nI{UNDRbo-wqa4NEls zICRJpu)??cj^*WcZ^MAv+;bDbh~gpN$1Cor<{Y2oyIDws^JsfW^5AL$azE(T0p&pP z1Mv~6Q44R&RHoH95&OuGx2srIr<@zYJTOMKiVs;Bx3py89I87LOb@%mr`0)#;7_~Z zzcZj8?w=)>%5@HoCHE_&hnu(n_yQ-L(~VjpjjkbT7e)Dk5??fApg(d>vwLRJ-x{um z*Nt?DqTSxh_MIyogY!vf1mU1`Gld-&L)*43f6dilz`Q@HEz;+>MDDYv9u!s;WXeao zUq=TaL$P*IFgJzrGc>j1dDOd zed+=ZBo?w4mr$2)Ya}?vedDopomhW1`#P<%YOJ_j=WwClX0xJH-f@s?^tmzs_j7t!k zK@j^zS0Q|mM4tVP5Ram$VbS6|YDY&y?Q1r1joe9dj08#CM{RSMTU}(RCh`hp_Rkl- zGd|Cv~G@F{DLhCizAm9AN!^{rNs8hu!G@8RpnGx7e`-+K$ffN<0qjR zGq^$dj_Tv!n*?zOSyk5skI7JVKJ)3jysnjIu-@VSzQiP8r6MzudCU=~?v-U8yzo^7 zGf~SUTvEp+S*!X9uX!sq=o}lH;r{pzk~M*VA(uyQ`3C8!{C;)&6)95fv(cK!%Cuz$ z_Zal57H6kPN>25KNiI6z6F)jzEkh#%OqU#-__Xzy)KyH};81#N6OfX$$IXWzOn`Q& z4f$Z1t>)8&8PcYfEwY5UadU1yg+U*(1m2ZlHoC-!2?gB!!fLhmTl))D@dhvkx#+Yj z1O=LV{(T%{^IeCuFK>%QR!VZ4GnO5tK8a+thWE zg4VytZrwcS?7^ zuZfhYnB8dwd%VLO?DK7pV5Wi<(`~DYqOXn8#jUIL^)12*Dbhk4GmL_E2`WX&iT16o zk(t|hok(Y|v-wzn?4x34T)|+SfZP>fiq!><*%vnxGN~ypST-FtC+@TPv*vYv@iU!_ z@2gf|PrgQ?Ktf*9^CnJ(x*CtZVB8!OBfg0%!wL;Z8(tYYre0vcnPGlyCc$V(Ipl*P z_(J!a=o@vp^%Efme!K74(Ke7A>Y}|sxV+JL^aYa{~m%5#$$+R1? zGaQhZTTX!#s#=Xtpegqero$RNt&`4xn3g$)=y*;=N=Qai)}~`xtxI_N*#MMCIq#HFifT zz(-*m;pVH&+4bixL&Bbg)W5FN^bH87pAHp)zPkWNMfTFqS=l~AC$3FX3kQUSh_C?-ZftyClgM)o_D7cX$RGlEYblux0jv5 zTr|i-I3@ZPCGheCl~BGhImF)K4!9@?pC(gi3ozX=a!|r1)LFxy_8c&wY0<^{2cm|P zv6Y`QktY*;I)IUd5y3ne1CqpVanlY45z8hf4&$EUBnucDj16pDa4&GI&TArYhf*xh zdj>*%APH8(h~c>o@l#%T>R$e>rwVx_WUB|~V`p^JHsg*y12lzj&zF}w6W09HwB2yb z%Q~`es&(;7#*DUC_w-Dmt7|$*?TA_m;zB+-u{2;Bg{O}nV7G_@7~<)Bv8fH^G$XG8$(&{A zwXJK5LRK%M34(t$&NI~MHT{UQ9qN-V_yn|%PqC81EIiSzmMM=2zb`mIwiP_b)x+2M z7Gd`83h79j#SItpQ}luuf2uOU`my_rY5T{6P#BNlb%h%<#MZb=m@y5aW;#o1^2Z)SWo+b`y0gV^iRcZtz5!-05vF z7wNo=hc6h4hc&s@uL^jqRvD6thVYtbErDK9k!;+a0xoE0WL7zLixjn5;$fXvT=O3I zT6jI&^A7k6R{&5#lVjz#8%_RiAa2{di{`kx79K+j72$H(!ass|B%@l%KeeKchYLe_ z>!(JC2fxsv>XVen+Y42GeYPxMWqm`6F$(E<6^s|g(slNk!lL*6v^W2>f6hh^mE$s= z3D$)}{V5(Qm&A6bp%2Q}*GZ5Qrf}n7*Hr51?bJOyA-?B4vg6y_EX<*-e20h{=0Mxs zbuQGZ$fLyO5v$nQ&^kuH+mNq9O#MWSfThtH|0q1i!NrWj^S}_P;Q1OkYLW6U^?_7G zx2wg?CULj7))QU(n{$0JE%1t2dWrMi2g-Os{v|8^wK{@qlj%+1b^?NI z$}l2tjp0g>K3O+p%yK<9!XqmQ?E9>z&(|^Pi~aSRwI5x$jaA62GFz9%fmO3t3a>cq zK8Xbv=5Ps~4mKN5+Eqw12(!PEyedFXv~VLxMB~HwT1Vfo51pQ#D8e$e4pFZ{&RC2P z5gTIzl{3!&(tor^BwZfR8j4k{7Rq#`riKXP2O-Bh66#WWK2w=z;iD9GLl+3 zpHIaI4#lQ&S-xBK8PiQ%dwOh?%BO~DCo06pN7<^dnZCN@NzY{_Z1>rrB0U|nC&+!2 z2y!oBcTd2;@lzyk(B=TkyZ)zy0deK05*Q0zk+o$@nun`VI1Er7pjq>8V zNmlW{p7S^Btgb(TA}jL(uR>`0w8gHP^T~Sh5Tkip^spk4SBAhC{TZU}_Z)UJw-}zm zPq{KBm!k)?P{`-(9?LFt&YN4s%SIZ-9lJ!Ws~B%exHOeVFk3~}HewnnH(d)qkLQ_d z6h>O)pEE{vbOVw}E+jdYC^wM+AAhaI(YAibUc@B#_mDss0Ji&BK{WG`4 zOk>vSNq(Bq2IB@s>>Rxm6Wv?h;ZXkpb1l8u|+_qXWdC*jjcPCixq;!%BVPSp#hP zqo`%cNf&YoQXHC$D=D45RiT|5ngPlh?0T~?lUf*O)){K@*Kbh?3RW1j9-T?%lDk@y z4+~?wKI%Y!-=O|_IuKz|=)F;V7ps=5@g)RrE;;tvM$gUhG>jHcw2Hr@fS+k^Zr~>G z^JvPrZc}_&d_kEsqAEMTMJw!!CBw)u&ZVzmq+ZworuaE&TT>$pYsd9|g9O^0orAe8 z221?Va!l1|Y5X1Y?{G7rt1sX#qFA^?RLG^VjoxPf63;AS=_mVDfGJKg73L zsGdnTUD40y(>S##2l|W2Cy!H(@@5KBa(#gs`vlz}Y~$ot5VsqPQ{{YtjYFvIumZzt zA{CcxZLJR|4#{j7k~Tu*jkwz8QA|5G1$Cl895R`Zyp;irp1{KN){kB30O8P1W5;@bG znvX74roeMmQlUi=v9Y%(wl$ZC#9tKNFpvi3!C}f1m6Ct|l2g%psc{TJp)@yu)*e2> z((p0Fg*8gJ!|3WZke9;Z{8}&NRkv7iP=#_y-F}x^y?2m%-D_aj^)f04%mneyjo_;) z6qc_Zu$q37d~X``*eP~Q>I2gg%rrV8v=kDfpp$=%Vj}hF)^dsSWygoN(A$g*E=Do6FX?&(@F#7pbiJ`;c0c@Ul zDqW_90Wm#5f2L<(Lf3)3TeXtI7nhYwRm(F;*r_G6K@OPW4H(Y3O5SjUzBC}u3d|eQ8*8d@?;zUPE+i#QNMn=r(ap?2SH@vo*m z3HJ%XuG_S6;QbWy-l%qU;8x;>z>4pMW7>R}J%QLf%@1BY(4f_1iixd-6GlO7Vp*yU zp{VU^3?s?90i=!#>H`lxT!q8rk>W_$2~kbpz7eV{3wR|8E=8**5?qn8#n`*(bt1xRQrdGxyx2y%B$qmw#>ZV$c7%cO#%JM1lY$Y0q?Yuo> ze9KdJoiM)RH*SB%^;TAdX-zEjA7@%y=!0=Zg%iWK7jVI9b&Dk}0$Af&08KHo+ zOwDhFvA(E|ER%a^cdh@^wLUlmIv6?_3=BvX8jKk92L=Y}7Jf5OGMfh` zBdR1wFCi-i5@`9km{isRb0O%TX+f~)KNaEz{rXQa89`YIF;EN&gN)cigu6mNh>?Cm zAO&Im2flv6D{jwm+y<%WsPe4!89n~KN|7}Cb{Z;XweER73r}Qp2 zz}WP4j}U0&(uD&9yGy6`!+_v-S(yG*iytsTR#x_Rc>=6u^vnRDnf1gP{#2>`ffrAC% zTZ5WQ@hAK;P;>kX{D)mIXe4%a5p=LO1xXH@8T?mz7Q@d)$3pL{{B!2{-v70L*o1AO+|n5beiw~ zk@(>m?T3{2k2c;NWc^`4@P&Z?BjxXJ@;x1qhn)9Mn*IFdt_J-dIqx5#d`NfyfX~m( zIS~5)MfZ2Uy?_4W`47i}u0ZgPh<{D|w_d#;D}Q&U$Q-G}xM1A@1f{#%A$jh6Qp&0hQ<0bPOM z-{1Wm&p%%#eb_?x7i;bol EfAhh=DF6Tf diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index a9f1ef87bb24..8c79a83ae43f 100755 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,18 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar diff --git a/mvnw b/mvnw index 41c0f0c23db5..5643201c7d82 100755 --- a/mvnw +++ b/mvnw @@ -36,6 +36,10 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + if [ -f /etc/mavenrc ] ; then . /etc/mavenrc fi @@ -145,7 +149,7 @@ if [ -z "$JAVACMD" ] ; then JAVACMD="$JAVA_HOME/bin/java" fi else - JAVACMD="`which java`" + JAVACMD="`\\unset -f command; \\command -v java`" fi fi @@ -212,9 +216,9 @@ else echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." fi if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" fi while IFS="=" read key value; do case "$key" in (wrapperUrl) jarUrl="$value"; break ;; @@ -233,9 +237,9 @@ else echo "Found wget ... using wget" fi if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" + wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" fi elif command -v curl > /dev/null; then if [ "$MVNW_VERBOSE" = true ]; then @@ -305,6 +309,8 @@ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain exec "$JAVACMD" \ $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + "-Dmaven.home=${M2_HOME}" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd old mode 100755 new mode 100644 index 86115719e538..8a15b7f311fe --- a/mvnw.cmd +++ b/mvnw.cmd @@ -46,8 +46,8 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") @REM Execute a user defined script before this one if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre @REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* :skipRcPre @setlocal @@ -120,9 +120,9 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B ) @@ -134,7 +134,7 @@ if exist %WRAPPER_JAR% ( ) ) else ( if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" ) if "%MVNW_VERBOSE%" == "true" ( echo Couldn't find %WRAPPER_JAR%, downloading it ... @@ -158,7 +158,13 @@ if exist %WRAPPER_JAR% ( @REM work with both Windows and non-Windows executions. set MAVEN_CMD_LINE_ARGS=%* -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* if ERRORLEVEL 1 goto error goto end @@ -168,15 +174,15 @@ set ERROR_CODE=1 :end @endlocal & set ERROR_CODE=%ERROR_CODE% -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost @REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" :skipRcPost @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause +if "%MAVEN_BATCH_PAUSE%"=="on" pause -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% -exit /B %ERROR_CODE% +cmd /C exit /B %ERROR_CODE% From d91a2e4221003e0f9f95ca8830d24a68ebede3bc Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 24 Jan 2022 17:10:24 +0800 Subject: [PATCH 138/175] replace tabs with spaces --- .../languages/PythonLegacyClientCodegen.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java index bdaa9a06ef32..15aa8d7246f2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java @@ -311,13 +311,13 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert * The OpenAPI pattern spec follows the Perl convention and style of modifiers. Python * does not support this in as natural a way so it needs to convert it. See * https://docs.python.org/2/howto/regex.html#compilation-flags for details. - * - * @param pattern (the String pattern to convert from python to Perl convention) - * @param vendorExtensions (list of custom x-* properties for extra functionality-see https://swagger.io/docs/specification/openapi-extensions/) - * @return void - * @throws IllegalArgumentException if pattern does not follow the Perl /pattern/modifiers convention - * - * Includes fix for issue #6675 + * + * @param pattern (the String pattern to convert from python to Perl convention) + * @param vendorExtensions (list of custom x-* properties for extra functionality-see https://swagger.io/docs/specification/openapi-extensions/) + * @return void + * @throws IllegalArgumentException if pattern does not follow the Perl /pattern/modifiers convention + * + * Includes fix for issue #6675 */ public void postProcessPattern(String pattern, Map vendorExtensions) { if (pattern != null) { @@ -328,9 +328,9 @@ public void postProcessPattern(String pattern, Map vendorExtensi throw new IllegalArgumentException("Pattern must follow the Perl " + "/pattern/modifiers convention. " + pattern + " is not valid."); } - - //check for instances of extra backslash that could cause compile issues and remove - int firstBackslash = pattern.indexOf("\\"); + + //check for instances of extra backslash that could cause compile issues and remove + int firstBackslash = pattern.indexOf("\\"); int bracket = pattern.indexOf("["); if (firstBackslash == 0 || firstBackslash == 1 || firstBackslash == bracket+1) { pattern = pattern.substring(0,firstBackslash)+pattern.substring(firstBackslash+1); From 6ac8d9b1231686f841c50c1b6b299675cc2790dd Mon Sep 17 00:00:00 2001 From: Tim Quinn Date: Mon, 24 Jan 2022 03:22:50 -0600 Subject: [PATCH 139/175] Change Helidon MP release in generated project from 1.x to 2.x (#11076) * Support Helidon MP server using Helidon 2.4.1 Signed-off-by: tim.quinn@oracle.com * Add unrelated changed sample file(s) after rebase * Updated generated samples file after rebasing again * Remove incorrectly 'git add'ed generated file --- .../languages/JavaJAXRSSpecServerCodegen.java | 3 +- .../spec/libraries/helidon/README.mustache | 4 +- .../helidon/logging.properties.mustache | 21 +- .../microprofile-config.properties.mustache | 9 +- .../spec/libraries/helidon/pom.mustache | 278 +++++++++++++----- 5 files changed, 221 insertions(+), 94 deletions(-) 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 8b50933247a7..23c82cc2edd6 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 @@ -213,11 +213,12 @@ public void processOpts() { supportingFiles.add(new SupportingFile("ibm-web-ext.xml.mustache", "src/main/webapp/WEB-INF", "ibm-web-ext.xml") .doNotOverwrite()); } else if(HELIDON_LIBRARY.equals(library)) { + additionalProperties.computeIfAbsent("helidonVersion", key -> "2.4.1"); supportingFiles.add(new SupportingFile("logging.properties.mustache", "src/main/resources", "logging.properties") .doNotOverwrite()); supportingFiles.add(new SupportingFile("microprofile-config.properties.mustache", "src/main/resources/META-INF", "microprofile-config.properties") .doNotOverwrite()); - supportingFiles.add(new SupportingFile("beans.xml.mustache", "src/main/webapp/META-INF", "beans.xml") + supportingFiles.add(new SupportingFile("beans.xml.mustache", "src/main/resources/META-INF", "beans.xml") .doNotOverwrite()); } else if(KUMULUZEE_LIBRARY.equals(library)) { supportingFiles.add(new SupportingFile("config.yaml.mustache", "src/main/resources", "config.yaml")); 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 d7982e6e6a66..d2d0ddaa1e55 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 @@ -16,7 +16,7 @@ The jar can be used in combination with an other project providing the implement {{/interfaceOnly}} {{^interfaceOnly}} -To build the server, run this maven command: +To build the server, run this maven command (with JDK 11+): ```bash mvn package @@ -25,7 +25,7 @@ mvn package To run the server, run this maven command: ```bash -mvn exec:java +java -jar target/{{artifactId}}.jar ``` You can then call your server endpoints under: diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/logging.properties.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/logging.properties.mustache index fea543d4c33b..3e909fb7d903 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/logging.properties.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/logging.properties.mustache @@ -1,19 +1,20 @@ # Example Logging Configuration File # For more information see $JAVA_HOME/jre/lib/logging.properties -# Send messages to the console -handlers=java.util.logging.ConsoleHandler - -# Global default logging level. Can be overridden by specific handlers and loggers +## Send messages to the console +handlers=io.helidon.common.HelidonConsoleHandler +# +## HelidonConsoleHandler uses a SimpleFormatter subclass that replaces "!thread!" with the current thread +java.util.logging.SimpleFormatter.format=%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n +# +## Global logging level. Can be overridden by specific loggers .level=INFO -# Helidon Web Server has a custom log formatter that extends SimpleFormatter. -# It replaces "!thread!" with the current thread name -java.util.logging.ConsoleHandler.level=INFO -java.util.logging.ConsoleHandler.formatter=io.helidon.webserver.WebServerLogFormatter -java.util.logging.SimpleFormatter.format=%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n +# Quiet Weld +org.jboss.level=WARNING -#Component specific log levels +# +# Component specific log levels #io.helidon.webserver.level=INFO #io.helidon.config.level=INFO #io.helidon.security.level=INFO diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/microprofile-config.properties.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/microprofile-config.properties.mustache index 1780a159b0a0..38988f20e5e2 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/microprofile-config.properties.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/microprofile-config.properties.mustache @@ -1,6 +1,11 @@ +# Microprofile server properties + +# Application properties. This is the default greeting +app.greeting=Hello + # Microprofile server properties server.port=8080 server.host=0.0.0.0 -# Microprofile OpenAPI properties -mp.openapi.scan.disable=true \ No newline at end of file +# Enable the optional MicroProfile Metrics REST.request metrics +metrics.rest-request.enabled=true diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/pom.mustache index e72b2b5d440f..91c575960dc7 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/pom.mustache @@ -16,103 +16,223 @@ {{/parentOverridden}} - io.helidon.microprofile.server.Main - 1.2.0 + + {{helidonVersion}} + io.helidon.microprofile.cdi.Main + + 11 + ${maven.compiler.source} + true + UTF-8 + UTF-8 + + 3.8.1 + 3.0.0 + 2.7.5.1 1.6.0 + 3.0.0-M5 + 2.3.0 + 2.3.0 1.0.6 3.0.2 - 1.1.2 - 2.29 - 1.2.2 - 5.1.0 + 1.5.0.Final + 0.5.1 + 2.7 + 3.0.0-M5 - - - - org.jboss.jandex - jandex-maven-plugin - ${version.plugin.jandex} - - - make-index - - jandex - - - - - - org.apache.maven.plugins - maven-jar-plugin - ${version.plugin.jar} - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${version.plugin.compiler} - - 1.8 - 1.8 - - -Xlint:unchecked - - - - - org.codehaus.mojo - exec-maven-plugin - ${version.plugin.exec} - - ${mainClass} - - - - + + + + io.helidon + helidon-dependencies + ${helidon.version} + pom + import + + + io.helidon.microprofile.bundles - helidon-microprofile-2.2 - ${version.lib.helidon} - - - org.eclipse.microprofile.openapi - microprofile-openapi-api - ${version.lib.microprofile-openapi-api} - - - org.glassfish.jersey.media - jersey-media-json-binding - ${version.lib.jersey} - runtime + helidon-microprofile - jakarta.activation - jakarta.activation-api - ${version.lib.activation-api} + org.jboss + jandex runtime + true org.junit.jupiter junit-jupiter-api - ${version.lib.junit} - test - - - org.junit.jupiter - junit-jupiter-engine - ${version.lib.junit} test + + + ${project.artifactId} + + + + org.apache.maven.plugins + maven-compiler-plugin + ${version.plugin.compiler} + + + org.apache.maven.plugins + maven-surefire-plugin + ${version.plugin.surefire} + + false + + ${project.build.outputDirectory}/logging.properties + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${version.plugin.failsafe} + + false + true + + + + org.apache.maven.plugins + maven-dependency-plugin + ${version.plugin.dependency} + + + org.apache.maven.plugins + maven-resources-plugin + ${version.plugin.resources} + + + org.apache.maven.plugins + maven-jar-plugin + ${version.plugin.jar} + + + + true + libs + ${mainClass} + false + + + + + + org.jboss.jandex + jandex-maven-plugin + ${version.plugin.jandex} + + + org.codehaus.mojo + exec-maven-plugin + ${version.plugin.exec} + + ${mainClass} + + + + io.helidon.build-tools + helidon-maven-plugin + ${version.plugin.helidon} + + + io.helidon.build-tools + helidon-cli-maven-plugin + ${version.plugin.helidon-cli} + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-libs + prepare-package + + copy-dependencies + + + ${project.build.directory}/libs + false + false + true + true + runtime + test + + + + + + org.jboss.jandex + jandex-maven-plugin + + + make-index + + jandex + + process-classes + + + + + + + + + native-image + + + + io.helidon.build-tools + helidon-maven-plugin + + + native-image + + native-image + + + + + + + + + io.helidon.integrations.graal + helidon-mp-graal-native-image-extension + + + + + jlink-image + + + + io.helidon.build-tools + helidon-maven-plugin + + + + jlink-image + + + + + + + + From 42f3258faade63d7c2083906d3ba44b7e4cf4196 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 24 Jan 2022 15:44:38 -0800 Subject: [PATCH 140/175] Turns on python-experimental CI tests (#11390) * Installs python3.9 in node3 * Moves python clients into separate node so they can use a docker image * Installs java and maven into docker * Switches off some python tests --- .circleci/config.yml | 284 ++++++++++++------ CI/circle_parallel.sh | 19 +- .../python-experimental/tox.handlebars | 2 +- pom.xml | 16 +- .../petstore/python-experimental/pom.xml | 46 +++ .../petstore/python-experimental/tox.ini | 2 +- 6 files changed, 273 insertions(+), 96 deletions(-) create mode 100644 samples/openapi3/client/petstore/python-experimental/pom.xml diff --git a/.circleci/config.yml b/.circleci/config.yml index b610ceeb2bb1..4efc24c7ba1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,16 +1,161 @@ -version: 2 +version: 2.1 +commands: # a reusable command with parameters + command_build_and_test: + parameters: + nodeNo: + default: "0" + type: string + steps: + # Restore the dependency cache + - restore_cache: + keys: + # Default branch if not + - source-v2-{{ .Branch }}-{{ .Revision }} + - source-v2-{{ .Branch }}- + - source-v2- + # Machine Setup + # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each + # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out. + - checkout + # Prepare for artifact and test results collection equivalent to how it was done on 1.0. + # In many cases you can simplify this from what is generated here. + # 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/' + - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS + # This is based on your 1.0 configuration file or project settings + - run: + command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV + - run: + command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; ' + - run: + command: |- + printf '127.0.0.1 petstore.swagger.io + ' | sudo tee -a /etc/hosts + # - run: docker pull openapitools/openapi-petstore + # - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore + - run: docker pull swaggerapi/petstore + - run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore + - run: docker ps -a + - run: sleep 30 + - run: cat /etc/hosts + # Test + - run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error + - run: + name: "Setup custom environment variables" + command: echo 'export CIRCLE_NODE_INDEX="<>"' >> $BASH_ENV + - run: ./CI/circle_parallel.sh + # Save dependency cache + - save_cache: + key: source-v2-{{ .Branch }}-{{ .Revision }} + paths: + # This is a broad list of cache paths to include many possible development environments + # You can probably delete some of these entries + - vendor/bundle + - ~/virtualenvs + - ~/.m2 + - ~/.ivy2 + - ~/.sbt + - ~/.bundle + - ~/.go_workspace + - ~/.gradle + - ~/.cache/bower + - ".git" + - ~/.stack + - /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work + - ~/R + # save "default" cache using the key "source-v2-" + - save_cache: + key: source-v2- + paths: + # This is a broad list of cache paths to include many possible development environments + # You can probably delete some of these entries + - vendor/bundle + - ~/virtualenvs + - ~/.m2 + - ~/.ivy2 + - ~/.sbt + - ~/.bundle + - ~/.go_workspace + - ~/.gradle + - ~/.cache/bower + - ".git" + - ~/.stack + - /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work + - ~/R + # Teardown + # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each + # Save test results + - store_test_results: + path: /tmp/circleci-test-results + # Save artifacts + - store_artifacts: + path: /tmp/circleci-artifacts + - store_artifacts: + path: /tmp/circleci-test-results + command_docker_build_and_test: + parameters: + nodeNo: + default: "0" + type: string + steps: + # Machine Setup + # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each + # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out. + - checkout + # Prepare for artifact and test results collection equivalent to how it was done on 1.0. + # In many cases you can simplify this from what is generated here. + # 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/' + - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS + # This is based on your 1.0 configuration file or project settings + # - run: + # command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV + # - run: + # Test + # - run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error + - run: + name: "Setup custom environment variables" + command: echo 'export CIRCLE_NODE_INDEX="<>"' >> $BASH_ENV + - run: ./CI/circle_parallel.sh + # Teardown + # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each + # Save test results + - store_test_results: + path: /tmp/circleci-test-results + # Save artifacts + - store_artifacts: + path: /tmp/circleci-artifacts + - store_artifacts: + path: /tmp/circleci-test-results jobs: - build: - # docker: - # #- image: openapitools/openapi-generator - # - image: swaggerapi/petstore - # environment: - # SWAGGER_HOST=http://petstore.swagger.io - # SWAGGER_BASE_PATH=/v2 + node0: + machine: + image: circleci/classic:latest + working_directory: ~/OpenAPITools/openapi-generator + shell: /bin/bash --login + environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator + DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli + steps: + - command_build_and_test: + nodeNo: "0" + node1: + machine: + image: circleci/classic:latest + working_directory: ~/OpenAPITools/openapi-generator + shell: /bin/bash --login + environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator + DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli + steps: + - command_build_and_test: + nodeNo: "1" + node2: machine: image: circleci/classic:latest working_directory: ~/OpenAPITools/openapi-generator - parallelism: 4 shell: /bin/bash --login environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts @@ -18,85 +163,42 @@ jobs: DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli steps: - # Restore the dependency cache - - restore_cache: - keys: - # Default branch if not - - source-v2-{{ .Branch }}-{{ .Revision }} - - source-v2-{{ .Branch }}- - - source-v2- - # Machine Setup - # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each - # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out. - - checkout - # Prepare for artifact and test results collection equivalent to how it was done on 1.0. - # In many cases you can simplify this from what is generated here. - # 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/' - - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS - # This is based on your 1.0 configuration file or project settings - - run: - command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV - - run: - command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; ' - - run: - command: |- - printf '127.0.0.1 petstore.swagger.io - ' | sudo tee -a /etc/hosts -# - run: docker pull openapitools/openapi-petstore -# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore - - run: docker pull swaggerapi/petstore - - run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore - - run: docker ps -a - - run: sleep 30 - - run: cat /etc/hosts - # Test - - run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error - - run: ./CI/circle_parallel.sh - # Save dependency cache - - save_cache: - key: source-v2-{{ .Branch }}-{{ .Revision }} - paths: - # This is a broad list of cache paths to include many possible development environments - # You can probably delete some of these entries - - vendor/bundle - - ~/virtualenvs - - ~/.m2 - - ~/.ivy2 - - ~/.sbt - - ~/.bundle - - ~/.go_workspace - - ~/.gradle - - ~/.cache/bower - - ".git" - - ~/.stack - - /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work - - ~/R - # save "default" cache using the key "source-v2-" - - save_cache: - key: source-v2- - paths: - # This is a broad list of cache paths to include many possible development environments - # You can probably delete some of these entries - - vendor/bundle - - ~/virtualenvs - - ~/.m2 - - ~/.ivy2 - - ~/.sbt - - ~/.bundle - - ~/.go_workspace - - ~/.gradle - - ~/.cache/bower - - ".git" - - ~/.stack - - /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work - - ~/R - # Teardown - # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each - # Save test results - - store_test_results: - path: /tmp/circleci-test-results - # Save artifacts - - store_artifacts: - path: /tmp/circleci-artifacts - - store_artifacts: - path: /tmp/circleci-test-results + - command_build_and_test: + nodeNo: "2" + node3: + machine: + image: circleci/classic:latest + working_directory: ~/OpenAPITools/openapi-generator + shell: /bin/bash --login + environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator + DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli + steps: + - checkout + - command_build_and_test: + nodeNo: "3" + node4: + docker: + - image: fkrull/multi-python + working_directory: ~/OpenAPITools/openapi-generator + shell: /bin/bash --login + environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator + DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli + steps: + - checkout + - command_docker_build_and_test: + nodeNo: "4" +workflows: + version: 2 + build: + jobs: + - node0 + - node1 + - node2 + - node3 + - node4 \ No newline at end of file diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 74e5f018f1ba..b6e2691121a5 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -11,7 +11,9 @@ export NODE_ENV=test function cleanup { # Show logs of 'petstore.swagger' container to troubleshoot Unit Test failures, if any. - docker logs petstore.swagger # container name specified in circle.yml + if [ "$NODE_INDEX" != "4" ]; then + docker logs petstore.swagger # container name specified in circle.yml + fi } trap cleanup EXIT @@ -61,7 +63,6 @@ elif [ "$NODE_INDEX" = "3" ]; then pyenv install 3.6.3 pyenv install 2.7.14 pyenv global 3.6.3 - python3 --version # Install node@stable (for angular 6) set +e @@ -80,6 +81,20 @@ elif [ "$NODE_INDEX" = "3" ]; then mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node3 -Dorg.slf4j.simpleLogger.defaultLogLevel=error +elif [ "$NODE_INDEX" = "4" ]; then + + echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..." + + # install maven and java so we can use them to run our tests + apt-get update && apt-get install -y default-jdk maven sudo + java -version + export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::") + echo $JAVA_HOME + # show os version + uname -a + + mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error + else echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..." #sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 diff --git a/modules/openapi-generator/src/main/resources/python-experimental/tox.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/tox.handlebars index 5af8eb6f8315..d1b68916df43 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/tox.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/tox.handlebars @@ -1,5 +1,5 @@ [tox] -envlist = py3 +envlist = py39 [testenv] deps=-r{toxinidir}/requirements.txt diff --git a/pom.xml b/pom.xml index 0dd62e012c48..06f87b9cb43f 100644 --- a/pom.xml +++ b/pom.xml @@ -1285,7 +1285,6 @@ samples/client/petstore/python samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent - samples/openapi3/client/petstore/python @@ -1316,6 +1315,21 @@ samples/client/petstore/javascript-promise-es6 + + + samples.circleci.node4 + + + env + samples.circleci.node4 + + + + + samples/openapi3/client/petstore/python + samples/openapi3/client/petstore/python-experimental + + samples.circleci.others diff --git a/samples/openapi3/client/petstore/python-experimental/pom.xml b/samples/openapi3/client/petstore/python-experimental/pom.xml new file mode 100644 index 000000000000..7e737c361115 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + org.openapitools + PythonExperimentalOAS3PetstoreTests + pom + 1.0-SNAPSHOT + Python Experimental OpenAPI3 Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + test + integration-test + + exec + + + make + + test + + + + + + + + \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/tox.ini b/samples/openapi3/client/petstore/python-experimental/tox.ini index 8989fc3c4d96..ef7cec358ca6 100644 --- a/samples/openapi3/client/petstore/python-experimental/tox.ini +++ b/samples/openapi3/client/petstore/python-experimental/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py3 +envlist = py39 [testenv] deps=-r{toxinidir}/requirements.txt From 5d2a3698e2ac96f8168e0aff887762c50a86a9b9 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 25 Jan 2022 17:04:32 +0800 Subject: [PATCH 141/175] [java][okttp-gson-nextgen] update docstring in ApiClient, RetryingOAuth (#11395) * update docstring in apiclient, retryingoauth (java client) * update samples --- .../okhttp-gson-nextgen/ApiClient.mustache | 1 + .../auth/RetryingOAuth.mustache | 43 ++++++++++++++++--- .../org/openapitools/client/ApiClient.java | 1 + .../client/auth/RetryingOAuth.java | 43 ++++++++++++++++--- 4 files changed, 74 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/ApiClient.mustache index 732551cec585..de8ac2527beb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/ApiClient.mustache @@ -1481,6 +1481,7 @@ public class ApiClient { * @param payload HTTP request body * @param method HTTP method * @param uri URI + * @throws org.openapitools.client.ApiException If fails to update the parameters */ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/auth/RetryingOAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/auth/RetryingOAuth.mustache index 137e266b5a29..43d58ce88043 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/auth/RetryingOAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson-nextgen/auth/RetryingOAuth.mustache @@ -29,22 +29,31 @@ public class RetryingOAuth extends OAuth implements Interceptor { private TokenRequestBuilder tokenRequestBuilder; + /** + * @param client An OkHttp client + * @param tokenRequestBuilder A token request builder + */ public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) { this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client)); this.tokenRequestBuilder = tokenRequestBuilder; } + /** + * @param tokenRequestBuilder A token request builder + */ public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) { this(new OkHttpClient(), tokenRequestBuilder); } /** - @param tokenUrl The token URL to be used for this OAuth2 flow. - Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". - The value must be an absolute URL. - @param clientId The OAuth2 client ID for the "clientCredentials" flow. - @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. - */ + * @param tokenUrl The token URL to be used for this OAuth2 flow. + * Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". + * The value must be an absolute URL. + * @param clientId The OAuth2 client ID for the "clientCredentials" flow. + * @param flow OAuth flow. + * @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. + * @param parameters A map of string. + */ public RetryingOAuth( String tokenUrl, String clientId, @@ -63,6 +72,11 @@ public class RetryingOAuth extends OAuth implements Interceptor { } } + /** + * Set the OAuth flow + * + * @param flow The OAuth flow. + */ public void setFlow(OAuthFlow flow) { switch(flow) { case accessCode: @@ -148,8 +162,12 @@ public class RetryingOAuth extends OAuth implements Interceptor { } } - /* + /** * Returns true if the access token has been updated + * + * @param requestAccessToken the request access token + * @return True if the update is successful + * @throws java.io.IOException If fail to update the access token */ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { @@ -166,10 +184,21 @@ public class RetryingOAuth extends OAuth implements Interceptor { return getAccessToken() == null || !getAccessToken().equals(requestAccessToken); } + /** + * Gets the token request builder + * + * @return A token request builder + * @throws java.io.IOException If fail to update the access token + */ public TokenRequestBuilder getTokenRequestBuilder() { return tokenRequestBuilder; } + /** + * Sets the token request builder + * + * @param tokenRequestBuilder Token request builder + */ public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { this.tokenRequestBuilder = tokenRequestBuilder; } diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ApiClient.java index 7e3cf65e18cf..98b640ae6e9e 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/ApiClient.java @@ -1367,6 +1367,7 @@ public void processCookieParams(Map cookieParams, Request.Builde * @param payload HTTP request body * @param method HTTP method * @param uri URI + * @throws org.openapitools.client.ApiException If fails to update the parameters */ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/auth/RetryingOAuth.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/auth/RetryingOAuth.java index 911df8d3a37d..91dac45f9e0d 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/auth/RetryingOAuth.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/auth/RetryingOAuth.java @@ -28,22 +28,31 @@ public class RetryingOAuth extends OAuth implements Interceptor { private TokenRequestBuilder tokenRequestBuilder; + /** + * @param client An OkHttp client + * @param tokenRequestBuilder A token request builder + */ public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) { this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client)); this.tokenRequestBuilder = tokenRequestBuilder; } + /** + * @param tokenRequestBuilder A token request builder + */ public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) { this(new OkHttpClient(), tokenRequestBuilder); } /** - @param tokenUrl The token URL to be used for this OAuth2 flow. - Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". - The value must be an absolute URL. - @param clientId The OAuth2 client ID for the "clientCredentials" flow. - @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. - */ + * @param tokenUrl The token URL to be used for this OAuth2 flow. + * Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". + * The value must be an absolute URL. + * @param clientId The OAuth2 client ID for the "clientCredentials" flow. + * @param flow OAuth flow. + * @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. + * @param parameters A map of string. + */ public RetryingOAuth( String tokenUrl, String clientId, @@ -62,6 +71,11 @@ public RetryingOAuth( } } + /** + * Set the OAuth flow + * + * @param flow The OAuth flow. + */ public void setFlow(OAuthFlow flow) { switch(flow) { case accessCode: @@ -147,8 +161,12 @@ private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAut } } - /* + /** * Returns true if the access token has been updated + * + * @param requestAccessToken the request access token + * @return True if the update is successful + * @throws java.io.IOException If fail to update the access token */ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { @@ -165,10 +183,21 @@ public synchronized boolean updateAccessToken(String requestAccessToken) throws return getAccessToken() == null || !getAccessToken().equals(requestAccessToken); } + /** + * Gets the token request builder + * + * @return A token request builder + * @throws java.io.IOException If fail to update the access token + */ public TokenRequestBuilder getTokenRequestBuilder() { return tokenRequestBuilder; } + /** + * Sets the token request builder + * + * @param tokenRequestBuilder Token request builder + */ public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { this.tokenRequestBuilder = tokenRequestBuilder; } From 8b3cad0692b6c58f827c0a9b35f1ad733547504b Mon Sep 17 00:00:00 2001 From: jiangyuan Date: Wed, 26 Jan 2022 01:50:59 +0800 Subject: [PATCH 142/175] [Python] fix model to dict (#11234) * fix model to dict * add unit test * add unit test * update sample files --- .../resources/python/model_utils.mustache | 10 +- ...odels-for-testing-with-http-signature.yaml | 11 +- .../python/petstore_api/model_utils.py | 10 +- .../petstore_api/model_utils.py | 10 +- .../python/x_auth_id_alias/model_utils.py | 10 +- .../python/dynamic_servers/model_utils.py | 10 +- .../petstore/python/.openapi-generator/FILES | 2 + .../openapi3/client/petstore/python/README.md | 1 + .../client/petstore/python/docs/FooObject.md | 13 + .../python/petstore_api/model/foo_object.py | 259 ++++++++++++++++++ .../python/petstore_api/model_utils.py | 10 +- .../python/petstore_api/models/__init__.py | 1 + .../petstore/python/test/test_foo_object.py | 35 +++ .../tests_manual/test_api_validation.py | 11 + 14 files changed, 374 insertions(+), 19 deletions(-) create mode 100644 samples/openapi3/client/petstore/python/docs/FooObject.md create mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/foo_object.py create mode 100644 samples/openapi3/client/petstore/python/test/test_foo_object.py diff --git a/modules/openapi-generator/src/main/resources/python/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/model_utils.mustache index 24dd544ce056..0e8ad8be5db7 100644 --- a/modules/openapi-generator/src/main/resources/python/model_utils.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_utils.mustache @@ -1340,6 +1340,7 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} + extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item model_instances = [model_instance] if model_instance._composed_schemas: @@ -1369,14 +1370,17 @@ def model_to_dict(model_instance, serialize=True): res.append(v) elif isinstance(v, ModelSimple): res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) else: res.append(model_to_dict(v, serialize=serialize)) result[attr] = res elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], - model_to_dict(item[1], serialize=serialize)) - if hasattr(item[1], '_data_store') else item, + extract_item, value.items() )) elif isinstance(value, ModelSimple): 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 ccb4451c6a4b..758c546fe918 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 @@ -2494,4 +2494,13 @@ components: BooleanEnum: type: boolean enum: - - true \ No newline at end of file + - true + FooObject: + type: object + properties: + prop1: + type: array + items: + type: object + prop2: + type: object \ No newline at end of file diff --git a/samples/client/petstore/python/petstore_api/model_utils.py b/samples/client/petstore/python/petstore_api/model_utils.py index c723626fc498..6414688b772b 100644 --- a/samples/client/petstore/python/petstore_api/model_utils.py +++ b/samples/client/petstore/python/petstore_api/model_utils.py @@ -1657,6 +1657,7 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} + extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item model_instances = [model_instance] if model_instance._composed_schemas: @@ -1686,14 +1687,17 @@ def model_to_dict(model_instance, serialize=True): res.append(v) elif isinstance(v, ModelSimple): res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) else: res.append(model_to_dict(v, serialize=serialize)) result[attr] = res elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], - model_to_dict(item[1], serialize=serialize)) - if hasattr(item[1], '_data_store') else item, + extract_item, value.items() )) elif isinstance(value, ModelSimple): diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py index c723626fc498..6414688b772b 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py @@ -1657,6 +1657,7 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} + extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item model_instances = [model_instance] if model_instance._composed_schemas: @@ -1686,14 +1687,17 @@ def model_to_dict(model_instance, serialize=True): res.append(v) elif isinstance(v, ModelSimple): res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) else: res.append(model_to_dict(v, serialize=serialize)) result[attr] = res elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], - model_to_dict(item[1], serialize=serialize)) - if hasattr(item[1], '_data_store') else item, + extract_item, value.items() )) elif isinstance(value, ModelSimple): diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py index 023d770fe6a2..38a28ca20897 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py @@ -1657,6 +1657,7 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} + extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item model_instances = [model_instance] if model_instance._composed_schemas: @@ -1686,14 +1687,17 @@ def model_to_dict(model_instance, serialize=True): res.append(v) elif isinstance(v, ModelSimple): res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) else: res.append(model_to_dict(v, serialize=serialize)) result[attr] = res elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], - model_to_dict(item[1], serialize=serialize)) - if hasattr(item[1], '_data_store') else item, + extract_item, value.items() )) elif isinstance(value, ModelSimple): diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py index f4b73e17079a..d76884daf889 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py @@ -1657,6 +1657,7 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} + extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item model_instances = [model_instance] if model_instance._composed_schemas: @@ -1686,14 +1687,17 @@ def model_to_dict(model_instance, serialize=True): res.append(v) elif isinstance(v, ModelSimple): res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) else: res.append(model_to_dict(v, serialize=serialize)) result[attr] = res elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], - model_to_dict(item[1], serialize=serialize)) - if hasattr(item[1], '_data_store') else item, + extract_item, value.items() )) elif isinstance(value, ModelSimple): diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/FILES b/samples/openapi3/client/petstore/python/.openapi-generator/FILES index 4b9b1323443f..68c32cfe7066 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python/.openapi-generator/FILES @@ -45,6 +45,7 @@ docs/FakePostInlineAdditionalPropertiesPayloadArrayData.md docs/File.md docs/FileSchemaTestClass.md docs/Foo.md +docs/FooObject.md docs/FormatTest.md docs/Fruit.md docs/FruitReq.md @@ -158,6 +159,7 @@ petstore_api/model/fake_post_inline_additional_properties_payload_array_data.py petstore_api/model/file.py petstore_api/model/file_schema_test_class.py petstore_api/model/foo.py +petstore_api/model/foo_object.py petstore_api/model/format_test.py petstore_api/model/fruit.py petstore_api/model/fruit_req.py diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index 2d83d666f8e2..4eaa47c54ee2 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -174,6 +174,7 @@ Class | Method | HTTP request | Description - [File](docs/File.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - [Foo](docs/Foo.md) + - [FooObject](docs/FooObject.md) - [FormatTest](docs/FormatTest.md) - [Fruit](docs/Fruit.md) - [FruitReq](docs/FruitReq.md) diff --git a/samples/openapi3/client/petstore/python/docs/FooObject.md b/samples/openapi3/client/petstore/python/docs/FooObject.md new file mode 100644 index 000000000000..55a7fc671efc --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/FooObject.md @@ -0,0 +1,13 @@ +# FooObject + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prop1** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | | [optional] +**prop2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../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/foo_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/foo_object.py new file mode 100644 index 000000000000..5c2113edd1c1 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo_object.py @@ -0,0 +1,259 @@ +""" + OpenAPI Petstore + + 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 re # noqa: F401 +import sys # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from petstore_api.exceptions import ApiAttributeError + + + +class FooObject(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'prop1': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],), # noqa: E501 + 'prop2': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'prop1': 'prop1', # noqa: E501 + 'prop2': 'prop2', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FooObject - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + prop1 ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]): [optional] # noqa: E501 + prop2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """FooObject - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + prop1 ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]): [optional] # noqa: E501 + prop2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/samples/openapi3/client/petstore/python/petstore_api/model_utils.py b/samples/openapi3/client/petstore/python/petstore_api/model_utils.py index c723626fc498..6414688b772b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model_utils.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model_utils.py @@ -1657,6 +1657,7 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} + extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item model_instances = [model_instance] if model_instance._composed_schemas: @@ -1686,14 +1687,17 @@ def model_to_dict(model_instance, serialize=True): res.append(v) elif isinstance(v, ModelSimple): res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) else: res.append(model_to_dict(v, serialize=serialize)) result[attr] = res elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], - model_to_dict(item[1], serialize=serialize)) - if hasattr(item[1], '_data_store') else item, + extract_item, value.items() )) elif isinstance(value, ModelSimple): 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 5e9f7f3bfaaa..170e786575f3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py @@ -48,6 +48,7 @@ from petstore_api.model.file import File from petstore_api.model.file_schema_test_class import FileSchemaTestClass from petstore_api.model.foo import Foo +from petstore_api.model.foo_object import FooObject from petstore_api.model.format_test import FormatTest from petstore_api.model.fruit import Fruit from petstore_api.model.fruit_req import FruitReq diff --git a/samples/openapi3/client/petstore/python/test/test_foo_object.py b/samples/openapi3/client/petstore/python/test/test_foo_object.py new file mode 100644 index 000000000000..9e04e6ddf7ab --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_foo_object.py @@ -0,0 +1,35 @@ +""" + OpenAPI Petstore + + 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 sys +import unittest + +import petstore_api +from petstore_api.model.foo_object import FooObject + + +class TestFooObject(unittest.TestCase): + """FooObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFooObject(self): + """Test FooObject""" + # FIXME: construct object with mandatory attributes with example values + # model = FooObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_api_validation.py b/samples/openapi3/client/petstore/python/tests_manual/test_api_validation.py index 696b05e548b3..c04427530e10 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_api_validation.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_api_validation.py @@ -163,3 +163,14 @@ def test_multiple_of_deserialization(self): } response = MockResponse(data=json.dumps(data)) deserialized = api_client.deserialize(response, (format_test.FormatTest,), True) + + def test_sanitize_for_serialization(self): + data = { + "prop1": [{"key1": "val1"}], + "prop2": {"key2": "val2"} + } + from petstore_api.model.foo_object import FooObject + # the property named prop1 of this model is a list of dict + foo_object = FooObject(prop1=data["prop1"], prop2=data["prop2"]) + result = self.api_client.sanitize_for_serialization(foo_object) + self.assertEqual(data, result) From cdf1943a81c489efa1166637baee6c62583ebd49 Mon Sep 17 00:00:00 2001 From: Hex052 Date: Tue, 25 Jan 2022 17:50:16 -0900 Subject: [PATCH 143/175] Fix typo in script name (#11402) --- docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index bc74ea62e789..35d8d1052214 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -108,7 +108,7 @@ export PATH=${JAVA_HOME}/bin:$PATH > **Platform(s)**: Linux, macOS, Windows (variable) -One downside to manual JAR downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator.cli.sh](https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh) which solves this problem. +One downside to manual JAR downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator-cli.sh](https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh) which solves this problem. To install the launcher script, copy the contents of the script to a location on your path and make the script executable. From 066883be58a34a6db50ed3f526db94c547b570d7 Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Wed, 26 Jan 2022 15:39:22 +1000 Subject: [PATCH 144/175] tidy: [csharp-netcore] Remove redundant useWebRequest tag from templates. (#11398) --- .../main/resources/csharp-netcore-functions/ApiClient.mustache | 3 --- .../libraries/httpclient/ApiClient.mustache | 3 --- .../src/main/resources/csharp-netcore/ApiClient.mustache | 3 --- .../csharp-netcore/libraries/httpclient/ApiClient.mustache | 3 --- 4 files changed, 12 deletions(-) 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 65cbf8d76bc3..72cbbf86b7eb 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 @@ -23,9 +23,6 @@ using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; using RestSharp; using RestSharp.Deserializers; using RestSharpMethod = RestSharp.Method; -{{#useWebRequest}} -using System.Net.Http; -{{/useWebRequest}} {{#supportsRetry}} using Polly; {{/supportsRetry}} 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 e9c39ea9f6d6..ca187c688d91 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 @@ -20,9 +20,6 @@ using System.Web; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; -{{#useWebRequest}} -using System.Net.Http; -{{/useWebRequest}} using System.Net.Http; using System.Net.Http.Headers; {{#supportsRetry}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache index e42b50fbd8bc..13d3b8c5f49d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache @@ -23,9 +23,6 @@ using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; using RestSharp; using RestSharp.Deserializers; using RestSharpMethod = RestSharp.Method; -{{#useWebRequest}} -using System.Net.Http; -{{/useWebRequest}} {{#supportsRetry}} using Polly; {{/supportsRetry}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache index f62f0e9423ff..f24c317a7024 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache @@ -20,9 +20,6 @@ using System.Web; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; -{{#useWebRequest}} -using System.Net.Http; -{{/useWebRequest}} using System.Net.Http; using System.Net.Http.Headers; {{#supportsRetry}} From a0dd025c828510bce57064aaaede3b5b4971a549 Mon Sep 17 00:00:00 2001 From: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com> Date: Wed, 26 Jan 2022 00:51:19 -0500 Subject: [PATCH 145/175] Add Micronaut server generator (#10270) * Add micronaut server implementation * Add micronaut server tests and imporovements * Generate samples, docs and verify that tests pass * Update micronaut docs and samples after merging with master * Update micronaut dev server samples * Add micronuat server docs * Update micronaut version * Minor changes to micronaut server and client * Fix documentation generation in samples Co-authored-by: Andriy Dmytruk --- bin/configs/java-micronaut-client.yaml | 1 + bin/configs/java-micronaut-server.yaml | 10 + docs/generators.md | 1 + docs/generators/java-micronaut-client.md | 5 +- docs/generators/java-micronaut-server.md | 314 +++ .../JavaMicronautAbstractCodegen.java | 511 +++++ .../languages/JavaMicronautClientCodegen.java | 292 +-- .../languages/JavaMicronautServerCodegen.java | 178 ++ .../org.openapitools.codegen.CodegenConfig | 1 + .../java-micronaut-client/api.mustache | 70 - .../gradle/gradle.properties.mustache | 1 - .../doc/model_doc.mustache | 4 - .../model/beanValidation.mustache | 52 - .../model/jackson_annotations.mustache | 26 - .../model/modelEnum.mustache | 61 - .../java-micronaut-client/model/pojo.mustache | 332 --- .../params/bodyParams.mustache | 1 - .../params/cookieParams.mustache | 1 - .../params/formParams.mustache | 1 - .../params/headerParams.mustache | 1 - .../params/pathParams.mustache | 1 - .../params/queryParams.mustache | 1 - .../query/QueryParam.mustache | 78 - .../query/QueryParamBinder.mustache | 164 -- .../java-micronaut/client/api.mustache | 71 + .../client}/auth/Authorization.mustache | 4 +- .../client}/auth/AuthorizationBinder.mustache | 4 +- .../client}/auth/AuthorizationFilter.mustache | 4 +- .../client}/auth/Authorizations.mustache | 4 +- .../ApiKeyAuthConfiguration.mustache | 4 +- .../ConfigurableAuthorization.mustache | 4 +- .../HttpBasicAuthConfiguration.mustache | 4 +- .../client}/doc/README.mustache | 0 .../client}/doc/api_doc.mustache | 0 .../client}/doc/auth.mustache | 0 .../client/params/bodyParams.mustache | 1 + .../client/params/cookieParams.mustache | 1 + .../client/params/formParams.mustache | 1 + .../client/params/headerParams.mustache | 1 + .../client/params/pathParams.mustache | 1 + .../client/params/queryParams.mustache | 1 + .../client}/params/type.mustache | 0 .../client/test}/api_test.groovy.mustache | 2 +- .../client/test}/api_test.mustache | 2 +- .../client/test}/model_test.groovy.mustache | 0 .../client/test}/model_test.mustache | 0 .../configuration/Application.mustache | 0 .../configuration/application.yml.mustache | 19 +- .../configuration/git/git_push.sh.mustache | 0 .../configuration/git/gitignore.mustache | 0 .../gradle/build.gradle.mustache | 10 +- .../gradle/gradle.properties.mustache | 1 + .../gradle/settings.gradle.mustache | 0 .../configuration/gradlew/gradle-wrapper.jar | 0 .../gradle-wrapper.properties.mustache | 0 .../gradlew/gradlew.bat.mustache | 0 .../configuration/gradlew/gradlew.mustache | 0 .../common/configuration/logback.xml.mustache | 15 + .../MavenWrapperDownloader.java.mustache | 0 .../mavenw/maven-wrapper.jar.mustache | Bin .../mavenw/maven-wrapper.properties.mustache | 0 .../configuration/mavenw/mvnw.bat.mustache | 0 .../configuration/mavenw/mvnw.mustache | 0 .../common}/configuration/pom.xml.mustache | 8 +- .../common}/doc/enum_outer_doc.mustache | 2 + .../common/doc/model_doc.mustache | 4 + .../common}/doc/pojo_doc.mustache | 33 +- .../common}/generatedAnnotation.mustache | 0 .../common}/licenseInfo.mustache | 0 .../common/model/beanValidation.mustache | 52 + .../common/model/jackson_annotations.mustache | 26 + .../common}/model/model.mustache | 8 +- .../common/model/modelEnum.mustache} | 43 +- .../common/model/modelInnerEnum.mustache | 60 + .../common}/model/oneof_interface.mustache | 2 +- .../java-micronaut/common/model/pojo.mustache | 342 ++++ .../common}/model/typeInfoAnnotation.mustache | 0 .../common}/model/xmlAnnotation.mustache | 0 .../common}/params/beanValidation.mustache | 11 +- .../common/test/model_test.groovy.mustache | 46 + .../common/test/model_test.mustache | 49 + .../java-micronaut/server/controller.mustache | 129 ++ .../server/controllerImplementation.mustache | 34 + .../server/controllerOperationBody.mustache | 17 + .../java-micronaut/server/doc/README.mustache | 27 + .../server/doc/controller_doc.mustache | 63 + .../server/params/bodyParams.mustache | 7 + .../server/params/cookieParams.mustache | 1 + .../server/params/formParams.mustache | 1 + .../server/params/headerParams.mustache | 1 + .../server/params/pathParams.mustache | 1 + .../server/params/queryParams.mustache | 1 + .../server/params/type.mustache | 7 + .../test/controller_test.groovy.mustache | 185 ++ .../server/test/controller_test.mustache | 185 ++ .../AbstractMicronautCodegenTest.java | 125 ++ .../micronaut/MicronautClientCodegenTest.java | 160 +- .../micronaut/MicronautServerCodegenTest.java | 195 ++ pom.xml | 12 + .../.openapi-generator/FILES | 113 +- .../petstore/java-micronaut-client/README.md | 12 +- .../java-micronaut-client/build.gradle | 6 +- .../docs/{ => apis}/AnotherFakeApi.md | 0 .../docs/{ => apis}/FakeApi.md | 8 +- .../{ => apis}/FakeClassnameTags123Api.md | 0 .../docs/{ => apis}/PetApi.md | 0 .../docs/{ => apis}/StoreApi.md | 0 .../docs/{ => apis}/UserApi.md | 0 .../docs/{ => apis}/auth.md | 0 .../AdditionalPropertiesAnyType.md | 4 +- .../{ => models}/AdditionalPropertiesArray.md | 4 +- .../AdditionalPropertiesBoolean.md | 4 +- .../{ => models}/AdditionalPropertiesClass.md | 8 + .../AdditionalPropertiesInteger.md | 4 +- .../AdditionalPropertiesNumber.md | 4 +- .../AdditionalPropertiesObject.md | 4 +- .../AdditionalPropertiesString.md | 4 +- .../docs/{ => models}/Animal.md | 3 +- .../{ => models}/ArrayOfArrayOfNumberOnly.md | 4 +- .../docs/{ => models}/ArrayOfNumberOnly.md | 4 +- .../docs/{ => models}/ArrayTest.md | 2 +- .../docs/{ => models}/BigCat.md | 16 +- .../docs/{ => models}/BigCatAllOf.md | 16 +- .../docs/{ => models}/Capitalization.md | 3 + .../docs/{ => models}/Cat.md | 4 +- .../docs/{ => models}/CatAllOf.md | 4 +- .../docs/{ => models}/Category.md | 3 +- .../docs/{ => models}/ClassModel.md | 5 +- .../docs/{ => models}/Dog.md | 4 +- .../docs/{ => models}/DogAllOf.md | 4 +- .../docs/{ => models}/EnumArrays.md | 19 +- .../docs/{ => models}/EnumClass.md | 2 + .../docs/{ => models}/EnumTest.md | 28 +- .../docs/{ => models}/FileSchemaTestClass.md | 3 +- .../docs/{ => models}/FormatTest.md | 11 + .../docs/{ => models}/HasOnlyReadOnly.md | 3 +- .../docs/{ => models}/MapTest.md | 9 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../docs/{ => models}/Model200Response.md | 4 +- .../docs/{ => models}/ModelApiResponse.md | 2 +- .../docs/{ => models}/ModelClient.md | 4 +- .../docs/{ => models}/ModelFile.md | 5 +- .../docs/{ => models}/ModelList.md | 4 +- .../docs/{ => models}/ModelReturn.md | 5 +- .../docs/{ => models}/Name.md | 2 + .../docs/{ => models}/NumberOnly.md | 4 +- .../docs/{ => models}/Order.md | 13 +- .../docs/{ => models}/OuterComposite.md | 2 +- .../docs/{ => models}/OuterEnum.md | 2 + .../docs/{ => models}/Pet.md | 13 +- .../docs/{ => models}/ReadOnlyFirst.md | 3 +- .../docs/{ => models}/SpecialModelName.md | 4 +- .../docs/{ => models}/Tag.md | 3 +- .../docs/{ => models}/TypeHolderDefault.md | 2 + .../docs/{ => models}/TypeHolderExample.md | 3 + .../docs/{ => models}/User.md | 5 + .../docs/{ => models}/XmlItem.md | 26 + .../java-micronaut-client/gradle.properties | 2 +- .../petstore/java-micronaut-client/pom.xml | 4 +- .../org/openapitools/api/AnotherFakeApi.java | 26 +- .../java/org/openapitools/api/FakeApi.java | 419 ++-- .../api/FakeClassnameTags123Api.java | 26 +- .../java/org/openapitools/api/PetApi.java | 214 +- .../java/org/openapitools/api/StoreApi.java | 83 +- .../java/org/openapitools/api/UserApi.java | 165 +- .../model/AdditionalPropertiesAnyType.java | 113 +- .../model/AdditionalPropertiesArray.java | 113 +- .../model/AdditionalPropertiesBoolean.java | 113 +- .../model/AdditionalPropertiesClass.java | 702 +++---- .../model/AdditionalPropertiesInteger.java | 113 +- .../model/AdditionalPropertiesNumber.java | 113 +- .../model/AdditionalPropertiesObject.java | 113 +- .../model/AdditionalPropertiesString.java | 113 +- .../java/org/openapitools/model/Animal.java | 176 +- .../model/ArrayOfArrayOfNumberOnly.java | 120 +- .../openapitools/model/ArrayOfNumberOnly.java | 120 +- .../org/openapitools/model/ArrayTest.java | 286 +-- .../java/org/openapitools/model/BigCat.java | 179 +- .../org/openapitools/model/BigCatAllOf.java | 174 +- .../openapitools/model/Capitalization.java | 406 ++-- .../main/java/org/openapitools/model/Cat.java | 113 +- .../java/org/openapitools/model/CatAllOf.java | 108 +- .../java/org/openapitools/model/Category.java | 176 +- .../org/openapitools/model/ClassModel.java | 108 +- .../main/java/org/openapitools/model/Dog.java | 113 +- .../java/org/openapitools/model/DogAllOf.java | 108 +- .../org/openapitools/model/EnumArrays.java | 284 +-- .../org/openapitools/model/EnumClass.java | 56 +- .../java/org/openapitools/model/EnumTest.java | 540 ++--- .../model/FileSchemaTestClass.java | 192 +- .../org/openapitools/model/FormatTest.java | 906 ++++----- .../openapitools/model/HasOnlyReadOnly.java | 120 +- .../java/org/openapitools/model/MapTest.java | 344 ++-- ...ropertiesAndAdditionalPropertiesClass.java | 218 +- .../openapitools/model/Model200Response.java | 176 +- .../openapitools/model/ModelApiResponse.java | 232 +-- .../org/openapitools/model/ModelClient.java | 108 +- .../org/openapitools/model/ModelFile.java | 108 +- .../org/openapitools/model/ModelList.java | 108 +- .../org/openapitools/model/ModelReturn.java | 108 +- .../java/org/openapitools/model/Name.java | 244 +-- .../org/openapitools/model/NumberOnly.java | 108 +- .../java/org/openapitools/model/Order.java | 444 ++-- .../openapitools/model/OuterComposite.java | 232 +-- .../org/openapitools/model/OuterEnum.java | 56 +- .../main/java/org/openapitools/model/Pet.java | 467 ++--- .../org/openapitools/model/ReadOnlyFirst.java | 138 +- .../openapitools/model/SpecialModelName.java | 108 +- .../main/java/org/openapitools/model/Tag.java | 176 +- .../openapitools/model/TypeHolderDefault.java | 360 ++-- .../openapitools/model/TypeHolderExample.java | 416 ++-- .../java/org/openapitools/model/User.java | 512 ++--- .../java/org/openapitools/model/XmlItem.java | 1806 +++++++++-------- .../src/main/resources/application.yml | 4 +- .../src/main/resources/logback.xml | 15 + .../petstore/java-micronaut-server/.gitignore | 21 + .../.mvn/wrapper/MavenWrapperDownloader.java | 124 ++ .../.mvn/wrapper/maren-wrapper.properties | 2 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 36 + .../.openapi-generator/VERSION | 1 + .../petstore/java-micronaut-server/README.md | 27 + .../java-micronaut-server/build.gradle | 43 + .../docs/controllers/PetController.md | 208 ++ .../docs/controllers/StoreController.md | 99 + .../docs/controllers/UserController.md | 189 ++ .../docs/models/Category.md | 18 + .../docs/models/ModelApiResponse.md | 20 + .../docs/models/Order.md | 33 + .../java-micronaut-server/docs/models/Pet.md | 33 + .../java-micronaut-server/docs/models/Tag.md | 18 + .../java-micronaut-server/docs/models/User.md | 30 + .../java-micronaut-server/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.jar | 0 .../gradle/wrapper/gradle-wrapper.properties | 5 + .../petstore/java-micronaut-server/gradlew | 185 ++ .../java-micronaut-server/gradlew.bat | 89 + .../petstore/java-micronaut-server/mvnw | 310 +++ .../petstore/java-micronaut-server/mvnw.bat | 182 ++ .../petstore/java-micronaut-server/pom.xml | 159 ++ .../java-micronaut-server/settings.gradle | 1 + .../java/org/openapitools/Application.java | 9 + .../controller/PetController.java | 286 +++ .../controller/StoreController.java | 136 ++ .../controller/UserController.java | 240 +++ .../java/org/openapitools/model/Category.java | 133 ++ .../openapitools/model/ModelApiResponse.java | 161 ++ .../java/org/openapitools/model/Order.java | 285 +++ .../main/java/org/openapitools/model/Pet.java | 302 +++ .../main/java/org/openapitools/model/Tag.java | 132 ++ .../java/org/openapitools/model/User.java | 306 +++ .../src/main/resources/application.yml | 18 + .../src/main/resources/logback.xml | 15 + .../controller/PetControllerSpec.groovy | 398 ++++ .../controller/StoreControllerSpec.groovy | 210 ++ .../controller/UserControllerSpec.groovy | 381 ++++ .../openapitools/model/CategorySpec.groovy | 37 + .../model/ModelApiResponseSpec.groovy | 44 + .../org/openapitools/model/OrderSpec.groovy | 66 + .../org/openapitools/model/PetSpec.groovy | 69 + .../org/openapitools/model/TagSpec.groovy | 37 + .../org/openapitools/model/UserSpec.groovy | 79 + 262 files changed, 14932 insertions(+), 8002 deletions(-) create mode 100644 bin/configs/java-micronaut-server.yaml create mode 100644 docs/generators/java-micronaut-server.md create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/api.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/gradle.properties.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/doc/model_doc.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/model/beanValidation.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/model/jackson_annotations.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/model/modelEnum.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/model/pojo.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/params/bodyParams.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/params/cookieParams.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/params/formParams.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/params/headerParams.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/params/pathParams.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/params/queryParams.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/query/QueryParam.mustache delete mode 100644 modules/openapi-generator/src/main/resources/java-micronaut-client/query/QueryParamBinder.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/auth/Authorization.mustache (94%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/auth/AuthorizationBinder.mustache (97%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/auth/AuthorizationFilter.mustache (99%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/auth/Authorizations.mustache (89%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/auth/configuration/ApiKeyAuthConfiguration.mustache (97%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/auth/configuration/ConfigurableAuthorization.mustache (84%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/auth/configuration/HttpBasicAuthConfiguration.mustache (96%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/doc/README.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/doc/api_doc.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/doc/auth.mustache (100%) create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/client/params/bodyParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/client/params/cookieParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/client/params/formParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/client/params/headerParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/client/params/pathParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/client/params/queryParams.mustache rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client}/params/type.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client/test}/api_test.groovy.mustache (88%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client/test}/api_test.mustache (88%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client/test}/model_test.groovy.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/client/test}/model_test.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/Application.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/application.yml.mustache (87%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/git/git_push.sh.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/git/gitignore.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/gradle/build.gradle.mustache (85%) create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/gradle.properties.mustache rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/gradle/settings.gradle.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/gradlew/gradle-wrapper.jar (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/gradlew/gradle-wrapper.properties.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/gradlew/gradlew.bat.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/gradlew/gradlew.mustache (100%) create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/logback.xml.mustache rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/mavenw/MavenWrapperDownloader.java.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/mavenw/maven-wrapper.jar.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/mavenw/maven-wrapper.properties.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/mavenw/mvnw.bat.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/mavenw/mvnw.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/configuration/pom.xml.mustache (97%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/doc/enum_outer_doc.mustache (58%) create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/doc/model_doc.mustache rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/doc/pojo_doc.mustache (76%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/generatedAnnotation.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/licenseInfo.mustache (100%) create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/model/beanValidation.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/model/model.mustache (91%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client/model/modelInnerEnum.mustache => java-micronaut/common/model/modelEnum.mustache} (52%) create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/model/modelInnerEnum.mustache rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/model/oneof_interface.mustache (77%) create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/model/typeInfoAnnotation.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/model/xmlAnnotation.mustache (100%) rename modules/openapi-generator/src/main/resources/{java-micronaut-client => java-micronaut/common}/params/beanValidation.mustache (82%) create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.groovy.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/controllerImplementation.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/controllerOperationBody.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/doc/README.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/doc/controller_doc.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/params/bodyParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/params/cookieParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/params/formParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/params/headerParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/params/pathParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/params/queryParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/params/type.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.groovy.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.mustache create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/AbstractMicronautCodegenTest.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java rename samples/client/petstore/java-micronaut-client/docs/{ => apis}/AnotherFakeApi.md (100%) rename samples/client/petstore/java-micronaut-client/docs/{ => apis}/FakeApi.md (99%) rename samples/client/petstore/java-micronaut-client/docs/{ => apis}/FakeClassnameTags123Api.md (100%) rename samples/client/petstore/java-micronaut-client/docs/{ => apis}/PetApi.md (100%) rename samples/client/petstore/java-micronaut-client/docs/{ => apis}/StoreApi.md (100%) rename samples/client/petstore/java-micronaut-client/docs/{ => apis}/UserApi.md (100%) rename samples/client/petstore/java-micronaut-client/docs/{ => apis}/auth.md (100%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/AdditionalPropertiesAnyType.md (57%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/AdditionalPropertiesArray.md (58%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/AdditionalPropertiesBoolean.md (57%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/AdditionalPropertiesClass.md (86%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/AdditionalPropertiesInteger.md (57%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/AdditionalPropertiesNumber.md (58%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/AdditionalPropertiesObject.md (58%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/AdditionalPropertiesString.md (58%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Animal.md (67%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ArrayOfArrayOfNumberOnly.md (63%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ArrayOfNumberOnly.md (63%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ArrayTest.md (78%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/BigCat.md (52%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/BigCatAllOf.md (52%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Capitalization.md (80%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Cat.md (65%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/CatAllOf.md (63%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Category.md (65%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ClassModel.md (68%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Dog.md (64%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/DogAllOf.md (63%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/EnumArrays.md (61%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/EnumClass.md (51%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/EnumTest.md (71%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/FileSchemaTestClass.md (69%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/FormatTest.md (86%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/HasOnlyReadOnly.md (69%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/MapTest.md (75%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/MixedPropertiesAndAdditionalPropertiesClass.md (66%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Model200Response.md (71%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ModelApiResponse.md (70%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ModelClient.md (62%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ModelFile.md (68%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ModelList.md (63%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ModelReturn.md (66%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Name.md (80%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/NumberOnly.md (63%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Order.md (72%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/OuterComposite.md (71%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/OuterEnum.md (55%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Pet.md (74%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/ReadOnlyFirst.md (68%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/SpecialModelName.md (62%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/Tag.md (69%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/TypeHolderDefault.md (72%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/TypeHolderExample.md (73%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/User.md (84%) rename samples/client/petstore/java-micronaut-client/docs/{ => models}/XmlItem.md (93%) create mode 100644 samples/client/petstore/java-micronaut-client/src/main/resources/logback.xml create mode 100644 samples/server/petstore/java-micronaut-server/.gitignore create mode 100644 samples/server/petstore/java-micronaut-server/.mvn/wrapper/MavenWrapperDownloader.java create mode 100644 samples/server/petstore/java-micronaut-server/.mvn/wrapper/maren-wrapper.properties create mode 100644 samples/server/petstore/java-micronaut-server/.openapi-generator-ignore create mode 100644 samples/server/petstore/java-micronaut-server/.openapi-generator/FILES create mode 100644 samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION create mode 100644 samples/server/petstore/java-micronaut-server/README.md create mode 100644 samples/server/petstore/java-micronaut-server/build.gradle create mode 100644 samples/server/petstore/java-micronaut-server/docs/controllers/PetController.md create mode 100644 samples/server/petstore/java-micronaut-server/docs/controllers/StoreController.md create mode 100644 samples/server/petstore/java-micronaut-server/docs/controllers/UserController.md create mode 100644 samples/server/petstore/java-micronaut-server/docs/models/Category.md create mode 100644 samples/server/petstore/java-micronaut-server/docs/models/ModelApiResponse.md create mode 100644 samples/server/petstore/java-micronaut-server/docs/models/Order.md create mode 100644 samples/server/petstore/java-micronaut-server/docs/models/Pet.md create mode 100644 samples/server/petstore/java-micronaut-server/docs/models/Tag.md create mode 100644 samples/server/petstore/java-micronaut-server/docs/models/User.md create mode 100644 samples/server/petstore/java-micronaut-server/gradle.properties create mode 100644 samples/server/petstore/java-micronaut-server/gradle/wrapper/gradle-wrapper.jar create mode 100644 samples/server/petstore/java-micronaut-server/gradle/wrapper/gradle-wrapper.properties create mode 100644 samples/server/petstore/java-micronaut-server/gradlew create mode 100644 samples/server/petstore/java-micronaut-server/gradlew.bat create mode 100644 samples/server/petstore/java-micronaut-server/mvnw create mode 100644 samples/server/petstore/java-micronaut-server/mvnw.bat create mode 100644 samples/server/petstore/java-micronaut-server/pom.xml create mode 100644 samples/server/petstore/java-micronaut-server/settings.gradle create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/Application.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java create mode 100644 samples/server/petstore/java-micronaut-server/src/main/resources/application.yml create mode 100644 samples/server/petstore/java-micronaut-server/src/main/resources/logback.xml create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/PetControllerSpec.groovy create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/StoreControllerSpec.groovy create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/UserControllerSpec.groovy create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/CategorySpec.groovy create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/OrderSpec.groovy create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/PetSpec.groovy create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/TagSpec.groovy create mode 100644 samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/UserSpec.groovy diff --git a/bin/configs/java-micronaut-client.yaml b/bin/configs/java-micronaut-client.yaml index 31722943924c..bf0720a69131 100644 --- a/bin/configs/java-micronaut-client.yaml +++ b/bin/configs/java-micronaut-client.yaml @@ -7,3 +7,4 @@ additionalProperties: configureAuth: "false" build: "all" test: "spock" + requiredPropertiesInConstructor: "false" diff --git a/bin/configs/java-micronaut-server.yaml b/bin/configs/java-micronaut-server.yaml new file mode 100644 index 000000000000..d0c4df9ac5e6 --- /dev/null +++ b/bin/configs/java-micronaut-server.yaml @@ -0,0 +1,10 @@ +generatorName: java-micronaut-server +outputDir: samples/server/petstore/java-micronaut-server/ +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + artifactId: petstore-micronaut-server + hideGenerationTimestamp: "true" + build: "all" + test: "spock" + requiredPropertiesInConstructor: "true" + useAuth: "false" diff --git a/docs/generators.md b/docs/generators.md index dc04b6f7452c..afd41cba7e37 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -99,6 +99,7 @@ The following generators are available: * [haskell-yesod (beta)](generators/haskell-yesod.md) * [java-camel](generators/java-camel.md) * [java-inflector](generators/java-inflector.md) +* [java-micronaut-server (beta)](generators/java-micronaut-server.md) * [java-msf4j](generators/java-msf4j.md) * [java-pkmst](generators/java-pkmst.md) * [java-play-framework](generators/java-play-framework.md) diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 00bb283b8c73..c1ba0089f6ba 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -29,7 +29,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |build|Specify for which build tool to generate files|
**gradle**
Gradle configuration is generated for the project
**all**
Both Gradle and Maven configurations are generated
**maven**
Maven configuration is generated for the project
|all| -|configPackage|Configuration package for generated code| |org.openapitools.configuration| |configureAuth|Configure all the authorization methods as specified in the file| |false| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| @@ -49,12 +48,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl |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| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| +|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.2.6| |modelPackage|package for generated models| |org.openapitools.model| |openApiNullable|Enable OpenAPI Jackson Nullable library| |true| |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|requiredPropertiesInConstructor|Allow only to create models with all the required properties provided in constructor| |true| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |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| @@ -64,7 +65,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |test|Specify which test tool to generate files for|
**junit**
Use JUnit as test tool
**spock**
Use Spock as test tool
|junit| -|title|Client service name| |OpenAPI Micronaut Client| +|title|Client service name| |null| |useBeanValidation|Use BeanValidation API annotations| |true| |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| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md new file mode 100644 index 000000000000..b99834e7c64e --- /dev/null +++ b/docs/generators/java-micronaut-server.md @@ -0,0 +1,314 @@ +--- +title: Documentation for the java-micronaut-server Generator +--- + +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | java-micronaut-server | pass this to the generate command after -g | +| generator stability | BETA | | +| generator type | SERVER | | +| generator language | Java | | +| helpTxt | Generates a Java Micronaut Server. | | + +## 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. + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|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| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-micronaut| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|build|Specify for which build tool to generate files|
**gradle**
Gradle configuration is generated for the project
**all**
Both Gradle and Maven configurations are generated
**maven**
Maven configuration is generated for the project
|all| +|controllerPackage|The package in which controllers will be generated| |org.openapitools.api| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|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| +|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|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| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateControllerAsAbstract|Generate an abstract class for controller to be extended. (apiPackage is then used for the abstract class, and controllerPackage is used for implementation that extends it.)| |false| +|generateControllerFromExamples|Generate the implementation of controller and tests from parameter and return examples that will verify that the api works as desired (for testing)| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| +|invokerPackage|root package for generated code| |org.openapitools| +|java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyDiscriminatorBehavior|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| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.2.6| +|modelPackage|package for generated models| |org.openapitools.model| +|openApiNullable|Enable OpenAPI Jackson Nullable library| |true| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|requiredPropertiesInConstructor|Allow only to create models with all the required properties provided in constructor| |true| +|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| +|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| +|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| +|sourceFolder|source folder for generated code| |src/main/java| +|test|Specify which test tool to generate files for|
**junit**
Use JUnit as test tool
**spock**
Use Spock as test tool
|junit| +|title|Client service name| |null| +|useAuth|Whether to import authorization and to annotate controller methods accordingly| |true| +|useBeanValidation|Use BeanValidation API annotations| |true| +|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| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|BigDecimal|java.math.BigDecimal| +|CompletedFileUpload|io.micronaut.http.multipart.CompletedFileUpload| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|LinkedHashSet|java.util.LinkedHashSet| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| +|set|LinkedHashSet| + + +## LANGUAGE PRIMITIVES + +
    +
  • Boolean
  • +
  • Double
  • +
  • Float
  • +
  • Integer
  • +
  • Long
  • +
  • Object
  • +
  • String
  • +
  • boolean
  • +
  • byte[]
  • +
+ +## RESERVED WORDS + +
    +
  • abstract
  • +
  • apiclient
  • +
  • apiexception
  • +
  • apiresponse
  • +
  • application
  • +
  • assert
  • +
  • authorization
  • +
  • body
  • +
  • boolean
  • +
  • break
  • +
  • byte
  • +
  • case
  • +
  • catch
  • +
  • char
  • +
  • class
  • +
  • client
  • +
  • configuration
  • +
  • const
  • +
  • continue
  • +
  • cookie
  • +
  • default
  • +
  • do
  • +
  • double
  • +
  • else
  • +
  • enum
  • +
  • extends
  • +
  • file
  • +
  • final
  • +
  • finally
  • +
  • float
  • +
  • for
  • +
  • format
  • +
  • goto
  • +
  • header
  • +
  • if
  • +
  • implements
  • +
  • import
  • +
  • instanceof
  • +
  • int
  • +
  • interface
  • +
  • list
  • +
  • localreturntype
  • +
  • localvaraccept
  • +
  • localvaraccepts
  • +
  • localvarauthnames
  • +
  • localvarcollectionqueryparams
  • +
  • localvarcontenttype
  • +
  • localvarcontenttypes
  • +
  • localvarcookieparams
  • +
  • localvarformparams
  • +
  • localvarheaderparams
  • +
  • localvarpath
  • +
  • localvarpostbody
  • +
  • localvarqueryparams
  • +
  • long
  • +
  • native
  • +
  • new
  • +
  • null
  • +
  • object
  • +
  • package
  • +
  • pathvariable
  • +
  • private
  • +
  • protected
  • +
  • public
  • +
  • queryparam
  • +
  • queryvalue
  • +
  • return
  • +
  • short
  • +
  • static
  • +
  • strictfp
  • +
  • stringutil
  • +
  • super
  • +
  • switch
  • +
  • synchronized
  • +
  • this
  • +
  • throw
  • +
  • throws
  • +
  • transient
  • +
  • try
  • +
  • void
  • +
  • volatile
  • +
  • while
  • +
+ +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension +|MockServer|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✓|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/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 new file mode 100644 index 000000000000..b8b8506e8f42 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java @@ -0,0 +1,511 @@ +package org.openapitools.codegen.languages; + +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.*; +import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.meta.features.SecurityFeature; + +import java.util.*; +import java.util.stream.Collectors; + +import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE; + +public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen implements BeanValidationFeatures { + public static final String OPT_TITLE = "title"; + public static final String OPT_BUILD = "build"; + public static final String OPT_BUILD_GRADLE = "gradle"; + public static final String OPT_BUILD_MAVEN = "maven"; + public static final String OPT_BUILD_ALL = "all"; + public static final String OPT_TEST = "test"; + public static final String OPT_TEST_JUNIT = "junit"; + public static final String OPT_TEST_SPOCK = "spock"; + public static final String OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR = "requiredPropertiesInConstructor"; + public static final String OPT_MICRONAUT_VERSION = "micronautVersion"; + public static final String OPT_USE_AUTH = "useAuth"; + + protected String title; + protected boolean useBeanValidation; + protected String buildTool; + protected String testTool; + protected boolean requiredPropertiesInConstructor = true; + protected String micronautVersion = "3.2.6"; + + public static final String CONTENT_TYPE_APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded"; + public static final String CONTENT_TYPE_APPLICATION_JSON = "application/json"; + public static final String CONTENT_TYPE_MULTIPART_FORM_DATA = "multipart/form-data"; + public static final String CONTENT_TYPE_ANY = "*/*"; + + public JavaMicronautAbstractCodegen() { + super(); + + // Set all the fields + useBeanValidation = true; + buildTool = OPT_BUILD_ALL; + testTool = OPT_TEST_JUNIT; + outputFolder = "generated-code/java-micronaut-client"; + templateDir = "java-micronaut/client"; + apiPackage = "org.openapitools.api"; + modelPackage = "org.openapitools.model"; + invokerPackage = "org.openapitools"; + artifactId = "openapi-micronaut"; + embeddedTemplateDir = templateDir = "java-micronaut"; + apiDocPath = "docs/apis"; + modelDocPath = "docs/models"; + + // Set implemented features for user information + modifyFeatureSet(features -> features + .includeDocumentationFeatures( + DocumentationFeature.Readme + ) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Password, + SecurityFeature.OpenIDConnect + )) + ); + + // Set additional properties + additionalProperties.put("jackson", "true"); + additionalProperties.put("openbrace", "{"); + additionalProperties.put("closebrace", "}"); + + // Set client options that will be presented to user + updateOption(INVOKER_PACKAGE, this.getInvokerPackage()); + updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); + updateOption(CodegenConstants.API_PACKAGE, apiPackage); + updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage); + + cliOptions.add(new CliOption(OPT_TITLE, "Client service name").defaultValue(title)); + cliOptions.add(new CliOption(OPT_MICRONAUT_VERSION, "Micronaut version, only >=3.0.0 versions are supported").defaultValue(micronautVersion)); + cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation)); + cliOptions.add(CliOption.newBoolean(OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, "Allow only to create models with all the required properties provided in constructor", requiredPropertiesInConstructor)); + + CliOption buildToolOption = new CliOption(OPT_BUILD, "Specify for which build tool to generate files").defaultValue(buildTool); + buildToolOption.setEnum(new HashMap() {{ + put(OPT_BUILD_GRADLE, "Gradle configuration is generated for the project"); + put(OPT_BUILD_MAVEN, "Maven configuration is generated for the project"); + put(OPT_BUILD_ALL, "Both Gradle and Maven configurations are generated"); + }}); + cliOptions.add(buildToolOption); + + CliOption testToolOption = new CliOption(OPT_TEST, "Specify which test tool to generate files for").defaultValue(testTool); + testToolOption.setEnum(new HashMap() {{ + put(OPT_TEST_JUNIT, "Use JUnit as test tool"); + put(OPT_TEST_SPOCK, "Use Spock as test tool"); + }}); + cliOptions.add(testToolOption); + + // Remove the date library option + cliOptions.stream().filter(o -> o.getOpt().equals("dateLibrary")).findFirst() + .ifPresent(v -> cliOptions.remove(v)); + + // Add reserved words + String[] reservedWordsArray = { + "client", "format", "queryvalue", "queryparam", "pathvariable", "header", "cookie", + "authorization", "body", "application" + }; + reservedWords.addAll(Arrays.asList(reservedWordsArray)); + } + + @Override + public void processOpts() { + super.processOpts(); + + // Get properties + if (additionalProperties.containsKey(OPT_TITLE)) { + this.title = (String) additionalProperties.get(OPT_TITLE); + } + + if (additionalProperties.containsKey(INVOKER_PACKAGE)) { + invokerPackage = (String) additionalProperties.get(INVOKER_PACKAGE); + } else { + additionalProperties.put(INVOKER_PACKAGE, invokerPackage); + } + + if (additionalProperties.containsKey(OPT_MICRONAUT_VERSION)) { + micronautVersion = (String) additionalProperties.get(OPT_MICRONAUT_VERSION); + } else { + additionalProperties.put(OPT_MICRONAUT_VERSION, micronautVersion); + } + + // Get boolean properties + if (additionalProperties.containsKey(USE_BEANVALIDATION)) { + this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION)); + } + writePropertyBack(USE_BEANVALIDATION, useBeanValidation); + + if (additionalProperties.containsKey(OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR)) { + this.requiredPropertiesInConstructor = convertPropertyToBoolean(OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR); + } + writePropertyBack(OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, requiredPropertiesInConstructor); + + // Get enum properties + if (additionalProperties.containsKey(OPT_BUILD)) { + switch ((String) additionalProperties.get(OPT_BUILD)) { + case OPT_BUILD_GRADLE: + case OPT_BUILD_MAVEN: + case OPT_BUILD_ALL: + this.buildTool = (String) additionalProperties.get(OPT_BUILD); + break; + default: + throw new RuntimeException("Build tool \"" + additionalProperties.get(OPT_BUILD) + "\" is not supported or misspelled."); + } + } + additionalProperties.put(OPT_BUILD, buildTool); + + if (additionalProperties.containsKey(OPT_TEST)) { + switch ((String) additionalProperties.get(OPT_TEST)) { + case OPT_TEST_JUNIT: + case OPT_TEST_SPOCK: + this.testTool = (String) additionalProperties.get(OPT_TEST); + break; + default: + throw new RuntimeException("Test tool \"" + additionalProperties.get(OPT_TEST) + "\" is not supported or misspelled."); + } + } + additionalProperties.put(OPT_TEST, testTool); + if (testTool.equals(OPT_TEST_JUNIT)) { + additionalProperties.put("isTestJunit", true); + } else if (testTool.equals(OPT_TEST_SPOCK)) { + additionalProperties.put("isTestSpock", true); + } + + // Add all the supporting files + String resourceFolder = projectFolder + "/resources"; + supportingFiles.add(new SupportingFile("common/configuration/application.yml.mustache", resourceFolder, "application.yml").doNotOverwrite()); + supportingFiles.add(new SupportingFile("common/configuration/logback.xml.mustache", resourceFolder, "logback.xml").doNotOverwrite()); + + if (buildTool.equals(OPT_BUILD_GRADLE) || buildTool.equals(OPT_BUILD_ALL)) { + // Gradle files + supportingFiles.add(new SupportingFile("common/configuration/gradle/build.gradle.mustache", "", "build.gradle").doNotOverwrite()); + supportingFiles.add(new SupportingFile("common/configuration/gradle/settings.gradle.mustache", "", "settings.gradle").doNotOverwrite()); + supportingFiles.add(new SupportingFile("common/configuration/gradle/gradle.properties.mustache", "", "gradle.properties").doNotOverwrite()); + + // Gradlew files + final String gradleWrapperFolder = "gradle/wrapper"; + supportingFiles.add(new SupportingFile("common/configuration/gradlew/gradlew.mustache", "", "gradlew")); + supportingFiles.add(new SupportingFile("common/configuration/gradlew/gradlew.bat.mustache", "", "gradlew.bat")); + supportingFiles.add(new SupportingFile("common/configuration/gradlew/gradle-wrapper.properties.mustache", gradleWrapperFolder, "gradle-wrapper.properties")); + supportingFiles.add(new SupportingFile("common/configuration/gradlew/gradle-wrapper.jar", gradleWrapperFolder, "gradle-wrapper.jar")); + } + + if (buildTool.equals(OPT_BUILD_MAVEN) || buildTool.equals(OPT_BUILD_ALL)) { + // Maven files + supportingFiles.add(new SupportingFile("common/configuration/pom.xml.mustache", "", "pom.xml").doNotOverwrite()); + + // Maven wrapper files + supportingFiles.add(new SupportingFile("common/configuration/mavenw/mvnw.mustache", "", "mvnw")); + supportingFiles.add(new SupportingFile("common/configuration/mavenw/mvnw.bat.mustache", "", "mvnw.bat")); + supportingFiles.add(new SupportingFile("common/configuration/mavenw/MavenWrapperDownloader.java.mustache", ".mvn/wrapper", "MavenWrapperDownloader.java")); + supportingFiles.add(new SupportingFile("common/configuration/mavenw/maven-wrapper.jar.mustache", ".mvn/wrapper", "maven-wrapper.jar")); + supportingFiles.add(new SupportingFile("common/configuration/mavenw/maven-wrapper.properties.mustache", ".mvn/wrapper", "maren-wrapper.properties")); + } + + // Git files + supportingFiles.add(new SupportingFile("common/configuration/git/gitignore.mustache", "", ".gitignore").doNotOverwrite()); + + // Use the default java LocalDate + typeMapping.put("date", "LocalDate"); + typeMapping.put("DateTime", "LocalDateTime"); + importMapping.put("LocalDate", "java.time.LocalDate"); + importMapping.put("LocalDateTime", "java.time.LocalDateTime"); + + // Add documentation files + modelDocTemplateFiles.clear(); + modelDocTemplateFiles.put("common/doc/model_doc.mustache", ".md"); + + // Add model files + modelTemplateFiles.clear(); + modelTemplateFiles.put("common/model/model.mustache", ".java"); + + // Add test files + modelTestTemplateFiles.clear(); + if (testTool.equals(OPT_TEST_JUNIT)) { + modelTestTemplateFiles.put("common/test/model_test.mustache", ".java"); + } else if (testTool.equals(OPT_TEST_SPOCK)) { + modelTestTemplateFiles.put("common/test/model_test.groovy.mustache", ".groovy"); + } + + // Set properties for documentation + final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/"); + final String apiFolder = (sourceFolder + '/' + apiPackage()).replace('.', '/'); + final String modelFolder = (sourceFolder + '/' + modelPackage()).replace('.', '/'); + additionalProperties.put("invokerFolder", invokerFolder); + additionalProperties.put("resourceFolder", resourceFolder); + additionalProperties.put("apiFolder", apiFolder); + additionalProperties.put("modelFolder", modelFolder); + } + + @Override + public String apiTestFileFolder() { + if (testTool.equals(OPT_TEST_SPOCK)) { + return getOutputDir() + "/src/test/groovy/" + apiPackage().replaceAll("\\.", "/"); + } + return getOutputDir() + "/src/test/java/" + apiPackage().replaceAll("\\.", "/"); + } + + @Override + public String modelTestFileFolder() { + if (testTool.equals(OPT_TEST_SPOCK)) { + return getOutputDir() + "/src/test/groovy/" + modelPackage().replaceAll("\\.", "/"); + } + return getOutputDir() + "/src/test/java/" + modelPackage().replaceAll("\\.", "/"); + } + + @Override + public String toApiTestFilename(String name) { + if (testTool.equals(OPT_TEST_SPOCK)) { + return toApiName(name) + "Spec"; + } + return toApiName(name) + "Test"; + } + + @Override + public String toModelTestFilename(String name) { + if (testTool.equals(OPT_TEST_SPOCK)) { + return toModelName(name) + "Spec"; + } + return toModelName(name) + "Test"; + } + + @Override + public void setUseBeanValidation(boolean useBeanValidation) { + this.useBeanValidation = useBeanValidation; + } + + @Override + public String toApiVarName(String name) { + String apiVarName = super.toApiVarName(name); + if (reservedWords.contains(apiVarName)) { + apiVarName = escapeReservedWord(apiVarName); + } + return apiVarName; + } + + public boolean isUseBeanValidation() { + return useBeanValidation; + } + + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + objs = super.postProcessOperationsWithModels(objs, allModels); + + Map models = allModels.stream() + .map(v -> ((Map) v).get("model")) + .collect(Collectors.toMap(v -> v.classname, v -> v)); + Map operations = (Map) objs.get("operations"); + List operationList = (List) operations.get("operation"); + + for (CodegenOperation op : operationList) { + // Set whether body is supported in request + op.vendorExtensions.put("methodAllowsBody", + op.httpMethod.equals("PUT") || op.httpMethod.equals("POST") || op.httpMethod.equals("PATCH")); + + // Set response example + if (op.returnType != null) { + String example; + String groovyExample; + if (models.containsKey(op.returnType)) { + CodegenModel m = models.get(op.returnType); + List allowableValues = null; + if (m.allowableValues != null && m.allowableValues.containsKey("values")) { + allowableValues = (List) m.allowableValues.get("values"); + } + example = getExampleValue(m.defaultValue, null, m.classname, true, + allowableValues, null, null, m.requiredVars, false); + groovyExample = getExampleValue(m.defaultValue, null, m.classname, true, + allowableValues, null, null, m.requiredVars, true); + } else { + example = getExampleValue(null, null, op.returnType, false, null, + op.returnBaseType, null, null, false); + groovyExample = getExampleValue(null, null, op.returnType, false, null, + op.returnBaseType, null, null, true); + } + op.vendorExtensions.put("example", example); + op.vendorExtensions.put("groovyExample", groovyExample); + } + + // Remove the "*/*" contentType from operations as it is ambiguous + if (CONTENT_TYPE_ANY.equals(op.vendorExtensions.get("x-contentType"))) { + op.vendorExtensions.put("x-contentType", CONTENT_TYPE_APPLICATION_JSON); + } + op.consumes = op.consumes == null ? null : op.consumes.stream() + .filter(contentType -> !CONTENT_TYPE_ANY.equals(contentType.get("mediaType"))) + .collect(Collectors.toList()); + op.produces = op.produces == null ? null : op.produces.stream() + .filter(contentType -> !CONTENT_TYPE_ANY.equals(contentType.get("mediaType"))) + .collect(Collectors.toList()); + + // Force form parameters are only set if the content-type is according + // formParams correspond to urlencoded type + // bodyParams correspond to multipart body + if (CONTENT_TYPE_APPLICATION_FORM_URLENCODED.equals(op.vendorExtensions.get("x-contentType"))) { + op.formParams.addAll(op.bodyParams); + op.bodyParams.forEach(p -> { + p.isBodyParam = false; + p.isFormParam = true; + }); + op.bodyParams.clear(); + } else if (CONTENT_TYPE_MULTIPART_FORM_DATA.equals(op.vendorExtensions.get("x-contentType"))) { + op.bodyParams.addAll(op.formParams); + op.formParams.forEach(p -> { + p.isBodyParam = true; + p.isFormParam = false; + }); + op.formParams.clear(); + } + } + + return objs; + } + + @Override + public Map postProcessAllModels(Map objs) { + objs = super.postProcessAllModels(objs); + + for (String modelName: objs.keySet()) { + CodegenModel model = ((Map>>) objs.get(modelName)) + .get("models").get(0).get("model"); + if (model.getParentModel() != null) { + model.vendorExtensions.put("requiredParentVars", model.getParentModel().requiredVars); + } + + List requiredVars = model.vars.stream().filter(v -> v.required).collect(Collectors.toList()); + model.vendorExtensions.put("requiredVars", requiredVars); + } + + return objs; + } + + @Override + public void setParameterExampleValue(CodegenParameter p) { + p.vendorExtensions.put("groovyExample", getParameterExampleValue(p, true)); + p.example = getParameterExampleValue(p, false); + } + + protected String getParameterExampleValue(CodegenParameter p, boolean groovy) { + List allowableValues = p.allowableValues == null ? null : (List) p.allowableValues.get("values"); + + return getExampleValue(p.defaultValue, p.example, p.dataType, p.isModel, allowableValues, + p.items == null ? null : p.items.dataType, + p.items == null ? null : p.items.defaultValue, + p.requiredVars, groovy); + } + + protected String getPropertyExampleValue(CodegenProperty p, boolean groovy) { + List allowableValues = p.allowableValues == null ? null : (List) p.allowableValues.get("values"); + + return getExampleValue(p.defaultValue, p.example, p.dataType, p.isModel, allowableValues, + p.items == null ? null : p.items.dataType, + p.items == null ? null : p.items.defaultValue, + null, groovy); + } + + public String getExampleValue( + String defaultValue, String example, String dataType, Boolean isModel, List allowableValues, + String itemsType, String itemsExample, List requiredVars, boolean groovy + ) { + example = defaultValue != null ? defaultValue : example; + String containerType = dataType == null ? null : dataType.split("<")[0]; + + if ("String".equals(dataType)) { + if (groovy) { + example = example != null ? "'" + escapeTextGroovy(example) + "'" : "'example'"; + } else { + example = example != null ? "\"" + escapeText(example) + "\"" : "\"example\""; + } + } else if ("Integer".equals(dataType) || "Short".equals(dataType)) { + example = example != null ? example : "56"; + } else if ("Long".equals(dataType)) { + example = StringUtils.appendIfMissingIgnoreCase(example != null ? example : "56", "L"); + } else if ("Float".equals(dataType)) { + example = StringUtils.appendIfMissingIgnoreCase(example != null ? example : "3.4", "F"); + } else if ("Double".equals(dataType)) { + example = StringUtils.appendIfMissingIgnoreCase(example != null ? example : "3.4", "D"); + } else if ("Boolean".equals(dataType)) { + example = example != null ? example : "false"; + } else if ("File".equals(dataType)) { + example = null; + } else if ("LocalDate".equals(dataType)) { + example = "LocalDate.of(2001, 2, 3)"; + } else if ("LocalDateTime".equals(dataType)) { + example = "LocalDateTime.of(2001, 2, 3, 4, 5)"; + } else if ("BigDecimal".equals(dataType)) { + example = "new BigDecimal(78)"; + } else if (allowableValues != null && !allowableValues.isEmpty()) { + // This is an enum + Object value = example; + if (value == null || !allowableValues.contains(value)) { + value = allowableValues.get(0); + } + example = dataType + ".fromValue(\"" + value + "\")"; + } else if ((isModel != null && isModel) || (isModel == null && !languageSpecificPrimitives.contains(dataType))) { + if (requiredVars == null) { + example = null; + } else { + if (requiredPropertiesInConstructor) { + StringBuilder builder = new StringBuilder(); + builder.append("new ").append(dataType).append("("); + for (int i = 0; i < requiredVars.size(); ++i) { + if (i != 0) { + builder.append(", "); + } + builder.append(getPropertyExampleValue(requiredVars.get(i), groovy)); + } + builder.append(")"); + example = builder.toString(); + } else { + example = "new " + dataType + "()"; + } + } + } + + if ("List".equals(containerType)) { + String innerExample; + if ("String".equals(itemsType)) { + itemsExample = itemsExample != null ? itemsExample : "example"; + if (groovy) { + innerExample = "'" + escapeTextGroovy(itemsExample) + "'"; + } else { + innerExample = "\"" + escapeText(itemsExample) + "\""; + } + } else { + innerExample = itemsExample != null ? itemsExample : ""; + } + + if (groovy) { + example = "[" + innerExample + "]"; + } else { + example = "Arrays.asList(" + innerExample + ")"; + } + } else if ("Set".equals(containerType)) { + if (groovy) { + example = "[].asSet()"; + } else { + example = "new HashSet<>()"; + } + } else if ("Map".equals(containerType)) { + if (groovy) { + example = "[:]"; + } else { + example = "new HashMap<>()"; + } + } else if (example == null) { + example = "null"; + } + + return example; + } + + public String escapeTextGroovy(String text) { + if (text == null) { + return null; + } + return escapeText(text).replaceAll("'", "\\'"); + } +} 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 f3d398c8e763..997ecf317230 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,127 +1,36 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; -import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; -import org.openapitools.codegen.meta.features.DocumentationFeature; -import org.openapitools.codegen.meta.features.SecurityFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Arrays; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; -import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE; - - -public class JavaMicronautClientCodegen extends AbstractJavaCodegen implements BeanValidationFeatures { +public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen { private final Logger LOGGER = LoggerFactory.getLogger(JavaClientCodegen.class); - public static final String OPT_TITLE = "title"; - public static final String OPT_CONFIG_PACKAGE = "configPackage"; public static final String OPT_CONFIGURE_AUTH = "configureAuth"; - public static final String OPT_BUILD = "build"; - public static final String OPT_BUILD_GRADLE = "gradle"; - public static final String OPT_BUILD_MAVEN = "maven"; - public static final String OPT_BUILD_ALL = "all"; - public static final String OPT_TEST = "test"; - public static final String OPT_TEST_JUNIT = "junit"; - public static final String OPT_TEST_SPOCK = "spock"; public static final String NAME = "java-micronaut-client"; - protected String title; - protected String configPackage; - protected boolean useBeanValidation; protected boolean configureAuthorization; - protected String buildTool; - protected String testTool; public JavaMicronautClientCodegen() { super(); title = "OpenAPI Micronaut Client"; - invokerPackage = "org.openapitools"; - configPackage = "org.openapitools.configuration"; - useBeanValidation = true; configureAuthorization = false; - buildTool = OPT_BUILD_ALL; - testTool = OPT_TEST_JUNIT; - - modifyFeatureSet(features -> features - .includeDocumentationFeatures( - DocumentationFeature.Readme - ) - .securityFeatures(EnumSet.of( - SecurityFeature.ApiKey, - SecurityFeature.BasicAuth, - SecurityFeature.OAuth2_Implicit, - SecurityFeature.OAuth2_AuthorizationCode, - SecurityFeature.OAuth2_ClientCredentials, - SecurityFeature.OAuth2_Password, - SecurityFeature.OpenIDConnect - )) - ); generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); + additionalProperties.put("client", "true"); - outputFolder = "generated-code/java-micronaut-client"; - embeddedTemplateDir = templateDir = "java-micronaut-client"; - apiPackage = "org.openapitools.api"; - modelPackage = "org.openapitools.model"; - invokerPackage = "org.openapitools"; - artifactId = "openapi-micronaut"; - - updateOption(INVOKER_PACKAGE, this.getInvokerPackage()); - updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); - updateOption(CodegenConstants.API_PACKAGE, apiPackage); - updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage); - - apiTestTemplateFiles.clear(); - - additionalProperties.put("jackson", "true"); - additionalProperties.put("openbrace", "{"); - additionalProperties.put("closebrace", "}"); - - cliOptions.add(new CliOption(OPT_TITLE, "Client service name").defaultValue(title)); - cliOptions.add(new CliOption(OPT_CONFIG_PACKAGE, "Configuration package for generated code").defaultValue(configPackage)); cliOptions.add(CliOption.newBoolean(OPT_CONFIGURE_AUTH, "Configure all the authorization methods as specified in the file", configureAuthorization)); - cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation)); - - CliOption buildToolOption = new CliOption(OPT_BUILD, "Specify for which build tool to generate files").defaultValue(buildTool); - Map buildToolOptionMap = new HashMap(); - buildToolOptionMap.put(OPT_BUILD_GRADLE, "Gradle configuration is generated for the project"); - buildToolOptionMap.put(OPT_BUILD_MAVEN, "Maven configuration is generated for the project"); - buildToolOptionMap.put(OPT_BUILD_ALL, "Both Gradle and Maven configurations are generated"); - buildToolOption.setEnum(buildToolOptionMap); - cliOptions.add(buildToolOption); - - CliOption testToolOption = new CliOption(OPT_TEST, "Specify which test tool to generate files for").defaultValue(testTool); - Map testToolOptionMap = new HashMap(); - testToolOptionMap.put(OPT_TEST_JUNIT, "Use JUnit as test tool"); - testToolOptionMap.put(OPT_TEST_SPOCK, "Use Spock as test tool"); - testToolOption.setEnum(testToolOptionMap); - cliOptions.add(testToolOption); - - // Remove the date library option - cliOptions.stream().filter(o -> o.getOpt().equals("dateLibrary")).findFirst() - .ifPresent(v -> cliOptions.remove(v)); - - // Add reserved words - String[] reservedWordsArray = { - "client", "format", "queryvalue", "queryparam", "pathvariable", "header", "cookie", - "authorization", "body", "application" - }; - reservedWords.addAll(Arrays.asList(reservedWordsArray)); } @Override @@ -139,202 +48,53 @@ public String getHelp() { return "Generates a Java Micronaut Client."; } + public boolean isConfigureAuthorization() { + return configureAuthorization; + } + @Override public void processOpts() { super.processOpts(); - // Get properties - if (additionalProperties.containsKey(OPT_TITLE)) { - this.title = (String) additionalProperties.get(OPT_TITLE); - } - - if (additionalProperties.containsKey(OPT_CONFIG_PACKAGE)) { - configPackage = (String) additionalProperties.get(OPT_CONFIG_PACKAGE); - } else { - additionalProperties.put(OPT_CONFIG_PACKAGE, configPackage); - } - - if (additionalProperties.containsKey(INVOKER_PACKAGE)) { - invokerPackage = (String) additionalProperties.get(INVOKER_PACKAGE); - } else { - additionalProperties.put(INVOKER_PACKAGE, invokerPackage); - } - - // Get boolean properties - if (additionalProperties.containsKey(USE_BEANVALIDATION)) { - this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION)); - } - writePropertyBack(USE_BEANVALIDATION, useBeanValidation); - if (additionalProperties.containsKey(OPT_CONFIGURE_AUTH)) { this.configureAuthorization = convertPropertyToBoolean(OPT_CONFIGURE_AUTH); } writePropertyBack(OPT_CONFIGURE_AUTH, configureAuthorization); - // Get enum properties - if (additionalProperties.containsKey(OPT_BUILD)) { - switch ((String) additionalProperties.get(OPT_BUILD)) { - case OPT_BUILD_GRADLE: - case OPT_BUILD_MAVEN: - case OPT_BUILD_ALL: - this.buildTool = (String) additionalProperties.get(OPT_BUILD); - break; - default: - throw new RuntimeException("Build tool \"" + additionalProperties.get(OPT_BUILD) + "\" is not supported or misspelled."); - } - } - additionalProperties.put(OPT_BUILD, buildTool); - - if (additionalProperties.containsKey(OPT_TEST)) { - switch ((String) additionalProperties.get(OPT_TEST)) { - case OPT_TEST_JUNIT: - case OPT_TEST_SPOCK: - this.testTool = (String) additionalProperties.get(OPT_TEST); - break; - default: - throw new RuntimeException("Test tool \"" + additionalProperties.get(OPT_TEST) + "\" is not supported or misspelled."); - } - } - additionalProperties.put(OPT_TEST, testTool); - if (testTool.equals(OPT_TEST_JUNIT)) { - additionalProperties.put("isTestJunit", true); - } else if (testTool.equals(OPT_TEST_SPOCK)) { - additionalProperties.put("isTestSpock", true); - } + // Write property that is present in server + writePropertyBack(OPT_USE_AUTH, true); final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/"); - final String apiFolder = (sourceFolder + '/' + apiPackage).replace(".", "/"); - - // Add all the supporting files - String resourceFolder = projectFolder + "/resources"; - supportingFiles.add(new SupportingFile("configuration/application.yml.mustache", resourceFolder, "application.yml").doNotOverwrite()); // Authorization files if (configureAuthorization) { final String authFolder = invokerFolder + "/auth"; - supportingFiles.add(new SupportingFile("auth/Authorization.mustache", authFolder, "Authorization.java")); - supportingFiles.add(new SupportingFile("auth/AuthorizationBinder.mustache", authFolder, "AuthorizationBinder.java")); - supportingFiles.add(new SupportingFile("auth/Authorizations.mustache", authFolder, "Authorizations.java")); - supportingFiles.add(new SupportingFile("auth/AuthorizationFilter.mustache", authFolder, "AuthorizationFilter.java")); + supportingFiles.add(new SupportingFile("client/auth/Authorization.mustache", authFolder, "Authorization.java")); + supportingFiles.add(new SupportingFile("client/auth/AuthorizationBinder.mustache", authFolder, "AuthorizationBinder.java")); + supportingFiles.add(new SupportingFile("client/auth/Authorizations.mustache", authFolder, "Authorizations.java")); + supportingFiles.add(new SupportingFile("client/auth/AuthorizationFilter.mustache", authFolder, "AuthorizationFilter.java")); final String authConfigurationFolder = authFolder + "/configuration"; - supportingFiles.add(new SupportingFile("auth/configuration/ApiKeyAuthConfiguration.mustache", authConfigurationFolder, "ApiKeyAuthConfiguration.java")); - supportingFiles.add(new SupportingFile("auth/configuration/ConfigurableAuthorization.mustache", authConfigurationFolder, "ConfigurableAuthorization.java")); - supportingFiles.add(new SupportingFile("auth/configuration/HttpBasicAuthConfiguration.mustache", authConfigurationFolder, "HttpBasicAuthConfiguration.java")); - } - - // Query files - final String queryFolder = invokerFolder + "/query"; - supportingFiles.add(new SupportingFile("query/QueryParam.mustache", queryFolder, "QueryParam.java")); - supportingFiles.add(new SupportingFile("query/QueryParamBinder.mustache", queryFolder, "QueryParamBinder.java")); - - if (buildTool.equals(OPT_BUILD_GRADLE) || buildTool.equals(OPT_BUILD_ALL)) { - // Gradle files - supportingFiles.add(new SupportingFile("configuration/gradle/build.gradle.mustache", "", "build.gradle").doNotOverwrite()); - supportingFiles.add(new SupportingFile("configuration/gradle/settings.gradle.mustache", "", "settings.gradle").doNotOverwrite()); - supportingFiles.add(new SupportingFile("configuration/gradle/gradle.properties.mustache", "", "gradle.properties").doNotOverwrite()); - - // Gradlew files - final String gradleWrapperFolder = "gradle/wrapper"; - supportingFiles.add(new SupportingFile("configuration/gradlew/gradlew.mustache", "", "gradlew")); - supportingFiles.add(new SupportingFile("configuration/gradlew/gradlew.bat.mustache", "", "gradlew.bat")); - supportingFiles.add(new SupportingFile("configuration/gradlew/gradle-wrapper.properties.mustache", gradleWrapperFolder, "gradle-wrapper.properties")); - supportingFiles.add(new SupportingFile("configuration/gradlew/gradle-wrapper.jar", gradleWrapperFolder, "gradle-wrapper.jar")); - } - - if (buildTool.equals(OPT_BUILD_MAVEN) || buildTool.equals(OPT_BUILD_ALL)) { - // Maven files - supportingFiles.add(new SupportingFile("configuration/pom.xml.mustache", "", "pom.xml").doNotOverwrite()); - - // Maven wrapper files - supportingFiles.add(new SupportingFile("configuration/mavenw/mvnw.mustache", "", "mvnw")); - supportingFiles.add(new SupportingFile("configuration/mavenw/mvnw.bat.mustache", "", "mvnw.bat")); - supportingFiles.add(new SupportingFile("configuration/mavenw/MavenWrapperDownloader.java.mustache", ".mvn/wrapper", "MavenWrapperDownloader.java")); - supportingFiles.add(new SupportingFile("configuration/mavenw/maven-wrapper.jar.mustache", ".mvn/wrapper", "maven-wrapper.jar")); - supportingFiles.add(new SupportingFile("configuration/mavenw/maven-wrapper.properties.mustache", ".mvn/wrapper", "maren-wrapper.properties")); + supportingFiles.add(new SupportingFile("client/auth/configuration/ApiKeyAuthConfiguration.mustache", authConfigurationFolder, "ApiKeyAuthConfiguration.java")); + supportingFiles.add(new SupportingFile("client/auth/configuration/ConfigurableAuthorization.mustache", authConfigurationFolder, "ConfigurableAuthorization.java")); + supportingFiles.add(new SupportingFile("client/auth/configuration/HttpBasicAuthConfiguration.mustache", authConfigurationFolder, "HttpBasicAuthConfiguration.java")); } - // Git files - supportingFiles.add(new SupportingFile("configuration/git/gitignore.mustache", "", ".gitignore").doNotOverwrite()); - - // Use the default java Date - typeMapping.put("date", "LocalDate"); - typeMapping.put("DateTime", "LocalDateTime"); - importMapping.put("LocalDate", "java.time.LocalDate"); - importMapping.put("LocalDateTime", "java.time.LocalDateTime"); - - // Add documentation files - supportingFiles.add(new SupportingFile("doc/README.mustache", "", "README.md").doNotOverwrite()); - supportingFiles.add(new SupportingFile("doc/auth.mustache", apiDocPath, "auth.md")); - modelDocTemplateFiles.put("doc/model_doc.mustache", ".md"); - apiDocTemplateFiles.put("doc/api_doc.mustache", ".md"); - modelDocTemplateFiles.remove("model_doc.mustache"); - apiDocTemplateFiles.remove("api_doc.mustache"); - - // Add model files - modelTemplateFiles.remove("model.mustache"); - modelTemplateFiles.put("model/model.mustache", ".java"); + // Api file + apiTemplateFiles.clear(); + apiTemplateFiles.put("client/api.mustache", ".java"); // Add test files + apiTestTemplateFiles.clear(); if (testTool.equals(OPT_TEST_JUNIT)) { - apiTestTemplateFiles.put("api_test.mustache", ".java"); - modelTestTemplateFiles.put("model_test.mustache", ".java"); + apiTestTemplateFiles.put("client/test/api_test.mustache", ".java"); } else if (testTool.equals(OPT_TEST_SPOCK)) { - apiTestTemplateFiles.put("api_test.groovy.mustache", ".groovy"); - modelTestTemplateFiles.put("model_test.groovy.mustache", ".groovy"); - } - } - - @Override - public String apiTestFileFolder() { - if (testTool.equals(OPT_TEST_SPOCK)) { - return getOutputDir() + "/src/test/groovy/" + getInvokerPackage().replaceAll("\\.", "/") + "/api"; - } - return getOutputDir() + "/src/test/java/" + getInvokerPackage().replaceAll("\\.", "/") + "/api"; - } - - @Override - public String modelTestFileFolder() { - if (testTool.equals(OPT_TEST_SPOCK)) { - return getOutputDir() + "/src/test/groovy/" + getInvokerPackage().replaceAll("\\.", "/") + "/model"; - } - return getOutputDir() + "/src/test/java/" + getInvokerPackage().replaceAll("\\.", "/") + "/model"; - } - - @Override - public String toApiTestFilename(String name) { - if (testTool.equals(OPT_TEST_SPOCK)) { - return toApiName(name) + "Spec"; - } - return toApiName(name) + "Test"; - } - - @Override - public String toModelTestFilename(String name) { - if (testTool.equals(OPT_TEST_SPOCK)) { - return toModelName(name) + "Spec"; - } - return toModelName(name) + "Test"; - } - - @Override - public void setUseBeanValidation(boolean useBeanValidation) { - this.useBeanValidation = useBeanValidation; - } - - @Override - public String toApiVarName(String name) { - String apiVarName = super.toApiVarName(name); - if (reservedWords.contains(apiVarName)) { - apiVarName = escapeReservedWord(apiVarName); + apiTestTemplateFiles.put("client/test/api_test.groovy.mustache", ".groovy"); } - return apiVarName; - } - public boolean isUseBeanValidation() { - return useBeanValidation; - } - - public boolean isConfigureAuthorization() { - return configureAuthorization; + // Add documentation files + supportingFiles.add(new SupportingFile("client/doc/README.mustache", "", "README.md").doNotOverwrite()); + supportingFiles.add(new SupportingFile("client/doc/auth.mustache", apiDocPath, "auth.md")); + apiDocTemplateFiles.clear(); + apiDocTemplateFiles.put("client/doc/api_doc.mustache", ".md"); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java new file mode 100644 index 000000000000..da071b68ec8e --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java @@ -0,0 +1,178 @@ +package org.openapitools.codegen.languages; + +import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.utils.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.io.File; +import java.util.List; +import java.util.Map; + + +public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen { + public static final String OPT_CONTROLLER_PACKAGE = "controllerPackage"; + public static final String OPT_GENERATE_CONTROLLER_FROM_EXAMPLES = "generateControllerFromExamples"; + public static final String OPT_GENERATE_CONTROLLER_AS_ABSTRACT = "generateControllerAsAbstract"; + + private final Logger LOGGER = LoggerFactory.getLogger(JavaClientCodegen.class); + + public static final String NAME = "java-micronaut-server"; + + protected String controllerPackage = "org.openapitools.controller"; + protected boolean generateControllerAsAbstract = false; + protected boolean generateControllerFromExamples = false; + protected boolean useAuth = true; + + protected String controllerPrefix = ""; + protected String controllerSuffix = "Controller"; + protected String apiPrefix = "Abstract"; + protected String apiSuffix = "Controller"; + + public JavaMicronautServerCodegen() { + super(); + + title = "OpenAPI Micronaut Server";; + apiPackage = "org.openapitools.api"; + apiDocPath = "docs/controllers"; + + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.BETA) + .build(); + additionalProperties.put("server", "true"); + + cliOptions.add(new CliOption(OPT_CONTROLLER_PACKAGE, "The package in which controllers will be generated").defaultValue(apiPackage)); + cliOptions.removeIf(c -> c.getOpt().equals(CodegenConstants.API_PACKAGE)); + cliOptions.add(CliOption.newBoolean(OPT_GENERATE_CONTROLLER_FROM_EXAMPLES, + "Generate the implementation of controller and tests from parameter and return examples that will verify that the api works as desired (for testing)", + generateControllerFromExamples)); + cliOptions.add(CliOption.newBoolean(OPT_GENERATE_CONTROLLER_AS_ABSTRACT, + "Generate an abstract class for controller to be extended. (" + CodegenConstants.API_PACKAGE + + " is then used for the abstract class, and " + OPT_CONTROLLER_PACKAGE + + " is used for implementation that extends it.)", + generateControllerAsAbstract)); + cliOptions.add(CliOption.newBoolean(OPT_USE_AUTH, "Whether to import authorization and to annotate controller methods accordingly", useAuth)); + + // Set the type mappings + // It could be also StreamingFileUpload + typeMapping.put("file", "CompletedFileUpload"); + importMapping.put("CompletedFileUpload", "io.micronaut.http.multipart.CompletedFileUpload"); + } + + @Override + public CodegenType getTag() { + return CodegenType.SERVER; + } + + @Override + public String getName() { + return NAME; + } + + @Override + public String getHelp() { + return "Generates a Java Micronaut Server."; + } + + @Override + public void processOpts() { + // Get all the properties that require to know if user specified them directly + if (additionalProperties.containsKey(OPT_GENERATE_CONTROLLER_AS_ABSTRACT)) { + generateControllerAsAbstract = convertPropertyToBoolean(OPT_GENERATE_CONTROLLER_AS_ABSTRACT); + } + writePropertyBack(OPT_GENERATE_CONTROLLER_AS_ABSTRACT, generateControllerAsAbstract); + + if (additionalProperties.containsKey(OPT_CONTROLLER_PACKAGE)) { + controllerPackage = (String) additionalProperties.get(OPT_CONTROLLER_PACKAGE); + } else if (!generateControllerAsAbstract && additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) { + controllerPackage = (String) additionalProperties.get(CodegenConstants.API_PACKAGE); + } + additionalProperties.put(OPT_CONTROLLER_PACKAGE, controllerPackage); + + if (!generateControllerAsAbstract) { + apiPackage = controllerPackage; + additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage); + } + super.processOpts(); + + // Get all the other properties after superclass processed everything + if (additionalProperties.containsKey(OPT_GENERATE_CONTROLLER_FROM_EXAMPLES)) { + generateControllerFromExamples = convertPropertyToBoolean(OPT_GENERATE_CONTROLLER_FROM_EXAMPLES); + } + writePropertyBack(OPT_GENERATE_CONTROLLER_FROM_EXAMPLES, generateControllerFromExamples); + + if (additionalProperties.containsKey(OPT_USE_AUTH)) { + useAuth = convertPropertyToBoolean(OPT_USE_AUTH); + } + writePropertyBack(OPT_USE_AUTH, useAuth); + + // Api file + apiTemplateFiles.clear(); + if (generateControllerAsAbstract) { + setApiNamePrefix(apiPrefix); + setApiNameSuffix(apiSuffix); + } else { + setApiNamePrefix(controllerPrefix); + setApiNameSuffix(controllerSuffix); + } + apiTemplateFiles.put("server/controller.mustache", ".java"); + + // Add documentation files + supportingFiles.add(new SupportingFile("server/doc/README.mustache", "", "README.md").doNotOverwrite()); + apiDocTemplateFiles.clear(); + apiDocTemplateFiles.put("server/doc/controller_doc.mustache", ".md"); + + // Add test files + apiTestTemplateFiles.clear(); + // Controller Implementation is generated as a test file - so that it is not overwritten + if (generateControllerAsAbstract) { + apiTestTemplateFiles.put("server/controllerImplementation.mustache", ".java"); + } + if (testTool.equals(OPT_TEST_JUNIT)) { + apiTestTemplateFiles.put("server/test/controller_test.mustache", ".java"); + } else if (testTool.equals(OPT_TEST_SPOCK)) { + apiTestTemplateFiles.put("server/test/controller_test.groovy.mustache", ".groovy"); + } + + // Add Application.java file + String invokerFolder = (sourceFolder + '/' + invokerPackage).replace('.', '/'); + supportingFiles.add(new SupportingFile("common/configuration/Application.mustache", invokerFolder, "Application.java").doNotOverwrite()); + } + + @Override + public String apiTestFilename(String templateName, String tag) { + if (generateControllerAsAbstract && templateName.contains("controllerImplementation")) { + return ( + outputFolder + File.separator + + sourceFolder + File.separator + + controllerPackage.replace('.', File.separatorChar) + File.separator + + StringUtils.camelize(controllerPrefix + "_" + tag + "_" + controllerSuffix) + ".java" + ).replace('/', File.separatorChar); + } + + return super.apiTestFilename(templateName, tag); + } + + @Override + public void setParameterExampleValue(CodegenParameter p) { + super.setParameterExampleValue(p); + + if (p.isFile) { + // The CompletedFileUpload cannot be initialized + p.example = "null"; + } + } + + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + objs = super.postProcessOperationsWithModels(objs, allModels); + + // Add the controller classname to operations + Map operations = (Map) objs.get("operations"); + String controllerClassname = StringUtils.camelize(controllerPrefix + "_" + operations.get("pathPrefix") + "_" + controllerSuffix); + objs.put("controllerClassname", controllerClassname); + + return objs; + } +} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index d5911a2139bd..434911baff5d 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -58,6 +58,7 @@ org.openapitools.codegen.languages.JavaClientCodegen org.openapitools.codegen.languages.JavaCXFClientCodegen org.openapitools.codegen.languages.JavaInflectorServerCodegen org.openapitools.codegen.languages.JavaMicronautClientCodegen +org.openapitools.codegen.languages.JavaMicronautServerCodegen org.openapitools.codegen.languages.JavaMSF4JServerCodegen org.openapitools.codegen.languages.JavaPKMSTServerCodegen org.openapitools.codegen.languages.JavaPlayFrameworkCodegen 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 deleted file mode 100644 index 4232340e5209..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/api.mustache +++ /dev/null @@ -1,70 +0,0 @@ -{{>licenseInfo}} -package {{package}}; - -import io.micronaut.http.annotation.*; -import io.micronaut.core.annotation.*; -import io.micronaut.http.client.annotation.Client; -{{#configureAuth}} -import {{invokerPackage}}.auth.Authorization; -{{/configureAuth}} -import {{invokerPackage}}.query.QueryParam; -import io.micronaut.core.convert.format.Format; -import reactor.core.publisher.Mono; -{{#imports}}import {{import}}; -{{/imports}} -import javax.annotation.Generated; -{{^fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}}{{#useBeanValidation}} -import javax.validation.Valid; -import javax.validation.constraints.*; -{{/useBeanValidation}} - -{{>generatedAnnotation}} -@Client("${base-path}") -public interface {{classname}} { -{{#operations}}{{#operation}} - /** - {{#summary}} - * {{summary}} - {{/summary}} - {{#notes}} - * {{notes}} - {{/notes}} - {{^summary}} - {{^notes}} - * {{nickname}} - {{/notes}} - {{/summary}} - * -{{#allParams}} - * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/allParams}} -{{#returnType}} - * @return {{returnType}} -{{/returnType}} -{{#externalDocs}} - * {{description}} - * @see {{summary}} Documentation -{{/externalDocs}} - */ - @{{#lambda.pascalcase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.pascalcase}}(uri="{{{path}}}") - {{#vendorExtensions.x-contentType}} - @Produces(value={"{{vendorExtensions.x-contentType}}"}) - {{/vendorExtensions.x-contentType}} - @Consumes(value={"{{vendorExtensions.x-accepts}}"}) - {{!auth methods}} - {{#configureAuth}} - {{#authMethods}} - @Authorization(name="{{{name}}}"{{!scopes}}{{#isOAuth}}, scopes={{=< >=}}{<={{ }}=>{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}{{=< >=}}}<={{ }}=>{{/isOAuth}}) - {{/authMethods}} - {{/configureAuth}} - {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} {{nickname}}({{^allParams}});{{/allParams}}{{#allParams}} - {{>params/queryParams}}{{>params/pathParams}}{{>params/headerParams}}{{>params/bodyParams}}{{>params/formParams}}{{>params/cookieParams}}{{^-last}}, {{/-last}}{{#-last}} - );{{/-last}}{{/allParams}} - {{/operation}} -{{/operations}} -} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/gradle.properties.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/gradle.properties.mustache deleted file mode 100644 index 4804e0490140..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/gradle.properties.mustache +++ /dev/null @@ -1 +0,0 @@ -micronautVersion=3.0.0-M5 \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/model_doc.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/model_doc.mustache deleted file mode 100644 index 3f14f6535810..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/model_doc.mustache +++ /dev/null @@ -1,4 +0,0 @@ -{{#models}}{{#model}} - -{{#isEnum}}{{>doc/enum_outer_doc}}{{/isEnum}}{{^isEnum}}{{>doc/pojo_doc}}{{/isEnum}} -{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/beanValidation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/model/beanValidation.mustache deleted file mode 100644 index bbc797247ea6..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/beanValidation.mustache +++ /dev/null @@ -1,52 +0,0 @@ -{{#useBeanValidation}}{{! -validate all pojos and enums -}}{{^isContainer}}{{#isModel}} @Valid -{{/isModel}}{{/isContainer}}{{! -nullable & nonnull -}}{{#required}}{{#isNullable}} @Nullable -{{/isNullable}}{{^isNullable}} @NotNull -{{/isNullable}}{{/required}}{{^required}} @Nullable -{{/required}}{{! -pattern -}}{{#pattern}}{{^isByteArray}} @Pattern(regexp="{{{pattern}}}") -{{/isByteArray}}{{/pattern}}{{! -both minLength && maxLength -}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}}, max={{maxLength}}) -{{/maxLength}}{{/minLength}}{{! -just minLength -}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}) -{{/maxLength}}{{/minLength}}{{! -just maxLength -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}) -{{/maxLength}}{{/minLength}}{{! -@Size: both minItems && maxItems -}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}}, max={{maxItems}}) -{{/maxItems}}{{/minItems}}{{! -@Size: just minItems -}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}) -{{/maxItems}}{{/minItems}}{{! -@Size: just maxItems -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}) -{{/maxItems}}{{/minItems}}{{! -@Email -}}{{#isEmail}} @Email -{{/isEmail}}{{! -check for integer or long / all others=decimal type with @Decimal* -isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}) -{{/minimum}}{{#maximum}} @Max({{maximum}}) -{{/maximum}}{{/isInteger}}{{! -isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L) -{{/minimum}}{{#maximum}} @Max({{maximum}}L) -{{/maximum}}{{/isLong}}{{! -Not Integer, not Long => we have a decimal value! -}}{{^isInteger}}{{^isLong}}{{! -minimum for decimal value -}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}}, inclusive=false{{/exclusiveMinimum}}) -{{/minimum}}{{! -maximal for decimal value -}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}}, inclusive=false{{/exclusiveMaximum}}) -{{/maximum}}{{! -close decimal values -}}{{/isLong}}{{/isInteger}}{{/useBeanValidation}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/jackson_annotations.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/model/jackson_annotations.mustache deleted file mode 100644 index b7f047ee5406..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/jackson_annotations.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{{! - If this is map and items are nullable, make sure that nulls are included. - To determine what JsonInclude.Include method to use, consider the following: - * If the field is required, always include it, even if it is null. - * Else use custom behaviour, IOW use whatever is defined on the object mapper - }} - @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) - @JsonInclude({{#isMap}}{{#items.isNullable}}content = JsonInclude.Include.ALWAYS, {{/items.isNullable}}{{/isMap}}value = JsonInclude.Include.{{#required}}ALWAYS{{/required}}{{^required}}USE_DEFAULTS{{/required}}) - {{#withXml}} - {{^isContainer}} - @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isContainer}} - {{#isContainer}} - {{#isXmlWrapped}} - // items.xmlName={{items.xmlName}} - @JacksonXmlElementWrapper(useWrapping = {{isXmlWrapped}}, {{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#items.xmlName}}{{items.xmlName}}{{/items.xmlName}}{{^items.xmlName}}{{items.baseName}}{{/items.xmlName}}") - {{/isXmlWrapped}} - {{/isContainer}} - {{/withXml}} - {{#isDateTime}} - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - {{/isDateTime}} - {{#isDate}} - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") - {{/isDate}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/modelEnum.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/model/modelEnum.mustache deleted file mode 100644 index 3bb6622f08dc..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/modelEnum.mustache +++ /dev/null @@ -1,61 +0,0 @@ -{{#jackson}} -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -{{/jackson}} - -/** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} - */ -{{#additionalEnumTypeAnnotations}} -{{{.}}} -{{/additionalEnumTypeAnnotations}}{{#useBeanValidation}}@Introspected -{{/useBeanValidation}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { - {{#allowableValues}} - {{#enumVars}} - {{#enumDescription}} - /** - * {{enumDescription}} - */ - {{/enumDescription}} - {{#withXml}} - @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) - {{/withXml}} - {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} - {{/enumVars}} - {{/allowableValues}} - - private {{{dataType}}} value; - - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { - this.value = value; - } - - {{#jackson}} - @JsonValue - {{/jackson}} - public {{{dataType}}} getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - {{#jackson}} - @JsonCreator - {{/jackson}} - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { - if (b.value.equals(value)) { - return b; - } - } - {{#isNullable}} - return null; - {{/isNullable}} - {{^isNullable}} - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - {{/isNullable}} - } -} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/pojo.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/model/pojo.mustache deleted file mode 100644 index e643ca051cdc..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/pojo.mustache +++ /dev/null @@ -1,332 +0,0 @@ -/** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} - */ -{{#description}} -@ApiModel(description = "{{{description}}}") -{{/description}} -{{#jackson}} -@JsonPropertyOrder({ - {{#vars}} - {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} - {{/vars}} -}) -@JsonTypeName("{{name}}") -{{/jackson}} -{{#additionalModelTypeAnnotations}} -{{{.}}} -{{/additionalModelTypeAnnotations}} -{{>generatedAnnotation}}{{#discriminator}}{{>model/typeInfoAnnotation}}{{/discriminator}}{{>model/xmlAnnotation}}{{#useBeanValidation}} -@Introspected -{{/useBeanValidation}}{{! -Declare the class with extends and implements -}}public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ - {{#serializableModel}} - private static final long serialVersionUID = 1L; - - {{/serializableModel}} - {{#vars}} - {{#isEnum}} - {{^isContainer}} -{{>model/modelInnerEnum}} - {{/isContainer}} - {{#isContainer}} - {{#mostInnerItems}} -{{>model/modelInnerEnum}} - {{/mostInnerItems}} - {{/isContainer}} - {{/isEnum}} - public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; - {{#withXml}} - {{#isXmlAttribute}} - @XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}" - {{/isXmlAttribute}} - {{^isXmlAttribute}} - {{^isContainer}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isContainer}} - {{#isContainer}} - // Is a container wrapped={{isXmlWrapped}} - {{#items}} - // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} - // items.example={{example}} items.type={{dataType}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/items}} - {{#isXmlWrapped}} - @XmlElementWrapper({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isXmlWrapped}} - {{/isContainer}} - {{/isXmlAttribute}} - {{/withXml}} - {{#vendorExtensions.x-is-jackson-optional-nullable}} - {{#isContainer}} - private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); - {{/isContainer}} - {{^isContainer}} - private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; - {{/isContainer}} - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} - {{#isContainer}} - private {{{datatypeWithEnum}}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}} = null{{/required}}; - {{/isContainer}} - {{^isContainer}} - {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; - {{/isContainer}} - {{/vendorExtensions.x-is-jackson-optional-nullable}} - - {{/vars}} - {{#parcelableModel}} - public {{classname}}() { - {{#parent}} - super(); - {{/parent}} - } - - {{/parcelableModel}} - {{#vars}} - {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} - this.{{name}} = {{name}}; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - return this; - } - - {{#isArray}} - public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - if (this.{{name}} == null || !this.{{name}}.isPresent()) { - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}); - } - try { - this.{{name}}.get().add({{name}}Item); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} - {{^required}} - if (this.{{name}} == null) { - this.{{name}} = {{{defaultValue}}}; - } - {{/required}} - this.{{name}}.add({{name}}Item); - return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - } - - {{/isArray}} - {{#isMap}} - public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - if (this.{{name}} == null || !this.{{name}}.isPresent()) { - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}); - } - try { - this.{{name}}.get().put(key, {{name}}Item); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} - {{^required}} - if (this.{{name}} == null) { - this.{{name}} = {{{defaultValue}}}; - } - {{/required}} - this.{{name}}.put(key, {{name}}Item); - return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - } - - {{/isMap}} - {{/isReadOnly}} - /** - {{#description}} - * {{description}} - {{/description}} - {{^description}} - * Get {{name}} - {{/description}} - {{#minimum}} - * minimum: {{minimum}} - {{/minimum}} - {{#maximum}} - * maximum: {{maximum}} - {{/maximum}} - * @return {{name}} - **/ -{{>model/beanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") - {{#vendorExtensions.x-extra-annotation}} - {{{vendorExtensions.x-extra-annotation}}} - {{/vendorExtensions.x-extra-annotation}} - {{#vendorExtensions.x-is-jackson-optional-nullable}} -{{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} @JsonIgnore - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} - {{#jackson}} -{{>model/jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} public {{{datatypeWithEnum}}} {{getter}}() { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - {{#isReadOnly}} -{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} if ({{name}} == null) { - {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; - } - {{/isReadOnly}} - return {{name}}.orElse(null); - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} - return {{name}}; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - } - - {{#vendorExtensions.x-is-jackson-optional-nullable}} -{{>model/jackson_annotations}} - public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { - return {{name}}; - } - - @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) - {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { - {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} this.{{name}} = {{name}}; - } - - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^isReadOnly}} - {{#jackson}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} -{{>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}}) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} - this.{{name}} = {{name}}; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - } - - {{/isReadOnly}} - {{/vars}} - @Override - public boolean equals(Object o) { - {{#useReflectionEqualsHashCode}} - return EqualsBuilder.reflectionEquals(this, o, false, null, true); - {{/useReflectionEqualsHashCode}} - {{^useReflectionEqualsHashCode}} - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - {{#hasVars}} - {{classname}} {{classVarName}} = ({{classname}}) o; - return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{^-last}} && - {{/-last}}{{/vars}}{{#parent}} && - super.equals(o){{/parent}}; - {{/hasVars}} - {{^hasVars}} - return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}}; - {{/hasVars}} - {{/useReflectionEqualsHashCode}} - } - - @Override - public int hashCode() { - {{#useReflectionEqualsHashCode}} - return HashCodeBuilder.reflectionHashCode(this); - {{/useReflectionEqualsHashCode}} - {{^useReflectionEqualsHashCode}} - return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); - {{/useReflectionEqualsHashCode}} - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class {{classname}} {\n"); - {{#parent}} - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - {{/parent}} - {{#vars}} - sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); - {{/vars}} - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - {{#parcelableModel}} - public void writeToParcel(Parcel out, int flags) { - {{#model}} - {{#isArray}} - out.writeList(this); - {{/isArray}} - {{^isArray}} - {{#parent}} - super.writeToParcel(out, flags); - {{/parent}} - {{#vars}} - out.writeValue({{name}}); - {{/vars}} - {{/isArray}} - {{/model}} - } - - {{classname}}(Parcel in) { - {{#isArray}} - in.readTypedList(this, {{arrayModelType}}.CREATOR); - {{/isArray}} - {{^isArray}} - {{#parent}} - super(in); - {{/parent}} - {{#vars}} - {{#isPrimitiveType}} - {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); - {{/isPrimitiveType}} - {{^isPrimitiveType}} - {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); - {{/isPrimitiveType}} - {{/vars}} - {{/isArray}} - } - - public int describeContents() { - return 0; - } - - public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { - public {{classname}} createFromParcel(Parcel in) { - {{#model}} - {{#isArray}} - {{classname}} result = new {{classname}}(); - result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); - return result; - {{/isArray}} - {{^isArray}} - return new {{classname}}(in); - {{/isArray}} - {{/model}} - } - public {{classname}}[] newArray(int size) { - return new {{classname}}[size]; - } - }; - {{/parcelableModel}} -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/bodyParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/params/bodyParams.mustache deleted file mode 100644 index b111ea9e05d9..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/bodyParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isBodyParam}}@Body {{>params/beanValidation}}{{>params/type}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/cookieParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/params/cookieParams.mustache deleted file mode 100644 index fab940b7460d..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/cookieParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isCookieParam}}@CookieValue(value="{{baseName}}"{{#defaultValue}}, defaultValue="{{defaultValue}}"{{/defaultValue}}) {{>params/beanValidationCore}}{{>params/type}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/formParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/params/formParams.mustache deleted file mode 100644 index e41f37e421f9..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/formParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isFormParam}}{{>params/beanValidation}}{{>params/type}} {{paramName}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/headerParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/params/headerParams.mustache deleted file mode 100644 index 9aab83b54621..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/headerParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isHeaderParam}}@Header(name="{{baseName}}"{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{>params/beanValidation}}{{>params/type}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/pathParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/params/pathParams.mustache deleted file mode 100644 index c67b97ed3f60..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/pathParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isPathParam}}@PathVariable(name="{{baseName}}"{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{>params/beanValidation}}{{>params/type}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/queryParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/params/queryParams.mustache deleted file mode 100644 index 7ef445005829..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/queryParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isQueryParam}}@QueryParam(name="{{{baseName}}}"{{!default value}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{!multi format}}{{#isCollectionFormatMulti}}, format=QueryParam.Format.MULTI{{/isCollectionFormatMulti}}{{!deep object}}{{#isDeepObject}}, format=QueryParam.Format.DEEP_OBJECT{{/isDeepObject}}{{!other collection formats}}{{^isCollectionFormatMulti}}{{^isDeepObject}}{{#collectionFormat}}, format=QueryParam.Format.{{#lambda.uppercase}}{{collectionFormat}}{{/lambda.uppercase}}{{/collectionFormat}}{{/isDeepObject}}{{/isCollectionFormatMulti}}) {{!validation and type}}{{>params/beanValidation}}{{>params/type}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/query/QueryParam.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/query/QueryParam.mustache deleted file mode 100644 index 4c3e845a1be2..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/query/QueryParam.mustache +++ /dev/null @@ -1,78 +0,0 @@ -{{>licenseInfo}} -package {{invokerPackage}}.query; - -import io.micronaut.context.annotation.AliasFor; -import io.micronaut.core.bind.annotation.Bindable; -import javax.annotation.Generated; -import java.lang.annotation.*; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - - -/** - * Indicates that the parameter is a query parameter - */ -{{>generatedAnnotation}} -@Documented -@Retention(RUNTIME) -@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE}) -@Bindable -@Inherited -public @interface QueryParam { - - /** - * @return The name of the parameter - */ - @AliasFor(annotation = Bindable.class, member = "value") - String value() default ""; - - /** - * @return The name of the parameter - */ - @AliasFor(annotation = Bindable.class, member = "value") - String name() default ""; - - /** - * @see Bindable#defaultValue() - * @return The default value - */ - @AliasFor(annotation = Bindable.class, member = "defaultValue") - String defaultValue() default ""; - - /** - * @return The format of the given values in the URL - */ - Format format() default Format.CSV; - - /** - * The possible formats of the query parameter in the URL. - * The conversion of various types is according to openapi v3 specification: - * @see openapi v3 specification - * Values are serialized using Jackson object mapper - */ - public static enum Format { - /** - * The values of iterator are comma-delimited. - * Ambiguity can arise if values of Iterator contain commas inside themselves. In such case, the MULTI format - * should be preferred. - * Null values are not supported and will be removed during the conversion process. - */ - CSV, - /** - * The values are space-delimited, similarly to comma-delimited format. - */ - SSV, - /** - * The values a delimited by pipes "|", similarly to comma-delimited format. - */ - PIPES, - /** - * The values are repeated as separate parameters, e.g.: color=blue&color=black&color=brown. - */ - MULTI, - /** - * The format supports 1-depth recursion into objects with setting each attribute as a separate parameter, e.g.: - * 'color[R]=100&color[G]=200&color[B]=150'. - */ - DEEP_OBJECT - } -} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/query/QueryParamBinder.mustache b/modules/openapi-generator/src/main/resources/java-micronaut-client/query/QueryParamBinder.mustache deleted file mode 100644 index 2a90b8b66587..000000000000 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/query/QueryParamBinder.mustache +++ /dev/null @@ -1,164 +0,0 @@ -{{>licenseInfo}} -package {{invokerPackage}}.query; - -import io.micronaut.core.annotation.NonNull; -import io.micronaut.core.beans.BeanProperty; -import io.micronaut.core.beans.BeanWrapper; -import io.micronaut.core.convert.ArgumentConversionContext; -import io.micronaut.core.convert.ConversionContext; -import io.micronaut.core.convert.ConversionService; -import io.micronaut.core.util.StringUtils; -import io.micronaut.http.MutableHttpRequest; -import io.micronaut.http.client.bind.AnnotatedClientArgumentRequestBinder; -import io.micronaut.http.client.bind.ClientRequestUriContext; - -import java.util.Collection; -import java.util.Optional; -import jakarta.inject.Singleton; -import javax.annotation.Generated; - - -{{>generatedAnnotation}} -@Singleton -public class QueryParamBinder implements AnnotatedClientArgumentRequestBinder { - private static final Character COMMA_DELIMITER = ','; - private static final Character PIPE_DELIMITER = '|'; - private static final Character SPACE_DELIMITER = ' '; - - private final ConversionService conversionService; - - public QueryParamBinder(ConversionService conversionService) { - this.conversionService = conversionService; - } - - @NonNull - @Override - public Class getAnnotationType() { - return QueryParam.class; - } - - @Override - public void bind(@NonNull ArgumentConversionContext context, - @NonNull ClientRequestUriContext uriContext, - @NonNull Object value, - @NonNull MutableHttpRequest request - ) { - String key = context.getAnnotationMetadata().stringValue(QueryParam.class) - .filter(StringUtils::isNotEmpty) - .orElse(context.getArgument().getName()); - - QueryParam.Format format = context.getAnnotationMetadata() - .enumValue(QueryParam.class, "format", QueryParam.Format.class) - .orElse(QueryParam.Format.CSV); - - if (format == QueryParam.Format.DEEP_OBJECT) { - addDeepObjectParameters(context, value, key, uriContext); - } else if (format == QueryParam.Format.MULTI) { - addMultiParameters(context, value, key, uriContext); - } else { - Character delimiter = ' '; - switch (format) { - case SSV: - delimiter = SPACE_DELIMITER; - break; - case PIPES: - delimiter = PIPE_DELIMITER; - break; - case CSV: - delimiter = COMMA_DELIMITER; - break; - default: - } - createSeparatedQueryParam(context, value, delimiter) - .ifPresent(v -> uriContext.addQueryParameter(key, v)); - } - } - - private void addMultiParameters( - ArgumentConversionContext context, Object value, String key, ClientRequestUriContext uriContext - ) { - if (value instanceof Iterable) { - // noinspection unchecked - Iterable iterable = (Iterable) value; - - for (Object item : iterable) { - convertToString(context, item).ifPresent(v -> uriContext.addQueryParameter(key, v)); - } - } else { - convertToString(context, value).ifPresent(v -> uriContext.addQueryParameter(key, v)); - } - } - - private void addDeepObjectParameters( - ArgumentConversionContext context, Object value, String key, ClientRequestUriContext uriContext - ) { - if (value instanceof Iterable) { - StringBuilder builder = new StringBuilder(key); - - Iterable iterable = (Iterable) value; - - int i = 0; - for (Object item: iterable) { - if (item == null) { - continue; - } - String index = String.valueOf(i); - - builder.append('['); - builder.append(index); - builder.append(']'); - - convertToString(context, item).ifPresent(v -> uriContext.addQueryParameter(builder.toString(), v)); - builder.delete(builder.length() - index.length() - 2, builder.length()); - i++; - } - } else if (value != null) { - StringBuilder builder = new StringBuilder(key); - BeanWrapper wrapper = BeanWrapper.getWrapper(value); - Collection> properties = wrapper.getBeanProperties(); - for (BeanProperty property: properties) { - Object item = property.get(value); - if (item == null) { - continue; - } - builder.append('['); - builder.append(property.getName()); - builder.append(']'); - - convertToString(context, item).ifPresent(v -> uriContext.addQueryParameter(builder.toString(), v)); - builder.delete(builder.length() - property.getName().length() - 2, builder.length()); - } - } - } - - private Optional createSeparatedQueryParam( - ArgumentConversionContext context, Object value, Character delimiter - ) { - if (value instanceof Iterable) { - StringBuilder builder = new StringBuilder(); - // noinspection unchecked - Iterable iterable = (Iterable) value; - - boolean first = true; - for (Object item : iterable) { - Optional opt = convertToString(context, item); - if (opt.isPresent()) { - if (!first) { - builder.append(delimiter); - } - first = false; - builder.append(opt.get()); - } - } - - return Optional.of(builder.toString()); - } else { - return convertToString(context, value); - } - } - - private Optional convertToString(ArgumentConversionContext context, Object value) { - return conversionService.convert(value, ConversionContext.STRING.with(context.getAnnotationMetadata())) - .filter(StringUtils::isNotEmpty); - } -} 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 new file mode 100644 index 000000000000..871eb59dfe04 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache @@ -0,0 +1,71 @@ +{{>common/licenseInfo}} +package {{package}}; + +import io.micronaut.http.annotation.*; +import io.micronaut.core.annotation.*; +import io.micronaut.http.client.annotation.Client; +{{#configureAuth}} +import {{invokerPackage}}.auth.Authorization; +{{/configureAuth}} +import io.micronaut.core.convert.format.Format; +import reactor.core.publisher.Mono; +{{#imports}}import {{import}}; +{{/imports}} +import javax.annotation.Generated; +{{^fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{/fullJavaUtil}}{{#useBeanValidation}} +import javax.validation.Valid; +import javax.validation.constraints.*; +{{/useBeanValidation}} + +{{>common/generatedAnnotation}} +@Client("${base-path}") +public interface {{classname}} { +{{#operations}} + {{#operation}} + /** + {{#summary}} + * {{summary}} + {{/summary}} + {{#notes}} + * {{notes}} + {{/notes}} + {{^summary}} + {{^notes}} + * {{nickname}} + {{/notes}} + {{/summary}} + * + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{returnType}} + {{/returnType}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + @{{#lambda.pascalcase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.pascalcase}}(uri="{{{path}}}") + {{#vendorExtensions.x-contentType}} + @Produces(value={"{{vendorExtensions.x-contentType}}"}) + {{/vendorExtensions.x-contentType}} + @Consumes(value={"{{vendorExtensions.x-accepts}}"}) + {{!auth methods}} + {{#configureAuth}} + {{#authMethods}} + @Authorization(name="{{{name}}}"{{!scopes}}{{#isOAuth}}, scopes={{openbrace}}{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}{{closebrace}}{{/isOAuth}}) + {{/authMethods}} + {{/configureAuth}} + {{!the method definition}} + {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} {{nickname}}({{^allParams}});{{/allParams}}{{#allParams}} + {{>client/params/queryParams}}{{>client/params/pathParams}}{{>client/params/headerParams}}{{>client/params/bodyParams}}{{>client/params/formParams}}{{>client/params/cookieParams}}{{^-last}}, {{/-last}}{{#-last}} + );{{/-last}}{{/allParams}} + {{/operation}} +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/Authorization.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorization.mustache similarity index 94% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/auth/Authorization.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorization.mustache index ac5f7f979fd1..e805e24db6d6 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/Authorization.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorization.mustache @@ -1,4 +1,4 @@ -{{>licenseInfo}} +{{>common/licenseInfo}} package {{invokerPackage}}.auth; import io.micronaut.context.annotation.AliasFor; @@ -14,7 +14,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; import javax.annotation.Generated; -{{>generatedAnnotation}} +{{>common/generatedAnnotation}} @Documented @Retention(RUNTIME) @Target(METHOD) diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/AuthorizationBinder.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationBinder.mustache similarity index 97% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/auth/AuthorizationBinder.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationBinder.mustache index fad44af0f007..7dc1814c2375 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/AuthorizationBinder.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationBinder.mustache @@ -1,4 +1,4 @@ -{{>licenseInfo}} +{{>common/licenseInfo}} package {{invokerPackage}}.auth; import io.micronaut.aop.MethodInvocationContext; @@ -15,7 +15,7 @@ import java.util.List; import javax.annotation.Generated; -{{>generatedAnnotation}} +{{>common/generatedAnnotation}} @Singleton public class AuthorizationBinder implements AnnotatedClientRequestBinder { diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/AuthorizationFilter.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationFilter.mustache similarity index 99% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/auth/AuthorizationFilter.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationFilter.mustache index 021a5425d392..3bd7a3562df6 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/AuthorizationFilter.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationFilter.mustache @@ -1,4 +1,4 @@ -{{>licenseInfo}} +{{>common/licenseInfo}} package {{invokerPackage}}.auth; import io.micronaut.context.BeanContext; @@ -36,7 +36,7 @@ import java.util.stream.Stream; import javax.annotation.Generated; -{{>generatedAnnotation}} +{{>common/generatedAnnotation}} @Filter(Filter.MATCH_ALL_PATTERN) public class AuthorizationFilter implements HttpClientFilter { private static final Logger LOG = LoggerFactory.getLogger(ClientCredentialsHttpClientFilter.class); diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/Authorizations.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorizations.mustache similarity index 89% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/auth/Authorizations.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorizations.mustache index 1ee37c7c1df3..7d3fb75cdab2 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/Authorizations.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorizations.mustache @@ -1,4 +1,4 @@ -{{>licenseInfo}} +{{>common/licenseInfo}} package {{invokerPackage}}.auth; import io.micronaut.core.bind.annotation.Bindable; @@ -11,7 +11,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; import javax.annotation.Generated; -{{>generatedAnnotation}} +{{>common/generatedAnnotation}} @Documented @Retention(RUNTIME) @Target(METHOD) diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/ApiKeyAuthConfiguration.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ApiKeyAuthConfiguration.mustache similarity index 97% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/ApiKeyAuthConfiguration.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ApiKeyAuthConfiguration.mustache index 969da02fabc3..28d1da0655cb 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/ApiKeyAuthConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ApiKeyAuthConfiguration.mustache @@ -1,4 +1,4 @@ -{{>licenseInfo}} +{{>common/licenseInfo}} package {{invokerPackage}}.auth.configuration; import io.micronaut.context.annotation.ConfigurationInject; @@ -10,7 +10,7 @@ import io.micronaut.http.cookie.Cookie; import javax.annotation.Generated; -{{>generatedAnnotation}} +{{>common/generatedAnnotation}} @EachProperty("security.api-key-auth") public class ApiKeyAuthConfiguration implements ConfigurableAuthorization { private final String name; diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/ConfigurableAuthorization.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ConfigurableAuthorization.mustache similarity index 84% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/ConfigurableAuthorization.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ConfigurableAuthorization.mustache index 2d649c3a3beb..ab87ecfc02cd 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/ConfigurableAuthorization.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ConfigurableAuthorization.mustache @@ -1,4 +1,4 @@ -{{>licenseInfo}} +{{>common/licenseInfo}} package {{invokerPackage}}.auth.configuration; import io.micronaut.core.annotation.NonNull; @@ -6,7 +6,7 @@ import io.micronaut.http.MutableHttpRequest; import javax.annotation.Generated; -{{>generatedAnnotation}} +{{>common/generatedAnnotation}} public interface ConfigurableAuthorization { String getName(); diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/HttpBasicAuthConfiguration.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/HttpBasicAuthConfiguration.mustache similarity index 96% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/HttpBasicAuthConfiguration.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/HttpBasicAuthConfiguration.mustache index 189613b4f7e1..6431c2846d6a 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/auth/configuration/HttpBasicAuthConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/HttpBasicAuthConfiguration.mustache @@ -1,4 +1,4 @@ -{{>licenseInfo}} +{{>common/licenseInfo}} package {{invokerPackage}}.auth.configuration; import io.micronaut.context.annotation.ConfigurationInject; @@ -9,7 +9,7 @@ import io.micronaut.http.MutableHttpRequest; import javax.annotation.Generated; -{{>generatedAnnotation}} +{{>common/generatedAnnotation}} @EachProperty("security.basic-auth") public class HttpBasicAuthConfiguration implements ConfigurableAuthorization { private final String name; diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/README.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/doc/README.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/doc/README.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/doc/README.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/api_doc.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/doc/api_doc.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/doc/api_doc.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/doc/api_doc.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/auth.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/doc/auth.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/doc/auth.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/doc/auth.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/params/bodyParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/bodyParams.mustache new file mode 100644 index 000000000000..fd6862369f1a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/bodyParams.mustache @@ -0,0 +1 @@ +{{#isBodyParam}}@Body {{>common/params/beanValidation}}{{>client/params/type}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/params/cookieParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/cookieParams.mustache new file mode 100644 index 000000000000..60c2c377ec7c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/cookieParams.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}@CookieValue(value="{{baseName}}"{{#defaultValue}}, defaultValue="{{defaultValue}}"{{/defaultValue}}) {{>common/params/beanValidation}}{{>client/params/type}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/params/formParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/formParams.mustache new file mode 100644 index 000000000000..cfbd00f3428c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/formParams.mustache @@ -0,0 +1 @@ +{{#isFormParam}}{{>common/params/beanValidation}}{{>client/params/type}} {{paramName}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/params/headerParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/headerParams.mustache new file mode 100644 index 000000000000..f8a5a79ab625 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/headerParams.mustache @@ -0,0 +1 @@ +{{#isHeaderParam}}@Header(name="{{baseName}}"{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{>common/params/beanValidation}}{{>client/params/type}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/params/pathParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/pathParams.mustache new file mode 100644 index 000000000000..64a0be56c6c3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/pathParams.mustache @@ -0,0 +1 @@ +{{#isPathParam}}@PathVariable(name="{{baseName}}"{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{>common/params/beanValidation}}{{>client/params/type}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/params/queryParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/queryParams.mustache new file mode 100644 index 000000000000..aed538a1c3dd --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/queryParams.mustache @@ -0,0 +1 @@ +{{#isQueryParam}}@QueryValue(value="{{{baseName}}}"{{!default value}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{!validation and type}}{{>common/params/beanValidation}}{{>client/params/type}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/type.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/params/type.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/params/type.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/params/type.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/api_test.groovy.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.groovy.mustache similarity index 88% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/api_test.groovy.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.groovy.mustache index af4469421f36..a660a5bb112c 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/api_test.groovy.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.groovy.mustache @@ -37,7 +37,7 @@ class {{classname}}Spec extends Specification { {{{dataType}}} {{paramName}} = null {{/allParams}} // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).block() - // {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} asyncResponse = api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) + // {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} asyncResponse = api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) expect: true diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/api_test.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.mustache similarity index 88% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/api_test.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.mustache index a3c3e48e44b1..fc737b42696f 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.mustache @@ -39,7 +39,7 @@ public class {{classname}}Test { {{{dataType}}} {{paramName}} = null; {{/allParams}} // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).block(); - // {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} asyncResponse = api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + // {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} asyncResponse = api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); // TODO: test validations } diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model_test.groovy.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.groovy.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/model_test.groovy.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.groovy.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model_test.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/model_test.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/Application.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/Application.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/Application.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/Application.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/application.yml.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/application.yml.mustache similarity index 87% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/application.yml.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/application.yml.mustache index 4b0dd5f1c23f..4e7d6e844980 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/application.yml.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/application.yml.mustache @@ -1,5 +1,7 @@ -base-path: "{{{basePath}}}" -context-path: "{{{contextPath}}}" +{{!CLIENT CONFIGURATION}} +{{#client}} +base-path: "{{{basePath}}}/" +context-path: "{{{contextPath}}}/" micronaut: application: @@ -51,6 +53,19 @@ micronaut: username: password: {{/isBasic}}{{/authMethods}}{{/configureAuth}} +{{/client}} +{{!SERVER CONFIGURATION}} +{{#server}} +context-path: "{{{contextPath}}}/" + +micronaut: + application: + name: {{artifactId}} + server: + port: 8080 + security: + # authentication: bearer | cookie | session | idtoken +{{/server}} jackson: serialization: diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/git/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/git/git_push.sh.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/git/git_push.sh.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/git/git_push.sh.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/git/gitignore.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/git/gitignore.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/git/gitignore.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/git/gitignore.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/build.gradle.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache similarity index 85% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/build.gradle.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache index a654fe371331..11ae6117087e 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache @@ -2,8 +2,8 @@ plugins { {{#isTestSpock}} id("groovy") {{/isTestSpock}} - id("com.github.johnrengelman.shadow") version "7.0.0" - id("io.micronaut.application") version "2.0.3" + id("com.github.johnrengelman.shadow") version "7.1.1" + id("io.micronaut.application") version "3.1.1" } version = "{{artifactVersion}}" @@ -30,12 +30,16 @@ micronaut { dependencies { annotationProcessor("io.micronaut:micronaut-http-validation") + {{#useAuth}} annotationProcessor("io.micronaut.security:micronaut-security-annotations") + {{/useAuth}} implementation("io.micronaut:micronaut-http-client") implementation("io.micronaut:micronaut-runtime") implementation("io.micronaut:micronaut-validation") + {{#useAuth}} implementation("io.micronaut.security:micronaut-security") implementation("io.micronaut.security:micronaut-security-oauth2") + {{/useAuth}} implementation("io.micronaut.reactor:micronaut-reactor") implementation("io.swagger:swagger-annotations:1.5.9") runtimeOnly("ch.qos.logback:logback-classic") @@ -49,3 +53,5 @@ java { sourceCompatibility = JavaVersion.toVersion("1.8") targetCompatibility = JavaVersion.toVersion("1.8") } + +graalvmNative.toolchainDetection = false diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/gradle.properties.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/gradle.properties.mustache new file mode 100644 index 000000000000..b95f66a25374 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/gradle.properties.mustache @@ -0,0 +1 @@ +micronautVersion={{{micronautVersion}}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/settings.gradle.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/settings.gradle.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradle/settings.gradle.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/settings.gradle.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradlew/gradle-wrapper.jar b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradlew/gradle-wrapper.jar similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradlew/gradle-wrapper.jar rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradlew/gradle-wrapper.jar diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradlew/gradle-wrapper.properties.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradlew/gradle-wrapper.properties.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradlew/gradle-wrapper.properties.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradlew/gradle-wrapper.properties.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradlew/gradlew.bat.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradlew/gradlew.bat.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradlew/gradlew.bat.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradlew/gradlew.bat.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradlew/gradlew.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradlew/gradlew.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/gradlew/gradlew.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradlew/gradlew.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/logback.xml.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/logback.xml.mustache new file mode 100644 index 000000000000..82218708264f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/logback.xml.mustache @@ -0,0 +1,15 @@ + + + + false + + + %cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n + + + + + + + diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/MavenWrapperDownloader.java.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/MavenWrapperDownloader.java.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/MavenWrapperDownloader.java.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/MavenWrapperDownloader.java.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/maven-wrapper.jar.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/maven-wrapper.jar.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/maven-wrapper.jar.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/maven-wrapper.jar.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/maven-wrapper.properties.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/maven-wrapper.properties.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/maven-wrapper.properties.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/maven-wrapper.properties.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/mvnw.bat.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/mvnw.bat.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/mvnw.bat.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/mvnw.bat.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/mvnw.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/mvnw.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/mavenw/mvnw.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/mavenw/mvnw.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/pom.xml.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache similarity index 97% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/pom.xml.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache index 3ef1c44ab3e3..bf1768a17c2d 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/configuration/pom.xml.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache @@ -10,7 +10,7 @@ io.micronaut micronaut-parent - 3.0.0-M5 + {{{micronautVersion}}} @@ -18,7 +18,7 @@ 1.8 - 3.0.0-M5 + {{{micronautVersion}}} {{groupId}}.Application netty 1.5.21 @@ -102,6 +102,7 @@ micronaut-reactor compile + {{#useAuth}} io.micronaut.security micronaut-security @@ -112,6 +113,7 @@ micronaut-security-oauth2 compile + {{/useAuth}} ch.qos.logback logback-classic @@ -144,11 +146,13 @@ micronaut-http-validation ${micronaut.version} + {{#useAuth}} io.micronaut.security micronaut-security-annotations ${micronaut.security.version} + {{/useAuth}} -Amicronaut.processing.group={{groupId}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/enum_outer_doc.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/doc/enum_outer_doc.mustache similarity index 58% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/doc/enum_outer_doc.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/doc/enum_outer_doc.mustache index 20c512aaeae4..3851c2f3050d 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/enum_outer_doc.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/doc/enum_outer_doc.mustache @@ -2,6 +2,8 @@ ## Enum +The class is defined in **[{{classname}}.java](../../{{{modelFolder}}}/{{classname}}.java)** + {{#allowableValues}}{{#enumVars}} * `{{name}}` (value: `{{{value}}}`) {{/enumVars}}{{/allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/doc/model_doc.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/doc/model_doc.mustache new file mode 100644 index 000000000000..8e6c8dde1c62 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/doc/model_doc.mustache @@ -0,0 +1,4 @@ +{{#models}}{{#model}} + +{{#isEnum}}{{>common/doc/enum_outer_doc}}{{/isEnum}}{{^isEnum}}{{>common/doc/pojo_doc}}{{/isEnum}} +{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/pojo_doc.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/doc/pojo_doc.mustache similarity index 76% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/doc/pojo_doc.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/doc/pojo_doc.mustache index 0a79703d7a0a..05d13ee4b59a 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/doc/pojo_doc.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/doc/pojo_doc.mustache @@ -1,7 +1,10 @@ # {{#vendorExtensions.x-is-one-of-interface}}Interface {{/vendorExtensions.x-is-one-of-interface}}{{classname}} +{{#description}} -{{#description}}{{&description}} +{{{description}}} {{/description}} + +The class is defined in **[{{classname}}.java](../../{{{modelFolder}}}/{{classname}}.java)** {{^vendorExtensions.x-is-one-of-interface}} ## Properties @@ -10,30 +13,34 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- {{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}[{{/isModel}}{{/items}}`{{baseType}}{{#items}}<{{dataType}}>`{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}[{{/isModel}}`Map<String, {{dataType}}>`{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}[{{/isModel}}`{{dataType}}`{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isModel}}{{/isContainer}}{{/isEnum}} | {{description}} | {{^required}} [optional property]{{/required}}{{#isReadOnly}} [readonly property]{{/isReadOnly}} {{/vars}} +{{#vars}} -{{#vars}}{{#isEnum}} - -## Enum: {{datatypeWithEnum}} + {{#isEnum}} +## {{datatypeWithEnum}} Name | Value ----- | -----{{#allowableValues}}{{#enumVars}} -{{name}} | `{{value}}`{{/enumVars}}{{/allowableValues}} -{{/isEnum}}{{/vars}} - +---- | ----- + {{#allowableValues}} + {{#enumVars}} +{{name}} | `{{{value}}}` + {{/enumVars}} + {{/allowableValues}} + {{/isEnum}} +{{/vars}} {{#vendorExtensions.x-implements.0}} + ## Implemented Interfaces -{{#vendorExtensions.x-implements}} + {{#vendorExtensions.x-implements}} * `{{{.}}}` -{{/vendorExtensions.x-implements}} + {{/vendorExtensions.x-implements}} {{/vendorExtensions.x-implements.0}} {{/vendorExtensions.x-is-one-of-interface}} - {{#vendorExtensions.x-is-one-of-interface}} ## Implementing Classes -{{#oneOf}} + {{#oneOf}} * `{{{.}}}` -{{/oneOf}} + {{/oneOf}} {{/vendorExtensions.x-is-one-of-interface}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/generatedAnnotation.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/generatedAnnotation.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/generatedAnnotation.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/licenseInfo.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/licenseInfo.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/licenseInfo.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/beanValidation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/beanValidation.mustache new file mode 100644 index 000000000000..ecf4809f9e3f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/beanValidation.mustache @@ -0,0 +1,52 @@ +{{#useBeanValidation}}{{! +validate all pojos and enums +}}{{^isContainer}}{{#isModel}} @Valid +{{/isModel}}{{/isContainer}}{{! +nullable & nonnull +}}{{#required}}{{#isNullable}} @Nullable +{{/isNullable}}{{^isNullable}} @NotNull +{{/isNullable}}{{/required}}{{^required}} @Nullable +{{/required}}{{! +pattern +}}{{#pattern}}{{^isByteArray}} @Pattern(regexp="{{{pattern}}}") +{{/isByteArray}}{{/pattern}}{{! +both minLength && maxLength +}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}}, max={{maxLength}}) +{{/maxLength}}{{/minLength}}{{! +just minLength +}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}) +{{/maxLength}}{{/minLength}}{{! +just maxLength +}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}) +{{/maxLength}}{{/minLength}}{{! +@Size: both minItems && maxItems +}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}}, max={{maxItems}}) +{{/maxItems}}{{/minItems}}{{! +@Size: just minItems +}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}) +{{/maxItems}}{{/minItems}}{{! +@Size: just maxItems +}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}) +{{/maxItems}}{{/minItems}}{{! +@Email +}}{{#isEmail}} @Email +{{/isEmail}}{{! +check for integer or long / all others=decimal type with @Decimal* +isInteger set +}}{{#isInteger}}{{#minimum}} @Min({{minimum}}) +{{/minimum}}{{#maximum}} @Max({{maximum}}) +{{/maximum}}{{/isInteger}}{{! +isLong set +}}{{#isLong}}{{#minimum}} @Min({{minimum}}L) +{{/minimum}}{{#maximum}} @Max({{maximum}}L) +{{/maximum}}{{/isLong}}{{! +Not Integer, not Long => we have a decimal value! +}}{{^isInteger}}{{^isLong}}{{! +minimum for decimal value +}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}}, inclusive=false{{/exclusiveMinimum}}) +{{/minimum}}{{! +maximal for decimal value +}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}}, inclusive=false{{/exclusiveMaximum}}) +{{/maximum}}{{! +close decimal values +}}{{/isLong}}{{/isInteger}}{{/useBeanValidation}} \ No newline at end of file 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 new file mode 100644 index 000000000000..6421884f47d3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache @@ -0,0 +1,26 @@ +{{! + If this is map and items are nullable, make sure that nulls are included. + To determine what JsonInclude.Include method to use, consider the following: + * If the field is required, always include it, even if it is null. + * Else use custom behaviour, IOW use whatever is defined on the object mapper + }} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + @JsonInclude({{#isMap}}{{#items.isNullable}}content = JsonInclude.Include.ALWAYS, {{/items.isNullable}}{{/isMap}}value = JsonInclude.Include.{{#required}}ALWAYS{{/required}}{{^required}}USE_DEFAULTS{{/required}}) + {{#withXml}} + {{^isContainer}} + @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + {{/isContainer}} + {{#isContainer}} + {{#isXmlWrapped}} + // items.xmlName={{items.xmlName}} + @JacksonXmlElementWrapper(useWrapping = {{isXmlWrapped}}, {{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#items.xmlName}}{{items.xmlName}}{{/items.xmlName}}{{^items.xmlName}}{{items.baseName}}{{/items.xmlName}}") + {{/isXmlWrapped}} + {{/isContainer}} + {{/withXml}} + {{#isDateTime}} + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + {{/isDateTime}} + {{#isDate}} + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") + {{/isDate}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/model.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache similarity index 91% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/model/model.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache index d9bf05729829..f3119818d387 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/model.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache @@ -1,4 +1,4 @@ -{{>licenseInfo}} +{{>common/licenseInfo}} package {{package}}; {{#useReflectionEqualsHashCode}} @@ -34,14 +34,14 @@ import javax.annotation.Generated; {{#models}} {{#model}} {{#isEnum}} -{{>model/modelEnum}} +{{>common/model/modelEnum}} {{/isEnum}} {{^isEnum}} {{#vendorExtensions.x-is-one-of-interface}} -{{>model/oneof_interface}} +{{>common/model/oneof_interface}} {{/vendorExtensions.x-is-one-of-interface}} {{^vendorExtensions.x-is-one-of-interface}} -{{>model/pojo}} +{{>common/model/pojo}} {{/vendorExtensions.x-is-one-of-interface}} {{/isEnum}} {{/model}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/modelEnum.mustache similarity index 52% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/model/modelInnerEnum.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/model/modelEnum.mustache index cd49673d0154..a2e0f03ade0a 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/modelEnum.mustache @@ -1,14 +1,15 @@ - /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} - */ -{{#withXml}} - @XmlType(name="{{datatypeWithEnum}}") - @XmlEnum({{dataType}}.class) -{{/withXml}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +{{/jackson}} + +/** + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + */ {{#additionalEnumTypeAnnotations}} - {{{.}}} -{{/additionalEnumTypeAnnotations}} - public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { +{{{.}}} +{{/additionalEnumTypeAnnotations}}{{#useBeanValidation}}@Introspected +{{/useBeanValidation}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} {{#enumDescription}} @@ -25,36 +26,36 @@ private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { - this.value = value; + {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; } {{#jackson}} @JsonValue {{/jackson}} public {{{dataType}}} getValue() { - return value; + return value; } @Override public String toString() { - return String.valueOf(value); + return String.valueOf(value); } {{#jackson}} @JsonCreator {{/jackson}} public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { - if (b.value.equals(value)) { - return b; + for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.equals(value)) { + return b; + } } - } {{#isNullable}} - return null; + return null; {{/isNullable}} {{^isNullable}} - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + throw new IllegalArgumentException("Unexpected value '" + value + "'"); {{/isNullable}} } - } \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/modelInnerEnum.mustache new file mode 100644 index 000000000000..9a1567a0ca51 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/modelInnerEnum.mustache @@ -0,0 +1,60 @@ + /** + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + */ +{{#withXml}} + @XmlType(name="{{datatypeWithEnum}}") + @XmlEnum({{dataType}}.class) +{{/withXml}} +{{#additionalEnumTypeAnnotations}} + {{{.}}} +{{/additionalEnumTypeAnnotations}} + public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{#allowableValues}} + {{#enumVars}} + {{#enumDescription}} + /** + * {{enumDescription}} + */ + {{/enumDescription}} + {{#withXml}} + @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) + {{/withXml}} + {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{/enumVars}} + {{/allowableValues}} + + private {{{dataType}}} value; + + {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + + {{#jackson}} + @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + {{#jackson}} + @JsonCreator + {{/jackson}} + public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.equals(value)) { + return b; + } + } + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + {{/isNullable}} + } + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/oneof_interface.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/oneof_interface.mustache similarity index 77% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/model/oneof_interface.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/model/oneof_interface.mustache index ca0a063d6d8a..33c3d6530fed 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/oneof_interface.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/oneof_interface.mustache @@ -1,7 +1,7 @@ {{#additionalModelTypeAnnotations}} {{{.}}} {{/additionalModelTypeAnnotations}} -{{>generatedAnnotation}}{{>model/typeInfoAnnotation}}{{>model/xmlAnnotation}} +{{>common/generatedAnnotation}}{{>common/model/typeInfoAnnotation}}{{>common/model/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/pojo.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache new file mode 100644 index 000000000000..8711f3f6dc76 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache @@ -0,0 +1,342 @@ +/** + * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + */ +{{#description}} +@ApiModel(description = "{{{description}}}") +{{/description}} +{{#jackson}} +@JsonPropertyOrder({ + {{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} + {{/vars}} +}) +@JsonTypeName("{{name}}") +{{/jackson}} +{{#additionalModelTypeAnnotations}} +{{{.}}} +{{/additionalModelTypeAnnotations}} +{{>common/generatedAnnotation}}{{#discriminator}}{{>common/model/typeInfoAnnotation}}{{/discriminator}}{{>common/model/xmlAnnotation}}{{#useBeanValidation}} +@Introspected +{{/useBeanValidation}}{{! +Declare the class with extends and implements +}}public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ + {{#serializableModel}} + private static final long serialVersionUID = 1L; + + {{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>common/model/modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>common/model/modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{#withXml}} + {{#isXmlAttribute}} + @XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}" + {{/isXmlAttribute}} + {{^isXmlAttribute}} + {{^isContainer}} + @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + {{/isContainer}} + {{#isContainer}} + // Is a container wrapped={{isXmlWrapped}} + {{#items}} + // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} + // items.example={{example}} items.type={{dataType}} + @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + {{/items}} + {{#isXmlWrapped}} + @XmlElementWrapper({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + {{/isXmlWrapped}} + {{/isContainer}} + {{/isXmlAttribute}} + {{/withXml}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + private {{{datatypeWithEnum}}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}} = null{{/required}}; + {{/isContainer}} + {{^isContainer}} + {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + {{#requiredPropertiesInConstructor}} + public {{classname}}({{#requiredVars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/requiredVars}}) { + {{#parent}} + super({{#vendorExtensions.requiredParentVars}}{{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.requiredParentVars}}); + {{/parent}} + {{#vendorExtensions.requiredVars}} + this.{{name}} = {{name}}; + {{/vendorExtensions.requiredVars}} + } + + {{/requiredPropertiesInConstructor}} + {{^requiredPropertiesInConstructor}} + public {{classname}}() { + {{#parent}} + super(); + {{/parent}} + } + {{/requiredPropertiesInConstructor}} + {{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{#isArray}} + public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}; + } + {{/required}} + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{/isArray}} + {{#isMap}} + public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{/isMap}} + {{/isReadOnly}} + /** + {{#description}} + * {{description}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{minimum}} + {{/minimum}} + {{#maximum}} + * maximum: {{maximum}} + {{/maximum}} + * @return {{name}} + **/ +{{>common/model/beanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + {{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} + {{/vendorExtensions.x-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} @JsonIgnore + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#jackson}} +{{>common/model/jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}} +{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{>common/model/jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} this.{{name}} = {{name}}; + } + + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^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}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{/isReadOnly}} + {{/vars}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + {{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{^-last}} && + {{/-last}}{{/vars}}{{#parent}} && + super.equals(o){{/parent}}; + {{/hasVars}} + {{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}}; + {{/hasVars}} + {{/useReflectionEqualsHashCode}} + } + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + {{/useReflectionEqualsHashCode}} + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{/vars}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + {{#parcelableModel}} + public void writeToParcel(Parcel out, int flags) { + {{#model}} + {{#isArray}} + out.writeList(this); + {{/isArray}} + {{^isArray}} + {{#parent}} + super.writeToParcel(out, flags); + {{/parent}} + {{#vars}} + out.writeValue({{name}}); + {{/vars}} + {{/isArray}} + {{/model}} + } + + {{classname}}(Parcel in) { + {{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); + {{/isArray}} + {{^isArray}} + {{#parent}} + super(in); + {{/parent}} + {{#vars}} + {{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); + {{/isPrimitiveType}} + {{/vars}} + {{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { + {{#model}} + {{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; + {{/isArray}} + {{^isArray}} + return new {{classname}}(in); + {{/isArray}} + {{/model}} + } + + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; + {{/parcelableModel}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/model/typeInfoAnnotation.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/model/xmlAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/xmlAnnotation.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/model/xmlAnnotation.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/model/xmlAnnotation.mustache diff --git a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/beanValidation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/params/beanValidation.mustache similarity index 82% rename from modules/openapi-generator/src/main/resources/java-micronaut-client/params/beanValidation.mustache rename to modules/openapi-generator/src/main/resources/java-micronaut/common/params/beanValidation.mustache index 6fd7a75b0661..8b625ef1b931 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut-client/params/beanValidation.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/params/beanValidation.mustache @@ -1,8 +1,11 @@ -{{#useBeanValidation}}{{! +{{!First handle the nullable - it should be present unless otherwise specified}} +{{#isNullable}}@Nullable {{/isNullable}}{{^isNullable}}{{^required}}@Nullable {{/required}}{{/isNullable}}{{! +All the validation +}}{{#useBeanValidation}}{{! +nullable overrides required +}}{{^isNullable}}{{#required}}@NotNull {{/required}}{{/isNullable}}{{! validate all pojos and enums }}{{^isContainer}}{{#isModel}}@Valid {{/isModel}}{{/isContainer}}{{! -nullable & nonnull -}}{{#required}}@NotNull {{/required}}{{#isNullable}}@Nullable {{/isNullable}}{{! pattern }}{{#pattern}}{{^isByteArray}}@Pattern(regexp="{{{pattern}}}") {{/isByteArray}}{{/pattern}}{{! both minLength && maxLength @@ -18,7 +21,7 @@ just maxLength @Size: just maxItems }}{{^minItems}}{{#maxItems}}@Size(max={{maxItems}}) {{/maxItems}}{{/minItems}}{{! @Email -}}{{#isEmail}}@Email{{/isEmail}}{{! +}}{{#isEmail}}@Email {{/isEmail}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set }}{{#isInteger}}{{#minimum}}@Min({{minimum}}) {{/minimum}}{{#maximum}}@Max({{maximum}}) {{/maximum}}{{/isInteger}}{{! diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.groovy.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.groovy.mustache new file mode 100644 index 000000000000..fb94253573cf --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.groovy.mustache @@ -0,0 +1,46 @@ +package {{package}} + +{{#imports}}import {{import}} +{{/imports}} +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import spock.lang.Specification +import jakarta.inject.Inject +{{#fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{/fullJavaUtil}} + +/** + * Model tests for {{classname}} + */ +@MicronautTest +public class {{classname}}Spec extends Specification { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = null + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + void '{{classname}} test'() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + void '{{classname}} property {{name}} test'() { + // TODO: test {{name}} property of {{classname}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.mustache new file mode 100644 index 000000000000..2a49ac946704 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.mustache @@ -0,0 +1,49 @@ +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} +import io.micronaut.test.extensions.junit5.annotation.MicronautTest; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; + +{{#fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{/fullJavaUtil}} + +/** + * Model tests for {{classname}} + */ +@MicronautTest +public class {{classname}}Test { + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-one-of-interface}} + {{^isEnum}} + private final {{classname}} model = null; + + {{/isEnum}} + /** + * Model tests for {{classname}} + */ + @Test + public void test{{classname}}() { + // TODO: test {{classname}} + } + + {{#allVars}} + /** + * Test the property '{{name}}' + */ + @Test + public void {{name}}Test() { + // TODO: test {{name}} + } + + {{/allVars}} + {{/vendorExtensions.x-is-one-of-interface}} + {{/model}} + {{/models}} +} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache new file mode 100644 index 000000000000..f1affde0c26e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache @@ -0,0 +1,129 @@ +{{>common/licenseInfo}} +package {{apiPackage}}; + +import io.micronaut.http.annotation.*; +import io.micronaut.core.annotation.Nullable; +import io.micronaut.core.convert.format.Format; +{{#useAuth}} +import io.micronaut.security.annotation.Secured; +import io.micronaut.security.rules.SecurityRule; +{{/useAuth}} +import reactor.core.publisher.Mono; +{{#imports}} +import {{import}}; +{{/imports}} +import javax.annotation.Generated; +{{^fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{#generateControllerFromExamples}} +import java.util.Arrays; +{{/generateControllerFromExamples}} +{{/fullJavaUtil}} +{{#useBeanValidation}} +import javax.validation.Valid; +import javax.validation.constraints.*; +{{/useBeanValidation}} +import io.swagger.annotations.*; + +{{>common/generatedAnnotation}} +{{^generateControllerAsAbstract}} +@Controller("${context-path}") +{{/generateControllerAsAbstract}} +public {{#generateControllerAsAbstract}}abstract {{/generateControllerAsAbstract}}class {{classname}} { +{{#operations}} + {{#operation}} + /** + {{#summary}} + * {{summary}} + {{/summary}} + {{#notes}} + * {{notes}} + {{/notes}} + {{^summary}} + {{^notes}} + * {{nickname}} + {{/notes}} + {{/summary}} + * + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{returnType}} + {{/returnType}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{!openapi annotations for info}} + @ApiOperation( + value = "{{{summary}}}", + nickname = "{{{operationId}}}"{{#notes}}, + notes = "{{{notes}}}"{{/notes}}{{#returnBaseType}}, + response = {{{returnBaseType}}}.class{{/returnBaseType}}{{#returnContainer}}, + responseContainer = "{{{returnContainer}}}"{{/returnContainer}}, + authorizations = {{openbrace}}{{#hasAuthMethods}} + {{#authMethods}} + {{#isOAuth}} + @Authorization(value = "{{name}}"{{#scopes}}{{#-first}}, scopes = { + {{#scopes}} + @AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}},{{/-last}} + {{/scopes}} + }{{/-first}}{{/scopes}}){{^-last}},{{/-last}} + {{/isOAuth}} + {{^isOAuth}} + @Authorization(value = "{{name}}"){{^-last}},{{/-last}} + {{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}}{{closebrace}}, + tags={{openbrace}}{{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}}{{closebrace}}) + {{!openapi annotations for info about responses}} + @ApiResponses(value = {{openbrace}}{{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}{{closebrace}}) + {{!micronaut annotations}} + @{{#lambda.pascalcase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.pascalcase}}(uri="{{{path}}}") + @Produces(value = {{openbrace}}{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}{{closebrace}}) + {{#consumes.0}} + @Consumes(value = {{openbrace}}{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}{{closebrace}}) + {{/consumes.0}} + {{!security annotations}} + {{#useAuth}} + {{#hasAuthMethods}} + @Secured(SecurityRule.IS_AUTHENTICATED) + {{/hasAuthMethods}} + {{^hasAuthMethods}} + @Secured(SecurityRule.IS_ANONYMOUS) + {{/hasAuthMethods}} + {{/useAuth}} + {{!the method definition}} + public {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} {{nickname}}{{#generateControllerAsAbstract}}Api{{/generateControllerAsAbstract}}({{#allParams}} + {{>server/params/queryParams}}{{>server/params/pathParams}}{{>server/params/headerParams}}{{>server/params/bodyParams}}{{>server/params/formParams}}{{>server/params/cookieParams}}{{^-last}}, {{/-last}}{{#-last}} + {{/-last}}{{/allParams}}) { + {{^generateControllerAsAbstract}} +{{>server/controllerOperationBody}} } + {{/generateControllerAsAbstract}} + {{#generateControllerAsAbstract}} + return {{nickname}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + } + {{/generateControllerAsAbstract}} + {{#generateControllerAsAbstract}} + + /** + {{#summary}} + * {{summary}} + {{/summary}} + * + * This method will be delegated to when the controller gets a request + */ + public abstract {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} {{nickname}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/generateControllerAsAbstract}} + {{^-last}} + + {{/-last}} + {{/operation}} +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerImplementation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerImplementation.mustache new file mode 100644 index 000000000000..91e582a17b5b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerImplementation.mustache @@ -0,0 +1,34 @@ +{{>common/licenseInfo}} +package {{controllerPackage}}; + +import io.micronaut.http.annotation.Controller; +import reactor.core.publisher.Mono; +import {{package}}.{{classname}}; +{{#imports}} +import {{import}}; +{{/imports}} +{{^fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{#generateControllerFromExamples}} +import java.util.Arrays; +{{/generateControllerFromExamples}} +{{/fullJavaUtil}} + + +@Controller("${context-path}") +public class {{controllerClassname}} extends {{classname}} { +{{#operations}} + {{#operation}} + {{!the method definition}} + @Override + public {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} {{nickname}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { +{{>server/controllerOperationBody}} } + {{^-last}} + + {{/-last}} + {{/operation}} +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerOperationBody.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerOperationBody.mustache new file mode 100644 index 000000000000..fc374fe0993f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerOperationBody.mustache @@ -0,0 +1,17 @@ + {{^generateControllerFromExamples}} + {{!The body needs to be implemented by user}} + // TODO implement {{nickname}}() body; + {{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} result = Mono.empty(); + return result; + {{/generateControllerFromExamples}} + {{#generateControllerFromExamples}} + {{!The body is generated to verify that example values are passed correctly}} + {{#allParams}} + {{^isFile}} + {{{dataType}}} {{paramName}}Expected = {{{example}}}; + assert {{paramName}}.equals({{paramName}}Expected) : "The parameter {{paramName}} was expected to match its example value"; + {{/isFile}} + {{/allParams}} + + return Mono.fromCallable(() -> {{^returnType}}""{{/returnType}}{{#returnType}}{{#vendorExtensions.example}}{{{vendorExtensions.example}}}{{/vendorExtensions.example}}{{^vendorExtensions.example}}null{{/vendorExtensions.example}}{{/returnType}}); + {{/generateControllerFromExamples}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/doc/README.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/doc/README.mustache new file mode 100644 index 000000000000..648874800319 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/doc/README.mustache @@ -0,0 +1,27 @@ +# {{artifactId}} + +This is a generated server based on [Micronaut](https://micronaut.io/) framework. + +## Configuration + +To run the whole application, use [Application.java]({{{invokerFolder}}}/Application.java) as main class. + +Read **[Micronaut Guide](https://docs.micronaut.io/latest/guide/#ideSetup)** for detailed description on IDE setup and Micronaut Framework features. + +All the properties can be changed in the [application.yml]({{resourceFolder}}/application.yml) file or when creating micronaut application as described in **[Micronaut Guide - Configuration Section](https://docs.micronaut.io/latest/guide/#config)**. + +## Controller Guides + +Description on how to create Apis is given inside individual api guides: + +{{#apiInfo}} + {{#apis}} +* [{{classFilename}}]({{apiDocPath}}/{{classFilename}}.md) + {{/apis}} +{{/apiInfo}} + +## Author + +{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} +{{/hasMore}}{{/apis}}{{/apiInfo}} + diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/doc/controller_doc.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/doc/controller_doc.mustache new file mode 100644 index 000000000000..80d49233c566 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/doc/controller_doc.mustache @@ -0,0 +1,63 @@ +# {{classname}}{{#description}} +{{description}}{{/description}} + +All URIs are relative to `"{{contextPath}}"` + +The controller class is defined in **[{{classname}}.java](../../{{{apiFolder}}}/{{classname}}.java)** + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}} + {{#operation}} +[**{{operationId}}**](#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} + {{/operation}} +{{/operations}} + +{{#operations}} + {{#operation}} + +# **{{operationId}}** +```java +{{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono{{/returnType}} {{classname}}.{{nickname}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +``` + +{{summary}}{{#notes}} + +{{notes}}{{/notes}} + +{{#allParams}} + {{#-last}} +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +{{#allParams}} +**{{paramName}}** | {{^isPrimitiveType}}[**{{dataType}}**](../../{{modelDocPath}}/{{baseType}}.md){{/isPrimitiveType}}{{#isPrimitiveType}}`{{dataType}}`{{/isPrimitiveType}} | {{description}} |{{^required}} [optional parameter]{{/required}}{{#defaultValue}} [default to `{{defaultValue}}`]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}`{{{.}}}`{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{/allParams}} + {{/-last}} +{{/allParams}} + +{{#returnType}} +### Return type + {{#returnTypeIsPrimitive}} +`{{returnType}}` + {{/returnTypeIsPrimitive}} + {{^returnTypeIsPrimitive}} +[**{{returnType}}**](../../{{modelDocPath}}/{{returnBaseType}}.md) + {{/returnTypeIsPrimitive}} +{{/returnType}} + +{{#authMethods}} + {{#-last}} +### Authorization + {{#authMethods}} +* **{{name}}**{{#scopes}}{{#-last}}, scopes: {{#scopes}}`{{{scope}}}`{{^-last}}, {{/-last}}{{/scopes}}{{/-last}}{{/scopes}} + {{/authMethods}} + {{/-last}} +{{/authMethods}} + +### HTTP request headers + - **Accepts Content-Type**: {{#consumes}}`{{{mediaType}}}`{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Produces Content-Type**: {{#produces}}`{{{mediaType}}}`{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + + {{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/bodyParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/bodyParams.mustache new file mode 100644 index 000000000000..80bca1989f61 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/bodyParams.mustache @@ -0,0 +1,7 @@ +{{#isBodyParam}}{{! +Multi part +}}{{#isMultipart}}@Part("{{baseName}}"){{/isMultipart}}{{! +Non-multipart body +}}{{^isMultipart}}@Body{{/isMultipart}}{{! +The type +}} {{>common/params/beanValidation}}{{>server/params/type}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/cookieParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/cookieParams.mustache new file mode 100644 index 000000000000..be25ae2174cf --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/cookieParams.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}@CookieValue(value="{{baseName}}"{{#defaultValue}}, defaultValue="{{defaultValue}}"{{/defaultValue}}) {{>common/params/beanValidation}}{{>server/params/type}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/formParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/formParams.mustache new file mode 100644 index 000000000000..22c02d391bd0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/formParams.mustache @@ -0,0 +1 @@ +{{#isFormParam}}{{>common/params/beanValidation}}{{>server/params/type}} {{paramName}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/headerParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/headerParams.mustache new file mode 100644 index 000000000000..1cb2c90a9109 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/headerParams.mustache @@ -0,0 +1 @@ +{{#isHeaderParam}}@Header(value="{{baseName}}"{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{>common/params/beanValidation}}{{>server/params/type}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/pathParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/pathParams.mustache new file mode 100644 index 000000000000..4e2fd4c2e1a7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/pathParams.mustache @@ -0,0 +1 @@ +{{#isPathParam}}@PathVariable(value="{{baseName}}"{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{>common/params/beanValidation}}{{>server/params/type}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/queryParams.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/queryParams.mustache new file mode 100644 index 000000000000..0ba7b4606140 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/queryParams.mustache @@ -0,0 +1 @@ +{{#isQueryParam}}@QueryValue(value="{{{baseName}}}"{{!default value}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{!validation and type}}{{>common/params/beanValidation}}{{>server/params/type}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/params/type.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/type.mustache new file mode 100644 index 000000000000..4d51aec1c95a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/params/type.mustache @@ -0,0 +1,7 @@ +{{! +default type +}}{{^isDate}}{{^isDateTime}}{{{dataType}}}{{/isDateTime}}{{/isDate}}{{! +date-time +}}{{#isDateTime}}@Format("yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") {{{dataType}}}{{/isDateTime}}{{! +date +}}{{#isDate}}@Format("yyyy-MM-dd") {{{dataType}}}{{/isDate}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.groovy.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.groovy.mustache new file mode 100644 index 000000000000..44c0730cb991 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.groovy.mustache @@ -0,0 +1,185 @@ +package {{package}} + +{{#imports}} +import {{import}} +{{/imports}} +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import io.micronaut.http.client.HttpClient +import io.micronaut.http.client.annotation.Client +import io.micronaut.runtime.server.EmbeddedServer +import io.micronaut.http.HttpStatus +import io.micronaut.http.HttpRequest +import io.micronaut.http.MutableHttpRequest; +import io.micronaut.http.HttpResponse +import io.micronaut.http.MediaType +import io.micronaut.http.uri.UriTemplate +import io.micronaut.http.cookie.Cookie +import io.micronaut.http.client.multipart.MultipartBody +import io.micronaut.core.type.Argument +import jakarta.inject.Inject +import spock.lang.Specification +import spock.lang.Ignore +import reactor.core.publisher.Mono +import java.io.File +import java.io.FileReader + + +/** + * Controller tests for {{classname}} + */ +@MicronautTest +class {{classname}}Spec extends Specification { + + @Inject + EmbeddedServer server + + @Inject + @Client('${context-path}') + HttpClient client + + @Inject + {{classname}} controller + + {{#operations}} + {{#operation}} + /** + * This test is used to validate the implementation of {{operationId}}() method + * + * The method should: {{summary}} + {{#notes}} + * + * {{notes}} + {{/notes}} + * + * TODO fill in the parameters and test return value. + */ + {{^generateControllerFromExamples}} + @Ignore("Not Implemented") + {{/generateControllerFromExamples}} + def '{{operationId}}() method test'() { + given: + {{#allParams}} + {{{dataType}}} {{paramName}} = {{{vendorExtensions.groovyExample}}} + {{/allParams}} + + when: + {{#returnType}}{{{returnType}}} result = {{/returnType}}controller.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).block() + + then: + {{^generateControllerFromExamples}} + true + {{/generateControllerFromExamples}} + {{#generateControllerFromExamples}} + {{^returnType}} + true + {{/returnType}} + {{#returnType}} + result == {{{vendorExtensions.groovyExample}}} + {{/returnType}} + {{/generateControllerFromExamples}} + } + + /** + * This test is used to check that the api available to client through + * '{{{path}}}' to the features of {{operationId}}() works as desired. + * + * TODO fill in the request parameters and test response. + */ + {{^generateControllerFromExamples}} + @Ignore("Not Implemented") + {{/generateControllerFromExamples}} + def '{{operationId}}() test with client through path {{{path}}}'() { + given: + {{!Create the body}} + {{#bodyParam}} + {{{dataType}}} body = {{{vendorExtensions.groovyExample}}} + {{/bodyParam}} + {{#formParams.0}} + var form = [ + // Fill in the body form parameters + {{#formParams}} + {{^isFile}} + '{{{baseName}}}': {{{vendorExtensions.groovyExample}}}{{^-last}},{{/-last}} + {{/isFile}} + {{#isFile}} + '{{{baseName}}}': new FileReader(File.createTempFile('test', '.tmp')){{^-last}},{{/-last}} + {{/isFile}} + {{/formParams}} + ] + {{/formParams.0}} + {{#isMultipart}} + {{^formParams}} + var body = MultipartBody.builder() // Create multipart body + {{#bodyParams}} + {{^isFile}} + .addPart('{{{baseName}}}', {{{vendorExtensions.groovyExample}}}{{^isString}}.toString(){{/isString}}) + {{/isFile}} + {{#isFile}} + {{#contentType}} + .addPart('{{{baseName}}}', 'filename', MediaType.of('{{{contentType}}}'), File.createTempFile('test', '.tmp')) + {{/contentType}} + {{^contentType}} + .addPart('{{{baseName}}}', 'filename', File.createTempFile('test', '.tmp')) + {{/contentType}} + {{/isFile}} + {{/bodyParams}} + .build() + {{/formParams}} + {{/isMultipart}} + {{!Create the uri with path variables}} + var uri = UriTemplate.of('{{{path}}}').expand({{^pathParams}}[:]{{/pathParams}}{{#pathParams.0}}[ + // Fill in the path variables + {{#pathParams}} + '{{{baseName}}}': {{{vendorExtensions.groovyExample}}}{{^-last}},{{/-last}} + {{/pathParams}} + ]{{/pathParams.0}}) + {{!Create the request with body and uri}} + MutableHttpRequest request = HttpRequest.{{httpMethod}}{{#vendorExtensions.methodAllowsBody}}{{#bodyParam}}(uri, body){{/bodyParam}}{{#isMultipart}}{{^formParams}}(uri, body){{/formParams}}{{/isMultipart}}{{#formParams.0}}(uri, form){{/formParams.0}}{{^bodyParam}}{{^isMultipart}}{{^formParams}}(uri, null){{/formParams}}{{/isMultipart}}{{/bodyParam}}{{/vendorExtensions.methodAllowsBody}}{{^vendorExtensions.methodAllowsBody}}(uri){{/vendorExtensions.methodAllowsBody}} + {{!Fill in all the request parameters}} + {{#vendorExtensions.x-contentType}} + .contentType('{{vendorExtensions.x-contentType}}') + {{/vendorExtensions.x-contentType}} + {{#vendorExtensions.x-accepts}} + .accept('{{vendorExtensions.x-accepts}}') + {{/vendorExtensions.x-accepts}} + {{#headerParams}} + .header('{{{baseName}}}', {{{vendorExtensions.groovyExample}}}{{^isString}}.toString(){{/isString}}) + {{/headerParams}} + {{#cookieParams}} + .cookie(Cookie.of('{{{baseName}}}', {{{vendorExtensions.groovyExample}}})) + {{/cookieParams}} + {{!Fill in the query parameters}} + {{#queryParams.0}} + request.getParameters() + {{#queryParams}} + {{#isCollectionFormatMulti}} + .add('{{{baseName}}}', {{{vendorExtensions.groovyExample}}}) // The query format should be multi + {{/isCollectionFormatMulti}} + {{#isDeepObject}} + .add('{{{baseName}}}[property]', 'value') // The query format should be deep-object + {{/isDeepObject}} + {{^isCollectionFormatMulti}} + {{^isDeepObject}} + .add('{{{baseName}}}', {{{vendorExtensions.groovyExample}}}{{^isString}}.toString(){{/isString}}){{#collectionFormat}} // The query parameter format should be {{collectionFormat}}{{/collectionFormat}} + {{/isDeepObject}} + {{/isCollectionFormatMulti}} + {{/queryParams}} + {{/queryParams.0}} + + when: + HttpResponse response = client.toBlocking().exchange(request{{#returnType}}, {{#returnContainer}}Argument.of({{#isArray}}List{{/isArray}}{{#isMap}}Map{{/isMap}}.class, {{#isMap}}String.class, {{/isMap}}{{{returnBaseType}}}.class){{/returnContainer}}{{^returnContainer}}{{{returnType}}}.class{{/returnContainer}}{{/returnType}});{{^returnType}} // To retrieve body you must specify required type (e.g. Map.class) as second argument {{/returnType}} + + then: + response.status() == HttpStatus.OK + {{#generateControllerFromExamples}} + {{#returnType}} + {{#vendorExtensions.example}} + response.body() == {{{vendorExtensions.groovyExample}}} + {{/vendorExtensions.example}} + {{/returnType}} + {{/generateControllerFromExamples}} + } + + {{/operation}} + {{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.mustache new file mode 100644 index 000000000000..2e34bd72124b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.mustache @@ -0,0 +1,185 @@ +package {{package}}; + +{{#imports}} +import {{import}}; +{{/imports}} +import io.micronaut.test.extensions.junit5.annotation.MicronautTest; +import io.micronaut.http.client.HttpClient; +import io.micronaut.http.client.annotation.Client; +import io.micronaut.runtime.server.EmbeddedServer; +import io.micronaut.http.HttpStatus; +import io.micronaut.http.MutableHttpRequest; +import io.micronaut.http.HttpRequest; +import io.micronaut.http.HttpResponse; +import io.micronaut.http.MediaType; +import io.micronaut.http.uri.UriTemplate; +import io.micronaut.http.cookie.Cookie; +import io.micronaut.http.client.multipart.MultipartBody; +import io.micronaut.core.type.Argument; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Assertions; +import jakarta.inject.Inject; +import reactor.core.publisher.Mono; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +{{^fullJavaUtil}} +import java.util.Arrays; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.HashSet; +{{/fullJavaUtil}} + + +/** + * API tests for {{classname}} + */ +@MicronautTest +public class {{classname}}Test { + + @Inject + EmbeddedServer server; + + @Inject + @Client("${context-path}") + HttpClient client; + + @Inject + {{classname}} controller; + + {{#operations}} + {{#operation}} + /** + * This test is used to validate the implementation of {{operationId}}() method + * + * The method should: {{summary}} + {{#notes}} + * + * {{notes}} + {{/notes}} + * + * TODO fill in the parameters and test return value. + */ + @Test + {{^generateControllerFromExamples}} + @Disabled("Not Implemented") + {{/generateControllerFromExamples}} + void {{operationId}}MethodTest() { + // given + {{#allParams}} + {{{dataType}}} {{paramName}} = {{{example}}}; + {{/allParams}} + + // when + {{#returnType}}{{{returnType}}} result = {{/returnType}}controller.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).block(); + + // then + {{^generateControllerFromExamples}} + Assertions.assertTrue(true); + {{/generateControllerFromExamples}} + {{#generateControllerFromExamples}} + {{#returnType}} + {{#vendorExtensions.example}} + Assertions.assertEquals(result, {{{vendorExtensions.example}}}); + {{/vendorExtensions.example}} + {{/returnType}} + {{/generateControllerFromExamples}} + } + + /** + * This test is used to check that the api available to client through + * '{{{path}}}' to the features of {{operationId}}() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Test + {{^generateControllerFromExamples}} + @Disabled("Not Implemented") + {{/generateControllerFromExamples}} + void {{operationId}}ClientApiTest() throws IOException { + // given + {{!Create the body}} + {{#bodyParam}} + {{{dataType}}} body = {{{example}}}; + {{/bodyParam}} + {{#formParams.0}} + Map form = new HashMap(){{openbrace}}{{openbrace}} + // Fill in the body form parameters + {{#formParams}} + {{^isFile}} + put("{{{baseName}}}", {{{example}}}); + {{/isFile}} + {{#isFile}} + put("{{{baseName}}}", new FileReader(File.createTempFile("test", ".tmp"))); + {{/isFile}} + {{/formParams}} + {{closebrace}}{{closebrace}}; + {{/formParams.0}} + {{#isMultipart}} + {{^formParams}} + MultipartBody body = MultipartBody.builder() // Create multipart body + {{#bodyParams}} + {{^isFile}} + .addPart("{{{baseName}}}", {{^isString}}String.valueOf({{/isString}}{{{example}}}{{^isString}}){{/isString}}) + {{/isFile}} + {{#isFile}} + {{#contentType}} + .addPart("{{{baseName}}}", "filename", MediaType.of("{{{contentType}}}"), File.createTempFile("test", ".tmp")) + {{/contentType}} + {{^contentType}} + .addPart("{{{baseName}}}", "filename", File.createTempFile("test", ".tmp")) + {{/contentType}} + {{/isFile}} + {{/bodyParams}} + .build(); + {{/formParams}} + {{/isMultipart}} + {{!Create the uri with path variables}} + String uri = UriTemplate.of("{{{path}}}").expand(new HashMap{{^pathParams}}<>(){{/pathParams}}{{#pathParams.0}}(){{openbrace}}{{openbrace}} + // Fill in the path variables + {{#pathParams}} + put("{{{baseName}}}", {{{example}}}); + {{/pathParams}} + {{closebrace}}{{closebrace}}{{/pathParams.0}}); + {{!Create the request with body and uri}} + MutableHttpRequest request = HttpRequest.{{httpMethod}}{{#vendorExtensions.methodAllowsBody}}{{#bodyParam}}(uri, body){{/bodyParam}}{{#isMultipart}}{{^formParams}}(uri, body){{/formParams}}{{/isMultipart}}{{#formParams.0}}(uri, form){{/formParams.0}}{{^bodyParam}}{{^isMultipart}}{{^formParams}}(uri, null){{/formParams}}{{/isMultipart}}{{/bodyParam}}{{/vendorExtensions.methodAllowsBody}}{{^vendorExtensions.methodAllowsBody}}(uri){{/vendorExtensions.methodAllowsBody}}{{!Fill in all the request parameters}}{{#vendorExtensions.x-contentType}} + .contentType("{{vendorExtensions.x-contentType}}"){{/vendorExtensions.x-contentType}}{{#vendorExtensions.x-accepts}} + .accept("{{vendorExtensions.x-accepts}}"){{/vendorExtensions.x-accepts}}{{#headerParams}} + .header("{{{baseName}}}", {{^isString}}String.valueOf({{/isString}}{{{example}}}{{^isString}}){{/isString}}){{/headerParams}}{{#cookieParams}} + .cookie(Cookie.of("{{{baseName}}}", {{{example}}})){{/cookieParams}}; + {{!Fill in the query parameters}} + {{#queryParams.0}} + request.getParameters() + {{#queryParams}} + {{#isCollectionFormatMulti}} + .add("{{{baseName}}}", {{{example}}}){{#-last}};{{/-last}} // The query format should be multi + {{/isCollectionFormatMulti}} + {{#isDeepObject}} + .add("{{{baseName}}}[property]", "value"){{#-last}};{{/-last}} // The query format should be deep-object + {{/isDeepObject}} + {{^isCollectionFormatMulti}} + {{^isDeepObject}} + .add("{{{baseName}}}", {{^isString}}String.valueOf({{/isString}}{{{example}}}{{^isString}}){{/isString}}){{#-last}};{{/-last}} // The query parameter format should be {{collectionFormat}} + {{/isDeepObject}} + {{/isCollectionFormatMulti}} + {{/queryParams}} + {{/queryParams.0}} + + // when + HttpResponse response = client.toBlocking().exchange(request{{#returnType}}, {{#returnContainer}}Argument.of({{#isArray}}List{{/isArray}}{{#isMap}}Map{{/isMap}}.class, {{#isMap}}String.class, {{/isMap}}{{{returnBaseType}}}.class){{/returnContainer}}{{^returnContainer}}{{{returnType}}}.class{{/returnContainer}}{{/returnType}});{{^returnType}} // To retrieve body you must specify required type (e.g. Map.class) as second argument {{/returnType}} + + // then + Assertions.assertEquals(HttpStatus.OK, response.status()); + {{#generateControllerFromExamples}} + {{#returnType}} + Assertions.assertEquals(response.body(), {{{vendorExtensions.example}}}); + {{/returnType}} + {{/generateControllerFromExamples}} + } + + {{/operation}} + {{/operations}} +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/AbstractMicronautCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/AbstractMicronautCodegenTest.java new file mode 100644 index 000000000000..2241771ef6a6 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/AbstractMicronautCodegenTest.java @@ -0,0 +1,125 @@ +package org.openapitools.codegen.java.micronaut; + +import io.swagger.parser.OpenAPIParser; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.parser.core.models.ParseOptions; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.languages.JavaMicronautAbstractCodegen; +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.regex.Pattern; + +import static org.testng.Assert.*; + + +/** + * An abstract class with methods useful for testing + */ +public abstract class AbstractMicronautCodegenTest { + /** + * Path to a common test configuration file + */ + protected final String PETSTORE_PATH = "src/test/resources/petstore.json"; + + /** + * + * @param codegen - the code generator + * @param configPath - the path to the config starting from src/test/resources + * @param filesToGenerate - which files to generate - can be CodegenConstants.MODELS, APIS, SUPPORTING_FILES, ... + * @return - the path to the generated folder + */ + protected String generateFiles(JavaMicronautAbstractCodegen codegen, String configPath, String... filesToGenerate) { + File output = null; + try { + output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + } catch (IOException e) { + fail("Unable to create temporary directory for output"); + } + output.deleteOnExit(); + + // Create parser + String outputPath = output.getAbsolutePath().replace('\\', '/'); + OpenAPI openAPI = new OpenAPIParser() + .readLocation(configPath, null, new ParseOptions()).getOpenAPI(); + + // Configure codegen + codegen.setOutputDir(outputPath); + + // Create input + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + // Generate + DefaultGenerator generator = new DefaultGenerator(); + // by default nothing is generated + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.API_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.API_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + // set all the files user wants to generate + for (String files: filesToGenerate) { + generator.setGeneratorPropertyDefault(files, "true"); + } + + generator.opts(input).generate(); + + return outputPath + "/"; + } + + public static void assertFileContainsRegex(String path, String... regex) { + String file = readFile(path); + for (String line: regex) + assertTrue(Pattern.compile(line.replace(" ", "\\s+")).matcher(file).find()); + } + + public static void assertFileNotContainsRegex(String path, String... regex) { + String file = readFile(path); + for (String line: regex) + assertFalse(Pattern.compile(line.replace(" ", "\\s+")).matcher(file).find()); + } + + public static void assertFileContains(String path, String... lines) { + String file = linearize(readFile(path)); + for (String line : lines) + assertTrue(file.contains(linearize(line)), "File does not contain line [" + line + "]"); + } + + public static void assertFileNotContains(String path, String... lines) { + String file = linearize(readFile(path)); + for (String line : lines) + assertFalse(file.contains(linearize(line)), "File contains line [" + line + "]"); + } + + public static void assertFileExists(String path) { + assertTrue(Paths.get(path).toFile().exists(), "File \"" + path + "\" should exist"); + } + + public static void assertFileNotExists(String path) { + assertFalse(Paths.get(path).toFile().exists(), "File \"" + path + "\" should not exist"); + } + + public static String readFile(String path) { + String file = null; + try { + file = new String(Files.readAllBytes(Paths.get(path)), StandardCharsets.UTF_8); + assertNotNull(file, "File \"" + path + "\" does not exist"); + } catch (IOException e) { + fail("Unable to evaluate file " + path); + } + + return file; + } + + public static String linearize(String target) { + return target.replaceAll("\r?\n", "").replaceAll("\\s+", "\\s"); + } +} 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 452d38f05ec1..103ae98ab1c0 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 @@ -1,31 +1,18 @@ package org.openapitools.codegen.java.micronaut; -import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.servers.Server; -import io.swagger.v3.parser.core.models.ParseOptions; import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.languages.JavaMicronautClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; - -import java.io.File; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Paths; - import static java.util.stream.Collectors.groupingBy; import static org.testng.Assert.*; -import static org.testng.Assert.fail; -public class MicronautClientCodegenTest { - private final String PETSTORE_PATH = "src/test/resources/petstore.json"; +public class MicronautClientCodegenTest extends AbstractMicronautCodegenTest { @Test public void clientOptsUnicity() { JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); @@ -55,6 +42,31 @@ public void testInitialConfigValues() throws Exception { Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools"); } + @Test + public void testApiAndModelFilesPresent() { + JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "org.test.test"); + codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "org.test.test.model"); + codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "org.test.test.api"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.SUPPORTING_FILES, + CodegenConstants.APIS, + CodegenConstants.MODELS); + + String apiFolder = outputPath + "src/main/java/org/test/test/api/"; + assertFileExists(apiFolder + "PetApi.java"); + assertFileExists(apiFolder + "StoreApi.java"); + assertFileExists(apiFolder + "UserApi.java"); + + String modelFolder = outputPath + "src/main/java/org/test/test/model/"; + assertFileExists(modelFolder + "Pet.java"); + assertFileExists(modelFolder + "User.java"); + assertFileExists(modelFolder + "Order.java"); + + String resources = outputPath + "src/main/resources/"; + assertFileExists(resources + "application.yml"); + } + @Test public void doConfigureAuthParam() { JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); @@ -85,7 +97,7 @@ public void doNotConfigureAuthParam() { @Test public void doUseValidationParam() { JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); - codegen.additionalProperties().put(JavaMicronautClientCodegen.OPT_CONFIGURE_AUTH, "false"); + codegen.additionalProperties().put(JavaMicronautClientCodegen.USE_BEANVALIDATION, "true"); String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.APIS); @@ -94,6 +106,18 @@ public void doUseValidationParam() { assertFileContains(outputPath + "/src/main/java/org/openapitools/api/PetApi.java", "@NotNull"); } + @Test + public void doNotUseValidationParam() { + JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); + codegen.additionalProperties().put(JavaMicronautClientCodegen.USE_BEANVALIDATION, "false"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.APIS); + + // Files are not generated + assertFileNotContains(outputPath + "/src/main/java/org/openapitools/api/PetApi.java", "@Valid"); + assertFileNotContains(outputPath + "/src/main/java/org/openapitools/api/PetApi.java", "@NotNull"); + } + @Test public void doGenerateForMaven() { JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); @@ -162,89 +186,33 @@ public void doGenerateForTestSpock() { assertFileContains(outputPath + "src/test/groovy/org/openapitools/api/PetApiSpec.groovy", "PetApiSpec", "@MicronautTest"); } - /** - * - * @param codegen - the code generator - * @param configPath - the path to the config starting from src/test/resources - * @param filesToGenerate - which files to generate - can be CodegenConstants.MODELS, APIS, SUPPORTING_FILES, ... - * @return - the path to the generated folder - */ - protected String generateFiles(JavaMicronautClientCodegen codegen, String configPath, String... filesToGenerate) { - File output = null; - try { - output = Files.createTempDirectory("test").toFile().getCanonicalFile(); - } catch (IOException e) { - fail("Unable to create temporary directory for output"); - } - output.deleteOnExit(); - - // Create parser - String outputPath = output.getAbsolutePath().replace('\\', '/'); - OpenAPI openAPI = new OpenAPIParser() - .readLocation(configPath, null, new ParseOptions()).getOpenAPI(); - - // Configure codegen - codegen.setOutputDir(outputPath); - - // Create input - ClientOptInput input = new ClientOptInput(); - input.openAPI(openAPI); - input.config(codegen); - - // Generate - DefaultGenerator generator = new DefaultGenerator(); - // by default nothing is generated - generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "false"); - generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); - generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); - generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false"); - generator.setGeneratorPropertyDefault(CodegenConstants.API_TESTS, "false"); - generator.setGeneratorPropertyDefault(CodegenConstants.API_DOCS, "false"); - generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); - // set all the files user wants to generate - for (String files: filesToGenerate) { - generator.setGeneratorPropertyDefault(files, "true"); - } - - generator.opts(input).generate(); - - return outputPath + "/"; - } - - public static void assertFileContains(String path, String... lines) { - String file = readFile(path); - for (String line : lines) - assertTrue(file.contains(linearize(line)), "File does not contain line [" + line + "]"); - } - - public static void assertFileNotContains(String path, String... lines) { - String file = readFile(path); - for (String line : lines) - assertFalse(file.contains(linearize(line)), "File contains line [" + line + "]"); - } - - public static void assertFileExists(String path) { - assertTrue(Paths.get(path).toFile().exists(), "File \"" + path + "\" should exist"); - } - - public static void assertFileNotExists(String path) { - assertFalse(Paths.get(path).toFile().exists(), "File \"" + path + "\" should not exist"); - } + @Test + public void doGenerateRequiredPropertiesInConstructor() { + JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); + codegen.additionalProperties().put(JavaMicronautClientCodegen.OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, "true"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); - public static String readFile(String path) { - String file = null; - try { - String generatedFile = new String(Files.readAllBytes(Paths.get(path)), StandardCharsets.UTF_8); - file = linearize(generatedFile); - assertNotNull(file); - } catch (IOException e) { - fail("Unable to evaluate file " + path); - } - - return file; + // Constructor should have properties + String modelPath = outputPath + "src/main/java/org/openapitools/model/"; + assertFileContains(modelPath + "Pet.java", "public Pet(String name, List photoUrls)"); + assertFileNotContains(modelPath + "Pet.java", "public Pet()"); + assertFileContains(modelPath + "User.java", "public User()"); + assertFileContains(modelPath + "Order.java", "public Order()"); } - public static String linearize(String target) { - return target.replaceAll("\r?\n", "").replaceAll("\\s+", "\\s"); + @Test + public void doNotGenerateRequiredPropertiesInConstructor() { + JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); + codegen.additionalProperties().put(JavaMicronautClientCodegen.OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, "false"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); + + // Constructor should have properties + String modelPath = outputPath + "src/main/java/org/openapitools/model/"; + assertFileContains(modelPath + "Pet.java", "public Pet()"); + assertFileNotContainsRegex(modelPath + "Pet.java", "public Pet\\([^)]+\\)"); + assertFileContains(modelPath + "User.java", "public User()"); + assertFileNotContainsRegex(modelPath + "User.java", "public User\\([^)]+\\)"); + assertFileContains(modelPath + "Order.java", "public Order()"); + assertFileNotContainsRegex(modelPath + "Order.java", "public Order\\([^)]+\\)"); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java new file mode 100644 index 000000000000..d10d250aabc3 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java @@ -0,0 +1,195 @@ +package org.openapitools.codegen.java.micronaut; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.servers.Server; +import org.openapitools.codegen.CliOption; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.languages.JavaMicronautServerCodegen; +import org.testng.Assert; +import org.testng.annotations.Test; + +import static java.util.stream.Collectors.groupingBy; +import static org.testng.Assert.assertEquals; + +public class MicronautServerCodegenTest extends AbstractMicronautCodegenTest { + @Test + public void clientOptsUnicity() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.cliOptions() + .stream() + .collect(groupingBy(CliOption::getOpt)) + .forEach((k, v) -> assertEquals(v.size(), 1, k + " is described multiple times")); + } + + @Test + public void testInitialConfigValues() throws Exception { + final JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.processOpts(); + + OpenAPI openAPI = new OpenAPI(); + openAPI.addServersItem(new Server().url("https://one.com/v2")); + openAPI.setInfo(new Info()); + codegen.preprocessOpenAPI(openAPI); + + Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE); + Assert.assertEquals(codegen.isHideGenerationTimestamp(), false); + Assert.assertEquals(codegen.modelPackage(), "org.openapitools.model"); + Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "org.openapitools.model"); + Assert.assertEquals(codegen.apiPackage(), "org.openapitools.controller"); + Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "org.openapitools.controller"); + Assert.assertEquals(codegen.additionalProperties().get(JavaMicronautServerCodegen.OPT_CONTROLLER_PACKAGE), "org.openapitools.controller"); + Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools"); + Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools"); + } + + @Test + public void testApiAndModelFilesPresent() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "org.test.test"); + codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "org.test.test.model"); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_CONTROLLER_PACKAGE, "org.test.test.controller"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.SUPPORTING_FILES, + CodegenConstants.APIS, + CodegenConstants.MODELS); + + String invokerFolder = outputPath + "src/main/java/org/test/test/"; + assertFileExists(invokerFolder + "Application.java"); + + String controllerFolder = outputPath + "src/main/java/org/test/test/controller/"; + assertFileExists(controllerFolder + "PetController.java"); + assertFileExists(controllerFolder + "StoreController.java"); + assertFileExists(controllerFolder + "UserController.java"); + + String modelFolder = outputPath + "src/main/java/org/test/test/model/"; + assertFileExists(modelFolder + "Pet.java"); + assertFileExists(modelFolder + "User.java"); + assertFileExists(modelFolder + "Order.java"); + + String resources = outputPath + "src/main/resources/"; + assertFileExists(resources + "application.yml"); + } + + @Test + public void doUseValidationParam() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.USE_BEANVALIDATION, "true"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.APIS); + + // Files are not generated + assertFileContains(outputPath + "/src/main/java/org/openapitools/controller/PetController.java", "@Valid"); + assertFileContains(outputPath + "/src/main/java/org/openapitools/controller/PetController.java", "@NotNull"); + } + + @Test + public void doNotUseValidationParam() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.USE_BEANVALIDATION, "false"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.APIS); + + // Files are not generated + assertFileNotContains(outputPath + "/src/main/java/org/openapitools/controller/PetController.java", "@Valid"); + assertFileNotContains(outputPath + "/src/main/java/org/openapitools/controller/PetController.java", "@NotNull"); + } + + @Test + public void doGenerateForMaven() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_BUILD, + JavaMicronautServerCodegen.OPT_BUILD_MAVEN); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.SUPPORTING_FILES); + + // Files are not generated + assertFileExists(outputPath + "/pom.xml"); + assertFileNotExists(outputPath + "/build.gradle"); + } + + @Test + public void doGenerateForGradle() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_BUILD, + JavaMicronautServerCodegen.OPT_BUILD_GRADLE); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.SUPPORTING_FILES); + + // Files are not generated + assertFileExists(outputPath + "/build.gradle"); + assertFileNotExists(outputPath + "/pom.xml"); + } + + @Test + public void doGenerateForTestJUnit() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_BUILD, + JavaMicronautServerCodegen.OPT_BUILD_ALL); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_TEST, + JavaMicronautServerCodegen.OPT_TEST_JUNIT); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.SUPPORTING_FILES, + CodegenConstants.API_TESTS, CodegenConstants.APIS, CodegenConstants.MODELS); + + // Files are not generated + assertFileContains(outputPath + "build.gradle", "testRuntime(\"junit"); + assertFileContains(outputPath + "pom.xml", "micronaut-test-junit"); + assertFileNotContains(outputPath + "build.gradle", "testRuntime(\"spock"); + assertFileNotContains(outputPath + "pom.xml", "micronaut-test-spock"); + assertFileExists(outputPath + "src/test/java/"); + assertFileExists(outputPath + "src/test/java/org/openapitools/controller/PetControllerTest.java"); + assertFileContains(outputPath + "src/test/java/org/openapitools/controller/PetControllerTest.java", "PetControllerTest", "@MicronautTest"); + } + + @Test + public void doGenerateForTestSpock() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_BUILD, + JavaMicronautServerCodegen.OPT_BUILD_ALL); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_TEST, + JavaMicronautServerCodegen.OPT_TEST_SPOCK); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.SUPPORTING_FILES, + CodegenConstants.API_TESTS, CodegenConstants.APIS, CodegenConstants.MODELS); + + // Files are not generated + assertFileNotContains(outputPath + "build.gradle", "testRuntime(\"junit"); + assertFileNotContains(outputPath + "pom.xml", "micronaut-test-junit"); + assertFileContains(outputPath + "build.gradle", "testRuntime(\"spock"); + assertFileContains(outputPath + "pom.xml", "micronaut-test-spock"); + assertFileExists(outputPath + "src/test/groovy"); + assertFileExists(outputPath + "src/test/groovy/org/openapitools/controller/PetControllerSpec.groovy"); + assertFileContains(outputPath + "src/test/groovy/org/openapitools/controller/PetControllerSpec.groovy", "PetControllerSpec", "@MicronautTest"); + } + + @Test + public void doGenerateRequiredPropertiesInConstructor() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, "true"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); + + // Constructor should have properties + String modelPath = outputPath + "src/main/java/org/openapitools/model/"; + assertFileContains(modelPath + "Pet.java", "public Pet(String name, List photoUrls)"); + assertFileNotContains(modelPath + "Pet.java", "public Pet()"); + assertFileContains(modelPath + "User.java", "public User()"); + assertFileContains(modelPath + "Order.java", "public Order()"); + } + + @Test + public void doNotGenerateRequiredPropertiesInConstructor() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, "false"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); + + // Constructor should have properties + String modelPath = outputPath + "src/main/java/org/openapitools/model/"; + assertFileContains(modelPath + "Pet.java", "public Pet()"); + assertFileNotContainsRegex(modelPath + "Pet.java", "public Pet\\([^)]+\\)"); + assertFileContains(modelPath + "User.java", "public User()"); + assertFileNotContainsRegex(modelPath + "User.java", "public User\\([^)]+\\)"); + assertFileContains(modelPath + "Order.java", "public Order()"); + assertFileNotContainsRegex(modelPath + "Order.java", "public Order\\([^)]+\\)"); + } +} diff --git a/pom.xml b/pom.xml index 06f87b9cb43f..94336ceb9a25 100644 --- a/pom.xml +++ b/pom.xml @@ -735,6 +735,18 @@ samples/client/petstore/java-micronaut-client + + java-micronaut-server + + + env + java + + + + samples/server/petstore/java-micronaut-server + + java-msf4j-server diff --git a/samples/client/petstore/java-micronaut-client/.openapi-generator/FILES b/samples/client/petstore/java-micronaut-client/.openapi-generator/FILES index 22a29a5113b6..d5036a847b55 100644 --- a/samples/client/petstore/java-micronaut-client/.openapi-generator/FILES +++ b/samples/client/petstore/java-micronaut-client/.openapi-generator/FILES @@ -4,61 +4,61 @@ .mvn/wrapper/maven-wrapper.jar README.md build.gradle -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/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/Dog.md -docs/DogAllOf.md -docs/EnumArrays.md -docs/EnumClass.md -docs/EnumTest.md -docs/FakeApi.md -docs/FakeClassnameTags123Api.md -docs/FileSchemaTestClass.md -docs/FormatTest.md -docs/HasOnlyReadOnly.md -docs/MapTest.md -docs/MixedPropertiesAndAdditionalPropertiesClass.md -docs/Model200Response.md -docs/ModelApiResponse.md -docs/ModelClient.md -docs/ModelFile.md -docs/ModelList.md -docs/ModelReturn.md -docs/Name.md -docs/NumberOnly.md -docs/Order.md -docs/OuterComposite.md -docs/OuterEnum.md -docs/Pet.md -docs/PetApi.md -docs/ReadOnlyFirst.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 -docs/auth.md +docs/apis/AnotherFakeApi.md +docs/apis/FakeApi.md +docs/apis/FakeClassnameTags123Api.md +docs/apis/PetApi.md +docs/apis/StoreApi.md +docs/apis/UserApi.md +docs/apis/auth.md +docs/models/AdditionalPropertiesAnyType.md +docs/models/AdditionalPropertiesArray.md +docs/models/AdditionalPropertiesBoolean.md +docs/models/AdditionalPropertiesClass.md +docs/models/AdditionalPropertiesInteger.md +docs/models/AdditionalPropertiesNumber.md +docs/models/AdditionalPropertiesObject.md +docs/models/AdditionalPropertiesString.md +docs/models/Animal.md +docs/models/ArrayOfArrayOfNumberOnly.md +docs/models/ArrayOfNumberOnly.md +docs/models/ArrayTest.md +docs/models/BigCat.md +docs/models/BigCatAllOf.md +docs/models/Capitalization.md +docs/models/Cat.md +docs/models/CatAllOf.md +docs/models/Category.md +docs/models/ClassModel.md +docs/models/Dog.md +docs/models/DogAllOf.md +docs/models/EnumArrays.md +docs/models/EnumClass.md +docs/models/EnumTest.md +docs/models/FileSchemaTestClass.md +docs/models/FormatTest.md +docs/models/HasOnlyReadOnly.md +docs/models/MapTest.md +docs/models/MixedPropertiesAndAdditionalPropertiesClass.md +docs/models/Model200Response.md +docs/models/ModelApiResponse.md +docs/models/ModelClient.md +docs/models/ModelFile.md +docs/models/ModelList.md +docs/models/ModelReturn.md +docs/models/Name.md +docs/models/NumberOnly.md +docs/models/Order.md +docs/models/OuterComposite.md +docs/models/OuterEnum.md +docs/models/Pet.md +docs/models/ReadOnlyFirst.md +docs/models/SpecialModelName.md +docs/models/Tag.md +docs/models/TypeHolderDefault.md +docs/models/TypeHolderExample.md +docs/models/User.md +docs/models/XmlItem.md gradle.properties gradle/wrapper/gradle-wrapper.jar gradle/wrapper/gradle-wrapper.properties @@ -122,6 +122,5 @@ src/main/java/org/openapitools/model/TypeHolderDefault.java src/main/java/org/openapitools/model/TypeHolderExample.java src/main/java/org/openapitools/model/User.java src/main/java/org/openapitools/model/XmlItem.java -src/main/java/org/openapitools/query/QueryParam.java -src/main/java/org/openapitools/query/QueryParamBinder.java src/main/resources/application.yml +src/main/resources/logback.xml diff --git a/samples/client/petstore/java-micronaut-client/README.md b/samples/client/petstore/java-micronaut-client/README.md index 9ed69e201d3f..149073d437ee 100644 --- a/samples/client/petstore/java-micronaut-client/README.md +++ b/samples/client/petstore/java-micronaut-client/README.md @@ -25,12 +25,12 @@ All the properties can be changed in the [application.yml][src/main/resources/ap Description on how to create Apis is given inside individual api guides: -* [AnotherFakeApi](docs//AnotherFakeApi.md) -* [FakeApi](docs//FakeApi.md) -* [FakeClassnameTags123Api](docs//FakeClassnameTags123Api.md) -* [PetApi](docs//PetApi.md) -* [StoreApi](docs//StoreApi.md) -* [UserApi](docs//UserApi.md) +* [AnotherFakeApi](docs/apis/AnotherFakeApi.md) +* [FakeApi](docs/apis/FakeApi.md) +* [FakeClassnameTags123Api](docs/apis/FakeClassnameTags123Api.md) +* [PetApi](docs/apis/PetApi.md) +* [StoreApi](docs/apis/StoreApi.md) +* [UserApi](docs/apis/UserApi.md) ## Auth methods diff --git a/samples/client/petstore/java-micronaut-client/build.gradle b/samples/client/petstore/java-micronaut-client/build.gradle index 856fe2d43497..c74021320ccc 100644 --- a/samples/client/petstore/java-micronaut-client/build.gradle +++ b/samples/client/petstore/java-micronaut-client/build.gradle @@ -1,7 +1,7 @@ plugins { id("groovy") - id("com.github.johnrengelman.shadow") version "7.0.0" - id("io.micronaut.application") version "2.0.3" + id("com.github.johnrengelman.shadow") version "7.1.1" + id("io.micronaut.application") version "3.1.1" } version = "1.0.0" @@ -42,3 +42,5 @@ java { sourceCompatibility = JavaVersion.toVersion("1.8") targetCompatibility = JavaVersion.toVersion("1.8") } + +graalvmNative.toolchainDetection = false diff --git a/samples/client/petstore/java-micronaut-client/docs/AnotherFakeApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md similarity index 100% rename from samples/client/petstore/java-micronaut-client/docs/AnotherFakeApi.md rename to samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md diff --git a/samples/client/petstore/java-micronaut-client/docs/FakeApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md similarity index 99% rename from samples/client/petstore/java-micronaut-client/docs/FakeApi.md rename to samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md index 3b9f98a4ed7b..14cf772369e0 100644 --- a/samples/client/petstore/java-micronaut-client/docs/FakeApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md @@ -95,7 +95,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: `*/*` + - **Accept**: Not defined # **fakeOuterCompositeSerialize** @@ -120,7 +120,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: `*/*` + - **Accept**: Not defined # **fakeOuterNumberSerialize** @@ -145,7 +145,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: `*/*` + - **Accept**: Not defined # **fakeOuterStringSerialize** @@ -170,7 +170,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: `*/*` + - **Accept**: Not defined # **testBodyWithFileSchema** diff --git a/samples/client/petstore/java-micronaut-client/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java-micronaut-client/docs/apis/FakeClassnameTags123Api.md similarity index 100% rename from samples/client/petstore/java-micronaut-client/docs/FakeClassnameTags123Api.md rename to samples/client/petstore/java-micronaut-client/docs/apis/FakeClassnameTags123Api.md diff --git a/samples/client/petstore/java-micronaut-client/docs/PetApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/PetApi.md similarity index 100% rename from samples/client/petstore/java-micronaut-client/docs/PetApi.md rename to samples/client/petstore/java-micronaut-client/docs/apis/PetApi.md diff --git a/samples/client/petstore/java-micronaut-client/docs/StoreApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md similarity index 100% rename from samples/client/petstore/java-micronaut-client/docs/StoreApi.md rename to samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md diff --git a/samples/client/petstore/java-micronaut-client/docs/UserApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md similarity index 100% rename from samples/client/petstore/java-micronaut-client/docs/UserApi.md rename to samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md diff --git a/samples/client/petstore/java-micronaut-client/docs/auth.md b/samples/client/petstore/java-micronaut-client/docs/apis/auth.md similarity index 100% rename from samples/client/petstore/java-micronaut-client/docs/auth.md rename to samples/client/petstore/java-micronaut-client/docs/apis/auth.md diff --git a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesAnyType.md similarity index 57% rename from samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesAnyType.md rename to samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesAnyType.md index fddcd9d8e0fa..d57b2721031f 100644 --- a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesAnyType.md @@ -2,6 +2,7 @@ # AdditionalPropertiesAnyType +The class is defined in **[AdditionalPropertiesAnyType.java](../../src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesArray.md similarity index 58% rename from samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesArray.md rename to samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesArray.md index c52113f687b3..8eb24fe8262f 100644 --- a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesArray.md @@ -2,6 +2,7 @@ # AdditionalPropertiesArray +The class is defined in **[AdditionalPropertiesArray.java](../../src/main/java/org/openapitools/model/AdditionalPropertiesArray.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesBoolean.md similarity index 57% rename from samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesBoolean.md rename to samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesBoolean.md index 9d626b446689..6fcfa2a50f6d 100644 --- a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesBoolean.md @@ -2,6 +2,7 @@ # AdditionalPropertiesBoolean +The class is defined in **[AdditionalPropertiesBoolean.java](../../src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesClass.md similarity index 86% rename from samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesClass.md rename to samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesClass.md index 84f88e3fdba9..4e452d010db1 100644 --- a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesClass.md @@ -2,6 +2,7 @@ # AdditionalPropertiesClass +The class is defined in **[AdditionalPropertiesClass.java](../../src/main/java/org/openapitools/model/AdditionalPropertiesClass.java)** ## Properties @@ -24,3 +25,10 @@ Name | Type | Description | Notes + + + + + + + diff --git a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesInteger.md similarity index 57% rename from samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesInteger.md rename to samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesInteger.md index b17edb556550..3f8aee1c8754 100644 --- a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesInteger.md @@ -2,6 +2,7 @@ # AdditionalPropertiesInteger +The class is defined in **[AdditionalPropertiesInteger.java](../../src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesNumber.md similarity index 58% rename from samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesNumber.md rename to samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesNumber.md index bd33c906eeb8..1e8f61b42a4b 100644 --- a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesNumber.md @@ -2,6 +2,7 @@ # AdditionalPropertiesNumber +The class is defined in **[AdditionalPropertiesNumber.java](../../src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesObject.md similarity index 58% rename from samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesObject.md rename to samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesObject.md index a77d38c7b19d..a839641e6e80 100644 --- a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesObject.md @@ -2,6 +2,7 @@ # AdditionalPropertiesObject +The class is defined in **[AdditionalPropertiesObject.java](../../src/main/java/org/openapitools/model/AdditionalPropertiesObject.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesString.md b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesString.md similarity index 58% rename from samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesString.md rename to samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesString.md index 6f1ccd0910db..1452d77056c0 100644 --- a/samples/client/petstore/java-micronaut-client/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/AdditionalPropertiesString.md @@ -2,6 +2,7 @@ # AdditionalPropertiesString +The class is defined in **[AdditionalPropertiesString.java](../../src/main/java/org/openapitools/model/AdditionalPropertiesString.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/Animal.md b/samples/client/petstore/java-micronaut-client/docs/models/Animal.md similarity index 67% rename from samples/client/petstore/java-micronaut-client/docs/Animal.md rename to samples/client/petstore/java-micronaut-client/docs/models/Animal.md index 4d92e8e7e291..226b3933ac06 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Animal.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Animal.md @@ -2,6 +2,7 @@ # Animal +The class is defined in **[Animal.java](../../src/main/java/org/openapitools/model/Animal.java)** ## Properties @@ -13,5 +14,3 @@ Name | Type | Description | Notes - - diff --git a/samples/client/petstore/java-micronaut-client/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java-micronaut-client/docs/models/ArrayOfArrayOfNumberOnly.md similarity index 63% rename from samples/client/petstore/java-micronaut-client/docs/ArrayOfArrayOfNumberOnly.md rename to samples/client/petstore/java-micronaut-client/docs/models/ArrayOfArrayOfNumberOnly.md index 65f6fb827f11..3cf3adab1ce3 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ArrayOfArrayOfNumberOnly.md @@ -2,6 +2,7 @@ # ArrayOfArrayOfNumberOnly +The class is defined in **[ArrayOfArrayOfNumberOnly.java](../../src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java-micronaut-client/docs/models/ArrayOfNumberOnly.md similarity index 63% rename from samples/client/petstore/java-micronaut-client/docs/ArrayOfNumberOnly.md rename to samples/client/petstore/java-micronaut-client/docs/models/ArrayOfNumberOnly.md index 2909608f6e83..fe09bde39c3d 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ArrayOfNumberOnly.md @@ -2,6 +2,7 @@ # ArrayOfNumberOnly +The class is defined in **[ArrayOfNumberOnly.java](../../src/main/java/org/openapitools/model/ArrayOfNumberOnly.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/ArrayTest.md b/samples/client/petstore/java-micronaut-client/docs/models/ArrayTest.md similarity index 78% rename from samples/client/petstore/java-micronaut-client/docs/ArrayTest.md rename to samples/client/petstore/java-micronaut-client/docs/models/ArrayTest.md index ee3f7633b288..3f3ec33c736e 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ArrayTest.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ArrayTest.md @@ -2,6 +2,7 @@ # ArrayTest +The class is defined in **[ArrayTest.java](../../src/main/java/org/openapitools/model/ArrayTest.java)** ## Properties @@ -15,4 +16,3 @@ Name | Type | Description | Notes - diff --git a/samples/client/petstore/java-micronaut-client/docs/BigCat.md b/samples/client/petstore/java-micronaut-client/docs/models/BigCat.md similarity index 52% rename from samples/client/petstore/java-micronaut-client/docs/BigCat.md rename to samples/client/petstore/java-micronaut-client/docs/models/BigCat.md index e368f81567fa..2bc6032da82a 100644 --- a/samples/client/petstore/java-micronaut-client/docs/BigCat.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/BigCat.md @@ -2,6 +2,7 @@ # BigCat +The class is defined in **[BigCat.java](../../src/main/java/org/openapitools/model/BigCat.java)** ## Properties @@ -9,18 +10,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **kind** | [**KindEnum**](#KindEnum) | | [optional property] - - -## Enum: KindEnum +## KindEnum Name | Value ---- | ----- -LIONS | `"lions"` -TIGERS | `"tigers"` -LEOPARDS | `"leopards"` -JAGUARS | `"jaguars"` - - - +LIONS | `"lions"` +TIGERS | `"tigers"` +LEOPARDS | `"leopards"` +JAGUARS | `"jaguars"` diff --git a/samples/client/petstore/java-micronaut-client/docs/BigCatAllOf.md b/samples/client/petstore/java-micronaut-client/docs/models/BigCatAllOf.md similarity index 52% rename from samples/client/petstore/java-micronaut-client/docs/BigCatAllOf.md rename to samples/client/petstore/java-micronaut-client/docs/models/BigCatAllOf.md index 869236ae81d8..6e72649489a3 100644 --- a/samples/client/petstore/java-micronaut-client/docs/BigCatAllOf.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/BigCatAllOf.md @@ -2,6 +2,7 @@ # BigCatAllOf +The class is defined in **[BigCatAllOf.java](../../src/main/java/org/openapitools/model/BigCatAllOf.java)** ## Properties @@ -9,18 +10,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **kind** | [**KindEnum**](#KindEnum) | | [optional property] - - -## Enum: KindEnum +## KindEnum Name | Value ---- | ----- -LIONS | `"lions"` -TIGERS | `"tigers"` -LEOPARDS | `"leopards"` -JAGUARS | `"jaguars"` - - - +LIONS | `"lions"` +TIGERS | `"tigers"` +LEOPARDS | `"leopards"` +JAGUARS | `"jaguars"` diff --git a/samples/client/petstore/java-micronaut-client/docs/Capitalization.md b/samples/client/petstore/java-micronaut-client/docs/models/Capitalization.md similarity index 80% rename from samples/client/petstore/java-micronaut-client/docs/Capitalization.md rename to samples/client/petstore/java-micronaut-client/docs/models/Capitalization.md index fb5232d52de1..c3578bff00e2 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Capitalization.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Capitalization.md @@ -2,6 +2,7 @@ # Capitalization +The class is defined in **[Capitalization.java](../../src/main/java/org/openapitools/model/Capitalization.java)** ## Properties @@ -19,3 +20,5 @@ Name | Type | Description | Notes + + diff --git a/samples/client/petstore/java-micronaut-client/docs/Cat.md b/samples/client/petstore/java-micronaut-client/docs/models/Cat.md similarity index 65% rename from samples/client/petstore/java-micronaut-client/docs/Cat.md rename to samples/client/petstore/java-micronaut-client/docs/models/Cat.md index 4a7e1503b1e7..44b1d8fd3ed8 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Cat.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Cat.md @@ -2,6 +2,7 @@ # Cat +The class is defined in **[Cat.java](../../src/main/java/org/openapitools/model/Cat.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/CatAllOf.md b/samples/client/petstore/java-micronaut-client/docs/models/CatAllOf.md similarity index 63% rename from samples/client/petstore/java-micronaut-client/docs/CatAllOf.md rename to samples/client/petstore/java-micronaut-client/docs/models/CatAllOf.md index 41f0898e7c0c..e93b6a351fd2 100644 --- a/samples/client/petstore/java-micronaut-client/docs/CatAllOf.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/CatAllOf.md @@ -2,6 +2,7 @@ # CatAllOf +The class is defined in **[CatAllOf.java](../../src/main/java/org/openapitools/model/CatAllOf.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/Category.md b/samples/client/petstore/java-micronaut-client/docs/models/Category.md similarity index 65% rename from samples/client/petstore/java-micronaut-client/docs/Category.md rename to samples/client/petstore/java-micronaut-client/docs/models/Category.md index 497a0ce8d456..cab979e1c3d5 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Category.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Category.md @@ -2,6 +2,7 @@ # Category +The class is defined in **[Category.java](../../src/main/java/org/openapitools/model/Category.java)** ## Properties @@ -13,5 +14,3 @@ Name | Type | Description | Notes - - diff --git a/samples/client/petstore/java-micronaut-client/docs/ClassModel.md b/samples/client/petstore/java-micronaut-client/docs/models/ClassModel.md similarity index 68% rename from samples/client/petstore/java-micronaut-client/docs/ClassModel.md rename to samples/client/petstore/java-micronaut-client/docs/models/ClassModel.md index e428f3bc2077..c3565b7c929b 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ClassModel.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ClassModel.md @@ -4,6 +4,8 @@ Model for testing model with \"_class\" property +The class is defined in **[ClassModel.java](../../src/main/java/org/openapitools/model/ClassModel.java)** + ## Properties Name | Type | Description | Notes @@ -12,6 +14,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/Dog.md b/samples/client/petstore/java-micronaut-client/docs/models/Dog.md similarity index 64% rename from samples/client/petstore/java-micronaut-client/docs/Dog.md rename to samples/client/petstore/java-micronaut-client/docs/models/Dog.md index db403946fcdb..552e7373757f 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Dog.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Dog.md @@ -2,6 +2,7 @@ # Dog +The class is defined in **[Dog.java](../../src/main/java/org/openapitools/model/Dog.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/DogAllOf.md b/samples/client/petstore/java-micronaut-client/docs/models/DogAllOf.md similarity index 63% rename from samples/client/petstore/java-micronaut-client/docs/DogAllOf.md rename to samples/client/petstore/java-micronaut-client/docs/models/DogAllOf.md index e89dd6406969..6e25529833b3 100644 --- a/samples/client/petstore/java-micronaut-client/docs/DogAllOf.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/DogAllOf.md @@ -2,6 +2,7 @@ # DogAllOf +The class is defined in **[DogAllOf.java](../../src/main/java/org/openapitools/model/DogAllOf.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/EnumArrays.md b/samples/client/petstore/java-micronaut-client/docs/models/EnumArrays.md similarity index 61% rename from samples/client/petstore/java-micronaut-client/docs/EnumArrays.md rename to samples/client/petstore/java-micronaut-client/docs/models/EnumArrays.md index f905c2dab358..421d6479b0ec 100644 --- a/samples/client/petstore/java-micronaut-client/docs/EnumArrays.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/EnumArrays.md @@ -2,6 +2,7 @@ # EnumArrays +The class is defined in **[EnumArrays.java](../../src/main/java/org/openapitools/model/EnumArrays.java)** ## Properties @@ -10,24 +11,18 @@ Name | Type | Description | Notes **justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional property] **arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional property] - - -## Enum: JustSymbolEnum +## JustSymbolEnum Name | Value ---- | ----- -GREATER_THAN_OR_EQUAL_TO | `">="` -DOLLAR | `"$"` - +GREATER_THAN_OR_EQUAL_TO | `">="` +DOLLAR | `"$"` -## Enum: List<ArrayEnumEnum> +## List<ArrayEnumEnum> Name | Value ---- | ----- -FISH | `"fish"` -CRAB | `"crab"` - - - +FISH | `"fish"` +CRAB | `"crab"` diff --git a/samples/client/petstore/java-micronaut-client/docs/EnumClass.md b/samples/client/petstore/java-micronaut-client/docs/models/EnumClass.md similarity index 51% rename from samples/client/petstore/java-micronaut-client/docs/EnumClass.md rename to samples/client/petstore/java-micronaut-client/docs/models/EnumClass.md index b314590a7591..e09084e283db 100644 --- a/samples/client/petstore/java-micronaut-client/docs/EnumClass.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/EnumClass.md @@ -4,6 +4,8 @@ ## Enum +The class is defined in **[EnumClass.java](../../src/main/java/org/openapitools/model/EnumClass.java)** + * `_ABC` (value: `"_abc"`) diff --git a/samples/client/petstore/java-micronaut-client/docs/EnumTest.md b/samples/client/petstore/java-micronaut-client/docs/models/EnumTest.md similarity index 71% rename from samples/client/petstore/java-micronaut-client/docs/EnumTest.md rename to samples/client/petstore/java-micronaut-client/docs/models/EnumTest.md index d2a2431223ec..d183eb4d5fe7 100644 --- a/samples/client/petstore/java-micronaut-client/docs/EnumTest.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/EnumTest.md @@ -2,6 +2,7 @@ # EnumTest +The class is defined in **[EnumTest.java](../../src/main/java/org/openapitools/model/EnumTest.java)** ## Properties @@ -13,35 +14,30 @@ Name | Type | Description | Notes **enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional property] **outerEnum** | `OuterEnum` | | [optional property] - - -## Enum: EnumStringEnum +## EnumStringEnum Name | Value ---- | ----- -UPPER | `"UPPER"` -LOWER | `"lower"` -EMPTY | `""` +UPPER | `"UPPER"` +LOWER | `"lower"` +EMPTY | `""` - -## Enum: EnumStringRequiredEnum +## EnumStringRequiredEnum Name | Value ---- | ----- -UPPER | `"UPPER"` -LOWER | `"lower"` -EMPTY | `""` - +UPPER | `"UPPER"` +LOWER | `"lower"` +EMPTY | `""` -## Enum: EnumIntegerEnum +## EnumIntegerEnum Name | Value ---- | ----- NUMBER_1 | `1` NUMBER_MINUS_1 | `-1` - -## Enum: EnumNumberEnum +## EnumNumberEnum Name | Value ---- | ----- @@ -50,5 +46,3 @@ NUMBER_MINUS_1_DOT_2 | `-1.2` - - diff --git a/samples/client/petstore/java-micronaut-client/docs/FileSchemaTestClass.md b/samples/client/petstore/java-micronaut-client/docs/models/FileSchemaTestClass.md similarity index 69% rename from samples/client/petstore/java-micronaut-client/docs/FileSchemaTestClass.md rename to samples/client/petstore/java-micronaut-client/docs/models/FileSchemaTestClass.md index 4039c948684e..0214efd3098b 100644 --- a/samples/client/petstore/java-micronaut-client/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/FileSchemaTestClass.md @@ -2,6 +2,7 @@ # FileSchemaTestClass +The class is defined in **[FileSchemaTestClass.java](../../src/main/java/org/openapitools/model/FileSchemaTestClass.java)** ## Properties @@ -13,5 +14,3 @@ Name | Type | Description | Notes - - diff --git a/samples/client/petstore/java-micronaut-client/docs/FormatTest.md b/samples/client/petstore/java-micronaut-client/docs/models/FormatTest.md similarity index 86% rename from samples/client/petstore/java-micronaut-client/docs/FormatTest.md rename to samples/client/petstore/java-micronaut-client/docs/models/FormatTest.md index 74c29bb97b25..d7299aaa90ed 100644 --- a/samples/client/petstore/java-micronaut-client/docs/FormatTest.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/FormatTest.md @@ -2,6 +2,7 @@ # FormatTest +The class is defined in **[FormatTest.java](../../src/main/java/org/openapitools/model/FormatTest.java)** ## Properties @@ -27,3 +28,13 @@ Name | Type | Description | Notes + + + + + + + + + + diff --git a/samples/client/petstore/java-micronaut-client/docs/HasOnlyReadOnly.md b/samples/client/petstore/java-micronaut-client/docs/models/HasOnlyReadOnly.md similarity index 69% rename from samples/client/petstore/java-micronaut-client/docs/HasOnlyReadOnly.md rename to samples/client/petstore/java-micronaut-client/docs/models/HasOnlyReadOnly.md index c53bce80f628..fab72494cfac 100644 --- a/samples/client/petstore/java-micronaut-client/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/HasOnlyReadOnly.md @@ -2,6 +2,7 @@ # HasOnlyReadOnly +The class is defined in **[HasOnlyReadOnly.java](../../src/main/java/org/openapitools/model/HasOnlyReadOnly.java)** ## Properties @@ -13,5 +14,3 @@ Name | Type | Description | Notes - - diff --git a/samples/client/petstore/java-micronaut-client/docs/MapTest.md b/samples/client/petstore/java-micronaut-client/docs/models/MapTest.md similarity index 75% rename from samples/client/petstore/java-micronaut-client/docs/MapTest.md rename to samples/client/petstore/java-micronaut-client/docs/models/MapTest.md index 8b868a1ae7e4..f5f96393f112 100644 --- a/samples/client/petstore/java-micronaut-client/docs/MapTest.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/MapTest.md @@ -2,6 +2,7 @@ # MapTest +The class is defined in **[MapTest.java](../../src/main/java/org/openapitools/model/MapTest.java)** ## Properties @@ -13,14 +14,12 @@ Name | Type | Description | Notes **indirectMap** | `Map<String, Boolean>` | | [optional property] - -## Enum: Map<String, InnerEnum> +## Map<String, InnerEnum> Name | Value ---- | ----- -UPPER | `"UPPER"` -LOWER | `"lower"` - +UPPER | `"UPPER"` +LOWER | `"lower"` diff --git a/samples/client/petstore/java-micronaut-client/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java-micronaut-client/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md similarity index 66% rename from samples/client/petstore/java-micronaut-client/docs/MixedPropertiesAndAdditionalPropertiesClass.md rename to samples/client/petstore/java-micronaut-client/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md index 40f3a82effd8..b7c29269f10a 100644 --- a/samples/client/petstore/java-micronaut-client/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md @@ -2,6 +2,7 @@ # MixedPropertiesAndAdditionalPropertiesClass +The class is defined in **[MixedPropertiesAndAdditionalPropertiesClass.java](../../src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java)** ## Properties @@ -15,4 +16,3 @@ Name | Type | Description | Notes - diff --git a/samples/client/petstore/java-micronaut-client/docs/Model200Response.md b/samples/client/petstore/java-micronaut-client/docs/models/Model200Response.md similarity index 71% rename from samples/client/petstore/java-micronaut-client/docs/Model200Response.md rename to samples/client/petstore/java-micronaut-client/docs/models/Model200Response.md index bc8078d0bed1..7f403913bbfa 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Model200Response.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Model200Response.md @@ -4,6 +4,8 @@ Model for testing model name starting with number +The class is defined in **[Model200Response.java](../../src/main/java/org/openapitools/model/Model200Response.java)** + ## Properties Name | Type | Description | Notes @@ -14,5 +16,3 @@ Name | Type | Description | Notes - - diff --git a/samples/client/petstore/java-micronaut-client/docs/ModelApiResponse.md b/samples/client/petstore/java-micronaut-client/docs/models/ModelApiResponse.md similarity index 70% rename from samples/client/petstore/java-micronaut-client/docs/ModelApiResponse.md rename to samples/client/petstore/java-micronaut-client/docs/models/ModelApiResponse.md index 950119dc1f12..2d8154e28e50 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ModelApiResponse.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ModelApiResponse.md @@ -2,6 +2,7 @@ # ModelApiResponse +The class is defined in **[ModelApiResponse.java](../../src/main/java/org/openapitools/model/ModelApiResponse.java)** ## Properties @@ -15,4 +16,3 @@ Name | Type | Description | Notes - diff --git a/samples/client/petstore/java-micronaut-client/docs/ModelClient.md b/samples/client/petstore/java-micronaut-client/docs/models/ModelClient.md similarity index 62% rename from samples/client/petstore/java-micronaut-client/docs/ModelClient.md rename to samples/client/petstore/java-micronaut-client/docs/models/ModelClient.md index 74770bad0731..3bfcef3bb181 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ModelClient.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ModelClient.md @@ -2,6 +2,7 @@ # ModelClient +The class is defined in **[ModelClient.java](../../src/main/java/org/openapitools/model/ModelClient.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/ModelFile.md b/samples/client/petstore/java-micronaut-client/docs/models/ModelFile.md similarity index 68% rename from samples/client/petstore/java-micronaut-client/docs/ModelFile.md rename to samples/client/petstore/java-micronaut-client/docs/models/ModelFile.md index 014716aba6a3..53228b7d77d3 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ModelFile.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ModelFile.md @@ -4,6 +4,8 @@ Must be named `File` for test. +The class is defined in **[ModelFile.java](../../src/main/java/org/openapitools/model/ModelFile.java)** + ## Properties Name | Type | Description | Notes @@ -12,6 +14,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/ModelList.md b/samples/client/petstore/java-micronaut-client/docs/models/ModelList.md similarity index 63% rename from samples/client/petstore/java-micronaut-client/docs/ModelList.md rename to samples/client/petstore/java-micronaut-client/docs/models/ModelList.md index 6468645316ca..badcf08bd2c8 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ModelList.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ModelList.md @@ -2,6 +2,7 @@ # ModelList +The class is defined in **[ModelList.java](../../src/main/java/org/openapitools/model/ModelList.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/ModelReturn.md b/samples/client/petstore/java-micronaut-client/docs/models/ModelReturn.md similarity index 66% rename from samples/client/petstore/java-micronaut-client/docs/ModelReturn.md rename to samples/client/petstore/java-micronaut-client/docs/models/ModelReturn.md index f907f3a956b1..48712674adb6 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ModelReturn.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ModelReturn.md @@ -4,6 +4,8 @@ Model for testing reserved words +The class is defined in **[ModelReturn.java](../../src/main/java/org/openapitools/model/ModelReturn.java)** + ## Properties Name | Type | Description | Notes @@ -12,6 +14,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/Name.md b/samples/client/petstore/java-micronaut-client/docs/models/Name.md similarity index 80% rename from samples/client/petstore/java-micronaut-client/docs/Name.md rename to samples/client/petstore/java-micronaut-client/docs/models/Name.md index e9e41d13435c..9595d1d9749c 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Name.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Name.md @@ -4,6 +4,8 @@ Model for testing model name same as property name +The class is defined in **[Name.java](../../src/main/java/org/openapitools/model/Name.java)** + ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java-micronaut-client/docs/NumberOnly.md b/samples/client/petstore/java-micronaut-client/docs/models/NumberOnly.md similarity index 63% rename from samples/client/petstore/java-micronaut-client/docs/NumberOnly.md rename to samples/client/petstore/java-micronaut-client/docs/models/NumberOnly.md index ff8408617c56..1c7c5a3d67a6 100644 --- a/samples/client/petstore/java-micronaut-client/docs/NumberOnly.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/NumberOnly.md @@ -2,6 +2,7 @@ # NumberOnly +The class is defined in **[NumberOnly.java](../../src/main/java/org/openapitools/model/NumberOnly.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/Order.md b/samples/client/petstore/java-micronaut-client/docs/models/Order.md similarity index 72% rename from samples/client/petstore/java-micronaut-client/docs/Order.md rename to samples/client/petstore/java-micronaut-client/docs/models/Order.md index 2522ec781e4e..c5f46aad0e1c 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Order.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Order.md @@ -2,6 +2,7 @@ # Order +The class is defined in **[Order.java](../../src/main/java/org/openapitools/model/Order.java)** ## Properties @@ -16,15 +17,15 @@ Name | Type | Description | Notes -## Enum: StatusEnum -Name | Value ----- | ----- -PLACED | `"placed"` -APPROVED | `"approved"` -DELIVERED | `"delivered"` +## StatusEnum +Name | Value +---- | ----- +PLACED | `"placed"` +APPROVED | `"approved"` +DELIVERED | `"delivered"` diff --git a/samples/client/petstore/java-micronaut-client/docs/OuterComposite.md b/samples/client/petstore/java-micronaut-client/docs/models/OuterComposite.md similarity index 71% rename from samples/client/petstore/java-micronaut-client/docs/OuterComposite.md rename to samples/client/petstore/java-micronaut-client/docs/models/OuterComposite.md index dc004d557a5e..13edac130704 100644 --- a/samples/client/petstore/java-micronaut-client/docs/OuterComposite.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/OuterComposite.md @@ -2,6 +2,7 @@ # OuterComposite +The class is defined in **[OuterComposite.java](../../src/main/java/org/openapitools/model/OuterComposite.java)** ## Properties @@ -15,4 +16,3 @@ Name | Type | Description | Notes - diff --git a/samples/client/petstore/java-micronaut-client/docs/OuterEnum.md b/samples/client/petstore/java-micronaut-client/docs/models/OuterEnum.md similarity index 55% rename from samples/client/petstore/java-micronaut-client/docs/OuterEnum.md rename to samples/client/petstore/java-micronaut-client/docs/models/OuterEnum.md index 1f9b723eb8e7..71fc1dfebad2 100644 --- a/samples/client/petstore/java-micronaut-client/docs/OuterEnum.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/OuterEnum.md @@ -4,6 +4,8 @@ ## Enum +The class is defined in **[OuterEnum.java](../../src/main/java/org/openapitools/model/OuterEnum.java)** + * `PLACED` (value: `"placed"`) diff --git a/samples/client/petstore/java-micronaut-client/docs/Pet.md b/samples/client/petstore/java-micronaut-client/docs/models/Pet.md similarity index 74% rename from samples/client/petstore/java-micronaut-client/docs/Pet.md rename to samples/client/petstore/java-micronaut-client/docs/models/Pet.md index 6a18fe4238dd..8abc005db7b4 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Pet.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Pet.md @@ -2,6 +2,7 @@ # Pet +The class is defined in **[Pet.java](../../src/main/java/org/openapitools/model/Pet.java)** ## Properties @@ -16,15 +17,15 @@ Name | Type | Description | Notes -## Enum: StatusEnum -Name | Value ----- | ----- -AVAILABLE | `"available"` -PENDING | `"pending"` -SOLD | `"sold"` +## StatusEnum +Name | Value +---- | ----- +AVAILABLE | `"available"` +PENDING | `"pending"` +SOLD | `"sold"` diff --git a/samples/client/petstore/java-micronaut-client/docs/ReadOnlyFirst.md b/samples/client/petstore/java-micronaut-client/docs/models/ReadOnlyFirst.md similarity index 68% rename from samples/client/petstore/java-micronaut-client/docs/ReadOnlyFirst.md rename to samples/client/petstore/java-micronaut-client/docs/models/ReadOnlyFirst.md index 503ba210dbff..3ee5d2f8e029 100644 --- a/samples/client/petstore/java-micronaut-client/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ReadOnlyFirst.md @@ -2,6 +2,7 @@ # ReadOnlyFirst +The class is defined in **[ReadOnlyFirst.java](../../src/main/java/org/openapitools/model/ReadOnlyFirst.java)** ## Properties @@ -13,5 +14,3 @@ Name | Type | Description | Notes - - diff --git a/samples/client/petstore/java-micronaut-client/docs/SpecialModelName.md b/samples/client/petstore/java-micronaut-client/docs/models/SpecialModelName.md similarity index 62% rename from samples/client/petstore/java-micronaut-client/docs/SpecialModelName.md rename to samples/client/petstore/java-micronaut-client/docs/models/SpecialModelName.md index 88dbe302799f..881887f07a2b 100644 --- a/samples/client/petstore/java-micronaut-client/docs/SpecialModelName.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/SpecialModelName.md @@ -2,6 +2,7 @@ # SpecialModelName +The class is defined in **[SpecialModelName.java](../../src/main/java/org/openapitools/model/SpecialModelName.java)** ## Properties @@ -11,6 +12,3 @@ Name | Type | Description | Notes - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/Tag.md b/samples/client/petstore/java-micronaut-client/docs/models/Tag.md similarity index 69% rename from samples/client/petstore/java-micronaut-client/docs/Tag.md rename to samples/client/petstore/java-micronaut-client/docs/models/Tag.md index 7de5f5be77fe..0f9ae67b0a54 100644 --- a/samples/client/petstore/java-micronaut-client/docs/Tag.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/Tag.md @@ -2,6 +2,7 @@ # Tag +The class is defined in **[Tag.java](../../src/main/java/org/openapitools/model/Tag.java)** ## Properties @@ -13,5 +14,3 @@ Name | Type | Description | Notes - - diff --git a/samples/client/petstore/java-micronaut-client/docs/TypeHolderDefault.md b/samples/client/petstore/java-micronaut-client/docs/models/TypeHolderDefault.md similarity index 72% rename from samples/client/petstore/java-micronaut-client/docs/TypeHolderDefault.md rename to samples/client/petstore/java-micronaut-client/docs/models/TypeHolderDefault.md index 1cd7787e4952..cb18bde0ed32 100644 --- a/samples/client/petstore/java-micronaut-client/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/TypeHolderDefault.md @@ -2,6 +2,7 @@ # TypeHolderDefault +The class is defined in **[TypeHolderDefault.java](../../src/main/java/org/openapitools/model/TypeHolderDefault.java)** ## Properties @@ -18,3 +19,4 @@ Name | Type | Description | Notes + diff --git a/samples/client/petstore/java-micronaut-client/docs/TypeHolderExample.md b/samples/client/petstore/java-micronaut-client/docs/models/TypeHolderExample.md similarity index 73% rename from samples/client/petstore/java-micronaut-client/docs/TypeHolderExample.md rename to samples/client/petstore/java-micronaut-client/docs/models/TypeHolderExample.md index 805608ae2b9e..83a65f0f276c 100644 --- a/samples/client/petstore/java-micronaut-client/docs/TypeHolderExample.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/TypeHolderExample.md @@ -2,6 +2,7 @@ # TypeHolderExample +The class is defined in **[TypeHolderExample.java](../../src/main/java/org/openapitools/model/TypeHolderExample.java)** ## Properties @@ -19,3 +20,5 @@ Name | Type | Description | Notes + + diff --git a/samples/client/petstore/java-micronaut-client/docs/User.md b/samples/client/petstore/java-micronaut-client/docs/models/User.md similarity index 84% rename from samples/client/petstore/java-micronaut-client/docs/User.md rename to samples/client/petstore/java-micronaut-client/docs/models/User.md index 73274c63f193..530642080941 100644 --- a/samples/client/petstore/java-micronaut-client/docs/User.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/User.md @@ -2,6 +2,7 @@ # User +The class is defined in **[User.java](../../src/main/java/org/openapitools/model/User.java)** ## Properties @@ -21,3 +22,7 @@ Name | Type | Description | Notes + + + + diff --git a/samples/client/petstore/java-micronaut-client/docs/XmlItem.md b/samples/client/petstore/java-micronaut-client/docs/models/XmlItem.md similarity index 93% rename from samples/client/petstore/java-micronaut-client/docs/XmlItem.md rename to samples/client/petstore/java-micronaut-client/docs/models/XmlItem.md index 2f07c8efbf6e..71ca437c2e61 100644 --- a/samples/client/petstore/java-micronaut-client/docs/XmlItem.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/XmlItem.md @@ -2,6 +2,7 @@ # XmlItem +The class is defined in **[XmlItem.java](../../src/main/java/org/openapitools/model/XmlItem.java)** ## Properties @@ -42,3 +43,28 @@ Name | Type | Description | Notes + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/java-micronaut-client/gradle.properties b/samples/client/petstore/java-micronaut-client/gradle.properties index 4804e0490140..70b9dde78f14 100644 --- a/samples/client/petstore/java-micronaut-client/gradle.properties +++ b/samples/client/petstore/java-micronaut-client/gradle.properties @@ -1 +1 @@ -micronautVersion=3.0.0-M5 \ No newline at end of file +micronautVersion=3.2.6 \ No newline at end of file diff --git a/samples/client/petstore/java-micronaut-client/pom.xml b/samples/client/petstore/java-micronaut-client/pom.xml index c64bc3bb07c5..89a43adef332 100644 --- a/samples/client/petstore/java-micronaut-client/pom.xml +++ b/samples/client/petstore/java-micronaut-client/pom.xml @@ -10,7 +10,7 @@ io.micronaut micronaut-parent - 3.0.0-M5 + 3.2.6 @@ -18,7 +18,7 @@ 1.8 - 3.0.0-M5 + 3.2.6 org.openapitools.Application netty 1.5.21 diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java index 09c1c9fb397e..26e3afaff52b 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -15,7 +15,6 @@ import io.micronaut.http.annotation.*; import io.micronaut.core.annotation.*; import io.micronaut.http.client.annotation.Client; -import org.openapitools.query.QueryParam; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; import org.openapitools.model.ModelClient; @@ -31,18 +30,17 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Client("${base-path}") public interface AnotherFakeApi { - - /** - * To test special tags - * To test special tags and operation ID starting with number - * - * @param _body client model (required) - * @return ModelClient - */ - @Patch(uri="/another-fake/dummy") - @Produces(value={"application/json"}) - @Consumes(value={"application/json"}) - Mono call123testSpecialTags( - @Body @Valid @NotNull ModelClient _body + /** + * To test special tags + * To test special tags and operation ID starting with number + * + * @param _body client model (required) + * @return ModelClient + */ + @Patch(uri="/another-fake/dummy") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono call123testSpecialTags( + @Body @NotNull @Valid ModelClient _body ); } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java index 1a5913a842c7..7f5970b69a61 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java @@ -15,7 +15,6 @@ import io.micronaut.http.annotation.*; import io.micronaut.core.annotation.*; import io.micronaut.http.client.annotation.Client; -import org.openapitools.query.QueryParam; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; import java.math.BigDecimal; @@ -39,242 +38,228 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Client("${base-path}") public interface FakeApi { - - /** - * creates an XmlItem - * this route creates an XmlItem - * - * @param xmlItem XmlItem Body (required) - */ - @Post(uri="/fake/create_xml_item") - @Produces(value={"application/xml"}) - @Consumes(value={"application/json"}) - Mono createXmlItem( - @Body @Valid @NotNull XmlItem xmlItem + /** + * creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + */ + @Post(uri="/fake/create_xml_item") + @Produces(value={"application/xml"}) + @Consumes(value={"application/json"}) + Mono createXmlItem( + @Body @NotNull @Valid XmlItem xmlItem ); - - /** - * Test serialization of outer boolean types - * - * @param _body Input boolean as post body (optional) - * @return Boolean - */ - @Post(uri="/fake/outer/boolean") - @Produces(value={"*/*"}) - @Consumes(value={"*/*"}) - Mono fakeOuterBooleanSerialize( - @Body Boolean _body + /** + * Test serialization of outer boolean types + * + * @param _body Input boolean as post body (optional) + * @return Boolean + */ + @Post(uri="/fake/outer/boolean") + @Produces(value={"application/json"}) + @Consumes(value={"*/*"}) + Mono fakeOuterBooleanSerialize( + @Body @Nullable Boolean _body ); - - /** - * Test serialization of object with outer number type - * - * @param _body Input composite as post body (optional) - * @return OuterComposite - */ - @Post(uri="/fake/outer/composite") - @Produces(value={"*/*"}) - @Consumes(value={"*/*"}) - Mono fakeOuterCompositeSerialize( - @Body @Valid OuterComposite _body + /** + * Test serialization of object with outer number type + * + * @param _body Input composite as post body (optional) + * @return OuterComposite + */ + @Post(uri="/fake/outer/composite") + @Produces(value={"application/json"}) + @Consumes(value={"*/*"}) + Mono fakeOuterCompositeSerialize( + @Body @Nullable @Valid OuterComposite _body ); - - /** - * Test serialization of outer number types - * - * @param _body Input number as post body (optional) - * @return BigDecimal - */ - @Post(uri="/fake/outer/number") - @Produces(value={"*/*"}) - @Consumes(value={"*/*"}) - Mono fakeOuterNumberSerialize( - @Body BigDecimal _body + /** + * Test serialization of outer number types + * + * @param _body Input number as post body (optional) + * @return BigDecimal + */ + @Post(uri="/fake/outer/number") + @Produces(value={"application/json"}) + @Consumes(value={"*/*"}) + Mono fakeOuterNumberSerialize( + @Body @Nullable BigDecimal _body ); - - /** - * Test serialization of outer string types - * - * @param _body Input string as post body (optional) - * @return String - */ - @Post(uri="/fake/outer/string") - @Produces(value={"*/*"}) - @Consumes(value={"*/*"}) - Mono fakeOuterStringSerialize( - @Body String _body + /** + * Test serialization of outer string types + * + * @param _body Input string as post body (optional) + * @return String + */ + @Post(uri="/fake/outer/string") + @Produces(value={"application/json"}) + @Consumes(value={"*/*"}) + Mono fakeOuterStringSerialize( + @Body @Nullable String _body ); - - /** - * For this test, the body for this request much reference a schema named `File`. - * - * @param _body (required) - */ - @Put(uri="/fake/body-with-file-schema") - @Produces(value={"application/json"}) - @Consumes(value={"application/json"}) - Mono testBodyWithFileSchema( - @Body @Valid @NotNull FileSchemaTestClass _body + /** + * For this test, the body for this request much reference a schema named `File`. + * + * @param _body (required) + */ + @Put(uri="/fake/body-with-file-schema") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono testBodyWithFileSchema( + @Body @NotNull @Valid FileSchemaTestClass _body ); - - /** - * testBodyWithQueryParams - * - * @param query (required) - * @param _body (required) - */ - @Put(uri="/fake/body-with-query-params") - @Produces(value={"application/json"}) - @Consumes(value={"application/json"}) - Mono testBodyWithQueryParams( - @QueryParam(name="query") @NotNull String query, - @Body @Valid @NotNull User _body + /** + * testBodyWithQueryParams + * + * @param query (required) + * @param _body (required) + */ + @Put(uri="/fake/body-with-query-params") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono testBodyWithQueryParams( + @QueryValue(value="query") @NotNull String query, + @Body @NotNull @Valid User _body ); - - /** - * To test \"client\" model - * To test \"client\" model - * - * @param _body client model (required) - * @return ModelClient - */ - @Patch(uri="/fake") - @Produces(value={"application/json"}) - @Consumes(value={"application/json"}) - Mono testClientModel( - @Body @Valid @NotNull ModelClient _body + /** + * To test \"client\" model + * To test \"client\" model + * + * @param _body client model (required) + * @return ModelClient + */ + @Patch(uri="/fake") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono testClientModel( + @Body @NotNull @Valid ModelClient _body ); - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * @param number None (required) - * @param _double None (required) - * @param patternWithoutDelimiter None (required) - * @param _byte None (required) - * @param integer None (optional) - * @param int32 None (optional) - * @param int64 None (optional) - * @param _float None (optional) - * @param string None (optional) - * @param binary None (optional) - * @param date None (optional) - * @param dateTime None (optional) - * @param password None (optional) - * @param paramCallback None (optional) - */ - @Post(uri="/fake") - @Produces(value={"application/x-www-form-urlencoded"}) - @Consumes(value={"application/json"}) - Mono testEndpointParameters( + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + */ + @Post(uri="/fake") + @Produces(value={"application/x-www-form-urlencoded"}) + @Consumes(value={"application/json"}) + Mono testEndpointParameters( @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, @NotNull @Pattern(regexp="^[A-Z].*") String patternWithoutDelimiter, @NotNull byte[] _byte, - @Min(10) @Max(100) Integer integer, - @Min(20) @Max(200) Integer int32, - Long int64, - @DecimalMax("987.6") Float _float, - @Pattern(regexp="/[a-z]/i") String string, - File binary, - @Format("yyyy-MM-dd") LocalDate date, - @Format("yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") LocalDateTime dateTime, - @Size(min=10, max=64) String password, - String paramCallback + @Nullable @Min(10) @Max(100) Integer integer, + @Nullable @Min(20) @Max(200) Integer int32, + @Nullable Long int64, + @Nullable @DecimalMax("987.6") Float _float, + @Nullable @Pattern(regexp="/[a-z]/i") String string, + @Nullable File binary, + @Nullable @Format("yyyy-MM-dd") LocalDate date, + @Nullable @Format("yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") LocalDateTime dateTime, + @Nullable @Size(min=10, max=64) String password, + @Nullable String paramCallback ); - - /** - * To test enum parameters - * To test enum parameters - * - * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) - * @param enumQueryInteger Query parameter enum test (double) (optional) - * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) - * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - */ - @Get(uri="/fake") - @Produces(value={"application/x-www-form-urlencoded"}) - @Consumes(value={"application/json"}) - Mono testEnumParameters( - @Header(name="enum_header_string_array") List enumHeaderStringArray, - @Header(name="enum_header_string", defaultValue="-efg") String enumHeaderString, - @QueryParam(name="enum_query_string_array", format=QueryParam.Format.CSV) List enumQueryStringArray, - @QueryParam(name="enum_query_string", defaultValue="-efg") String enumQueryString, - @QueryParam(name="enum_query_integer") Integer enumQueryInteger, - @QueryParam(name="enum_query_double") Double enumQueryDouble, - List enumFormStringArray, - String enumFormString + /** + * To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + */ + @Get(uri="/fake") + @Produces(value={"application/x-www-form-urlencoded"}) + @Consumes(value={"application/json"}) + Mono testEnumParameters( + @Header(name="enum_header_string_array") @Nullable List enumHeaderStringArray, + @Header(name="enum_header_string", defaultValue="-efg") @Nullable String enumHeaderString, + @QueryValue(value="enum_query_string_array") @Nullable List enumQueryStringArray, + @QueryValue(value="enum_query_string", defaultValue="-efg") @Nullable String enumQueryString, + @QueryValue(value="enum_query_integer") @Nullable Integer enumQueryInteger, + @QueryValue(value="enum_query_double") @Nullable Double enumQueryDouble, + @Nullable List enumFormStringArray, + @Nullable String enumFormString ); - - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - */ - @Delete(uri="/fake") - @Consumes(value={"application/json"}) - Mono testGroupParameters( - @QueryParam(name="required_string_group") @NotNull Integer requiredStringGroup, + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + */ + @Delete(uri="/fake") + @Consumes(value={"application/json"}) + Mono testGroupParameters( + @QueryValue(value="required_string_group") @NotNull Integer requiredStringGroup, @Header(name="required_boolean_group") @NotNull Boolean requiredBooleanGroup, - @QueryParam(name="required_int64_group") @NotNull Long requiredInt64Group, - @QueryParam(name="string_group") Integer stringGroup, - @Header(name="boolean_group") Boolean booleanGroup, - @QueryParam(name="int64_group") Long int64Group + @QueryValue(value="required_int64_group") @NotNull Long requiredInt64Group, + @QueryValue(value="string_group") @Nullable Integer stringGroup, + @Header(name="boolean_group") @Nullable Boolean booleanGroup, + @QueryValue(value="int64_group") @Nullable Long int64Group ); - - /** - * test inline additionalProperties - * - * @param param request body (required) - */ - @Post(uri="/fake/inline-additionalProperties") - @Produces(value={"application/json"}) - @Consumes(value={"application/json"}) - Mono testInlineAdditionalProperties( + /** + * test inline additionalProperties + * + * @param param request body (required) + */ + @Post(uri="/fake/inline-additionalProperties") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono testInlineAdditionalProperties( @Body @NotNull Map param ); - - /** - * test json serialization of form data - * - * @param param field1 (required) - * @param param2 field2 (required) - */ - @Get(uri="/fake/jsonFormData") - @Produces(value={"application/x-www-form-urlencoded"}) - @Consumes(value={"application/json"}) - Mono testJsonFormData( + /** + * test json serialization of form data + * + * @param param field1 (required) + * @param param2 field2 (required) + */ + @Get(uri="/fake/jsonFormData") + @Produces(value={"application/x-www-form-urlencoded"}) + @Consumes(value={"application/json"}) + Mono testJsonFormData( @NotNull String param, @NotNull String param2 ); - - /** - * To test the collection format in query parameters - * - * @param pipe (required) - * @param ioutil (required) - * @param http (required) - * @param url (required) - * @param context (required) - */ - @Put(uri="/fake/test-query-parameters") - @Consumes(value={"application/json"}) - Mono testQueryParameterCollectionFormat( - @QueryParam(name="pipe", format=QueryParam.Format.CSV) @NotNull List pipe, - @QueryParam(name="ioutil", format=QueryParam.Format.CSV) @NotNull List ioutil, - @QueryParam(name="http", format=QueryParam.Format.SSV) @NotNull List http, - @QueryParam(name="url", format=QueryParam.Format.CSV) @NotNull List url, - @QueryParam(name="context", format=QueryParam.Format.MULTI) @NotNull List context + /** + * To test the collection format in query parameters + * + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) + */ + @Put(uri="/fake/test-query-parameters") + @Consumes(value={"application/json"}) + Mono testQueryParameterCollectionFormat( + @QueryValue(value="pipe") @NotNull List pipe, + @QueryValue(value="ioutil") @NotNull List ioutil, + @QueryValue(value="http") @NotNull List http, + @QueryValue(value="url") @NotNull List url, + @QueryValue(value="context") @NotNull List context ); } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index e586776bc7d1..5b9658621789 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -15,7 +15,6 @@ import io.micronaut.http.annotation.*; import io.micronaut.core.annotation.*; import io.micronaut.http.client.annotation.Client; -import org.openapitools.query.QueryParam; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; import org.openapitools.model.ModelClient; @@ -31,18 +30,17 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Client("${base-path}") public interface FakeClassnameTags123Api { - - /** - * To test class name in snake case - * To test class name in snake case - * - * @param _body client model (required) - * @return ModelClient - */ - @Patch(uri="/fake_classname_test") - @Produces(value={"application/json"}) - @Consumes(value={"application/json"}) - Mono testClassname( - @Body @Valid @NotNull ModelClient _body + /** + * To test class name in snake case + * To test class name in snake case + * + * @param _body client model (required) + * @return ModelClient + */ + @Patch(uri="/fake_classname_test") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono testClassname( + @Body @NotNull @Valid ModelClient _body ); } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java index 538f7eb80fa9..a49acded5819 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java @@ -15,7 +15,6 @@ import io.micronaut.http.annotation.*; import io.micronaut.core.annotation.*; import io.micronaut.http.client.annotation.Client; -import org.openapitools.query.QueryParam; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; import java.io.File; @@ -34,130 +33,121 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Client("${base-path}") public interface PetApi { - - /** - * Add a new pet to the store - * - * @param _body Pet object that needs to be added to the store (required) - */ - @Post(uri="/pet") - @Produces(value={"application/json"}) - @Consumes(value={"application/json"}) - Mono addPet( - @Body @Valid @NotNull Pet _body + /** + * Add a new pet to the store + * + * @param _body Pet object that needs to be added to the store (required) + */ + @Post(uri="/pet") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono addPet( + @Body @NotNull @Valid Pet _body ); - - /** - * Deletes a pet - * - * @param petId Pet id to delete (required) - * @param apiKey (optional) - */ - @Delete(uri="/pet/{petId}") - @Consumes(value={"application/json"}) - Mono deletePet( + /** + * Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + */ + @Delete(uri="/pet/{petId}") + @Consumes(value={"application/json"}) + Mono deletePet( @PathVariable(name="petId") @NotNull Long petId, - @Header(name="api_key") String apiKey + @Header(name="api_key") @Nullable String apiKey ); - - /** - * Finds Pets by status - * Multiple status values can be provided with comma separated strings - * - * @param status Status values that need to be considered for filter (required) - * @return List<Pet> - */ - @Get(uri="/pet/findByStatus") - @Consumes(value={"application/json"}) - Mono> findPetsByStatus( - @QueryParam(name="status", format=QueryParam.Format.CSV) @NotNull List status + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return List<Pet> + */ + @Get(uri="/pet/findByStatus") + @Consumes(value={"application/json"}) + Mono> findPetsByStatus( + @QueryValue(value="status") @NotNull List status ); - - /** - * Finds Pets by tags - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * @param tags Tags to filter by (required) - * @return Set<Pet> - */ - @Get(uri="/pet/findByTags") - @Consumes(value={"application/json"}) - Mono> findPetsByTags( - @QueryParam(name="tags", format=QueryParam.Format.CSV) @NotNull Set tags + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return Set<Pet> + */ + @Get(uri="/pet/findByTags") + @Consumes(value={"application/json"}) + Mono> findPetsByTags( + @QueryValue(value="tags") @NotNull Set tags ); - - /** - * Find pet by ID - * Returns a single pet - * - * @param petId ID of pet to return (required) - * @return Pet - */ - @Get(uri="/pet/{petId}") - @Consumes(value={"application/json"}) - Mono getPetById( + /** + * Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return Pet + */ + @Get(uri="/pet/{petId}") + @Consumes(value={"application/json"}) + Mono getPetById( @PathVariable(name="petId") @NotNull Long petId ); - - /** - * Update an existing pet - * - * @param _body Pet object that needs to be added to the store (required) - */ - @Put(uri="/pet") - @Produces(value={"application/json"}) - @Consumes(value={"application/json"}) - Mono updatePet( - @Body @Valid @NotNull Pet _body + /** + * Update an existing pet + * + * @param _body Pet object that needs to be added to the store (required) + */ + @Put(uri="/pet") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono updatePet( + @Body @NotNull @Valid Pet _body ); - - /** - * Updates a pet in the store with form data - * - * @param petId ID of pet that needs to be updated (required) - * @param name Updated name of the pet (optional) - * @param status Updated status of the pet (optional) - */ - @Post(uri="/pet/{petId}") - @Produces(value={"application/x-www-form-urlencoded"}) - @Consumes(value={"application/json"}) - Mono updatePetWithForm( + /** + * Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + */ + @Post(uri="/pet/{petId}") + @Produces(value={"application/x-www-form-urlencoded"}) + @Consumes(value={"application/json"}) + Mono updatePetWithForm( @PathVariable(name="petId") @NotNull Long petId, - String name, - String status + @Nullable String name, + @Nullable String status ); - - /** - * uploads an image - * - * @param petId ID of pet to update (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param _file file to upload (optional) - * @return ModelApiResponse - */ - @Post(uri="/pet/{petId}/uploadImage") - @Produces(value={"multipart/form-data"}) - @Consumes(value={"application/json"}) - Mono uploadFile( + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param _file file to upload (optional) + * @return ModelApiResponse + */ + @Post(uri="/pet/{petId}/uploadImage") + @Produces(value={"multipart/form-data"}) + @Consumes(value={"application/json"}) + Mono uploadFile( @PathVariable(name="petId") @NotNull Long petId, - String additionalMetadata, - File _file + @Nullable String additionalMetadata, + @Nullable File _file ); - - /** - * uploads an image (required) - * - * @param petId ID of pet to update (required) - * @param requiredFile file to upload (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @return ModelApiResponse - */ - @Post(uri="/fake/{petId}/uploadImageWithRequiredFile") - @Produces(value={"multipart/form-data"}) - @Consumes(value={"application/json"}) - Mono uploadFileWithRequiredFile( + /** + * uploads an image (required) + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return ModelApiResponse + */ + @Post(uri="/fake/{petId}/uploadImageWithRequiredFile") + @Produces(value={"multipart/form-data"}) + @Consumes(value={"application/json"}) + Mono uploadFileWithRequiredFile( @PathVariable(name="petId") @NotNull Long petId, @NotNull File requiredFile, - String additionalMetadata + @Nullable String additionalMetadata ); } 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 5a0bb8af787b..36ccca35533b 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 @@ -15,7 +15,6 @@ import io.micronaut.http.annotation.*; import io.micronaut.core.annotation.*; import io.micronaut.http.client.annotation.Client; -import org.openapitools.query.QueryParam; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; import org.openapitools.model.Order; @@ -31,52 +30,48 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Client("${base-path}") public interface StoreApi { - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * @param orderId ID of the order that needs to be deleted (required) - */ - @Delete(uri="/store/order/{order_id}") - @Consumes(value={"application/json"}) - Mono deleteOrder( + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + */ + @Delete(uri="/store/order/{order_id}") + @Consumes(value={"application/json"}) + Mono deleteOrder( @PathVariable(name="order_id") @NotNull String orderId ); - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * - * @return Map<String, Integer> - */ - @Get(uri="/store/inventory") - @Consumes(value={"application/json"}) - Mono> getInventory(); - - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * - * @param orderId ID of pet that needs to be fetched (required) - * @return Order - */ - @Get(uri="/store/order/{order_id}") - @Consumes(value={"application/json"}) - Mono getOrderById( + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return Map<String, Integer> + */ + @Get(uri="/store/inventory") + @Consumes(value={"application/json"}) + Mono> getInventory(); + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return Order + */ + @Get(uri="/store/order/{order_id}") + @Consumes(value={"application/json"}) + Mono getOrderById( @PathVariable(name="order_id") @NotNull @Min(1L) @Max(5L) Long orderId ); - - /** - * Place an order for a pet - * - * @param _body order placed for purchasing the pet (required) - * @return Order - */ - @Post(uri="/store/order") - @Produces(value={"*/*"}) - @Consumes(value={"application/json"}) - Mono placeOrder( - @Body @Valid @NotNull Order _body + /** + * Place an order for a pet + * + * @param _body order placed for purchasing the pet (required) + * @return Order + */ + @Post(uri="/store/order") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono placeOrder( + @Body @NotNull @Valid Order _body ); } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java index 6e608808a733..8fa12ce923b1 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java @@ -15,7 +15,6 @@ import io.micronaut.http.annotation.*; import io.micronaut.core.annotation.*; import io.micronaut.http.client.annotation.Client; -import org.openapitools.query.QueryParam; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; import java.time.LocalDateTime; @@ -32,102 +31,94 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Client("${base-path}") public interface UserApi { - - /** - * Create user - * This can only be done by the logged in user. - * - * @param _body Created user object (required) - */ - @Post(uri="/user") - @Produces(value={"*/*"}) - @Consumes(value={"application/json"}) - Mono createUser( - @Body @Valid @NotNull User _body + /** + * Create user + * This can only be done by the logged in user. + * + * @param _body Created user object (required) + */ + @Post(uri="/user") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono createUser( + @Body @NotNull @Valid User _body ); - - /** - * Creates list of users with given input array - * - * @param _body List of user object (required) - */ - @Post(uri="/user/createWithArray") - @Produces(value={"*/*"}) - @Consumes(value={"application/json"}) - Mono createUsersWithArrayInput( + /** + * Creates list of users with given input array + * + * @param _body List of user object (required) + */ + @Post(uri="/user/createWithArray") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono createUsersWithArrayInput( @Body @NotNull List _body ); - - /** - * Creates list of users with given input array - * - * @param _body List of user object (required) - */ - @Post(uri="/user/createWithList") - @Produces(value={"*/*"}) - @Consumes(value={"application/json"}) - Mono createUsersWithListInput( + /** + * Creates list of users with given input array + * + * @param _body List of user object (required) + */ + @Post(uri="/user/createWithList") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono createUsersWithListInput( @Body @NotNull List _body ); - - /** - * Delete user - * This can only be done by the logged in user. - * - * @param username The name that needs to be deleted (required) - */ - @Delete(uri="/user/{username}") - @Consumes(value={"application/json"}) - Mono deleteUser( + /** + * Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + */ + @Delete(uri="/user/{username}") + @Consumes(value={"application/json"}) + Mono deleteUser( @PathVariable(name="username") @NotNull String username ); - - /** - * Get user by user name - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return User - */ - @Get(uri="/user/{username}") - @Consumes(value={"application/json"}) - Mono getUserByName( + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return User + */ + @Get(uri="/user/{username}") + @Consumes(value={"application/json"}) + Mono getUserByName( @PathVariable(name="username") @NotNull String username ); - - /** - * Logs user into the system - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @return String - */ - @Get(uri="/user/login") - @Consumes(value={"application/json"}) - Mono loginUser( - @QueryParam(name="username") @NotNull String username, - @QueryParam(name="password") @NotNull String password + /** + * Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return String + */ + @Get(uri="/user/login") + @Consumes(value={"application/json"}) + Mono loginUser( + @QueryValue(value="username") @NotNull String username, + @QueryValue(value="password") @NotNull String password ); - - /** - * Logs out current logged in user session - * - */ - @Get(uri="/user/logout") - @Consumes(value={"application/json"}) - Mono logoutUser(); - - /** - * Updated user - * This can only be done by the logged in user. - * - * @param username name that need to be deleted (required) - * @param _body Updated user object (required) - */ - @Put(uri="/user/{username}") - @Produces(value={"*/*"}) - @Consumes(value={"application/json"}) - Mono updateUser( + /** + * Logs out current logged in user session + * + */ + @Get(uri="/user/logout") + @Consumes(value={"application/json"}) + Mono logoutUser(); + /** + * Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param _body Updated user object (required) + */ + @Put(uri="/user/{username}") + @Produces(value={"application/json"}) + @Consumes(value={"application/json"}) + Mono updateUser( @PathVariable(name="username") @NotNull String username, - @Body @Valid @NotNull User _body + @Body @NotNull @Valid User _body ); } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index c727e3389abb..96ce13164ee3 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -35,69 +35,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class AdditionalPropertiesAnyType extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public AdditionalPropertiesAnyType name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + public AdditionalPropertiesAnyType() { + super(); + } + public AdditionalPropertiesAnyType name(String name) { + this.name = name; + return this; + } - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } + /** + * Get name + * @return name + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + super.equals(o); } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesAnyType {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 749c516be0ac..107272b74d1c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -36,69 +36,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class AdditionalPropertiesArray extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public AdditionalPropertiesArray name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + public AdditionalPropertiesArray() { + super(); + } + public AdditionalPropertiesArray name(String name) { + this.name = name; + return this; + } - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } + /** + * Get name + * @return name + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + super.equals(o); } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesArray {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 859739c31a52..cfdb8791d0a8 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -35,69 +35,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class AdditionalPropertiesBoolean extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public AdditionalPropertiesBoolean name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + public AdditionalPropertiesBoolean() { + super(); + } + public AdditionalPropertiesBoolean name(String name) { + this.name = name; + return this; + } - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } + /** + * Get name + * @return name + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + super.equals(o); } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesBoolean {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index aef32243b4e9..8e130aca02ee 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -47,411 +47,413 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString = null; + public static final String JSON_PROPERTY_MAP_STRING = "map_string"; + private Map mapString = null; - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber = null; + public static final String JSON_PROPERTY_MAP_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_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_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_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_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_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_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_ANYTYPE1 = "anytype_1"; + private Object anytype1; - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; + 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_ANYTYPE3 = "anytype_3"; + private Object anytype3; - public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; - return this; - } - - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap(); + public AdditionalPropertiesClass() { } - this.mapString.put(key, mapStringItem); - return this; - } - - /** - * Get mapString - * @return mapString - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapString() { - return mapString; - } - - @JsonProperty(JSON_PROPERTY_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - return this; - } - - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap(); + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; } - this.mapNumber.put(key, mapNumberItem); - return this; - } - /** - * Get mapNumber - * @return mapNumber - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapNumber() { - return mapNumber; - } - - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) - @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(); + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapString() { + return mapString; } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - /** - * Get mapInteger - * @return mapInteger - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapInteger() { - return mapInteger; - } + @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapString(Map mapString) { + this.mapString = mapString; + } - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - return this; - } + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapNumber() { + return mapNumber; + } - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap(); + @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - /** - * Get mapBoolean - * @return mapBoolean - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapBoolean() { - return mapBoolean; - } + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } + 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 + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapInteger() { + return mapInteger; + } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return this; - } + @JsonProperty(JSON_PROPERTY_MAP_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap>(); + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getMapArrayInteger() { - return mapArrayInteger; - } + 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 + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapBoolean() { + return mapBoolean; + } - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } + @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return this; - } + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap>(); + 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 + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getMapArrayInteger() { + return mapArrayInteger; } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } + @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - 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 + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap>(); + @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - /** - * Get mapMapString - * @return mapMapString - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getMapMapString() { - return mapMapString; - } + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } + 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 + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getMapMapString() { + return mapMapString; + } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - return this; - } + @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap>(); + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getMapMapAnytype() { - return mapMapAnytype; - } + 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 + **/ + @Nullable + @ApiModelProperty(value = "") + @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; - } + @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; - } + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = anytype1; + return this; + } - /** - * Get anytype1 - * @return anytype1 - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getAnytype1() { - return anytype1; - } + /** + * Get anytype1 + * @return anytype1 + **/ + @Nullable + @ApiModelProperty(value = "") + @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; - } + @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; - } + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = anytype2; + return this; + } - /** - * Get anytype2 - * @return anytype2 - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getAnytype2() { - return anytype2; - } + /** + * Get anytype2 + * @return anytype2 + **/ + @Nullable + @ApiModelProperty(value = "") + @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; - } + @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; - } + public AdditionalPropertiesClass anytype3(Object anytype3) { + this.anytype3 = anytype3; + return this; + } - /** - * Get anytype3 - * @return anytype3 - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getAnytype3() { - return anytype3; - } + /** + * Get anytype3 + * @return anytype3 + **/ + @Nullable + @ApiModelProperty(value = "") + @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; - } + @JsonProperty(JSON_PROPERTY_ANYTYPE3) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); - } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } - @Override - public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); - } + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5d6f4bcec0fc..1e1c1f20731e 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -35,69 +35,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class AdditionalPropertiesInteger extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public AdditionalPropertiesInteger name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + public AdditionalPropertiesInteger() { + super(); + } + public AdditionalPropertiesInteger name(String name) { + this.name = name; + return this; + } - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } + /** + * Get name + * @return name + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + super.equals(o); } - AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesInteger {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 88dfc96af1b4..972cb4ae44d1 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -36,69 +36,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class AdditionalPropertiesNumber extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public AdditionalPropertiesNumber name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + public AdditionalPropertiesNumber() { + super(); + } + public AdditionalPropertiesNumber name(String name) { + this.name = name; + return this; + } - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } + /** + * Get name + * @return name + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + super.equals(o); } - AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesNumber {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 393746a2f1db..1c3fe0f86264 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -35,69 +35,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class AdditionalPropertiesObject extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public AdditionalPropertiesObject name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + public AdditionalPropertiesObject() { + super(); + } + public AdditionalPropertiesObject name(String name) { + this.name = name; + return this; + } - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } + /** + * Get name + * @return name + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + super.equals(o); } - AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesObject {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index cefd74bd15da..732a70109dbd 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -35,69 +35,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class AdditionalPropertiesString extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public AdditionalPropertiesString name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + public AdditionalPropertiesString() { + super(); + } + public AdditionalPropertiesString name(String name) { + this.name = name; + return this; + } - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } + /** + * Get name + * @return name + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + super.equals(o); } - AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(name, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesString {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java index 5225322d5c8b..9920cdfda2d0 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java @@ -43,95 +43,97 @@ @Introspected public class Animal { - public static final String JSON_PROPERTY_CLASS_NAME = "className"; - protected String className; - - public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; - - public Animal className(String className) { - this.className = className; - return this; - } - - /** - * Get className - * @return className - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_CLASS_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClassName() { - return className; - } - - @JsonProperty(JSON_PROPERTY_CLASS_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClassName(String className) { - this.className = className; - } - - public Animal color(String color) { - this.color = color; - return this; - } - - /** - * Get color - * @return color - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getColor() { - return color; - } - - @JsonProperty(JSON_PROPERTY_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setColor(String color) { - this.color = color; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + protected String className; + + public static final String JSON_PROPERTY_COLOR = "color"; + private String color = "red"; + + public Animal() { + } + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClassName() { + return className; } - if (o == null || getClass() != o.getClass()) { - return false; + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getColor() { + return color; } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColor(String color) { + this.color = color; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 0388c7c5ae66..f8e35cafcb37 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,75 +36,77 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ArrayOfArrayOfNumberOnly { - public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; - private List> arrayArrayNumber = null; + public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; + private List> arrayArrayNumber = null; - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList>(); + public ArrayOfArrayOfNumberOnly() { + } + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; } - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - /** - * Get arrayArrayNumber - * @return arrayArrayNumber - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayNumber() { - return arrayArrayNumber; - } + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 721d788bd90e..0c81db857cef 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,75 +36,77 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ArrayOfNumberOnly { - public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; - private List arrayNumber = null; + public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; + private List arrayNumber = null; - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - return this; - } - - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList(); + public ArrayOfNumberOnly() { + } + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; } - this.arrayNumber.add(arrayNumberItem); - return this; - } - /** - * Get arrayNumber - * @return arrayNumber - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getArrayNumber() { - return arrayNumber; - } + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } - @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } + /** + * Get arrayNumber + * @return arrayNumber + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getArrayNumber() { + return arrayNumber; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); - } - @Override - public int hashCode() { - return Objects.hash(arrayNumber); - } + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java index 07578136d1ed..91a150fa94df 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java @@ -38,147 +38,149 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ArrayTest { - public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; - private List arrayOfString = null; - - public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer"; - private List> arrayArrayOfInteger = null; - - public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; - private List> arrayArrayOfModel = null; - - public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - return this; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList(); - } - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - /** - * Get arrayOfString - * @return arrayOfString - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getArrayOfString() { - return arrayOfString; - } - - @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList>(); - } - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList>(); - } - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; + private List arrayOfString = null; + + public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer"; + private List> arrayArrayOfInteger = null; + + public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; + private List> arrayArrayOfModel = null; + + public ArrayTest() { + } + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getArrayOfString() { + return arrayOfString; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java index badc93843144..732353de97dd 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java @@ -35,104 +35,107 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class BigCat extends Cat { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - TIGERS("tigers"), - LEOPARDS("leopards"), - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + TIGERS("tigers"), + LEOPARDS("leopards"), + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } + public static final String JSON_PROPERTY_KIND = "kind"; + private KindEnum kind; - @JsonValue - public String getValue() { - return value; + public BigCat() { + super(); + } + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; } - @Override - public String toString() { - return String.valueOf(value); + /** + * Get kind + * @return kind + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public KindEnum getKind() { + return kind; } - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKind(KindEnum kind) { + this.kind = kind; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); } - } - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCat kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public KindEnum getKind() { - return kind; - } - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); } - BigCat bigCat = (BigCat) o; - return Objects.equals(this.kind, bigCat.kind) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(kind, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java index cdc464b8e9dd..f19a8935510b 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,102 +33,104 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - TIGERS("tigers"), - LEOPARDS("leopards"), - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + TIGERS("tigers"), + LEOPARDS("leopards"), + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } + public static final String JSON_PROPERTY_KIND = "kind"; + private KindEnum kind; - @JsonValue - public String getValue() { - return value; + public BigCatAllOf() { + } + public BigCatAllOf kind(KindEnum kind) { + this.kind = kind; + return this; } - @Override - public String toString() { - return String.valueOf(value); + /** + * Get kind + * @return kind + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public KindEnum getKind() { + return kind; } - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKind(KindEnum kind) { + this.kind = kind; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + BigCatAllOf bigCatAllOf = (BigCatAllOf) o; + return Objects.equals(this.kind, bigCatAllOf.kind); } - } - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public KindEnum getKind() { - return kind; - } - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + + @Override + public int hashCode() { + return Objects.hash(kind); } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java index dd01342a8a65..312e637f8669 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java @@ -38,207 +38,209 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Capitalization { - public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; - private String smallCamel; - - public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel"; - private String capitalCamel; - - public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake"; - private String smallSnake; - - public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake"; - private String capitalSnake; - - public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points"; - private String scAETHFlowPoints; - - public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; - private String ATT_NAME; - - public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; - return this; - } - - /** - * Get smallCamel - * @return smallCamel - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSmallCamel() { - return smallCamel; - } - - @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - return this; - } - - /** - * Get capitalCamel - * @return capitalCamel - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCapitalCamel() { - return capitalCamel; - } - - @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; - return this; - } - - /** - * Get smallSnake - * @return smallSnake - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSmallSnake() { - return smallSnake; - } - - @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - return this; - } - - /** - * Get capitalSnake - * @return capitalSnake - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCapitalSnake() { - return capitalSnake; - } - - @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - return this; - } - - /** - * Name of the pet - * @return ATT_NAME - **/ - @Nullable - @ApiModelProperty(value = "Name of the pet ") - @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getATTNAME() { - return ATT_NAME; - } - - @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; + private String smallCamel; + + public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel"; + private String capitalCamel; + + public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake"; + private String smallSnake; + + public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake"; + private String capitalSnake; + + public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points"; + private String scAETHFlowPoints; + + public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; + private String ATT_NAME; + + public Capitalization() { + } + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSmallCamel() { + return smallCamel; + } + + @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCapitalCamel() { + return capitalCamel; + } + + @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSmallSnake() { + return smallSnake; + } + + @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCapitalSnake() { + return capitalSnake; + } + + @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + **/ + @Nullable + @ApiModelProperty(value = "Name of the pet ") + @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getATTNAME() { + return ATT_NAME; + } + + @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java index 8f9fe12d8848..817807f86d7c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java @@ -35,69 +35,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Cat extends Animal { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; + public static final String JSON_PROPERTY_DECLAWED = "declawed"; + private Boolean declawed; - public Cat declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDeclawed() { - return declawed; - } + public Cat() { + super(); + } + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } + /** + * Get declawed + * @return declawed + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDeclawed() { + return declawed; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java index 4ee623d649b9..6125a814c9be 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java @@ -33,67 +33,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; + public static final String JSON_PROPERTY_DECLAWED = "declawed"; + private Boolean declawed; - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDeclawed() { - return declawed; - } + public CatAllOf() { + } + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } + /** + * Get declawed + * @return declawed + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDeclawed() { + return declawed; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_DECLAWED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatAllOf catAllOf = (CatAllOf) o; + return Objects.equals(this.declawed, catAllOf.declawed); } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - @Override - public int hashCode() { - return Objects.hash(declawed); - } + @Override + public int hashCode() { + return Objects.hash(declawed); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java index 552c577d79a2..88978ee639ce 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java @@ -34,95 +34,97 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Category { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name = "default-name"; - - public Category id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @Nullable - @ApiModelProperty(value = "") - @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 - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @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; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name = "default-name"; + + public Category() { + } + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; } - if (o == null || getClass() != o.getClass()) { - return false; + + @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 + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; } - 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"; + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java index 2f94229b7e89..37dafc836cab 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java @@ -34,67 +34,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ClassModel { - public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class"; - private String propertyClass; + public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class"; + private String propertyClass; - public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPropertyClass() { - return propertyClass; - } + public ClassModel() { + } + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } + /** + * Get propertyClass + * @return propertyClass + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPropertyClass() { + return propertyClass; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java index 8bde5e0809ec..53a7c64f13b0 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java @@ -35,69 +35,72 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Dog extends Animal { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; + public static final String JSON_PROPERTY_BREED = "breed"; + private String breed; - public Dog breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBreed() { - return breed; - } + public Dog() { + super(); + } + public Dog breed(String breed) { + this.breed = breed; + return this; + } - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } + /** + * Get breed + * @return breed + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBreed() { + return breed; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBreed(String breed) { + this.breed = breed; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java index 51dec00ea106..3dba0d3bc208 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java @@ -33,67 +33,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; + public static final String JSON_PROPERTY_BREED = "breed"; + private String breed; - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBreed() { - return breed; - } + public DogAllOf() { + } + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } + /** + * Get breed + * @return breed + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBreed() { + return breed; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_BREED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBreed(String breed) { + this.breed = breed; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogAllOf dogAllOf = (DogAllOf) o; + return Objects.equals(this.breed, dogAllOf.breed); } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - @Override - public int hashCode() { - return Objects.hash(breed); - } + @Override + public int hashCode() { + return Objects.hash(breed); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java index c71f5edf0c4c..9c72665e822d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java @@ -36,169 +36,171 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class EnumArrays { - /** - * Gets or Sets justSymbol - */ - public enum JustSymbolEnum { - GREATER_THAN_OR_EQUAL_TO(">="), - DOLLAR("$"); + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + DOLLAR("$"); - private String value; + private String value; - JustSymbolEnum(String value) { - this.value = value; + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } + public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol"; + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + CRAB("crab"); + + private String value; - @JsonValue - public String getValue() { - return value; + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } + public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; + private List arrayEnum = null; - @Override - public String toString() { - return String.valueOf(value); + public EnumArrays() { + } + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; } - @JsonCreator - public static JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + /** + * Get justSymbol + * @return justSymbol + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JustSymbolEnum getJustSymbol() { + return justSymbol; } - } - public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol"; - private JustSymbolEnum justSymbol; - /** - * Gets or Sets arrayEnum - */ - public enum ArrayEnumEnum { - FISH("fish"), - CRAB("crab"); + @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } - private String value; + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } - ArrayEnumEnum(String value) { - this.value = value; + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList(); + } + this.arrayEnum.add(arrayEnumItem); + return this; } - @JsonValue - public String getValue() { - return value; + /** + * Get arrayEnum + * @return arrayEnum + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getArrayEnum() { + return arrayEnum; } - @Override - public String toString() { - return String.valueOf(value); + @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; } - @JsonCreator - public static ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; - private List arrayEnum = null; - - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - return this; - } - - /** - * Get justSymbol - * @return justSymbol - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - return this; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList(); + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); } - this.arrayEnum.add(arrayEnumItem); - return this; - } - - /** - * Get arrayEnum - * @return arrayEnum - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getArrayEnum() { - return arrayEnum; - } - - @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumClass.java index 1ee1b126d039..f01bfc417554 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumClass.java @@ -29,34 +29,34 @@ */ @Introspected public enum EnumClass { - _ABC("_abc"), - _EFG("-efg"), - _XYZ_("(xyz)"); - - private String value; - - EnumClass(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { - if (b.value.equals(value)) { - return b; - } + _ABC("_abc"), + _EFG("-efg"), + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java index 0b9c758a8221..1168da6df501 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java @@ -38,313 +38,315 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class EnumTest { - /** - * Gets or Sets enumString - */ - public enum EnumStringEnum { - UPPER("UPPER"), - LOWER("lower"), - EMPTY(""); - - private String value; - - EnumStringEnum(String value) { - this.value = value; + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + LOWER("lower"), + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } + public static final String JSON_PROPERTY_ENUM_STRING = "enum_string"; + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + LOWER("lower"), + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } - @JsonValue - public String getValue() { - return value; + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } + public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required"; + private EnumStringRequiredEnum enumStringRequired; - @Override - public String toString() { - return String.valueOf(value); + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } + public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer"; + private EnumIntegerEnum enumInteger; - @JsonCreator - public static EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number"; + private EnumNumberEnum enumNumber; + + public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; + private OuterEnum outerEnum; + + public EnumTest() { } - } - public static final String JSON_PROPERTY_ENUM_STRING = "enum_string"; - private EnumStringEnum enumString; - - /** - * Gets or Sets enumStringRequired - */ - public enum EnumStringRequiredEnum { - UPPER("UPPER"), - LOWER("lower"), - EMPTY(""); - - private String value; - - EnumStringRequiredEnum(String value) { - this.value = value; + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; } - @JsonValue - public String getValue() { - return value; + /** + * Get enumString + * @return enumString + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EnumStringEnum getEnumString() { + return enumString; } - @Override - public String toString() { - return String.valueOf(value); + @JsonProperty(JSON_PROPERTY_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; } - @JsonCreator - public static EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; } - } - public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required"; - private EnumStringRequiredEnum enumStringRequired; - /** - * Gets or Sets enumInteger - */ - public enum EnumIntegerEnum { - NUMBER_1(1), - NUMBER_MINUS_1(-1); + /** + * Get enumStringRequired + * @return enumStringRequired + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } - private Integer value; + @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } - EnumIntegerEnum(Integer value) { - this.value = value; + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; } - @JsonValue - public Integer getValue() { - return value; + /** + * Get enumInteger + * @return enumInteger + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EnumIntegerEnum getEnumInteger() { + return enumInteger; } - @Override - public String toString() { - return String.valueOf(value); + @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; } - @JsonCreator - public static EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; } - } - public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer"; - private EnumIntegerEnum enumInteger; - /** - * Gets or Sets enumNumber - */ - public enum EnumNumberEnum { - NUMBER_1_DOT_1(1.1), - NUMBER_MINUS_1_DOT_2(-1.2); + /** + * Get enumNumber + * @return enumNumber + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } - private Double value; + @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } - EnumNumberEnum(Double value) { - this.value = value; + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; } - @JsonValue - public Double getValue() { - return value; + /** + * Get outerEnum + * @return outerEnum + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OuterEnum getOuterEnum() { + return outerEnum; } - @Override - public String toString() { - return String.valueOf(value); + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; } - @JsonCreator - public static EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); } - } - public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number"; - private EnumNumberEnum enumNumber; - - public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; - - public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; - return this; - } - - /** - * Get enumString - * @return enumString - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EnumStringEnum getEnumString() { - return enumString; - } - - @JsonProperty(JSON_PROPERTY_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - return this; - } - - /** - * Get enumStringRequired - * @return enumStringRequired - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - return this; - } - - /** - * Get enumInteger - * @return enumInteger - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - return this; - } - - /** - * Get enumNumber - * @return enumNumber - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - return this; - } - - /** - * Get outerEnum - * @return outerEnum - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OuterEnum getOuterEnum() { - return outerEnum; - } - - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); - sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); - sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9e250b52efc9..b1f30f1a4fc1 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -37,104 +37,106 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class FileSchemaTestClass { - public static final String JSON_PROPERTY_FILE = "file"; - private ModelFile _file; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public FileSchemaTestClass _file(ModelFile _file) { - this._file = _file; - return this; - } - - /** - * Get _file - * @return _file - **/ - @Valid - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ModelFile getFile() { - return _file; - } - - @JsonProperty(JSON_PROPERTY_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFile(ModelFile _file) { - this._file = _file; - } - - public FileSchemaTestClass files(List files) { - this.files = files; - return this; - } - - public FileSchemaTestClass addFilesItem(ModelFile filesItem) { - if (this.files == null) { - this.files = new ArrayList(); + public static final String JSON_PROPERTY_FILE = "file"; + private ModelFile _file; + + public static final String JSON_PROPERTY_FILES = "files"; + private List files = null; + + public FileSchemaTestClass() { + } + public FileSchemaTestClass _file(ModelFile _file) { + this._file = _file; + return this; + } + + /** + * Get _file + * @return _file + **/ + @Valid + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ModelFile getFile() { + return _file; + } + + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFile(ModelFile _file) { + this._file = _file; + } + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(ModelFile filesItem) { + if (this.files == null) { + this.files = new ArrayList(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFiles() { + return files; + } + + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFiles(List files) { + this.files = files; } - this.files.add(filesItem); - return this; - } - - /** - * Get files - * @return files - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this._file, fileSchemaTestClass._file) && + Objects.equals(this.files, fileSchemaTestClass.files); } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public int hashCode() { + return Objects.hash(_file, files); } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(_file, files); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java index 239ef22ecb27..83555236ab53 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java @@ -51,457 +51,459 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class FormatTest { - public static final String JSON_PROPERTY_INTEGER = "integer"; - private Integer integer; - - public static final String JSON_PROPERTY_INT32 = "int32"; - private Integer int32; - - public static final String JSON_PROPERTY_INT64 = "int64"; - private Long int64; - - public static final String JSON_PROPERTY_NUMBER = "number"; - private BigDecimal number; - - public static final String JSON_PROPERTY_FLOAT = "float"; - private Float _float; - - public static final String JSON_PROPERTY_DOUBLE = "double"; - private Double _double; - - public static final String JSON_PROPERTY_STRING = "string"; - private String string; - - public static final String JSON_PROPERTY_BYTE = "byte"; - private byte[] _byte; - - public static final String JSON_PROPERTY_BINARY = "binary"; - private File binary; - - public static final String JSON_PROPERTY_DATE = "date"; - private LocalDate date; - - public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private LocalDateTime dateTime; - - public static final String JSON_PROPERTY_UUID = "uuid"; - private UUID uuid; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; - - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; - - public FormatTest integer(Integer integer) { - this.integer = integer; - return this; - } - - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer - **/ - @Nullable - @Min(10) - @Max(100) - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInteger() { - return integer; - } - - @JsonProperty(JSON_PROPERTY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInteger(Integer integer) { - this.integer = integer; - } - - public FormatTest int32(Integer int32) { - this.int32 = int32; - return this; - } - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 - **/ - @Nullable - @Min(20) - @Max(200) - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INT32) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getInt32() { - return int32; - } - - @JsonProperty(JSON_PROPERTY_INT32) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt32(Integer int32) { - this.int32 = int32; - } - - public FormatTest int64(Long int64) { - this.int64 = int64; - return this; - } - - /** - * Get int64 - * @return int64 - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INT64) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInt64() { - return int64; - } - - @JsonProperty(JSON_PROPERTY_INT64) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt64(Long int64) { - this.int64 = int64; - } - - public FormatTest number(BigDecimal number) { - this.number = number; - return this; - } - - /** - * Get number - * minimum: 32.1 - * maximum: 543.2 - * @return number - **/ - @NotNull - @DecimalMin("32.1") - @DecimalMax("543.2") - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getNumber() { - return number; - } - - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(BigDecimal number) { - this.number = number; - } - - public FormatTest _float(Float _float) { - this._float = _float; - return this; - } - - /** - * Get _float - * minimum: 54.3 - * maximum: 987.6 - * @return _float - **/ - @Nullable - @DecimalMin("54.3") - @DecimalMax("987.6") - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FLOAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Float getFloat() { - return _float; - } - - @JsonProperty(JSON_PROPERTY_FLOAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFloat(Float _float) { - this._float = _float; - } - - public FormatTest _double(Double _double) { - this._double = _double; - return this; - } - - /** - * Get _double - * minimum: 67.8 - * maximum: 123.4 - * @return _double - **/ - @Nullable - @DecimalMin("67.8") - @DecimalMax("123.4") - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DOUBLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDouble() { - return _double; - } - - @JsonProperty(JSON_PROPERTY_DOUBLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(Double _double) { - this._double = _double; - } - - public FormatTest string(String string) { - this.string = string; - return this; - } - - /** - * Get string - * @return string - **/ - @Nullable - @Pattern(regexp="/[a-z]/i") - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getString() { - return string; - } - - @JsonProperty(JSON_PROPERTY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setString(String string) { - this.string = string; - } - - public FormatTest _byte(byte[] _byte) { - this._byte = _byte; - return this; - } - - /** - * Get _byte - * @return _byte - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_BYTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public byte[] getByte() { - return _byte; - } - - @JsonProperty(JSON_PROPERTY_BYTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - public FormatTest binary(File binary) { - this.binary = binary; - return this; - } - - /** - * Get binary - * @return binary - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BINARY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public File getBinary() { - return binary; - } - - @JsonProperty(JSON_PROPERTY_BINARY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBinary(File binary) { - this.binary = binary; - } - - public FormatTest date(LocalDate date) { - this.date = date; - return this; - } - - /** - * Get date - * @return date - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") - public LocalDate getDate() { - return date; - } - - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") - public void setDate(LocalDate date) { - this.date = date; - } - - public FormatTest dateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public LocalDateTime getDateTime() { - return dateTime; - } - - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setDateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - } - - public FormatTest uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @Nullable - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UUID getUuid() { - return uuid; - } - - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - public FormatTest password(String password) { - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @NotNull - @Size(min=10, max=64) - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPassword() { - return password; - } - - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPassword(String password) { - this.password = password; - } - - public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - return this; - } - - /** - * Get bigDecimal - * @return bigDecimal - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getBigDecimal() { - return bigDecimal; - } - - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + public static final String JSON_PROPERTY_INTEGER = "integer"; + private Integer integer; + + public static final String JSON_PROPERTY_INT32 = "int32"; + private Integer int32; + + public static final String JSON_PROPERTY_INT64 = "int64"; + private Long int64; + + public static final String JSON_PROPERTY_NUMBER = "number"; + private BigDecimal number; + + public static final String JSON_PROPERTY_FLOAT = "float"; + private Float _float; + + public static final String JSON_PROPERTY_DOUBLE = "double"; + private Double _double; + + public static final String JSON_PROPERTY_STRING = "string"; + private String string; + + public static final String JSON_PROPERTY_BYTE = "byte"; + private byte[] _byte; + + public static final String JSON_PROPERTY_BINARY = "binary"; + private File binary; + + public static final String JSON_PROPERTY_DATE = "date"; + private LocalDate date; + + public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + private LocalDateTime dateTime; + + public static final String JSON_PROPERTY_UUID = "uuid"; + private UUID uuid; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; + private BigDecimal bigDecimal; + + public FormatTest() { + } + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + **/ + @Nullable + @Min(10) + @Max(100) + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getInteger() { + return integer; + } + + @JsonProperty(JSON_PROPERTY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + **/ + @Nullable + @Min(20) + @Max(200) + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INT32) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getInt32() { + return int32; + } + + @JsonProperty(JSON_PROPERTY_INT32) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INT64) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInt64() { + return int64; + } + + @JsonProperty(JSON_PROPERTY_INT64) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + **/ + @NotNull + @DecimalMin("32.1") + @DecimalMax("543.2") + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getNumber() { + return number; + } + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + **/ + @Nullable + @DecimalMin("54.3") + @DecimalMax("987.6") + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Float getFloat() { + return _float; + } + + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + **/ + @Nullable + @DecimalMin("67.8") + @DecimalMax("123.4") + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getDouble() { + return _double; + } + + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @Nullable + @Pattern(regexp="/[a-z]/i") + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getString() { + return string; + } + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BYTE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public byte[] getByte() { + return _byte; + } + + @JsonProperty(JSON_PROPERTY_BYTE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(File binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BINARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public File getBinary() { + return binary; + } + + @JsonProperty(JSON_PROPERTY_BINARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBinary(File binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") + public LocalDate getDate() { + return date; + } + + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(LocalDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + public LocalDateTime getDateTime() { + return dateTime; + } + + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + public void setDateTime(LocalDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @Nullable + @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUuid() { + return uuid; + } + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @NotNull + @Size(min=10, max=64) + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPassword() { + return password; + } + + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 43e713b03055..0de28c497864 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -34,73 +34,75 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class HasOnlyReadOnly { - public static final String JSON_PROPERTY_BAR = "bar"; - private String bar; + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar; - public static final String JSON_PROPERTY_FOO = "foo"; - private String foo; + public static final String JSON_PROPERTY_FOO = "foo"; + private String foo; - /** - * Get bar - * @return bar - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBar() { - return bar; - } - - /** - * Get foo - * @return foo - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FOO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFoo() { - return foo; - } + public HasOnlyReadOnly() { + } + /** + * Get bar + * @return bar + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBar() { + return bar; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + /** + * Get foo + * @return foo + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FOO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFoo() { + return foo; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java index 259929412b24..57112ef976a5 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java @@ -39,216 +39,218 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class MapTest { - public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; - private Map> mapMapOfString = null; + public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; + private Map> mapMapOfString = null; - /** - * Gets or Sets inner - */ - public enum InnerEnum { - UPPER("UPPER"), - LOWER("lower"); + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + LOWER("lower"); - private String value; + private String value; - InnerEnum(String value) { - this.value = value; - } + InnerEnum(String value) { + this.value = value; + } - @JsonValue - public String getValue() { - return value; - } + @JsonValue + public String getValue() { + return value; + } - @Override - public String toString() { - return String.valueOf(value); - } + @Override + public String toString() { + return String.valueOf(value); + } - @JsonCreator - public static InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - } - public static final String JSON_PROPERTY_MAP_OF_ENUM_STRING = "map_of_enum_string"; - private Map mapOfEnumString = null; + public static final String JSON_PROPERTY_MAP_OF_ENUM_STRING = "map_of_enum_string"; + private Map mapOfEnumString = null; - public static final String JSON_PROPERTY_DIRECT_MAP = "direct_map"; - private Map directMap = null; + public static final String JSON_PROPERTY_DIRECT_MAP = "direct_map"; + private Map directMap = null; - public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; - private Map indirectMap = null; + public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; + private Map indirectMap = null; - public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - return this; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap>(); + public MapTest() { + } + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; } - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - /** - * Get mapMapOfString - * @return mapMapOfString - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getMapMapOfString() { - return mapMapOfString; + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; } - @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } + /** + * Get mapMapOfString + * @return mapMapOfString + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getMapMapOfString() { + return mapMapOfString; + } - public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - return this; - } + @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap(); + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; } - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - /** - * Get mapOfEnumString - * @return mapOfEnumString - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapOfEnumString() { - return mapOfEnumString; + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; } - @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } + /** + * Get mapOfEnumString + * @return mapOfEnumString + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapOfEnumString() { + return mapOfEnumString; + } - public MapTest directMap(Map directMap) { - this.directMap = directMap; - return this; - } + @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap(); + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; } - this.directMap.put(key, directMapItem); - return this; - } - /** - * Get directMap - * @return directMap - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getDirectMap() { - return directMap; + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap(); + } + this.directMap.put(key, directMapItem); + return this; } - @JsonProperty(JSON_PROPERTY_DIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } + /** + * Get directMap + * @return directMap + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getDirectMap() { + return directMap; + } - public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - return this; - } + @JsonProperty(JSON_PROPERTY_DIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap(); + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; } - this.indirectMap.put(key, indirectMapItem); - return this; - } - /** - * Get indirectMap - * @return indirectMap - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getIndirectMap() { - return indirectMap; + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap(); + } + this.indirectMap.put(key, indirectMapItem); + return this; } - @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } + /** + * Get indirectMap + * @return indirectMap + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getIndirectMap() { + return indirectMap; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 4f546fae5f9f..46e2e81f47a5 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -41,133 +41,135 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class MixedPropertiesAndAdditionalPropertiesClass { - public static final String JSON_PROPERTY_UUID = "uuid"; - private UUID uuid; + public static final String JSON_PROPERTY_UUID = "uuid"; + private UUID uuid; - public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private LocalDateTime dateTime; + public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + private LocalDateTime dateTime; - public static final String JSON_PROPERTY_MAP = "map"; - private Map map = null; + public static final String JSON_PROPERTY_MAP = "map"; + private Map map = null; - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UUID getUuid() { - return uuid; - } + public MixedPropertiesAndAdditionalPropertiesClass() { + } + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUuid(UUID uuid) { - this.uuid = uuid; - } + /** + * Get uuid + * @return uuid + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUuid() { + return uuid; + } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - return this; - } + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(UUID uuid) { + this.uuid = uuid; + } - /** - * Get dateTime - * @return dateTime - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public LocalDateTime getDateTime() { - return dateTime; - } + public MixedPropertiesAndAdditionalPropertiesClass dateTime(LocalDateTime dateTime) { + this.dateTime = dateTime; + return this; + } - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setDateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - } + /** + * Get dateTime + * @return dateTime + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + public LocalDateTime getDateTime() { + return dateTime; + } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; - return this; - } + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + public void setDateTime(LocalDateTime dateTime) { + this.dateTime = dateTime; + } - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - if (this.map == null) { - this.map = new HashMap(); + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; } - this.map.put(key, mapItem); - return this; - } - /** - * Get map - * @return map - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMap() { - return map; + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap(); + } + this.map.put(key, mapItem); + return this; } - @JsonProperty(JSON_PROPERTY_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMap(Map map) { - this.map = map; - } + /** + * Get map + * @return map + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMap() { + return map; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMap(Map map) { + this.map = map; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java index 34604b7b3bfd..05141ad70762 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java @@ -35,95 +35,97 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Model200Response { - public static final String JSON_PROPERTY_NAME = "name"; - private Integer name; - - public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; - private String propertyClass; - - public Model200Response name(Integer name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(Integer name) { - this.name = name; - } - - public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPropertyClass() { - return propertyClass; - } - - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static final String JSON_PROPERTY_NAME = "name"; + private Integer name; + + public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; + private String propertyClass; + + public Model200Response() { + } + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getName() { + return name; } - if (o == null || getClass() != o.getClass()) { - return false; + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPropertyClass() { + return propertyClass; } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java index 7d185d9d0bae..33e9cd2305ff 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -35,123 +35,125 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ModelApiResponse { - public static final String JSON_PROPERTY_CODE = "code"; - private Integer code; - - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public ModelApiResponse code(Integer code) { - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCode() { - return code; - } - - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCode(Integer code) { - this.code = code; - } - - public ModelApiResponse type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public ModelApiResponse message(String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static final String JSON_PROPERTY_CODE = "code"; + private Integer code; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public ModelApiResponse() { + } + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; } - if (o == null || getClass() != o.getClass()) { - return false; + + /** + * Get message + * @return message + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java index af4f73af5ccb..936ddd4a2dfb 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java @@ -33,67 +33,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ModelClient { - public static final String JSON_PROPERTY_CLIENT = "client"; - private String _client; + public static final String JSON_PROPERTY_CLIENT = "client"; + private String _client; - public ModelClient _client(String _client) { - this._client = _client; - return this; - } - - /** - * Get _client - * @return _client - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CLIENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClient() { - return _client; - } + public ModelClient() { + } + public ModelClient _client(String _client) { + this._client = _client; + return this; + } - @JsonProperty(JSON_PROPERTY_CLIENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClient(String _client) { - this._client = _client; - } + /** + * Get _client + * @return _client + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CLIENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClient() { + return _client; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_CLIENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClient(String _client) { + this._client = _client; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelClient _client = (ModelClient) o; + return Objects.equals(this._client, _client._client); } - ModelClient _client = (ModelClient) o; - return Objects.equals(this._client, _client._client); - } - @Override - public int hashCode() { - return Objects.hash(_client); - } + @Override + public int hashCode() { + return Objects.hash(_client); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelClient {\n"); - sb.append(" _client: ").append(toIndentedString(_client)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelClient {\n"); + sb.append(" _client: ").append(toIndentedString(_client)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java index 7112952184c0..b4d40ff9b656 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java @@ -34,67 +34,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ModelFile { - public static final String JSON_PROPERTY_SOURCE_U_R_I = "sourceURI"; - private String sourceURI; + public static final String JSON_PROPERTY_SOURCE_U_R_I = "sourceURI"; + private String sourceURI; - public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - /** - * Test capitalization - * @return sourceURI - **/ - @Nullable - @ApiModelProperty(value = "Test capitalization") - @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceURI() { - return sourceURI; - } + public ModelFile() { + } + public ModelFile sourceURI(String sourceURI) { + this.sourceURI = sourceURI; + return this; + } - @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } + /** + * Test capitalization + * @return sourceURI + **/ + @Nullable + @ApiModelProperty(value = "Test capitalization") + @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceURI() { + return sourceURI; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceURI(String sourceURI) { + this.sourceURI = sourceURI; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelFile _file = (ModelFile) o; + return Objects.equals(this.sourceURI, _file.sourceURI); } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); - } - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } + @Override + public int hashCode() { + return Objects.hash(sourceURI); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelFile {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelFile {\n"); + sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java index 9aa652a72ee4..6c48df8fe43a 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java @@ -33,67 +33,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ModelList { - public static final String JSON_PROPERTY_123LIST = "123-list"; - private String _123list; + public static final String JSON_PROPERTY_123LIST = "123-list"; + private String _123list; - public ModelList _123list(String _123list) { - this._123list = _123list; - return this; - } - - /** - * Get _123list - * @return _123list - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_123LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String get123list() { - return _123list; - } + public ModelList() { + } + public ModelList _123list(String _123list) { + this._123list = _123list; + return this; + } - @JsonProperty(JSON_PROPERTY_123LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void set123list(String _123list) { - this._123list = _123list; - } + /** + * Get _123list + * @return _123list + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_123LIST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String get123list() { + return _123list; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_123LIST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void set123list(String _123list) { + this._123list = _123list; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelList _list = (ModelList) o; + return Objects.equals(this._123list, _list._123list); } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); - } - @Override - public int hashCode() { - return Objects.hash(_123list); - } + @Override + public int hashCode() { + return Objects.hash(_123list); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelList {\n"); + sb.append(" _123list: ").append(toIndentedString(_123list)).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"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java index 2688ecad2624..be60946ba7f7 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java @@ -34,67 +34,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ModelReturn { - public static final String JSON_PROPERTY_RETURN = "return"; - private Integer _return; + public static final String JSON_PROPERTY_RETURN = "return"; + private Integer _return; - public ModelReturn _return(Integer _return) { - this._return = _return; - return this; - } - - /** - * Get _return - * @return _return - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_RETURN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getReturn() { - return _return; - } + public ModelReturn() { + } + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } - @JsonProperty(JSON_PROPERTY_RETURN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReturn(Integer _return) { - this._return = _return; - } + /** + * Get _return + * @return _return + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RETURN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getReturn() { + return _return; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_RETURN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturn(Integer _return) { + this._return = _return; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); - } - @Override - public int hashCode() { - return Objects.hash(_return); - } + @Override + public int hashCode() { + return Objects.hash(_return); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java index 018d3cf558ed..401002e5de2f 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java @@ -37,129 +37,131 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Name { - public static final String JSON_PROPERTY_NAME = "name"; - private Integer name; - - public static final String JSON_PROPERTY_SNAKE_CASE = "snake_case"; - private Integer snakeCase; - - public static final String JSON_PROPERTY_PROPERTY = "property"; - private String property; - - public static final String JSON_PROPERTY_123NUMBER = "123Number"; - private Integer _123number; - - public Name name(Integer name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(Integer name) { - this.name = name; - } - - /** - * Get snakeCase - * @return snakeCase - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SNAKE_CASE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSnakeCase() { - return snakeCase; - } - - public Name property(String property) { - this.property = property; - return this; - } - - /** - * Get property - * @return property - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProperty() { - return property; - } - - @JsonProperty(JSON_PROPERTY_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProperty(String property) { - this.property = property; - } - - /** - * Get _123number - * @return _123number - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_123NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer get123number() { - return _123number; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static final String JSON_PROPERTY_NAME = "name"; + private Integer name; + + public static final String JSON_PROPERTY_SNAKE_CASE = "snake_case"; + private Integer snakeCase; + + public static final String JSON_PROPERTY_PROPERTY = "property"; + private String property; + + public static final String JSON_PROPERTY_123NUMBER = "123Number"; + private Integer _123number; + + public Name() { } - if (o == null || getClass() != o.getClass()) { - return false; + public Name name(Integer name) { + this.name = name; + return this; } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + /** + * Get name + * @return name + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(Integer name) { + this.name = name; + } + + /** + * Get snakeCase + * @return snakeCase + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SNAKE_CASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSnakeCase() { + return snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProperty() { + return property; + } + + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProperty(String property) { + this.property = property; + } + + /** + * Get _123number + * @return _123number + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_123NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer get123number() { + return _123number; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java index e4197f390e5a..9b3e86e34e33 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,67 +34,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class NumberOnly { - public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber"; - private BigDecimal justNumber; + public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber"; + private BigDecimal justNumber; - public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - return this; - } - - /** - * Get justNumber - * @return justNumber - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_JUST_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getJustNumber() { - return justNumber; - } + public NumberOnly() { + } + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } - @JsonProperty(JSON_PROPERTY_JUST_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } + /** + * Get justNumber + * @return justNumber + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_JUST_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getJustNumber() { + return justNumber; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_JUST_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - @Override - public int hashCode() { - return Objects.hash(justNumber); - } + @Override + public int hashCode() { + return Objects.hash(justNumber); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java index 8ecdbda12600..801a4d52c669 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java @@ -39,243 +39,245 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Order { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; - public static final String JSON_PROPERTY_PET_ID = "petId"; - private Long petId; + public static final String JSON_PROPERTY_PET_ID = "petId"; + private Long petId; - public static final String JSON_PROPERTY_QUANTITY = "quantity"; - private Integer quantity; + public static final String JSON_PROPERTY_QUANTITY = "quantity"; + private Integer quantity; - public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; - private LocalDateTime shipDate; + public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; + private LocalDateTime shipDate; - /** - * Order Status - */ - public enum StatusEnum { - PLACED("placed"), - APPROVED("approved"), - DELIVERED("delivered"); + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + APPROVED("approved"), + DELIVERED("delivered"); - private String value; + private String value; - StatusEnum(String value) { - this.value = 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; - @JsonValue - public String getValue() { - return value; + public static final String JSON_PROPERTY_COMPLETE = "complete"; + private Boolean complete = false; + + public Order() { + } + public Order id(Long id) { + this.id = id; + return this; } - @Override - public String toString() { - return String.valueOf(value); + /** + * Get id + * @return id + **/ + @Nullable + @ApiModelProperty(value = "") + @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 Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPetId() { + return petId; + } + + @JsonProperty(JSON_PROPERTY_PET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_QUANTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getQuantity() { + return quantity; + } + + @JsonProperty(JSON_PROPERTY_QUANTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(LocalDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SHIP_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + public LocalDateTime getShipDate() { + return shipDate; + } + + @JsonProperty(JSON_PROPERTY_SHIP_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + public void setShipDate(LocalDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + **/ + @Nullable + @ApiModelProperty(value = "Order Status") + @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; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; } - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; + /** + * Get complete + * @return complete + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getComplete() { + return complete; + } + + @JsonProperty(JSON_PROPERTY_COMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); } - } - public static final String JSON_PROPERTY_STATUS = "status"; - private StatusEnum status; - - public static final String JSON_PROPERTY_COMPLETE = "complete"; - private Boolean complete = false; - - public Order id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @Nullable - @ApiModelProperty(value = "") - @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 Order petId(Long petId) { - this.petId = petId; - return this; - } - - /** - * Get petId - * @return petId - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PET_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPetId() { - return petId; - } - - @JsonProperty(JSON_PROPERTY_PET_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPetId(Long petId) { - this.petId = petId; - } - - public Order quantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getQuantity() { - return quantity; - } - - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - public Order shipDate(LocalDateTime shipDate) { - this.shipDate = shipDate; - return this; - } - - /** - * Get shipDate - * @return shipDate - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SHIP_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public LocalDateTime getShipDate() { - return shipDate; - } - - @JsonProperty(JSON_PROPERTY_SHIP_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setShipDate(LocalDateTime shipDate) { - this.shipDate = shipDate; - } - - public Order status(StatusEnum status) { - this.status = status; - return this; - } - - /** - * Order Status - * @return status - **/ - @Nullable - @ApiModelProperty(value = "Order Status") - @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; - } - - public Order complete(Boolean complete) { - this.complete = complete; - return this; - } - - /** - * Get complete - * @return complete - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getComplete() { - return complete; - } - - @JsonProperty(JSON_PROPERTY_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setComplete(Boolean complete) { - this.complete = complete; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java index 4c41ddc658f6..96fd146e2537 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java @@ -36,123 +36,125 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class OuterComposite { - public static final String JSON_PROPERTY_MY_NUMBER = "my_number"; - private BigDecimal myNumber; - - public static final String JSON_PROPERTY_MY_STRING = "my_string"; - private String myString; - - public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; - private Boolean myBoolean; - - public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - return this; - } - - /** - * Get myNumber - * @return myNumber - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getMyNumber() { - return myNumber; - } - - @JsonProperty(JSON_PROPERTY_MY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - public OuterComposite myString(String myString) { - this.myString = myString; - return this; - } - - /** - * Get myString - * @return myString - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMyString() { - return myString; - } - - @JsonProperty(JSON_PROPERTY_MY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyString(String myString) { - this.myString = myString; - } - - public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - return this; - } - - /** - * Get myBoolean - * @return myBoolean - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMyBoolean() { - return myBoolean; - } - - @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static final String JSON_PROPERTY_MY_NUMBER = "my_number"; + private BigDecimal myNumber; + + public static final String JSON_PROPERTY_MY_STRING = "my_string"; + private String myString; + + public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; + private Boolean myBoolean; + + public OuterComposite() { + } + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getMyNumber() { + return myNumber; + } + + @JsonProperty(JSON_PROPERTY_MY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMyString() { + return myString; + } + + @JsonProperty(JSON_PROPERTY_MY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; } - if (o == null || getClass() != o.getClass()) { - return false; + + /** + * Get myBoolean + * @return myBoolean + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMyBoolean() { + return myBoolean; } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterEnum.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterEnum.java index 76fe37007e9a..5cf96d109321 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterEnum.java @@ -29,34 +29,34 @@ */ @Introspected public enum OuterEnum { - PLACED("placed"), - APPROVED("approved"), - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } + PLACED("placed"), + APPROVED("approved"), + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java index f142a57afdd5..fa4dec4b495a 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java @@ -45,257 +45,258 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Pet { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; - public static final String JSON_PROPERTY_CATEGORY = "category"; - private Category category; + public static final String JSON_PROPERTY_CATEGORY = "category"; + private Category category; - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; - private Set photoUrls = new LinkedHashSet(); + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; + private Set photoUrls = new LinkedHashSet(); - public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags = null; + 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"); + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + PENDING("pending"), + SOLD("sold"); - private String value; + private String value; - StatusEnum(String value) { - this.value = 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; - @JsonValue - public String getValue() { - return value; + public Pet() { + } + public Pet id(Long id) { + this.id = id; + return this; } - @Override - public String toString() { - return String.valueOf(value); + /** + * Get id + * @return id + **/ + @Nullable + @ApiModelProperty(value = "") + @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 category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @Valid + @Nullable + @ApiModelProperty(value = "") + @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 name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @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 photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; } - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; + /** + * Get photoUrls + * @return photoUrls + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList(); } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; } - } - public static final String JSON_PROPERTY_STATUS = "status"; - private StatusEnum status; - - public Pet id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @Nullable - @ApiModelProperty(value = "") - @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 category(Category category) { - this.category = category; - return this; - } - - /** - * Get category - * @return category - **/ - @Valid - @Nullable - @ApiModelProperty(value = "") - @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 name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") - @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 photoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - return this; - } - - public Pet addPhotoUrlsItem(String photoUrlsItem) { - this.photoUrls.add(photoUrlsItem); - return this; - } - - /** - * Get photoUrls - * @return photoUrls - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PHOTO_URLS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Set getPhotoUrls() { - return photoUrls; - } - - @JsonProperty(JSON_PROPERTY_PHOTO_URLS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - @JsonDeserialize(as = LinkedHashSet.class) - public void setPhotoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - } - - public Pet tags(List tags) { - this.tags = tags; - return this; - } - - public Pet addTagsItem(Tag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList(); + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(List tags) { + this.tags = tags; } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @Nullable - @ApiModelProperty(value = "") - @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 - **/ - @Nullable - @ApiModelProperty(value = "pet status in the store") - @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; + + public Pet status(StatusEnum status) { + this.status = status; + return this; } - if (o == null || getClass() != o.getClass()) { - return false; + + /** + * pet status in the store + * @return status + **/ + @Nullable + @ApiModelProperty(value = "pet status in the store") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; } - Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + @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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java index a9827ceca000..38133c13c8ee 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -34,84 +34,86 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class ReadOnlyFirst { - public static final String JSON_PROPERTY_BAR = "bar"; - private String bar; + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar; - public static final String JSON_PROPERTY_BAZ = "baz"; - private String baz; + public static final String JSON_PROPERTY_BAZ = "baz"; + private String baz; - /** - * Get bar - * @return bar - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBar() { - return bar; - } - - public ReadOnlyFirst baz(String baz) { - this.baz = baz; - return this; - } + public ReadOnlyFirst() { + } + /** + * Get bar + * @return bar + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBar() { + return bar; + } - /** - * Get baz - * @return baz - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BAZ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBaz() { - return baz; - } + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } - @JsonProperty(JSON_PROPERTY_BAZ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBaz(String baz) { - this.baz = baz; - } + /** + * Get baz + * @return baz + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BAZ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBaz() { + return baz; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_BAZ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaz(String baz) { + this.baz = baz; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); - } - @Override - public int hashCode() { - return Objects.hash(bar, baz); - } + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java index 0845ebff6384..d0a8db4de8bc 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java @@ -33,67 +33,69 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class SpecialModelName { - public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; - private Long $specialPropertyName; + public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; + private Long $specialPropertyName; - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - return this; - } - - /** - * Get $specialPropertyName - * @return $specialPropertyName - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long get$SpecialPropertyName() { - return $specialPropertyName; - } + public SpecialModelName() { + } + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } - @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void set$SpecialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } + /** + * Get $specialPropertyName + * @return $specialPropertyName + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName $specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); - } - @Override - public int hashCode() { - return Objects.hash($specialPropertyName); - } + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + /** + * 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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java index eee95fd360de..7163b1863310 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java @@ -34,95 +34,97 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class Tag { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public Tag id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @Nullable - @ApiModelProperty(value = "") - @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 - **/ - @Nullable - @ApiModelProperty(value = "") - @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; + 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 + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; } - if (o == null || getClass() != o.getClass()) { - return false; + + @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 + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; } - 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"; + + @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 "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java index 7475ae2ec45a..47b47122e39a 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -40,184 +40,186 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class TypeHolderDefault { - public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; - private String stringItem = "what"; - - public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; - private BigDecimal numberItem; - - public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; - private Integer integerItem; - - public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; - private Boolean boolItem = true; - - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; - private List arrayItem = new ArrayList(); - - public TypeHolderDefault stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getStringItem() { - return stringItem; - } - - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - public TypeHolderDefault numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getNumberItem() { - return numberItem; - } - - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - public TypeHolderDefault integerItem(Integer integerItem) { - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getIntegerItem() { - return integerItem; - } - - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - public TypeHolderDefault boolItem(Boolean boolItem) { - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getBoolItem() { - return boolItem; - } - - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - public TypeHolderDefault arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @NotNull - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getArrayItem() { - return arrayItem; - } - - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; - return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && - Objects.equals(this.numberItem, typeHolderDefault.numberItem) && - Objects.equals(this.integerItem, typeHolderDefault.integerItem) && - Objects.equals(this.boolItem, typeHolderDefault.boolItem) && - Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; + private String stringItem = "what"; + + public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; + private BigDecimal numberItem; + + public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; + private Integer integerItem; + + public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; + private Boolean boolItem = true; + + public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; + private List arrayItem = new ArrayList(); + + public TypeHolderDefault() { + } + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_STRING_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStringItem() { + return stringItem; + } + + @JsonProperty(JSON_PROPERTY_STRING_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getNumberItem() { + return numberItem; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getIntegerItem() { + return integerItem; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BOOL_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getBoolItem() { + return boolItem; + } + + @JsonProperty(JSON_PROPERTY_BOOL_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getArrayItem() { + return arrayItem; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java index 539ef489b978..be1a7351861c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -41,212 +41,214 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class TypeHolderExample { - public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; - private String stringItem; - - public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; - private BigDecimal numberItem; - - public static final String JSON_PROPERTY_FLOAT_ITEM = "float_item"; - private Float floatItem; - - public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; - private Integer integerItem; - - public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; - private Boolean boolItem; - - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; - private List arrayItem = new ArrayList(); - - public TypeHolderExample stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @NotNull - @ApiModelProperty(example = "what", required = true, value = "") - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getStringItem() { - return stringItem; - } - - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - public TypeHolderExample numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @NotNull - @ApiModelProperty(example = "1.234", required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getNumberItem() { - return numberItem; - } - - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - public TypeHolderExample floatItem(Float floatItem) { - this.floatItem = floatItem; - return this; - } - - /** - * Get floatItem - * @return floatItem - **/ - @NotNull - @ApiModelProperty(example = "1.234", required = true, value = "") - @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Float getFloatItem() { - return floatItem; - } - - @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFloatItem(Float floatItem) { - this.floatItem = floatItem; - } - - public TypeHolderExample integerItem(Integer integerItem) { - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getIntegerItem() { - return integerItem; - } - - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - public TypeHolderExample boolItem(Boolean boolItem) { - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @NotNull - @ApiModelProperty(example = "true", required = true, value = "") - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getBoolItem() { - return boolItem; - } - - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - public TypeHolderExample arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @NotNull - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getArrayItem() { - return arrayItem; - } - - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderExample typeHolderExample = (TypeHolderExample) o; - return Objects.equals(this.stringItem, typeHolderExample.stringItem) && - Objects.equals(this.numberItem, typeHolderExample.numberItem) && - Objects.equals(this.floatItem, typeHolderExample.floatItem) && - Objects.equals(this.integerItem, typeHolderExample.integerItem) && - Objects.equals(this.boolItem, typeHolderExample.boolItem) && - Objects.equals(this.arrayItem, typeHolderExample.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; + private String stringItem; + + public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; + private BigDecimal numberItem; + + public static final String JSON_PROPERTY_FLOAT_ITEM = "float_item"; + private Float floatItem; + + public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; + private Integer integerItem; + + public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; + private Boolean boolItem; + + public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; + private List arrayItem = new ArrayList(); + + public TypeHolderExample() { + } + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + **/ + @NotNull + @ApiModelProperty(example = "what", required = true, value = "") + @JsonProperty(JSON_PROPERTY_STRING_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStringItem() { + return stringItem; + } + + @JsonProperty(JSON_PROPERTY_STRING_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + **/ + @NotNull + @ApiModelProperty(example = "1.234", required = true, value = "") + @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getNumberItem() { + return numberItem; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + **/ + @NotNull + @ApiModelProperty(example = "1.234", required = true, value = "") + @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Float getFloatItem() { + return floatItem; + } + + @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + **/ + @NotNull + @ApiModelProperty(example = "-2", required = true, value = "") + @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getIntegerItem() { + return integerItem; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + **/ + @NotNull + @ApiModelProperty(example = "true", required = true, value = "") + @JsonProperty(JSON_PROPERTY_BOOL_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getBoolItem() { + return boolItem; + } + + @JsonProperty(JSON_PROPERTY_BOOL_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + **/ + @NotNull + @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") + @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getArrayItem() { + return arrayItem; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java index caea2374d872..fedc16d29198 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java @@ -40,263 +40,265 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class User { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_USERNAME = "username"; - private String username; - - public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; - private String firstName; - - public static final String JSON_PROPERTY_LAST_NAME = "lastName"; - private String lastName; - - public static final String JSON_PROPERTY_EMAIL = "email"; - private String email; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; - - public static final String JSON_PROPERTY_PHONE = "phone"; - private String phone; - - public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; - private Integer userStatus; - - public User id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @Nullable - @ApiModelProperty(value = "") - @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 User username(String username) { - this.username = username; - return this; - } - - /** - * Get username - * @return username - **/ - @Nullable - @ApiModelProperty(value = "") - @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 User firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FIRST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFirstName() { - return firstName; - } - - @JsonProperty(JSON_PROPERTY_FIRST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public User lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LAST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLastName() { - return lastName; - } - - @JsonProperty(JSON_PROPERTY_LAST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public User email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmail(String email) { - this.email = email; - } - - public User password(String password) { - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPassword() { - return password; - } - - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPassword(String password) { - this.password = password; - } - - public User phone(String phone) { - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PHONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPhone() { - return phone; - } - - @JsonProperty(JSON_PROPERTY_PHONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPhone(String phone) { - this.phone = phone; - } - - public User userStatus(Integer userStatus) { - this.userStatus = userStatus; - return this; - } - - /** - * User Status - * @return userStatus - **/ - @Nullable - @ApiModelProperty(value = "User Status") - @JsonProperty(JSON_PROPERTY_USER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getUserStatus() { - return userStatus; - } - - @JsonProperty(JSON_PROPERTY_USER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + private String firstName; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + private String lastName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private String phone; + + public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; + private Integer userStatus; + + public User() { } - if (o == null || getClass() != o.getClass()) { - return false; + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @Nullable + @ApiModelProperty(value = "") + @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 User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUsername() { + return username; } - User user = (User) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFirstName() { + return firstName; + } + + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastName() { + return lastName; + } + + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPassword() { + return password; + } + + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPhone() { + return phone; + } + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + **/ + @Nullable + @ApiModelProperty(value = "User Status") + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getUserStatus() { + return userStatus; + } + + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } - return o.toString().replace("\n", "\n "); - } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java index 5ef915900403..351e04063b01 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java @@ -64,923 +64,925 @@ @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") @Introspected public class XmlItem { - public static final String JSON_PROPERTY_ATTRIBUTE_STRING = "attribute_string"; - private String attributeString; + public static final String JSON_PROPERTY_ATTRIBUTE_STRING = "attribute_string"; + private String attributeString; - public static final String JSON_PROPERTY_ATTRIBUTE_NUMBER = "attribute_number"; - private BigDecimal attributeNumber; + public static final String JSON_PROPERTY_ATTRIBUTE_NUMBER = "attribute_number"; + private BigDecimal attributeNumber; - public static final String JSON_PROPERTY_ATTRIBUTE_INTEGER = "attribute_integer"; - private Integer attributeInteger; + public static final String JSON_PROPERTY_ATTRIBUTE_INTEGER = "attribute_integer"; + private Integer attributeInteger; - public static final String JSON_PROPERTY_ATTRIBUTE_BOOLEAN = "attribute_boolean"; - private Boolean attributeBoolean; + public static final String JSON_PROPERTY_ATTRIBUTE_BOOLEAN = "attribute_boolean"; + private Boolean attributeBoolean; - public static final String JSON_PROPERTY_WRAPPED_ARRAY = "wrapped_array"; - private List wrappedArray = null; + public static final String JSON_PROPERTY_WRAPPED_ARRAY = "wrapped_array"; + private List wrappedArray = null; - public static final String JSON_PROPERTY_NAME_STRING = "name_string"; - private String nameString; + public static final String JSON_PROPERTY_NAME_STRING = "name_string"; + private String nameString; - public static final String JSON_PROPERTY_NAME_NUMBER = "name_number"; - private BigDecimal nameNumber; + public static final String JSON_PROPERTY_NAME_NUMBER = "name_number"; + private BigDecimal nameNumber; - public static final String JSON_PROPERTY_NAME_INTEGER = "name_integer"; - private Integer nameInteger; + public static final String JSON_PROPERTY_NAME_INTEGER = "name_integer"; + private Integer nameInteger; - public static final String JSON_PROPERTY_NAME_BOOLEAN = "name_boolean"; - private Boolean nameBoolean; + public static final String JSON_PROPERTY_NAME_BOOLEAN = "name_boolean"; + private Boolean nameBoolean; - public static final String JSON_PROPERTY_NAME_ARRAY = "name_array"; - private List nameArray = null; + public static final String JSON_PROPERTY_NAME_ARRAY = "name_array"; + private List nameArray = null; - public static final String JSON_PROPERTY_NAME_WRAPPED_ARRAY = "name_wrapped_array"; - private List nameWrappedArray = null; + public static final String JSON_PROPERTY_NAME_WRAPPED_ARRAY = "name_wrapped_array"; + private List nameWrappedArray = null; - public static final String JSON_PROPERTY_PREFIX_STRING = "prefix_string"; - private String prefixString; + public static final String JSON_PROPERTY_PREFIX_STRING = "prefix_string"; + private String prefixString; - public static final String JSON_PROPERTY_PREFIX_NUMBER = "prefix_number"; - private BigDecimal prefixNumber; + public static final String JSON_PROPERTY_PREFIX_NUMBER = "prefix_number"; + private BigDecimal prefixNumber; - public static final String JSON_PROPERTY_PREFIX_INTEGER = "prefix_integer"; - private Integer prefixInteger; + public static final String JSON_PROPERTY_PREFIX_INTEGER = "prefix_integer"; + private Integer prefixInteger; - public static final String JSON_PROPERTY_PREFIX_BOOLEAN = "prefix_boolean"; - private Boolean prefixBoolean; + public static final String JSON_PROPERTY_PREFIX_BOOLEAN = "prefix_boolean"; + private Boolean prefixBoolean; - public static final String JSON_PROPERTY_PREFIX_ARRAY = "prefix_array"; - private List prefixArray = null; - - public static final String JSON_PROPERTY_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array"; - private List prefixWrappedArray = null; + public static final String JSON_PROPERTY_PREFIX_ARRAY = "prefix_array"; + private List prefixArray = null; - public static final String JSON_PROPERTY_NAMESPACE_STRING = "namespace_string"; - private String namespaceString; - - public static final String JSON_PROPERTY_NAMESPACE_NUMBER = "namespace_number"; - private BigDecimal namespaceNumber; - - public static final String JSON_PROPERTY_NAMESPACE_INTEGER = "namespace_integer"; - private Integer namespaceInteger; - - public static final String JSON_PROPERTY_NAMESPACE_BOOLEAN = "namespace_boolean"; - private Boolean namespaceBoolean; - - public static final String JSON_PROPERTY_NAMESPACE_ARRAY = "namespace_array"; - private List namespaceArray = null; - - public static final String JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array"; - private List namespaceWrappedArray = null; - - public static final String JSON_PROPERTY_PREFIX_NS_STRING = "prefix_ns_string"; - private String prefixNsString; - - public static final String JSON_PROPERTY_PREFIX_NS_NUMBER = "prefix_ns_number"; - private BigDecimal prefixNsNumber; - - public static final String JSON_PROPERTY_PREFIX_NS_INTEGER = "prefix_ns_integer"; - private Integer prefixNsInteger; - - public static final String JSON_PROPERTY_PREFIX_NS_BOOLEAN = "prefix_ns_boolean"; - private Boolean prefixNsBoolean; - - public static final String JSON_PROPERTY_PREFIX_NS_ARRAY = "prefix_ns_array"; - private List prefixNsArray = null; - - public static final String JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array"; - private List prefixNsWrappedArray = null; - - public XmlItem attributeString(String attributeString) { - this.attributeString = attributeString; - return this; - } - - /** - * Get attributeString - * @return attributeString - **/ - @Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeString() { - return attributeString; - } - - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - public XmlItem attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - return this; - } - - /** - * Get attributeNumber - * @return attributeNumber - **/ - @Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - public XmlItem attributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - return this; - } - - /** - * Get attributeInteger - * @return attributeInteger - **/ - @Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getAttributeInteger() { - return attributeInteger; - } - - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - public XmlItem attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - return this; - } - - /** - * Get attributeBoolean - * @return attributeBoolean - **/ - @Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAttributeBoolean() { - return attributeBoolean; - } - - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - public XmlItem wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - return this; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList(); - } - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - /** - * Get wrappedArray - * @return wrappedArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWrappedArray() { - return wrappedArray; - } - - @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - public XmlItem nameString(String nameString) { - this.nameString = nameString; - return this; - } - - /** - * Get nameString - * @return nameString - **/ - @Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_NAME_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNameString() { - return nameString; - } - - @JsonProperty(JSON_PROPERTY_NAME_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameString(String nameString) { - this.nameString = nameString; - } - - public XmlItem nameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - return this; - } - - /** - * Get nameNumber - * @return nameNumber - **/ - @Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_NAME_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getNameNumber() { - return nameNumber; - } - - @JsonProperty(JSON_PROPERTY_NAME_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - public XmlItem nameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - return this; - } - - /** - * Get nameInteger - * @return nameInteger - **/ - @Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_NAME_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNameInteger() { - return nameInteger; - } - - @JsonProperty(JSON_PROPERTY_NAME_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - public XmlItem nameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - return this; - } - - /** - * Get nameBoolean - * @return nameBoolean - **/ - @Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNameBoolean() { - return nameBoolean; - } - - @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - public XmlItem nameArray(List nameArray) { - this.nameArray = nameArray; - return this; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList(); - } - this.nameArray.add(nameArrayItem); - return this; - } - - /** - * Get nameArray - * @return nameArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNameArray() { - return nameArray; - } - - @JsonProperty(JSON_PROPERTY_NAME_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - public XmlItem nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - return this; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList(); - } - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - /** - * Get nameWrappedArray - * @return nameWrappedArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNameWrappedArray() { - return nameWrappedArray; - } - - @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - public XmlItem prefixString(String prefixString) { - this.prefixString = prefixString; - return this; - } - - /** - * Get prefixString - * @return prefixString - **/ - @Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrefixString() { - return prefixString; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - public XmlItem prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - return this; - } - - /** - * Get prefixNumber - * @return prefixNumber - **/ - @Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - public XmlItem prefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - return this; - } - - /** - * Get prefixInteger - * @return prefixInteger - **/ - @Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPrefixInteger() { - return prefixInteger; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - public XmlItem prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - return this; - } - - /** - * Get prefixBoolean - * @return prefixBoolean - **/ - @Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPrefixBoolean() { - return prefixBoolean; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - public XmlItem prefixArray(List prefixArray) { - this.prefixArray = prefixArray; - return this; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList(); - } - this.prefixArray.add(prefixArrayItem); - return this; - } - - /** - * Get prefixArray - * @return prefixArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixArray() { - return prefixArray; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList(); - } - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - /** - * Get prefixWrappedArray - * @return prefixWrappedArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - public XmlItem namespaceString(String namespaceString) { - this.namespaceString = namespaceString; - return this; - } - - /** - * Get namespaceString - * @return namespaceString - **/ - @Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNamespaceString() { - return namespaceString; - } - - @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - return this; - } - - /** - * Get namespaceNumber - * @return namespaceNumber - **/ - @Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - public XmlItem namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - return this; - } - - /** - * Get namespaceInteger - * @return namespaceInteger - **/ - @Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - return this; - } - - /** - * Get namespaceBoolean - * @return namespaceBoolean - **/ - @Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - public XmlItem namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - return this; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList(); - } - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - /** - * Get namespaceArray - * @return namespaceArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNamespaceArray() { - return namespaceArray; - } - - @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList(); - } - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - /** - * Get namespaceWrappedArray - * @return namespaceWrappedArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - public XmlItem prefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - return this; - } - - /** - * Get prefixNsString - * @return prefixNsString - **/ - @Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrefixNsString() { - return prefixNsString; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - return this; - } - - /** - * Get prefixNsNumber - * @return prefixNsNumber - **/ - @Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - return this; - } - - /** - * Get prefixNsInteger - * @return prefixNsInteger - **/ - @Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - /** - * Get prefixNsBoolean - * @return prefixNsBoolean - **/ - @Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - public XmlItem prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - return this; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList(); - } - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - /** - * Get prefixNsArray - * @return prefixNsArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixNsArray() { - return prefixNsArray; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList(); - } - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - /** - * Get prefixNsWrappedArray - * @return prefixNsWrappedArray - **/ - @Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + public static final String JSON_PROPERTY_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array"; + private List prefixWrappedArray = null; + + public static final String JSON_PROPERTY_NAMESPACE_STRING = "namespace_string"; + private String namespaceString; + + public static final String JSON_PROPERTY_NAMESPACE_NUMBER = "namespace_number"; + private BigDecimal namespaceNumber; + + public static final String JSON_PROPERTY_NAMESPACE_INTEGER = "namespace_integer"; + private Integer namespaceInteger; + + public static final String JSON_PROPERTY_NAMESPACE_BOOLEAN = "namespace_boolean"; + private Boolean namespaceBoolean; + + public static final String JSON_PROPERTY_NAMESPACE_ARRAY = "namespace_array"; + private List namespaceArray = null; + + public static final String JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array"; + private List namespaceWrappedArray = null; + + public static final String JSON_PROPERTY_PREFIX_NS_STRING = "prefix_ns_string"; + private String prefixNsString; + + public static final String JSON_PROPERTY_PREFIX_NS_NUMBER = "prefix_ns_number"; + private BigDecimal prefixNsNumber; + + public static final String JSON_PROPERTY_PREFIX_NS_INTEGER = "prefix_ns_integer"; + private Integer prefixNsInteger; + + public static final String JSON_PROPERTY_PREFIX_NS_BOOLEAN = "prefix_ns_boolean"; + private Boolean prefixNsBoolean; + + public static final String JSON_PROPERTY_PREFIX_NS_ARRAY = "prefix_ns_array"; + private List prefixNsArray = null; + + public static final String JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array"; + private List prefixNsWrappedArray = null; + + public XmlItem() { + } + public XmlItem attributeString(String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + **/ + @Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeString() { + return attributeString; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + **/ + @Nullable + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + **/ + @Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAttributeInteger() { + return attributeInteger; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + **/ + @Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAttributeBoolean() { + return attributeBoolean; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWrappedArray() { + return wrappedArray; + } + + @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + **/ + @Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_NAME_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNameString() { + return nameString; + } + + @JsonProperty(JSON_PROPERTY_NAME_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNameString(String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + **/ + @Nullable + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_NAME_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getNameNumber() { + return nameNumber; + } + + @JsonProperty(JSON_PROPERTY_NAME_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + **/ + @Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_NAME_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNameInteger() { + return nameInteger; + } + + @JsonProperty(JSON_PROPERTY_NAME_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + **/ + @Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNameBoolean() { + return nameBoolean; + } + + @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNameArray() { + return nameArray; + } + + @JsonProperty(JSON_PROPERTY_NAME_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNameWrappedArray() { + return nameWrappedArray; + } + + @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + **/ + @Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPrefixString() { + return prefixString; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + **/ + @Nullable + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + **/ + @Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPrefixInteger() { + return prefixInteger; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + **/ + @Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPrefixBoolean() { + return prefixBoolean; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixArray() { + return prefixArray; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + **/ + @Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNamespaceString() { + return namespaceString; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + **/ + @Nullable + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + **/ + @Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + **/ + @Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNamespaceArray() { + return namespaceArray; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + **/ + @Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPrefixNsString() { + return prefixNsString; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + **/ + @Nullable + @ApiModelProperty(example = "1.234", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + **/ + @Nullable + @ApiModelProperty(example = "-2", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + **/ + @Nullable + @ApiModelProperty(example = "true", value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixNsArray() { + return prefixNsArray; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/resources/application.yml b/samples/client/petstore/java-micronaut-client/src/main/resources/application.yml index bf9e0df6cade..49d8cc32a022 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/resources/application.yml +++ b/samples/client/petstore/java-micronaut-client/src/main/resources/application.yml @@ -1,5 +1,5 @@ -base-path: "http://petstore.swagger.io:80/v2" -context-path: "/v2" +base-path: "http://petstore.swagger.io:80/v2/" +context-path: "/v2/" micronaut: application: diff --git a/samples/client/petstore/java-micronaut-client/src/main/resources/logback.xml b/samples/client/petstore/java-micronaut-client/src/main/resources/logback.xml new file mode 100644 index 000000000000..82218708264f --- /dev/null +++ b/samples/client/petstore/java-micronaut-client/src/main/resources/logback.xml @@ -0,0 +1,15 @@ + + + + false + + + %cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n + + + + + + + diff --git a/samples/server/petstore/java-micronaut-server/.gitignore b/samples/server/petstore/java-micronaut-server/.gitignore new file mode 100644 index 000000000000..a530464afa1b --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/.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/server/petstore/java-micronaut-server/.mvn/wrapper/MavenWrapperDownloader.java b/samples/server/petstore/java-micronaut-server/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 000000000000..fc435c409b37 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,124 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.Authenticator; +import java.net.PasswordAuthentication; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/samples/server/petstore/java-micronaut-server/.mvn/wrapper/maren-wrapper.properties b/samples/server/petstore/java-micronaut-server/.mvn/wrapper/maren-wrapper.properties new file mode 100644 index 000000000000..642d572ce90e --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/.mvn/wrapper/maren-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/samples/server/petstore/java-micronaut-server/.openapi-generator-ignore b/samples/server/petstore/java-micronaut-server/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/.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/server/petstore/java-micronaut-server/.openapi-generator/FILES b/samples/server/petstore/java-micronaut-server/.openapi-generator/FILES new file mode 100644 index 000000000000..c1595591bf45 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/.openapi-generator/FILES @@ -0,0 +1,36 @@ +.gitignore +.mvn/wrapper/MavenWrapperDownloader.java +.mvn/wrapper/maren-wrapper.properties +.mvn/wrapper/maven-wrapper.jar +README.md +build.gradle +docs/controllers/PetController.md +docs/controllers/StoreController.md +docs/controllers/UserController.md +docs/models/Category.md +docs/models/ModelApiResponse.md +docs/models/Order.md +docs/models/Pet.md +docs/models/Tag.md +docs/models/User.md +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +mvnw +mvnw.bat +pom.xml +settings.gradle +src/main/java/org/openapitools/Application.java +src/main/java/org/openapitools/controller/PetController.java +src/main/java/org/openapitools/controller/StoreController.java +src/main/java/org/openapitools/controller/UserController.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java +src/main/resources/application.yml +src/main/resources/logback.xml diff --git a/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION b/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-micronaut-server/README.md b/samples/server/petstore/java-micronaut-server/README.md new file mode 100644 index 000000000000..7f5a8dd218e7 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/README.md @@ -0,0 +1,27 @@ +# petstore-micronaut-server + +This is a generated server based on [Micronaut](https://micronaut.io/) framework. + +## Configuration + +To run the whole application, use [Application.java](src/main/java/org/openapitools/Application.java) as main class. + +Read **[Micronaut Guide](https://docs.micronaut.io/latest/guide/#ideSetup)** for detailed description on IDE setup and Micronaut Framework features. + +All the properties can be changed in the [application.yml](src/main/resources/application.yml) file or when creating micronaut application as described in **[Micronaut Guide - Configuration Section](https://docs.micronaut.io/latest/guide/#config)**. + +## Controller Guides + +Description on how to create Apis is given inside individual api guides: + +* [PetController](docs/controllers/PetController.md) +* [StoreController](docs/controllers/StoreController.md) +* [UserController](docs/controllers/UserController.md) + +## Author + + + + + + diff --git a/samples/server/petstore/java-micronaut-server/build.gradle b/samples/server/petstore/java-micronaut-server/build.gradle new file mode 100644 index 000000000000..29b6603f7936 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/build.gradle @@ -0,0 +1,43 @@ +plugins { + id("groovy") + id("com.github.johnrengelman.shadow") version "7.1.1" + id("io.micronaut.application") version "3.1.1" +} + +version = "1.0.0" +group = "org.openapitools" + +repositories { + mavenCentral() +} + +micronaut { + runtime("netty") + testRuntime("spock2") + processing { + incremental(true) + annotations("org.openapitools.*") + } +} + + +dependencies { + annotationProcessor("io.micronaut:micronaut-http-validation") + implementation("io.micronaut:micronaut-http-client") + implementation("io.micronaut:micronaut-runtime") + implementation("io.micronaut:micronaut-validation") + implementation("io.micronaut.reactor:micronaut-reactor") + implementation("io.swagger:swagger-annotations:1.5.9") + runtimeOnly("ch.qos.logback:logback-classic") +} + +// TODO Set the main class +application { + mainClass.set("org.openapitools.Application") +} +java { + sourceCompatibility = JavaVersion.toVersion("1.8") + targetCompatibility = JavaVersion.toVersion("1.8") +} + +graalvmNative.toolchainDetection = false diff --git a/samples/server/petstore/java-micronaut-server/docs/controllers/PetController.md b/samples/server/petstore/java-micronaut-server/docs/controllers/PetController.md new file mode 100644 index 000000000000..da831a4f13b7 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/controllers/PetController.md @@ -0,0 +1,208 @@ +# PetController + +All URIs are relative to `"/v2"` + +The controller class is defined in **[PetController.java](../../src/main/java/org/openapitools/controller/PetController.java)** + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image + + +# **addPet** +```java +Mono PetController.addPet(pet) +``` + +Add a new pet to the store + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**pet** | [**Pet**](../../docs/models/Pet.md) | Pet object that needs to be added to the store | + +### Return type +[**Pet**](../../docs/models/Pet.md) + +### Authorization +* **petstore_auth**, scopes: `write:pets`, `read:pets` + +### HTTP request headers + - **Accepts Content-Type**: `application/json`, `application/xml` + - **Produces Content-Type**: `application/xml`, `application/json` + + +# **deletePet** +```java +Mono PetController.deletePet(petIdapiKey) +``` + +Deletes a pet + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**petId** | `Long` | Pet id to delete | +**apiKey** | `String` | | [optional parameter] + + +### Authorization +* **petstore_auth**, scopes: `write:pets`, `read:pets` + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: Not defined + + +# **findPetsByStatus** +```java +Mono> PetController.findPetsByStatus(status) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**status** | [**List<String>**](../../docs/models/String.md) | Status values that need to be considered for filter | [enum: `available`, `pending`, `sold`] + +### Return type +[**List<Pet>**](../../docs/models/Pet.md) + +### Authorization +* **petstore_auth**, scopes: `read:pets` + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: `application/xml`, `application/json` + + +# **findPetsByTags** +```java +Mono> PetController.findPetsByTags(tags) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**tags** | [**List<String>**](../../docs/models/String.md) | Tags to filter by | + +### Return type +[**List<Pet>**](../../docs/models/Pet.md) + +### Authorization +* **petstore_auth**, scopes: `read:pets` + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: `application/xml`, `application/json` + + +# **getPetById** +```java +Mono PetController.getPetById(petId) +``` + +Find pet by ID + +Returns a single pet + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**petId** | `Long` | ID of pet to return | + +### Return type +[**Pet**](../../docs/models/Pet.md) + +### Authorization +* **api_key** + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: `application/xml`, `application/json` + + +# **updatePet** +```java +Mono PetController.updatePet(pet) +``` + +Update an existing pet + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**pet** | [**Pet**](../../docs/models/Pet.md) | Pet object that needs to be added to the store | + +### Return type +[**Pet**](../../docs/models/Pet.md) + +### Authorization +* **petstore_auth**, scopes: `write:pets`, `read:pets` + +### HTTP request headers + - **Accepts Content-Type**: `application/json`, `application/xml` + - **Produces Content-Type**: `application/xml`, `application/json` + + +# **updatePetWithForm** +```java +Mono PetController.updatePetWithForm(petIdnamestatus) +``` + +Updates a pet in the store with form data + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**petId** | `Long` | ID of pet that needs to be updated | +**name** | `String` | Updated name of the pet | [optional parameter] +**status** | `String` | Updated status of the pet | [optional parameter] + + +### Authorization +* **petstore_auth**, scopes: `write:pets`, `read:pets` + +### HTTP request headers + - **Accepts Content-Type**: `application/x-www-form-urlencoded` + - **Produces Content-Type**: Not defined + + +# **uploadFile** +```java +Mono PetController.uploadFile(petIdadditionalMetadata_file) +``` + +uploads an image + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**petId** | `Long` | ID of pet to update | +**additionalMetadata** | `String` | Additional data to pass to server | [optional parameter] +**_file** | `CompletedFileUpload` | file to upload | [optional parameter] + +### Return type +[**ModelApiResponse**](../../docs/models/ModelApiResponse.md) + +### Authorization +* **petstore_auth**, scopes: `write:pets`, `read:pets` + +### HTTP request headers + - **Accepts Content-Type**: `multipart/form-data` + - **Produces Content-Type**: `application/json` + diff --git a/samples/server/petstore/java-micronaut-server/docs/controllers/StoreController.md b/samples/server/petstore/java-micronaut-server/docs/controllers/StoreController.md new file mode 100644 index 000000000000..0cc9c7f0a207 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/controllers/StoreController.md @@ -0,0 +1,99 @@ +# StoreController + +All URIs are relative to `"/v2"` + +The controller class is defined in **[StoreController.java](../../src/main/java/org/openapitools/controller/StoreController.java)** + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](#placeOrder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```java +Mono StoreController.deleteOrder(orderId) +``` + +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 | Notes +------------- | ------------- | ------------- | ------------- +**orderId** | `String` | ID of the order that needs to be deleted | + + + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: Not defined + + +# **getInventory** +```java +Mono> StoreController.getInventory() +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + + +### Return type +`Map<String, Integer>` + +### Authorization +* **api_key** + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: `application/json` + + +# **getOrderById** +```java +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 + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**orderId** | `Long` | ID of pet that needs to be fetched | + +### Return type +[**Order**](../../docs/models/Order.md) + + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: `application/xml`, `application/json` + + +# **placeOrder** +```java +Mono StoreController.placeOrder(order) +``` + +Place an order for a pet + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**order** | [**Order**](../../docs/models/Order.md) | order placed for purchasing the pet | + +### Return type +[**Order**](../../docs/models/Order.md) + + +### HTTP request headers + - **Accepts Content-Type**: `application/json` + - **Produces Content-Type**: `application/xml`, `application/json` + diff --git a/samples/server/petstore/java-micronaut-server/docs/controllers/UserController.md b/samples/server/petstore/java-micronaut-server/docs/controllers/UserController.md new file mode 100644 index 000000000000..31012f2b441f --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/controllers/UserController.md @@ -0,0 +1,189 @@ +# UserController + +All URIs are relative to `"/v2"` + +The controller class is defined in **[UserController.java](../../src/main/java/org/openapitools/controller/UserController.java)** + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](#updateUser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```java +Mono UserController.createUser(user) +``` + +Create user + +This can only be done by the logged in user. + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**user** | [**User**](../../docs/models/User.md) | Created user object | + + +### Authorization +* **api_key** + +### HTTP request headers + - **Accepts Content-Type**: `application/json` + - **Produces Content-Type**: Not defined + + +# **createUsersWithArrayInput** +```java +Mono UserController.createUsersWithArrayInput(user) +``` + +Creates list of users with given input array + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**user** | [**List<User>**](../../docs/models/User.md) | List of user object | + + +### Authorization +* **api_key** + +### HTTP request headers + - **Accepts Content-Type**: `application/json` + - **Produces Content-Type**: Not defined + + +# **createUsersWithListInput** +```java +Mono UserController.createUsersWithListInput(user) +``` + +Creates list of users with given input array + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**user** | [**List<User>**](../../docs/models/User.md) | List of user object | + + +### Authorization +* **api_key** + +### HTTP request headers + - **Accepts Content-Type**: `application/json` + - **Produces Content-Type**: Not defined + + +# **deleteUser** +```java +Mono UserController.deleteUser(username) +``` + +Delete user + +This can only be done by the logged in user. + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**username** | `String` | The name that needs to be deleted | + + +### Authorization +* **api_key** + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: Not defined + + +# **getUserByName** +```java +Mono UserController.getUserByName(username) +``` + +Get user by user name + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**username** | `String` | The name that needs to be fetched. Use user1 for testing. | + +### Return type +[**User**](../../docs/models/User.md) + + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: `application/xml`, `application/json` + + +# **loginUser** +```java +Mono UserController.loginUser(usernamepassword) +``` + +Logs user into the system + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**username** | `String` | The user name for login | +**password** | `String` | The password for login in clear text | + +### Return type +`String` + + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: `application/xml`, `application/json` + + +# **logoutUser** +```java +Mono UserController.logoutUser() +``` + +Logs out current logged in user session + + + +### Authorization +* **api_key** + +### HTTP request headers + - **Accepts Content-Type**: Not defined + - **Produces Content-Type**: Not defined + + +# **updateUser** +```java +Mono UserController.updateUser(usernameuser) +``` + +Updated user + +This can only be done by the logged in user. + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**username** | `String` | name that need to be deleted | +**user** | [**User**](../../docs/models/User.md) | Updated user object | + + +### Authorization +* **api_key** + +### HTTP request headers + - **Accepts Content-Type**: `application/json` + - **Produces Content-Type**: Not defined + diff --git a/samples/server/petstore/java-micronaut-server/docs/models/Category.md b/samples/server/petstore/java-micronaut-server/docs/models/Category.md new file mode 100644 index 000000000000..65cdd608adad --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/models/Category.md @@ -0,0 +1,18 @@ + + +# Category + +A category for a pet + +The class is defined in **[Category.java](../../src/main/java/org/openapitools/model/Category.java)** + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | `Long` | | [optional property] +**name** | `String` | | [optional property] + + + + diff --git a/samples/server/petstore/java-micronaut-server/docs/models/ModelApiResponse.md b/samples/server/petstore/java-micronaut-server/docs/models/ModelApiResponse.md new file mode 100644 index 000000000000..be3226fa260c --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/models/ModelApiResponse.md @@ -0,0 +1,20 @@ + + +# ModelApiResponse + +Describes the result of uploading an image resource + +The class is defined in **[ModelApiResponse.java](../../src/main/java/org/openapitools/model/ModelApiResponse.java)** + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | `Integer` | | [optional property] +**type** | `String` | | [optional property] +**message** | `String` | | [optional property] + + + + + diff --git a/samples/server/petstore/java-micronaut-server/docs/models/Order.md b/samples/server/petstore/java-micronaut-server/docs/models/Order.md new file mode 100644 index 000000000000..b514feb22d00 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/models/Order.md @@ -0,0 +1,33 @@ + + +# Order + +An order for a pets from the pet store + +The class is defined in **[Order.java](../../src/main/java/org/openapitools/model/Order.java)** + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | `Long` | | [optional property] +**petId** | `Long` | | [optional property] +**quantity** | `Integer` | | [optional property] +**shipDate** | `LocalDateTime` | | [optional property] +**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional property] +**complete** | `Boolean` | | [optional property] + + + + + +## StatusEnum + +Name | Value +---- | ----- +PLACED | `"placed"` +APPROVED | `"approved"` +DELIVERED | `"delivered"` + + + diff --git a/samples/server/petstore/java-micronaut-server/docs/models/Pet.md b/samples/server/petstore/java-micronaut-server/docs/models/Pet.md new file mode 100644 index 000000000000..9f8876b0df55 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/models/Pet.md @@ -0,0 +1,33 @@ + + +# Pet + +A pet for sale in the pet store + +The class is defined in **[Pet.java](../../src/main/java/org/openapitools/model/Pet.java)** + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | `Long` | | [optional property] +**category** | [`Category`](Category.md) | | [optional property] +**name** | `String` | | +**photoUrls** | `List<String>` | | +**tags** | [`List<Tag>`](Tag.md) | | [optional property] +**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional property] + + + + + + +## StatusEnum + +Name | Value +---- | ----- +AVAILABLE | `"available"` +PENDING | `"pending"` +SOLD | `"sold"` + + diff --git a/samples/server/petstore/java-micronaut-server/docs/models/Tag.md b/samples/server/petstore/java-micronaut-server/docs/models/Tag.md new file mode 100644 index 000000000000..557c72572a25 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/models/Tag.md @@ -0,0 +1,18 @@ + + +# Tag + +A tag for a pet + +The class is defined in **[Tag.java](../../src/main/java/org/openapitools/model/Tag.java)** + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | `Long` | | [optional property] +**name** | `String` | | [optional property] + + + + diff --git a/samples/server/petstore/java-micronaut-server/docs/models/User.md b/samples/server/petstore/java-micronaut-server/docs/models/User.md new file mode 100644 index 000000000000..dac90ef84e7c --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/docs/models/User.md @@ -0,0 +1,30 @@ + + +# User + +A User who is purchasing from the pet store + +The class is defined in **[User.java](../../src/main/java/org/openapitools/model/User.java)** + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | `Long` | | [optional property] +**username** | `String` | | [optional property] +**firstName** | `String` | | [optional property] +**lastName** | `String` | | [optional property] +**email** | `String` | | [optional property] +**password** | `String` | | [optional property] +**phone** | `String` | | [optional property] +**userStatus** | `Integer` | User Status | [optional property] + + + + + + + + + + diff --git a/samples/server/petstore/java-micronaut-server/gradle.properties b/samples/server/petstore/java-micronaut-server/gradle.properties new file mode 100644 index 000000000000..70b9dde78f14 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/gradle.properties @@ -0,0 +1 @@ +micronautVersion=3.2.6 \ No newline at end of file diff --git a/samples/server/petstore/java-micronaut-server/gradle/wrapper/gradle-wrapper.jar b/samples/server/petstore/java-micronaut-server/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/samples/server/petstore/java-micronaut-server/gradle/wrapper/gradle-wrapper.properties b/samples/server/petstore/java-micronaut-server/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000000..f2e1eb1fd471 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip diff --git a/samples/server/petstore/java-micronaut-server/gradlew b/samples/server/petstore/java-micronaut-server/gradlew new file mode 100644 index 000000000000..4f906e0c811f --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/samples/server/petstore/java-micronaut-server/gradlew.bat b/samples/server/petstore/java-micronaut-server/gradlew.bat new file mode 100644 index 000000000000..107acd32c4e6 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/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="-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/server/petstore/java-micronaut-server/mvnw b/samples/server/petstore/java-micronaut-server/mvnw new file mode 100644 index 000000000000..a16b5431b4c3 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + 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 + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + 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 + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/samples/server/petstore/java-micronaut-server/mvnw.bat b/samples/server/petstore/java-micronaut-server/mvnw.bat new file mode 100644 index 000000000000..c8d43372c986 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/mvnw.bat @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. 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, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/samples/server/petstore/java-micronaut-server/pom.xml b/samples/server/petstore/java-micronaut-server/pom.xml new file mode 100644 index 000000000000..71aee310caa4 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/pom.xml @@ -0,0 +1,159 @@ + + + 4.0.0 + org.openapitools + petstore-micronaut-server + 1.0.0 + ${packaging} + + + io.micronaut + micronaut-parent + 3.2.6 + + + + jar + 1.8 + + + 3.2.6 + org.openapitools.Application + netty + 1.5.21 + + + + + central + https://repo.maven.apache.org/maven2 + + + + + + io.micronaut + micronaut-inject + compile + + + io.micronaut + micronaut-validation + compile + + + io.micronaut + micronaut-inject-groovy + test + + + org.spockframework + spock-core + test + + + org.codehaus.groovy + groovy-all + + + + + io.micronaut.test + micronaut-test-spock + test + + + io.micronaut + micronaut-http-client + compile + + + io.micronaut + micronaut-http-server-netty + compile + + + io.micronaut + micronaut-runtime + compile + + + io.micronaut.reactor + micronaut-reactor + compile + + + ch.qos.logback + logback-classic + runtime + + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + + + + + + io.micronaut.build + micronaut-maven-plugin + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + + + io.micronaut + micronaut-http-validation + ${micronaut.version} + + + + -Amicronaut.processing.group=org.openapitools + -Amicronaut.processing.module=petstore-micronaut-server + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*Spec.* + **/*Test.* + + + + + + org.codehaus.gmavenplus + gmavenplus-plugin + 1.9.0 + + + + addSources + generateStubs + compile + removeStubs + addTestSources + generateTestStubs + compileTests + removeTestStubs + + + + + + + + diff --git a/samples/server/petstore/java-micronaut-server/settings.gradle b/samples/server/petstore/java-micronaut-server/settings.gradle new file mode 100644 index 000000000000..f96ffa51ae27 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "petstore-micronaut-server" \ No newline at end of file diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/Application.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/Application.java new file mode 100644 index 000000000000..54b6adc71ecb --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/Application.java @@ -0,0 +1,9 @@ +package org.openapitools; + +import io.micronaut.runtime.Micronaut; + +public class Application { + public static void main(String[] args) { + Micronaut.run(Application.class, args); + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java new file mode 100644 index 000000000000..330ee3b70747 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java @@ -0,0 +1,286 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.controller; + +import io.micronaut.http.annotation.*; +import io.micronaut.core.annotation.Nullable; +import io.micronaut.core.convert.format.Format; +import reactor.core.publisher.Mono; +import io.micronaut.http.multipart.CompletedFileUpload; +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.annotations.*; + +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Controller("${context-path}") +public class PetController { + /** + * Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store (required) + * @return Pet + */ + @ApiOperation( + value = "Add a new pet to the store", + nickname = "addPet", + response = Pet.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 405, message = "Invalid input")}) + @Post(uri="/pet") + @Produces(value = {"application/xml", "application/json"}) + @Consumes(value = {"application/json", "application/xml"}) + public Mono addPet( + @Body @NotNull @Valid Pet pet + ) { + // TODO implement addPet() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + */ + @ApiOperation( + value = "Deletes a pet", + nickname = "deletePet", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid pet value")}) + @Delete(uri="/pet/{petId}") + @Produces(value = {}) + public Mono deletePet( + @PathVariable(value="petId") @NotNull Long petId, + @Header(value="api_key") @Nullable String apiKey + ) { + // TODO implement deletePet() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return List<Pet> + */ + @ApiOperation( + value = "Finds Pets by status", + nickname = "findPetsByStatus", + notes = "Multiple status values can be provided with comma separated strings", + response = Pet.class, + responseContainer = "array", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), + @ApiResponse(code = 400, message = "Invalid status value")}) + @Get(uri="/pet/findByStatus") + @Produces(value = {"application/xml", "application/json"}) + public Mono> findPetsByStatus( + @QueryValue(value="status") @NotNull List status + ) { + // TODO implement findPetsByStatus() body; + Mono> result = Mono.empty(); + return result; + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return List<Pet> + */ + @ApiOperation( + value = "Finds Pets by tags", + nickname = "findPetsByTags", + notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + response = Pet.class, + responseContainer = "array", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), + @ApiResponse(code = 400, message = "Invalid tag value")}) + @Get(uri="/pet/findByTags") + @Produces(value = {"application/xml", "application/json"}) + public Mono> findPetsByTags( + @QueryValue(value="tags") @NotNull List tags + ) { + // TODO implement findPetsByTags() body; + Mono> result = Mono.empty(); + return result; + } + + /** + * Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return Pet + */ + @ApiOperation( + value = "Find pet by ID", + nickname = "getPetById", + notes = "Returns a single pet", + response = Pet.class, + authorizations = { + @Authorization(value = "api_key") + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found")}) + @Get(uri="/pet/{petId}") + @Produces(value = {"application/xml", "application/json"}) + public Mono getPetById( + @PathVariable(value="petId") @NotNull Long petId + ) { + // TODO implement getPetById() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Update an existing pet + * + * @param pet Pet object that needs to be added to the store (required) + * @return Pet + */ + @ApiOperation( + value = "Update an existing pet", + nickname = "updatePet", + response = Pet.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception")}) + @Put(uri="/pet") + @Produces(value = {"application/xml", "application/json"}) + @Consumes(value = {"application/json", "application/xml"}) + public Mono updatePet( + @Body @NotNull @Valid Pet pet + ) { + // TODO implement updatePet() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + */ + @ApiOperation( + value = "Updates a pet in the store with form data", + nickname = "updatePetWithForm", + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input")}) + @Post(uri="/pet/{petId}") + @Produces(value = {}) + @Consumes(value = {"application/x-www-form-urlencoded"}) + public Mono updatePetWithForm( + @PathVariable(value="petId") @NotNull Long petId, + @Nullable String name, + @Nullable String status + ) { + // TODO implement updatePetWithForm() body; + Mono result = Mono.empty(); + return result; + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param _file file to upload (optional) + * @return ModelApiResponse + */ + @ApiOperation( + value = "uploads an image", + nickname = "uploadFile", + response = ModelApiResponse.class, + authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class)}) + @Post(uri="/pet/{petId}/uploadImage") + @Produces(value = {"application/json"}) + @Consumes(value = {"multipart/form-data"}) + public Mono uploadFile( + @PathVariable(value="petId") @NotNull Long petId, + @Nullable String additionalMetadata, + @Nullable CompletedFileUpload _file + ) { + // TODO implement uploadFile() body; + Mono result = Mono.empty(); + return result; + } +} 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 new file mode 100644 index 000000000000..3ae60165ca03 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java @@ -0,0 +1,136 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.controller; + +import io.micronaut.http.annotation.*; +import io.micronaut.core.annotation.Nullable; +import io.micronaut.core.convert.format.Format; +import reactor.core.publisher.Mono; +import org.openapitools.model.Order; +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.annotations.*; + +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Controller("${context-path}") +public class StoreController { + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + */ + @ApiOperation( + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + authorizations = {}, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found")}) + @Delete(uri="/store/order/{orderId}") + @Produces(value = {}) + public Mono deleteOrder( + @PathVariable(value="orderId") @NotNull String orderId + ) { + // TODO implement deleteOrder() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return Map<String, Integer> + */ + @ApiOperation( + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "map", + authorizations = { + @Authorization(value = "api_key") + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map")}) + @Get(uri="/store/inventory") + @Produces(value = {"application/json"}) + public Mono> getInventory() { + // TODO implement getInventory() body; + Mono> result = Mono.empty(); + return result; + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return Order + */ + @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, + authorizations = {}, + tags={}) + @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")}) + @Get(uri="/store/order/{orderId}") + @Produces(value = {"application/xml", "application/json"}) + public Mono getOrderById( + @PathVariable(value="orderId") @NotNull @Min(1L) @Max(5L) Long orderId + ) { + // TODO implement getOrderById() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Place an order for a pet + * + * @param order order placed for purchasing the pet (required) + * @return Order + */ + @ApiOperation( + value = "Place an order for a pet", + nickname = "placeOrder", + response = Order.class, + authorizations = {}, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order")}) + @Post(uri="/store/order") + @Produces(value = {"application/xml", "application/json"}) + @Consumes(value = {"application/json"}) + public Mono placeOrder( + @Body @NotNull @Valid Order order + ) { + // TODO implement placeOrder() body; + Mono result = Mono.empty(); + return result; + } +} diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java new file mode 100644 index 000000000000..78adec91467b --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java @@ -0,0 +1,240 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.controller; + +import io.micronaut.http.annotation.*; +import io.micronaut.core.annotation.Nullable; +import io.micronaut.core.convert.format.Format; +import reactor.core.publisher.Mono; +import java.time.LocalDateTime; +import org.openapitools.model.User; +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.annotations.*; + +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Controller("${context-path}") +public class UserController { + /** + * Create user + * This can only be done by the logged in user. + * + * @param user Created user object (required) + */ + @ApiOperation( + value = "Create user", + nickname = "createUser", + notes = "This can only be done by the logged in user.", + authorizations = { + @Authorization(value = "api_key") + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation")}) + @Post(uri="/user") + @Produces(value = {}) + @Consumes(value = {"application/json"}) + public Mono createUser( + @Body @NotNull @Valid User user + ) { + // TODO implement createUser() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + */ + @ApiOperation( + value = "Creates list of users with given input array", + nickname = "createUsersWithArrayInput", + authorizations = { + @Authorization(value = "api_key") + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation")}) + @Post(uri="/user/createWithArray") + @Produces(value = {}) + @Consumes(value = {"application/json"}) + public Mono createUsersWithArrayInput( + @Body @NotNull List user + ) { + // TODO implement createUsersWithArrayInput() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + */ + @ApiOperation( + value = "Creates list of users with given input array", + nickname = "createUsersWithListInput", + authorizations = { + @Authorization(value = "api_key") + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation")}) + @Post(uri="/user/createWithList") + @Produces(value = {}) + @Consumes(value = {"application/json"}) + public Mono createUsersWithListInput( + @Body @NotNull List user + ) { + // TODO implement createUsersWithListInput() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + */ + @ApiOperation( + value = "Delete user", + nickname = "deleteUser", + notes = "This can only be done by the logged in user.", + authorizations = { + @Authorization(value = "api_key") + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found")}) + @Delete(uri="/user/{username}") + @Produces(value = {}) + public Mono deleteUser( + @PathVariable(value="username") @NotNull String username + ) { + // TODO implement deleteUser() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return User + */ + @ApiOperation( + value = "Get user by user name", + nickname = "getUserByName", + response = User.class, + authorizations = {}, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found")}) + @Get(uri="/user/{username}") + @Produces(value = {"application/xml", "application/json"}) + public Mono getUserByName( + @PathVariable(value="username") @NotNull String username + ) { + // TODO implement getUserByName() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return String + */ + @ApiOperation( + value = "Logs user into the system", + nickname = "loginUser", + response = String.class, + authorizations = {}, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied")}) + @Get(uri="/user/login") + @Produces(value = {"application/xml", "application/json"}) + public Mono loginUser( + @QueryValue(value="username") @NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @QueryValue(value="password") @NotNull String password + ) { + // TODO implement loginUser() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Logs out current logged in user session + * + */ + @ApiOperation( + value = "Logs out current logged in user session", + nickname = "logoutUser", + authorizations = { + @Authorization(value = "api_key") + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation")}) + @Get(uri="/user/logout") + @Produces(value = {}) + public Mono logoutUser() { + // TODO implement logoutUser() body; + Mono result = Mono.empty(); + return result; + } + + /** + * Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + */ + @ApiOperation( + value = "Updated user", + nickname = "updateUser", + notes = "This can only be done by the logged in user.", + authorizations = { + @Authorization(value = "api_key") + }, + tags={}) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found")}) + @Put(uri="/user/{username}") + @Produces(value = {}) + @Consumes(value = {"application/json"}) + public Mono updateUser( + @PathVariable(value="username") @NotNull String username, + @Body @NotNull @Valid User user + ) { + // TODO implement updateUser() body; + Mono result = Mono.empty(); + return result; + } +} diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..e6a3f7e9432a --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java @@ -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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.*; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import io.micronaut.core.annotation.*; +import javax.annotation.Generated; + +/** + * A category for a pet + */ +@ApiModel(description = "A category for a pet") +@JsonPropertyOrder({ + Category.JSON_PROPERTY_ID, + Category.JSON_PROPERTY_NAME +}) +@JsonTypeName("Category") +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Introspected +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 + **/ + @Nullable + @ApiModelProperty(value = "") + @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 + **/ + @Nullable + @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @ApiModelProperty(value = "") + @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/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..6e4b2b0834f4 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,161 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.*; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import io.micronaut.core.annotation.*; +import javax.annotation.Generated; + +/** + * Describes the result of uploading an image resource + */ +@ApiModel(description = "Describes the result of uploading an image resource") +@JsonPropertyOrder({ + ModelApiResponse.JSON_PROPERTY_CODE, + ModelApiResponse.JSON_PROPERTY_TYPE, + ModelApiResponse.JSON_PROPERTY_MESSAGE +}) +@JsonTypeName("ApiResponse") +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Introspected +public class ModelApiResponse { + public static final String JSON_PROPERTY_CODE = "code"; + private Integer code; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public ModelApiResponse() { + } + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..2ef8aa828587 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,285 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.LocalDateTime; +import com.fasterxml.jackson.annotation.*; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import io.micronaut.core.annotation.*; +import javax.annotation.Generated; + +/** + * An order for a pets from the pet store + */ +@ApiModel(description = "An order for a pets from the pet store") +@JsonPropertyOrder({ + Order.JSON_PROPERTY_ID, + Order.JSON_PROPERTY_PET_ID, + Order.JSON_PROPERTY_QUANTITY, + Order.JSON_PROPERTY_SHIP_DATE, + Order.JSON_PROPERTY_STATUS, + Order.JSON_PROPERTY_COMPLETE +}) +@JsonTypeName("Order") +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Introspected +public class Order { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_PET_ID = "petId"; + private Long petId; + + public static final String JSON_PROPERTY_QUANTITY = "quantity"; + private Integer quantity; + + public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; + private LocalDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + APPROVED("approved"), + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_COMPLETE = "complete"; + private Boolean complete = false; + + public Order() { + } + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @Nullable + @ApiModelProperty(value = "") + @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 Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPetId() { + return petId; + } + + @JsonProperty(JSON_PROPERTY_PET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_QUANTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getQuantity() { + return quantity; + } + + @JsonProperty(JSON_PROPERTY_QUANTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(LocalDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SHIP_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + public LocalDateTime getShipDate() { + return shipDate; + } + + @JsonProperty(JSON_PROPERTY_SHIP_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") + public void setShipDate(LocalDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + **/ + @Nullable + @ApiModelProperty(value = "Order Status") + @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; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getComplete() { + return complete; + } + + @JsonProperty(JSON_PROPERTY_COMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..a2625f7d89a2 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,302 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import com.fasterxml.jackson.annotation.*; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import io.micronaut.core.annotation.*; +import javax.annotation.Generated; + +/** + * A pet for sale in the pet store + */ +@ApiModel(description = "A pet for sale in the pet store") +@JsonPropertyOrder({ + Pet.JSON_PROPERTY_ID, + Pet.JSON_PROPERTY_CATEGORY, + Pet.JSON_PROPERTY_NAME, + Pet.JSON_PROPERTY_PHOTO_URLS, + Pet.JSON_PROPERTY_TAGS, + Pet.JSON_PROPERTY_STATUS +}) +@JsonTypeName("Pet") +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Introspected +public class Pet { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private Category category; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; + private 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(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @Nullable + @ApiModelProperty(value = "") + @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 category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @Valid + @Nullable + @ApiModelProperty(value = "") + @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 name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @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 photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @NotNull + @ApiModelProperty(required = true, value = "") + @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 + **/ + @Nullable + @ApiModelProperty(value = "") + @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 + **/ + @Nullable + @ApiModelProperty(value = "pet status in the store") + @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.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..830c5ded133e --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,132 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.*; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import io.micronaut.core.annotation.*; +import javax.annotation.Generated; + +/** + * A tag for a pet + */ +@ApiModel(description = "A tag for a pet") +@JsonPropertyOrder({ + Tag.JSON_PROPERTY_ID, + Tag.JSON_PROPERTY_NAME +}) +@JsonTypeName("Tag") +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Introspected +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 + **/ + @Nullable + @ApiModelProperty(value = "") + @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 + **/ + @Nullable + @ApiModelProperty(value = "") + @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/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..057e2f19d912 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,306 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.model; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.*; + +import javax.validation.constraints.*; +import javax.validation.Valid; +import io.micronaut.core.annotation.*; +import javax.annotation.Generated; + +/** + * A User who is purchasing from the pet store + */ +@ApiModel(description = "A User who is purchasing from the pet store") +@JsonPropertyOrder({ + User.JSON_PROPERTY_ID, + User.JSON_PROPERTY_USERNAME, + User.JSON_PROPERTY_FIRST_NAME, + User.JSON_PROPERTY_LAST_NAME, + User.JSON_PROPERTY_EMAIL, + User.JSON_PROPERTY_PASSWORD, + User.JSON_PROPERTY_PHONE, + User.JSON_PROPERTY_USER_STATUS +}) +@JsonTypeName("User") +@Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") +@Introspected +public class User { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + private String firstName; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + private String lastName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private String phone; + + public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; + private Integer userStatus; + + public User() { + } + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @Nullable + @ApiModelProperty(value = "") + @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 User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @Nullable + @ApiModelProperty(value = "") + @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 User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFirstName() { + return firstName; + } + + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastName() { + return lastName; + } + + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPassword() { + return password; + } + + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPhone() { + return phone; + } + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + **/ + @Nullable + @ApiModelProperty(value = "User Status") + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getUserStatus() { + return userStatus; + } + + @JsonProperty(JSON_PROPERTY_USER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/main/resources/application.yml b/samples/server/petstore/java-micronaut-server/src/main/resources/application.yml new file mode 100644 index 000000000000..932949d0b39c --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/resources/application.yml @@ -0,0 +1,18 @@ +context-path: "/v2/" + +micronaut: + application: + name: petstore-micronaut-server + server: + port: 8080 + security: + # authentication: bearer | cookie | session | idtoken + +jackson: + serialization: + writeEnumsUsingToString: true + writeDatesAsTimestamps: false + deserialization: + readEnumsUsingToString: true + failOnUnknownProperties: false + failOnInvalidSubtype: false diff --git a/samples/server/petstore/java-micronaut-server/src/main/resources/logback.xml b/samples/server/petstore/java-micronaut-server/src/main/resources/logback.xml new file mode 100644 index 000000000000..82218708264f --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/main/resources/logback.xml @@ -0,0 +1,15 @@ + + + + false + + + %cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n + + + + + + + diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/PetControllerSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/PetControllerSpec.groovy new file mode 100644 index 000000000000..1a42ac43aa21 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/PetControllerSpec.groovy @@ -0,0 +1,398 @@ +package org.openapitools.controller + +import io.micronaut.http.multipart.CompletedFileUpload +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import io.micronaut.http.client.HttpClient +import io.micronaut.http.client.annotation.Client +import io.micronaut.runtime.server.EmbeddedServer +import io.micronaut.http.HttpStatus +import io.micronaut.http.HttpRequest +import io.micronaut.http.MutableHttpRequest; +import io.micronaut.http.HttpResponse +import io.micronaut.http.MediaType +import io.micronaut.http.uri.UriTemplate +import io.micronaut.http.cookie.Cookie +import io.micronaut.http.client.multipart.MultipartBody +import io.micronaut.core.type.Argument +import jakarta.inject.Inject +import spock.lang.Specification +import spock.lang.Ignore +import reactor.core.publisher.Mono +import java.io.File +import java.io.FileReader + + +/** + * Controller tests for PetController + */ +@MicronautTest +class PetControllerSpec extends Specification { + + @Inject + EmbeddedServer server + + @Inject + @Client('${context-path}') + HttpClient client + + @Inject + PetController controller + + /** + * This test is used to validate the implementation of addPet() method + * + * The method should: Add a new pet to the store + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'addPet() method test'() { + given: + Pet pet = new Pet('doggie', ['example']) + + when: + Pet result = controller.addPet(pet).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/pet' to the features of addPet() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'addPet() test with client through path /pet'() { + given: + Pet body = new Pet('doggie', ['example']) + var uri = UriTemplate.of('/pet').expand([:]) + MutableHttpRequest request = HttpRequest.POST(uri, body) + .contentType('application/json') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request, Pet.class); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of deletePet() method + * + * The method should: Deletes a pet + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'deletePet() method test'() { + given: + Long petId = 56L + String apiKey = 'example' + + when: + controller.deletePet(petId, apiKey).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/pet/{petId}' to the features of deletePet() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'deletePet() test with client through path /pet/{petId}'() { + given: + var uri = UriTemplate.of('/pet/{petId}').expand([ + // Fill in the path variables + 'petId': 56L + ]) + MutableHttpRequest request = HttpRequest.DELETE(uri) + .accept('application/json') + .header('api_key', 'example') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of findPetsByStatus() method + * + * The method should: Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'findPetsByStatus() method test'() { + given: + List status = ['available'] + + when: + List result = controller.findPetsByStatus(status).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/pet/findByStatus' to the features of findPetsByStatus() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'findPetsByStatus() test with client through path /pet/findByStatus'() { + given: + var uri = UriTemplate.of('/pet/findByStatus').expand([:]) + MutableHttpRequest request = HttpRequest.GET(uri) + .accept('application/json') + request.getParameters() + .add('status', ['available'].toString()) // The query parameter format should be csv + + when: + HttpResponse response = client.toBlocking().exchange(request, Argument.of(List.class, Pet.class)); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of findPetsByTags() method + * + * The method should: Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'findPetsByTags() method test'() { + given: + List tags = ['example'] + + when: + List result = controller.findPetsByTags(tags).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/pet/findByTags' to the features of findPetsByTags() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'findPetsByTags() test with client through path /pet/findByTags'() { + given: + var uri = UriTemplate.of('/pet/findByTags').expand([:]) + MutableHttpRequest request = HttpRequest.GET(uri) + .accept('application/json') + request.getParameters() + .add('tags', ['example'].toString()) // The query parameter format should be csv + + when: + HttpResponse response = client.toBlocking().exchange(request, Argument.of(List.class, Pet.class)); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of getPetById() method + * + * The method should: Find pet by ID + * + * Returns a single pet + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'getPetById() method test'() { + given: + Long petId = 56L + + when: + Pet result = controller.getPetById(petId).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/pet/{petId}' to the features of getPetById() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'getPetById() test with client through path /pet/{petId}'() { + given: + var uri = UriTemplate.of('/pet/{petId}').expand([ + // Fill in the path variables + 'petId': 56L + ]) + MutableHttpRequest request = HttpRequest.GET(uri) + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request, Pet.class); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of updatePet() method + * + * The method should: Update an existing pet + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'updatePet() method test'() { + given: + Pet pet = new Pet('doggie', ['example']) + + when: + Pet result = controller.updatePet(pet).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/pet' to the features of updatePet() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'updatePet() test with client through path /pet'() { + given: + Pet body = new Pet('doggie', ['example']) + var uri = UriTemplate.of('/pet').expand([:]) + MutableHttpRequest request = HttpRequest.PUT(uri, body) + .contentType('application/json') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request, Pet.class); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of updatePetWithForm() method + * + * The method should: Updates a pet in the store with form data + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'updatePetWithForm() method test'() { + given: + Long petId = 56L + String name = 'example' + String status = 'example' + + when: + controller.updatePetWithForm(petId, name, status).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/pet/{petId}' to the features of updatePetWithForm() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'updatePetWithForm() test with client through path /pet/{petId}'() { + given: + var form = [ + // Fill in the body form parameters + 'name': 'example', + 'status': 'example' + ] + var uri = UriTemplate.of('/pet/{petId}').expand([ + // Fill in the path variables + 'petId': 56L + ]) + MutableHttpRequest request = HttpRequest.POST(uri, form) + .contentType('application/x-www-form-urlencoded') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of uploadFile() method + * + * The method should: uploads an image + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'uploadFile() method test'() { + given: + Long petId = 56L + String additionalMetadata = 'example' + CompletedFileUpload file = null + + when: + ModelApiResponse result = controller.uploadFile(petId, additionalMetadata, file).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/pet/{petId}/uploadImage' to the features of uploadFile() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'uploadFile() test with client through path /pet/{petId}/uploadImage'() { + given: + var body = MultipartBody.builder() // Create multipart body + .addPart('additionalMetadata', 'example') + .addPart('file', 'filename', File.createTempFile('test', '.tmp')) + .build() + var uri = UriTemplate.of('/pet/{petId}/uploadImage').expand([ + // Fill in the path variables + 'petId': 56L + ]) + MutableHttpRequest request = HttpRequest.POST(uri, body) + .contentType('multipart/form-data') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request, ModelApiResponse.class); + + then: + response.status() == HttpStatus.OK + } + +} 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 new file mode 100644 index 000000000000..4af6ebfface9 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/StoreControllerSpec.groovy @@ -0,0 +1,210 @@ +package org.openapitools.controller + +import org.openapitools.model.Order +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import io.micronaut.http.client.HttpClient +import io.micronaut.http.client.annotation.Client +import io.micronaut.runtime.server.EmbeddedServer +import io.micronaut.http.HttpStatus +import io.micronaut.http.HttpRequest +import io.micronaut.http.MutableHttpRequest; +import io.micronaut.http.HttpResponse +import io.micronaut.http.MediaType +import io.micronaut.http.uri.UriTemplate +import io.micronaut.http.cookie.Cookie +import io.micronaut.http.client.multipart.MultipartBody +import io.micronaut.core.type.Argument +import jakarta.inject.Inject +import spock.lang.Specification +import spock.lang.Ignore +import reactor.core.publisher.Mono +import java.io.File +import java.io.FileReader + + +/** + * Controller tests for StoreController + */ +@MicronautTest +class StoreControllerSpec extends Specification { + + @Inject + EmbeddedServer server + + @Inject + @Client('${context-path}') + HttpClient client + + @Inject + StoreController controller + + /** + * This test is used to validate the implementation of deleteOrder() method + * + * The method should: Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'deleteOrder() method test'() { + given: + String orderId = 'example' + + when: + controller.deleteOrder(orderId).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/store/order/{orderId}' to the features of deleteOrder() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'deleteOrder() test with client through path /store/order/{orderId}'() { + given: + var uri = UriTemplate.of('/store/order/{orderId}').expand([ + // Fill in the path variables + 'orderId': 'example' + ]) + MutableHttpRequest request = HttpRequest.DELETE(uri) + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of getInventory() method + * + * The method should: Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'getInventory() method test'() { + given: + + when: + Map result = controller.getInventory().block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/store/inventory' to the features of getInventory() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'getInventory() test with client through path /store/inventory'() { + given: + var uri = UriTemplate.of('/store/inventory').expand([:]) + MutableHttpRequest request = HttpRequest.GET(uri) + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request, Argument.of(Map.class, String.class, Integer.class)); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of getOrderById() method + * + * The method should: Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'getOrderById() method test'() { + given: + Long orderId = 56L + + when: + Order result = controller.getOrderById(orderId).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/store/order/{orderId}' to the features of getOrderById() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'getOrderById() test with client through path /store/order/{orderId}'() { + given: + var uri = UriTemplate.of('/store/order/{orderId}').expand([ + // Fill in the path variables + 'orderId': 56L + ]) + MutableHttpRequest request = HttpRequest.GET(uri) + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request, Order.class); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of placeOrder() method + * + * The method should: Place an order for a pet + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'placeOrder() method test'() { + given: + Order order = new Order() + + when: + Order result = controller.placeOrder(order).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/store/order' to the features of placeOrder() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'placeOrder() test with client through path /store/order'() { + given: + Order body = new Order() + var uri = UriTemplate.of('/store/order').expand([:]) + MutableHttpRequest request = HttpRequest.POST(uri, body) + .contentType('application/json') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request, Order.class); + + then: + response.status() == HttpStatus.OK + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/UserControllerSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/UserControllerSpec.groovy new file mode 100644 index 000000000000..59940a3b5a50 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/UserControllerSpec.groovy @@ -0,0 +1,381 @@ +package org.openapitools.controller + +import java.time.LocalDateTime +import org.openapitools.model.User +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import io.micronaut.http.client.HttpClient +import io.micronaut.http.client.annotation.Client +import io.micronaut.runtime.server.EmbeddedServer +import io.micronaut.http.HttpStatus +import io.micronaut.http.HttpRequest +import io.micronaut.http.MutableHttpRequest; +import io.micronaut.http.HttpResponse +import io.micronaut.http.MediaType +import io.micronaut.http.uri.UriTemplate +import io.micronaut.http.cookie.Cookie +import io.micronaut.http.client.multipart.MultipartBody +import io.micronaut.core.type.Argument +import jakarta.inject.Inject +import spock.lang.Specification +import spock.lang.Ignore +import reactor.core.publisher.Mono +import java.io.File +import java.io.FileReader + + +/** + * Controller tests for UserController + */ +@MicronautTest +class UserControllerSpec extends Specification { + + @Inject + EmbeddedServer server + + @Inject + @Client('${context-path}') + HttpClient client + + @Inject + UserController controller + + /** + * This test is used to validate the implementation of createUser() method + * + * The method should: Create user + * + * This can only be done by the logged in user. + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'createUser() method test'() { + given: + User user = new User() + + when: + controller.createUser(user).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/user' to the features of createUser() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'createUser() test with client through path /user'() { + given: + User body = new User() + var uri = UriTemplate.of('/user').expand([:]) + MutableHttpRequest request = HttpRequest.POST(uri, body) + .contentType('application/json') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of createUsersWithArrayInput() method + * + * The method should: Creates list of users with given input array + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'createUsersWithArrayInput() method test'() { + given: + List user = [] + + when: + controller.createUsersWithArrayInput(user).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/user/createWithArray' to the features of createUsersWithArrayInput() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'createUsersWithArrayInput() test with client through path /user/createWithArray'() { + given: + List body = [] + var uri = UriTemplate.of('/user/createWithArray').expand([:]) + MutableHttpRequest request = HttpRequest.POST(uri, body) + .contentType('application/json') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of createUsersWithListInput() method + * + * The method should: Creates list of users with given input array + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'createUsersWithListInput() method test'() { + given: + List user = [] + + when: + controller.createUsersWithListInput(user).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/user/createWithList' to the features of createUsersWithListInput() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'createUsersWithListInput() test with client through path /user/createWithList'() { + given: + List body = [] + var uri = UriTemplate.of('/user/createWithList').expand([:]) + MutableHttpRequest request = HttpRequest.POST(uri, body) + .contentType('application/json') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of deleteUser() method + * + * The method should: Delete user + * + * This can only be done by the logged in user. + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'deleteUser() method test'() { + given: + String username = 'example' + + when: + controller.deleteUser(username).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/user/{username}' to the features of deleteUser() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'deleteUser() test with client through path /user/{username}'() { + given: + var uri = UriTemplate.of('/user/{username}').expand([ + // Fill in the path variables + 'username': 'example' + ]) + MutableHttpRequest request = HttpRequest.DELETE(uri) + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of getUserByName() method + * + * The method should: Get user by user name + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'getUserByName() method test'() { + given: + String username = 'example' + + when: + User result = controller.getUserByName(username).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/user/{username}' to the features of getUserByName() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'getUserByName() test with client through path /user/{username}'() { + given: + var uri = UriTemplate.of('/user/{username}').expand([ + // Fill in the path variables + 'username': 'example' + ]) + MutableHttpRequest request = HttpRequest.GET(uri) + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request, User.class); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of loginUser() method + * + * The method should: Logs user into the system + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'loginUser() method test'() { + given: + String username = 'example' + String password = 'example' + + when: + String result = controller.loginUser(username, password).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/user/login' to the features of loginUser() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'loginUser() test with client through path /user/login'() { + given: + var uri = UriTemplate.of('/user/login').expand([:]) + MutableHttpRequest request = HttpRequest.GET(uri) + .accept('application/json') + request.getParameters() + .add('username', 'example') + .add('password', 'example') + + when: + HttpResponse response = client.toBlocking().exchange(request, String.class); + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of logoutUser() method + * + * The method should: Logs out current logged in user session + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'logoutUser() method test'() { + given: + + when: + controller.logoutUser().block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/user/logout' to the features of logoutUser() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'logoutUser() test with client through path /user/logout'() { + given: + var uri = UriTemplate.of('/user/logout').expand([:]) + MutableHttpRequest request = HttpRequest.GET(uri) + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + + /** + * This test is used to validate the implementation of updateUser() method + * + * The method should: Updated user + * + * This can only be done by the logged in user. + * + * TODO fill in the parameters and test return value. + */ + @Ignore("Not Implemented") + def 'updateUser() method test'() { + given: + String username = 'example' + User user = new User() + + when: + controller.updateUser(username, user).block() + + then: + true + } + + /** + * This test is used to check that the api available to client through + * '/user/{username}' to the features of updateUser() works as desired. + * + * TODO fill in the request parameters and test response. + */ + @Ignore("Not Implemented") + def 'updateUser() test with client through path /user/{username}'() { + given: + User body = new User() + var uri = UriTemplate.of('/user/{username}').expand([ + // Fill in the path variables + 'username': 'example' + ]) + MutableHttpRequest request = HttpRequest.PUT(uri, body) + .contentType('application/json') + .accept('application/json') + + when: + HttpResponse response = client.toBlocking().exchange(request); // To retrieve body you must specify required type (e.g. Map.class) as second argument + + then: + response.status() == HttpStatus.OK + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/CategorySpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/CategorySpec.groovy new file mode 100644 index 000000000000..09ea5aea6bf8 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/CategorySpec.groovy @@ -0,0 +1,37 @@ +package org.openapitools.model + +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import spock.lang.Specification +import jakarta.inject.Inject + +/** + * Model tests for Category + */ +@MicronautTest +public class CategorySpec extends Specification { + private final Category model = null + + /** + * Model tests for Category + */ + void 'Category test'() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + void 'Category property id test'() { + // TODO: test id property of Category + } + + /** + * Test the property 'name' + */ + void 'Category property name test'() { + // TODO: test name property of Category + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy new file mode 100644 index 000000000000..11581554b2e7 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy @@ -0,0 +1,44 @@ +package org.openapitools.model + +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import spock.lang.Specification +import jakarta.inject.Inject + +/** + * Model tests for ModelApiResponse + */ +@MicronautTest +public class ModelApiResponseSpec extends Specification { + private final ModelApiResponse model = null + + /** + * Model tests for ModelApiResponse + */ + void 'ModelApiResponse test'() { + // TODO: test ModelApiResponse + } + + /** + * Test the property 'code' + */ + void 'ModelApiResponse property code test'() { + // TODO: test code property of ModelApiResponse + } + + /** + * Test the property 'type' + */ + void 'ModelApiResponse property type test'() { + // TODO: test type property of ModelApiResponse + } + + /** + * Test the property 'message' + */ + void 'ModelApiResponse property message test'() { + // TODO: test message property of ModelApiResponse + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/OrderSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/OrderSpec.groovy new file mode 100644 index 000000000000..f49fd81a9a2b --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/OrderSpec.groovy @@ -0,0 +1,66 @@ +package org.openapitools.model + +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty +import java.time.LocalDateTime +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import spock.lang.Specification +import jakarta.inject.Inject + +/** + * Model tests for Order + */ +@MicronautTest +public class OrderSpec extends Specification { + private final Order model = null + + /** + * Model tests for Order + */ + void 'Order test'() { + // TODO: test Order + } + + /** + * Test the property 'id' + */ + void 'Order property id test'() { + // TODO: test id property of Order + } + + /** + * Test the property 'petId' + */ + void 'Order property petId test'() { + // TODO: test petId property of Order + } + + /** + * Test the property 'quantity' + */ + void 'Order property quantity test'() { + // TODO: test quantity property of Order + } + + /** + * Test the property 'shipDate' + */ + void 'Order property shipDate test'() { + // TODO: test shipDate property of Order + } + + /** + * Test the property 'status' + */ + void 'Order property status test'() { + // TODO: test status property of Order + } + + /** + * Test the property 'complete' + */ + void 'Order property complete test'() { + // TODO: test complete property of Order + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/PetSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/PetSpec.groovy new file mode 100644 index 000000000000..87de485ec4b9 --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/PetSpec.groovy @@ -0,0 +1,69 @@ +package org.openapitools.model + +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty +import java.util.ArrayList +import java.util.List +import org.openapitools.model.Category +import org.openapitools.model.Tag +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import spock.lang.Specification +import jakarta.inject.Inject + +/** + * Model tests for Pet + */ +@MicronautTest +public class PetSpec extends Specification { + private final Pet model = null + + /** + * Model tests for Pet + */ + void 'Pet test'() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + void 'Pet property id test'() { + // TODO: test id property of Pet + } + + /** + * Test the property 'category' + */ + void 'Pet property category test'() { + // TODO: test category property of Pet + } + + /** + * Test the property 'name' + */ + void 'Pet property name test'() { + // TODO: test name property of Pet + } + + /** + * Test the property 'photoUrls' + */ + void 'Pet property photoUrls test'() { + // TODO: test photoUrls property of Pet + } + + /** + * Test the property 'tags' + */ + void 'Pet property tags test'() { + // TODO: test tags property of Pet + } + + /** + * Test the property 'status' + */ + void 'Pet property status test'() { + // TODO: test status property of Pet + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/TagSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/TagSpec.groovy new file mode 100644 index 000000000000..23208c3464bd --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/TagSpec.groovy @@ -0,0 +1,37 @@ +package org.openapitools.model + +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import spock.lang.Specification +import jakarta.inject.Inject + +/** + * Model tests for Tag + */ +@MicronautTest +public class TagSpec extends Specification { + private final Tag model = null + + /** + * Model tests for Tag + */ + void 'Tag test'() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + void 'Tag property id test'() { + // TODO: test id property of Tag + } + + /** + * Test the property 'name' + */ + void 'Tag property name test'() { + // TODO: test name property of Tag + } + +} diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/UserSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/UserSpec.groovy new file mode 100644 index 000000000000..c3060a006bbb --- /dev/null +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/UserSpec.groovy @@ -0,0 +1,79 @@ +package org.openapitools.model + +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty +import io.micronaut.test.extensions.spock.annotation.MicronautTest +import spock.lang.Specification +import jakarta.inject.Inject + +/** + * Model tests for User + */ +@MicronautTest +public class UserSpec extends Specification { + private final User model = null + + /** + * Model tests for User + */ + void 'User test'() { + // TODO: test User + } + + /** + * Test the property 'id' + */ + void 'User property id test'() { + // TODO: test id property of User + } + + /** + * Test the property 'username' + */ + void 'User property username test'() { + // TODO: test username property of User + } + + /** + * Test the property 'firstName' + */ + void 'User property firstName test'() { + // TODO: test firstName property of User + } + + /** + * Test the property 'lastName' + */ + void 'User property lastName test'() { + // TODO: test lastName property of User + } + + /** + * Test the property 'email' + */ + void 'User property email test'() { + // TODO: test email property of User + } + + /** + * Test the property 'password' + */ + void 'User property password test'() { + // TODO: test password property of User + } + + /** + * Test the property 'phone' + */ + void 'User property phone test'() { + // TODO: test phone property of User + } + + /** + * Test the property 'userStatus' + */ + void 'User property userStatus test'() { + // TODO: test userStatus property of User + } + +} From 209f08e4a461bd35be6d68beac7f873b14d73739 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 26 Jan 2022 14:54:11 +0800 Subject: [PATCH 146/175] update doc --- docs/generators/java-micronaut-server.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index b99834e7c64e..1089565806fd 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -10,6 +10,7 @@ title: Documentation for the java-micronaut-server Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | Java | | +| generator default templating engine | mustache | | | helpTxt | Generates a Java Micronaut Server. | | ## CONFIG OPTIONS From 2ebadc36f7ddff8aca1b35a93fbd218fd2c0dae9 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 26 Jan 2022 14:54:32 +0800 Subject: [PATCH 147/175] update undertow dependencies (#11411) --- .../src/main/resources/java-undertow-server/pom.mustache | 6 +++--- samples/server/petstore/java-undertow/pom.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 9ad7d579940b..ead7f7e3c7d3 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 @@ -27,11 +27,11 @@ 1.2 3.1.2 1.2.0 - 4.13 + 4.13.1 2.1.0-beta.124 - 1.4.0.Final + 2.1.6.Final 2.2.0 - 4.5.2 + 4.5.13 4.1.2 1.5.10 diff --git a/samples/server/petstore/java-undertow/pom.xml b/samples/server/petstore/java-undertow/pom.xml index 53ccffba47d4..3e18815a1d13 100644 --- a/samples/server/petstore/java-undertow/pom.xml +++ b/samples/server/petstore/java-undertow/pom.xml @@ -27,11 +27,11 @@ 1.2 3.1.2 1.2.0 - 4.13 + 4.13.1 2.1.0-beta.124 - 1.4.0.Final + 2.1.6.Final 2.2.0 - 4.5.2 + 4.5.13 4.1.2 1.5.10 From adcf04c63b257a20230dbca8e073091f451cb88b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 26 Jan 2022 15:40:24 +0800 Subject: [PATCH 148/175] update jaxrs junit to newer version (#11410) --- .../JavaJaxRS/libraries/jersey1/pom.mustache | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-cxf-client-jackson/pom.xml | 5 +- .../gen/java/org/openapitools/api/PetApi.java | 3 +- .../java/org/openapitools/api/StoreApi.java | 1 - .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/Category.java | 7 -- .../openapitools/model/ModelApiResponse.java | 7 -- .../java/org/openapitools/model/Order.java | 11 +-- .../gen/java/org/openapitools/model/Pet.java | 11 +-- .../gen/java/org/openapitools/model/Tag.java | 7 -- .../gen/java/org/openapitools/model/User.java | 7 -- .../.openapi-generator/VERSION | 2 +- .../client/petstore/jaxrs-cxf-client/pom.xml | 5 +- .../gen/java/org/openapitools/api/PetApi.java | 3 +- .../java/org/openapitools/api/StoreApi.java | 1 - .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/Category.java | 7 -- .../openapitools/model/ModelApiResponse.java | 7 -- .../java/org/openapitools/model/Order.java | 11 +-- .../gen/java/org/openapitools/model/Pet.java | 11 +-- .../gen/java/org/openapitools/model/Tag.java | 7 -- .../gen/java/org/openapitools/model/User.java | 7 -- .../.openapi-generator/FILES | 3 + .../.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-cxf-test-data/pom.xml | 16 ++-- .../org/openapitools/api/AnotherFakeApi.java | 1 - .../java/org/openapitools/api/FakeApi.java | 10 +-- .../api/FakeClassnameTags123Api.java | 1 - .../gen/java/org/openapitools/api/PetApi.java | 9 +- .../java/org/openapitools/api/StoreApi.java | 1 - .../java/org/openapitools/api/UserApi.java | 4 +- .../model/AdditionalPropertiesAnyType.java | 9 +- .../model/AdditionalPropertiesArray.java | 9 +- .../model/AdditionalPropertiesBoolean.java | 9 +- .../model/AdditionalPropertiesClass.java | 29 +++--- .../model/AdditionalPropertiesInteger.java | 9 +- .../model/AdditionalPropertiesNumber.java | 9 +- .../model/AdditionalPropertiesObject.java | 9 +- .../model/AdditionalPropertiesString.java | 9 +- .../java/org/openapitools/model/Animal.java | 11 +-- .../org/openapitools/model/AnimalFarm.java | 7 -- .../model/ArrayOfArrayOfNumberOnly.java | 9 +- .../openapitools/model/ArrayOfNumberOnly.java | 9 +- .../org/openapitools/model/ArrayTest.java | 13 +-- .../java/org/openapitools/model/BigCat.java | 19 ++-- .../org/openapitools/model/BigCatAllOf.java | 19 ++-- .../openapitools/model/Capitalization.java | 19 ++-- .../gen/java/org/openapitools/model/Cat.java | 9 +- .../java/org/openapitools/model/CatAllOf.java | 9 +- .../java/org/openapitools/model/Category.java | 11 +-- .../org/openapitools/model/ClassModel.java | 9 +- .../java/org/openapitools/model/Client.java | 9 +- .../gen/java/org/openapitools/model/Dog.java | 9 +- .../java/org/openapitools/model/DogAllOf.java | 9 +- .../org/openapitools/model/EnumArrays.java | 23 ++--- .../org/openapitools/model/EnumClass.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 45 ++++------ .../model/FileSchemaTestClass.java | 42 ++++----- .../org/openapitools/model/FormatTest.java | 35 +++----- .../openapitools/model/HasOnlyReadOnly.java | 11 +-- .../java/org/openapitools/model/MapTest.java | 21 ++--- ...ropertiesAndAdditionalPropertiesClass.java | 13 +-- .../openapitools/model/Model200Response.java | 11 +-- .../openapitools/model/ModelApiResponse.java | 13 +-- .../org/openapitools/model/ModelFile.java | 70 +++++++++++++++ .../org/openapitools/model/ModelList.java | 61 +++++++++++++ .../org/openapitools/model/ModelReturn.java | 9 +- .../gen/java/org/openapitools/model/Name.java | 15 +--- .../org/openapitools/model/NumberOnly.java | 9 +- .../java/org/openapitools/model/Order.java | 27 ++---- .../openapitools/model/OuterComposite.java | 13 +-- .../org/openapitools/model/OuterEnum.java | 2 +- .../gen/java/org/openapitools/model/Pet.java | 29 +++--- .../org/openapitools/model/ReadOnlyFirst.java | 11 +-- .../openapitools/model/SpecialModelName.java | 9 +- .../openapitools/model/StringBooleanMap.java | 7 -- .../gen/java/org/openapitools/model/Tag.java | 11 +-- .../openapitools/model/TypeHolderDefault.java | 17 ++-- .../openapitools/model/TypeHolderExample.java | 19 ++-- .../gen/java/org/openapitools/model/User.java | 23 ++--- .../java/org/openapitools/model/XmlItem.java | 65 ++++++-------- .../api/impl/AnotherFakeApiServiceImpl.java | 2 +- .../api/impl/FakeApiServiceImpl.java | 3 +- .../FakeClassnameTags123ApiServiceImpl.java | 2 +- .../api/impl/PetApiServiceImpl.java | 4 +- .../api/impl/StoreApiServiceImpl.java | 2 +- .../api/impl/UserApiServiceImpl.java | 3 +- .../src/main/resources/ApplicationContext.xml | 2 +- .../src/main/resources/test-data.json | 15 +++- .../src/main/webapp/WEB-INF/context.xml | 8 +- .../src/main/webapp/WEB-INF/web.xml | 2 +- .../api/SpringBootApplication.java | 8 +- .../.openapi-generator/FILES | 2 + .../.openapi-generator/VERSION | 2 +- .../jaxrs-spec-interface-response/pom.xml | 16 ++-- .../java/org/openapitools/api/FakeApi.java | 8 +- .../gen/java/org/openapitools/api/PetApi.java | 8 +- .../java/org/openapitools/api/UserApi.java | 3 +- .../model/AdditionalPropertiesAnyType.java | 3 + .../model/AdditionalPropertiesArray.java | 3 + .../model/AdditionalPropertiesBoolean.java | 3 + .../model/AdditionalPropertiesClass.java | 13 +++ .../model/AdditionalPropertiesInteger.java | 3 + .../model/AdditionalPropertiesNumber.java | 3 + .../model/AdditionalPropertiesObject.java | 3 + .../model/AdditionalPropertiesString.java | 3 + .../java/org/openapitools/model/Animal.java | 4 + .../model/ArrayOfArrayOfNumberOnly.java | 3 + .../openapitools/model/ArrayOfNumberOnly.java | 3 + .../org/openapitools/model/ArrayTest.java | 5 ++ .../java/org/openapitools/model/BigCat.java | 3 + .../org/openapitools/model/BigCatAllOf.java | 3 + .../openapitools/model/Capitalization.java | 8 ++ .../gen/java/org/openapitools/model/Cat.java | 3 + .../java/org/openapitools/model/CatAllOf.java | 3 + .../java/org/openapitools/model/Category.java | 4 + .../org/openapitools/model/ClassModel.java | 3 + .../java/org/openapitools/model/Client.java | 3 + .../gen/java/org/openapitools/model/Dog.java | 3 + .../java/org/openapitools/model/DogAllOf.java | 3 + .../org/openapitools/model/EnumArrays.java | 6 +- .../java/org/openapitools/model/EnumTest.java | 7 ++ .../model/FileSchemaTestClass.java | 33 ++++--- .../org/openapitools/model/FormatTest.java | 16 ++++ .../openapitools/model/HasOnlyReadOnly.java | 4 + .../java/org/openapitools/model/MapTest.java | 8 +- ...ropertiesAndAdditionalPropertiesClass.java | 5 ++ .../openapitools/model/Model200Response.java | 4 + .../openapitools/model/ModelApiResponse.java | 5 ++ .../org/openapitools/model/ModelFile.java | 88 +++++++++++++++++++ .../org/openapitools/model/ModelList.java | 85 ++++++++++++++++++ .../org/openapitools/model/ModelReturn.java | 3 + .../gen/java/org/openapitools/model/Name.java | 6 ++ .../org/openapitools/model/NumberOnly.java | 3 + .../java/org/openapitools/model/Order.java | 8 ++ .../openapitools/model/OuterComposite.java | 5 ++ .../gen/java/org/openapitools/model/Pet.java | 10 +++ .../org/openapitools/model/ReadOnlyFirst.java | 4 + .../openapitools/model/SpecialModelName.java | 3 + .../gen/java/org/openapitools/model/Tag.java | 4 + .../openapitools/model/TypeHolderDefault.java | 7 ++ .../openapitools/model/TypeHolderExample.java | 8 ++ .../gen/java/org/openapitools/model/User.java | 10 +++ .../java/org/openapitools/model/XmlItem.java | 31 +++++++ .../petstore/jaxrs/jersey1-useTags/pom.xml | 2 +- samples/server/petstore/jaxrs/jersey1/pom.xml | 2 +- 147 files changed, 862 insertions(+), 731 deletions(-) create mode 100644 samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelFile.java create mode 100644 samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelList.java create mode 100644 samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelFile.java create mode 100644 samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelList.java diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache index 0bef89d23094..828013c794ca 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache @@ -217,7 +217,7 @@ 1.19.1 2.9.9 1.7.21 - 4.13 + 4.13.1 4.0.4 UTF-8 diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/.openapi-generator/VERSION b/samples/client/petstore/jaxrs-cxf-client-jackson/.openapi-generator/VERSION index 6555596f9311..0984c4c1ad21 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml b/samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml index 7fccbfb562ed..177096636d31 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml @@ -6,6 +6,8 @@ jaxrs-cxf-jackson-petstore-client This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. 1.0.0 + + src/main/java @@ -111,7 +113,7 @@ ${cxf-version} test - + org.apache.cxf @@ -172,7 +174,6 @@ 9.2.9.v20150224 4.13.1 1.2.0 - 2.5 3.3.0 2.9.9 1.3.5 diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/PetApi.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/PetApi.java index 51cce1e1d63a..cb3a46b1f51a 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/PetApi.java @@ -135,6 +135,5 @@ public interface PetApi { @ApiOperation(value = "uploads an image", tags={ }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); + public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail); } - 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 073884a0c6ff..c1216ebe2cc3 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 @@ -84,4 +84,3 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid Order") }) public Order placeOrder(Order body); } - diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/UserApi.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/UserApi.java index ee7ab7836612..31d37fe19cd4 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import java.util.Date; import org.openapitools.model.User; import java.io.InputStream; @@ -128,4 +129,3 @@ public interface UserApi { @ApiResponse(code = 404, message = "User not found") }) public void updateUser(@PathParam("username") String username, User body); } - diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Category.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Category.java index 8312405424ae..385d6324ae44 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Category.java @@ -3,13 +3,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/ModelApiResponse.java index 14b393d10970..d37f40980d36 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -3,13 +3,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java index 770e6d30baa9..aa0f0ce80b84 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Order.java @@ -6,13 +6,6 @@ import java.util.Date; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -33,11 +26,9 @@ public class Order { @ApiModelProperty(value = "") private Date shipDate; -@XmlType(name="StatusEnum") -@XmlEnum(String.class) public enum StatusEnum { -@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered")); +PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); private String value; diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Pet.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Pet.java index 807cb4182d88..c151c3733984 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Pet.java @@ -9,13 +9,6 @@ import org.openapitools.model.Tag; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -39,11 +32,9 @@ public class Pet { @ApiModelProperty(value = "") private List tags = null; -@XmlType(name="StatusEnum") -@XmlEnum(String.class) public enum StatusEnum { -@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold")); +AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); private String value; diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Tag.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Tag.java index ad321a154960..49680fe48a4a 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Tag.java @@ -3,13 +3,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/User.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/User.java index 0cd34a9baf47..bab06ed1f71c 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/User.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/User.java @@ -3,13 +3,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** diff --git a/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION b/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION index 6555596f9311..0984c4c1ad21 100644 --- a/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION +++ b/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/pom.xml b/samples/client/petstore/jaxrs-cxf-client/pom.xml index d2c3b968a2aa..bb40eef574a3 100644 --- a/samples/client/petstore/jaxrs-cxf-client/pom.xml +++ b/samples/client/petstore/jaxrs-cxf-client/pom.xml @@ -6,6 +6,8 @@ jaxrs-cxf-petstore-client This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. 1.0.0 + + src/main/java @@ -111,7 +113,7 @@ ${cxf-version} test - + org.apache.cxf @@ -172,7 +174,6 @@ 9.2.9.v20150224 4.13.1 1.2.0 - 2.5 3.3.0 2.9.9 1.3.5 diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/PetApi.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/PetApi.java index 51cce1e1d63a..cb3a46b1f51a 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/PetApi.java @@ -135,6 +135,5 @@ public interface PetApi { @ApiOperation(value = "uploads an image", tags={ }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); + public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail); } - 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 073884a0c6ff..c1216ebe2cc3 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 @@ -84,4 +84,3 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid Order") }) public Order placeOrder(Order body); } - diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/UserApi.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/UserApi.java index ee7ab7836612..31d37fe19cd4 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import java.util.Date; import org.openapitools.model.User; import java.io.InputStream; @@ -128,4 +129,3 @@ public interface UserApi { @ApiResponse(code = 404, message = "User not found") }) public void updateUser(@PathParam("username") String username, User body); } - diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Category.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Category.java index 8312405424ae..385d6324ae44 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Category.java @@ -3,13 +3,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/ModelApiResponse.java index 14b393d10970..d37f40980d36 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -3,13 +3,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java index 9ebf511b68e9..76f002502406 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java @@ -4,13 +4,6 @@ import java.util.Date; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -31,11 +24,9 @@ public class Order { @ApiModelProperty(value = "") private Date shipDate; -@XmlType(name="StatusEnum") -@XmlEnum(String.class) public enum StatusEnum { -@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered")); +PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); private String value; diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java index d6dd036a532a..baf8f5a9d7b0 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java @@ -7,13 +7,6 @@ import org.openapitools.model.Tag; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -37,11 +30,9 @@ public class Pet { @ApiModelProperty(value = "") private List tags = null; -@XmlType(name="StatusEnum") -@XmlEnum(String.class) public enum StatusEnum { -@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold")); +AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); private String value; diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Tag.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Tag.java index ad321a154960..49680fe48a4a 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Tag.java @@ -3,13 +3,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/User.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/User.java index 0cd34a9baf47..bab06ed1f71c 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/User.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/User.java @@ -3,13 +3,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** diff --git a/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES index 0fc7cbf70c70..8a46c3fe2118 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES @@ -40,6 +40,8 @@ src/gen/java/org/openapitools/model/MapTest.java src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java src/gen/java/org/openapitools/model/Model200Response.java src/gen/java/org/openapitools/model/ModelApiResponse.java +src/gen/java/org/openapitools/model/ModelFile.java +src/gen/java/org/openapitools/model/ModelList.java src/gen/java/org/openapitools/model/ModelReturn.java src/gen/java/org/openapitools/model/Name.java src/gen/java/org/openapitools/model/NumberOnly.java @@ -62,6 +64,7 @@ src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java src/main/resources/ApplicationContext.xml +src/main/resources/test-data.json src/main/webapp/WEB-INF/context.xml src/main/webapp/WEB-INF/web.xml src/test/java/org/openapitools/api/SpringBootApplication.java diff --git a/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/VERSION index 6555596f9311..0984c4c1ad21 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.0-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-test-data/pom.xml b/samples/server/petstore/jaxrs-cxf-test-data/pom.xml index f17dde84badc..f42f6e5455e9 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-test-data/pom.xml @@ -43,8 +43,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -87,7 +87,7 @@ - + maven-war-plugin @@ -127,8 +127,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api provided @@ -200,7 +200,7 @@ org.springframework spring-web - + - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided 2.9.9 4.13.1 + 2.0.2 + 2.1.6 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 882acd3129ad..6647d22250f5 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 @@ -81,7 +81,7 @@ @ApiOperation(value = "", notes = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body); + Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body); @PATCH @Consumes({ "application/json" }) @@ -108,13 +108,13 @@ @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); + Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); @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) }) - 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); + 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 @Path("/inline-additionalProperties") @@ -137,7 +137,7 @@ @ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context); + Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context); @POST @Path("/{petId}/uploadImageWithRequiredFile") diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java index 480057d9367b..688f409117a3 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java @@ -42,7 +42,7 @@ @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey); + Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey); @GET @Path("/findByStatus") @@ -55,7 +55,7 @@ @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class, responseContainer = "List") }) - Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status); + Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status); @GET @Path("/findByTags") @@ -68,7 +68,7 @@ @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "Set") }) - Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags); + Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags); @GET @Path("/{petId}") @@ -120,5 +120,5 @@ }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream); + Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java index 77ea16dbeb8e..ed2fcd7dc4e8 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import java.util.Date; import java.util.List; import org.openapitools.model.User; @@ -63,7 +64,7 @@ @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); + Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); @GET @Path("/logout") diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 6b9dcfa1ac67..50c6702c65f7 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesAnyType") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesAnyType extends HashMap implements Serializable { private @Valid String name; @@ -36,6 +38,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 1b504c15f4e0..3b400ed375e7 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -14,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesArray") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesArray extends HashMap implements Serializable { private @Valid String name; @@ -37,6 +39,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index d842728a186e..e1dbfa0821ab 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesBoolean") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesBoolean extends HashMap implements Serializable { private @Valid String name; @@ -36,6 +38,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index ab1baad99760..61bec1b6ff49 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -15,9 +15,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesClass implements Serializable { private @Valid Map mapString = new HashMap(); @@ -48,6 +50,7 @@ public Map getMapString() { return mapString; } + @JsonProperty("map_string") public void setMapString(Map mapString) { this.mapString = mapString; } @@ -68,6 +71,7 @@ public Map getMapNumber() { return mapNumber; } + @JsonProperty("map_number") public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -88,6 +92,7 @@ public Map getMapInteger() { return mapInteger; } + @JsonProperty("map_integer") public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -108,6 +113,7 @@ public Map getMapBoolean() { return mapBoolean; } + @JsonProperty("map_boolean") public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -128,6 +134,7 @@ public Map> getMapArrayInteger() { return mapArrayInteger; } + @JsonProperty("map_array_integer") public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -148,6 +155,7 @@ public Map> getMapArrayAnytype() { return mapArrayAnytype; } + @JsonProperty("map_array_anytype") public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -168,6 +176,7 @@ public Map> getMapMapString() { return mapMapString; } + @JsonProperty("map_map_string") public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -188,6 +197,7 @@ public Map> getMapMapAnytype() { return mapMapAnytype; } + @JsonProperty("map_map_anytype") public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -208,6 +218,7 @@ public Object getAnytype1() { return anytype1; } + @JsonProperty("anytype_1") public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -228,6 +239,7 @@ public Object getAnytype2() { return anytype2; } + @JsonProperty("anytype_2") public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -248,6 +260,7 @@ public Object getAnytype3() { return anytype3; } + @JsonProperty("anytype_3") public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index 6f925720abad..fc85a62ad023 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesInteger") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesInteger extends HashMap implements Serializable { private @Valid String name; @@ -36,6 +38,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 884577dcdd08..25852547106b 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -14,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesNumber") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesNumber extends HashMap implements Serializable { private @Valid String name; @@ -37,6 +39,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index cbe4428f3e37..998b85d511da 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesObject") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesObject extends HashMap implements Serializable { private @Valid String name; @@ -36,6 +38,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index 16f6a60afd12..b317c03b4c05 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesString") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesString extends HashMap implements Serializable { private @Valid String name; @@ -36,6 +38,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java index 8ddd9ed2f8c9..7c6fb6c670ae 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @@ -22,6 +23,7 @@ }) +@JsonTypeName("Animal") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Animal implements Serializable { private @Valid String className; @@ -44,6 +46,7 @@ public String getClassName() { return className; } + @JsonProperty("className") public void setClassName(String className) { this.className = className; } @@ -64,6 +67,7 @@ public String getColor() { return color; } + @JsonProperty("color") public void setColor(String color) { this.color = color; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 9643930053c0..cbca7de2f692 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -14,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayOfArrayOfNumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfArrayOfNumberOnly implements Serializable { private @Valid List> arrayArrayNumber = new ArrayList>(); @@ -37,6 +39,7 @@ public List> getArrayArrayNumber() { return arrayArrayNumber; } + @JsonProperty("ArrayArrayNumber") public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index 2c585cdc1e86..ad7cc3db32ef 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -14,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayOfNumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfNumberOnly implements Serializable { private @Valid List arrayNumber = new ArrayList(); @@ -37,6 +39,7 @@ public List getArrayNumber() { return arrayNumber; } + @JsonProperty("ArrayNumber") public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java index edc0b7a9484f..f2b7469f65c7 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java @@ -14,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayTest") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayTest implements Serializable { private @Valid List arrayOfString = new ArrayList(); @@ -39,6 +41,7 @@ public List getArrayOfString() { return arrayOfString; } + @JsonProperty("array_of_string") public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -59,6 +62,7 @@ public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } + @JsonProperty("array_array_of_integer") public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -79,6 +83,7 @@ public List> getArrayArrayOfModel() { return arrayArrayOfModel; } + @JsonProperty("array_array_of_model") public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCat.java index 1a3ddba789b0..483c60b3d06e 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCat.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("BigCat") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCat extends Cat implements Serializable { @@ -69,6 +71,7 @@ public KindEnum getKind() { return kind; } + @JsonProperty("kind") public void setKind(KindEnum kind) { this.kind = kind; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCatAllOf.java index 080e86afaca2..db6873590460 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("BigCat_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCatAllOf implements Serializable { @@ -67,6 +69,7 @@ public KindEnum getKind() { return kind; } + @JsonProperty("kind") public void setKind(KindEnum kind) { this.kind = kind; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Capitalization.java index a65c79d984e6..595296559701 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Capitalization.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Capitalization") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Capitalization implements Serializable { private @Valid String smallCamel; @@ -39,6 +41,7 @@ public String getSmallCamel() { return smallCamel; } + @JsonProperty("smallCamel") public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -59,6 +62,7 @@ public String getCapitalCamel() { return capitalCamel; } + @JsonProperty("CapitalCamel") public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -79,6 +83,7 @@ public String getSmallSnake() { return smallSnake; } + @JsonProperty("small_Snake") public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -99,6 +104,7 @@ public String getCapitalSnake() { return capitalSnake; } + @JsonProperty("Capital_Snake") public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -119,6 +125,7 @@ public String getScAETHFlowPoints() { return scAETHFlowPoints; } + @JsonProperty("SCA_ETH_Flow_Points") public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -140,6 +147,7 @@ public String getATTNAME() { return ATT_NAME; } + @JsonProperty("ATT_NAME") public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Cat.java index 4cc078e22351..948b28d037a3 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Cat.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Cat") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Cat extends Animal implements Serializable { private @Valid Boolean declawed; @@ -36,6 +38,7 @@ public Boolean getDeclawed() { return declawed; } + @JsonProperty("declawed") public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/CatAllOf.java index e56df72d3be4..b5d2587fe85e 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/CatAllOf.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Cat_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class CatAllOf implements Serializable { private @Valid Boolean declawed; @@ -34,6 +36,7 @@ public Boolean getDeclawed() { return declawed; } + @JsonProperty("declawed") public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Category.java index 9af6f93c7c42..6d4e8a879921 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Category.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Category") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Category implements Serializable { private @Valid Long id; @@ -35,6 +37,7 @@ public Long getId() { return id; } + @JsonProperty("id") public void setId(Long id) { this.id = id; } @@ -56,6 +59,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ClassModel.java index f050e12bb257..fec3c619257e 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ClassModel.java @@ -11,11 +11,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property **/ @ApiModel(description = "Model for testing model with \"_class\" property") +@JsonTypeName("ClassModel") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ClassModel implements Serializable { private @Valid String propertyClass; @@ -36,6 +38,7 @@ public String getPropertyClass() { return propertyClass; } + @JsonProperty("_class") public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Client.java index 4cdbbef940df..74d489b5aced 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Client.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Client") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Client implements Serializable { private @Valid String client; @@ -34,6 +36,7 @@ public String getClient() { return client; } + @JsonProperty("client") public void setClient(String client) { this.client = client; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Dog.java index 87c3a825ba81..20599ecebcfd 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Dog.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Dog") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Dog extends Animal implements Serializable { private @Valid String breed; @@ -36,6 +38,7 @@ public String getBreed() { return breed; } + @JsonProperty("breed") public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/DogAllOf.java index 5496e3c89157..269faf93678e 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/DogAllOf.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Dog_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class DogAllOf implements Serializable { private @Valid String breed; @@ -34,6 +36,7 @@ public String getBreed() { return breed; } + @JsonProperty("breed") public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumArrays.java index fc7770afa096..bf05c76fd9ee 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumArrays.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("EnumArrays") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumArrays implements Serializable { @@ -52,7 +54,7 @@ public static JustSymbolEnum fromValue(String value) { } private @Valid JustSymbolEnum justSymbol; - + public enum ArrayEnumEnum { FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); @@ -103,6 +105,7 @@ public JustSymbolEnum getJustSymbol() { return justSymbol; } + @JsonProperty("just_symbol") public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -123,6 +126,7 @@ public List getArrayEnum() { return arrayEnum; } + @JsonProperty("array_enum") public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumTest.java index 6c02f0647c9e..34ec3b13e072 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumTest.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Enum_Test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumTest implements Serializable { @@ -171,6 +173,7 @@ public EnumStringEnum getEnumString() { return enumString; } + @JsonProperty("enum_string") public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -192,6 +195,7 @@ public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } + @JsonProperty("enum_string_required") public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -212,6 +216,7 @@ public EnumIntegerEnum getEnumInteger() { return enumInteger; } + @JsonProperty("enum_integer") public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -232,6 +237,7 @@ public EnumNumberEnum getEnumNumber() { return enumNumber; } + @JsonProperty("enum_number") public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -252,6 +258,7 @@ public OuterEnum getOuterEnum() { return outerEnum; } + @JsonProperty("outerEnum") public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index b8ba37d5cdc5..05ff7b2ea246 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; +import org.openapitools.model.ModelFile; import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -13,18 +14,20 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("FileSchemaTestClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FileSchemaTestClass implements Serializable { - private @Valid java.io.File file; - private @Valid List files = new ArrayList(); + private @Valid ModelFile _file; + private @Valid List files = new ArrayList(); /** **/ - public FileSchemaTestClass file(java.io.File file) { - this.file = file; + public FileSchemaTestClass _file(ModelFile _file) { + this._file = _file; return this; } @@ -33,17 +36,18 @@ public FileSchemaTestClass file(java.io.File file) { @ApiModelProperty(value = "") @JsonProperty("file") - public java.io.File getFile() { - return file; + public ModelFile getFile() { + return _file; } - public void setFile(java.io.File file) { - this.file = file; + @JsonProperty("file") + public void setFile(ModelFile _file) { + this._file = _file; } /** **/ - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -53,11 +57,12 @@ public FileSchemaTestClass files(List files) { @ApiModelProperty(value = "") @JsonProperty("files") - public List getFiles() { + public List getFiles() { return files; } - public void setFiles(List files) { + @JsonProperty("files") + public void setFiles(List files) { this.files = files; } @@ -71,13 +76,13 @@ public boolean equals(Object o) { return false; } FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this.file, fileSchemaTestClass.file) && + return Objects.equals(this._file, fileSchemaTestClass._file) && Objects.equals(this.files, fileSchemaTestClass.files); } @Override public int hashCode() { - return Objects.hash(file, files); + return Objects.hash(_file, files); } @Override @@ -85,7 +90,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FormatTest.java index ca11645f9ae3..bbb010c5ff19 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FormatTest.java @@ -16,9 +16,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FormatTest implements Serializable { private @Valid Integer integer; @@ -54,6 +56,7 @@ public FormatTest integer(Integer integer) { return integer; } + @JsonProperty("integer") public void setInteger(Integer integer) { this.integer = integer; } @@ -76,6 +79,7 @@ public FormatTest int32(Integer int32) { return int32; } + @JsonProperty("int32") public void setInt32(Integer int32) { this.int32 = int32; } @@ -96,6 +100,7 @@ public Long getInt64() { return int64; } + @JsonProperty("int64") public void setInt64(Long int64) { this.int64 = int64; } @@ -119,6 +124,7 @@ public FormatTest number(BigDecimal number) { return number; } + @JsonProperty("number") public void setNumber(BigDecimal number) { this.number = number; } @@ -141,6 +147,7 @@ public FormatTest _float(Float _float) { return _float; } + @JsonProperty("float") public void setFloat(Float _float) { this._float = _float; } @@ -163,6 +170,7 @@ public FormatTest _double(Double _double) { return _double; } + @JsonProperty("double") public void setDouble(Double _double) { this._double = _double; } @@ -183,6 +191,7 @@ public FormatTest string(String string) { return string; } + @JsonProperty("string") public void setString(String string) { this.string = string; } @@ -204,6 +213,7 @@ public FormatTest _byte(byte[] _byte) { return _byte; } + @JsonProperty("byte") public void setByte(byte[] _byte) { this._byte = _byte; } @@ -224,6 +234,7 @@ public File getBinary() { return binary; } + @JsonProperty("binary") public void setBinary(File binary) { this.binary = binary; } @@ -245,6 +256,7 @@ public LocalDate getDate() { return date; } + @JsonProperty("date") public void setDate(LocalDate date) { this.date = date; } @@ -265,6 +277,7 @@ public Date getDateTime() { return dateTime; } + @JsonProperty("dateTime") public void setDateTime(Date dateTime) { this.dateTime = dateTime; } @@ -285,6 +298,7 @@ public UUID getUuid() { return uuid; } + @JsonProperty("uuid") public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -306,6 +320,7 @@ public FormatTest password(String password) { return password; } + @JsonProperty("password") public void setPassword(String password) { this.password = password; } @@ -326,6 +341,7 @@ public BigDecimal getBigDecimal() { return bigDecimal; } + @JsonProperty("BigDecimal") public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index 6438846d569f..db68308cdce3 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("hasOnlyReadOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class HasOnlyReadOnly implements Serializable { private @Valid String bar; @@ -35,6 +37,7 @@ public String getBar() { return bar; } + @JsonProperty("bar") public void setBar(String bar) { this.bar = bar; } @@ -55,6 +58,7 @@ public String getFoo() { return foo; } + @JsonProperty("foo") public void setFoo(String foo) { this.foo = foo; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MapTest.java index a8eff4c21b24..f5c57914a905 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MapTest.java @@ -14,13 +14,15 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("MapTest") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MapTest implements Serializable { private @Valid Map> mapMapOfString = new HashMap>(); - + public enum InnerEnum { UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); @@ -73,6 +75,7 @@ public Map> getMapMapOfString() { return mapMapOfString; } + @JsonProperty("map_map_of_string") public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -93,6 +96,7 @@ public Map getMapOfEnumString() { return mapOfEnumString; } + @JsonProperty("map_of_enum_string") public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -113,6 +117,7 @@ public Map getDirectMap() { return directMap; } + @JsonProperty("direct_map") public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -133,6 +138,7 @@ public Map getIndirectMap() { return indirectMap; } + @JsonProperty("indirect_map") public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index aace3762eb95..77464620e9c6 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -17,9 +17,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { private @Valid UUID uuid; @@ -42,6 +44,7 @@ public UUID getUuid() { return uuid; } + @JsonProperty("uuid") public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -62,6 +65,7 @@ public Date getDateTime() { return dateTime; } + @JsonProperty("dateTime") public void setDateTime(Date dateTime) { this.dateTime = dateTime; } @@ -82,6 +86,7 @@ public Map getMap() { return map; } + @JsonProperty("map") public void setMap(Map map) { this.map = map; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Model200Response.java index d96df1aceae5..7aeb481a43a3 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Model200Response.java @@ -11,11 +11,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number **/ @ApiModel(description = "Model for testing model name starting with number") +@JsonTypeName("200_response") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Model200Response implements Serializable { private @Valid Integer name; @@ -37,6 +39,7 @@ public Integer getName() { return name; } + @JsonProperty("name") public void setName(Integer name) { this.name = name; } @@ -57,6 +60,7 @@ public String getPropertyClass() { return propertyClass; } + @JsonProperty("class") public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelApiResponse.java index 952439560b5d..d541b6586f3c 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ApiResponse") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelApiResponse implements Serializable { private @Valid Integer code; @@ -36,6 +38,7 @@ public Integer getCode() { return code; } + @JsonProperty("code") public void setCode(Integer code) { this.code = code; } @@ -56,6 +59,7 @@ public String getType() { return type; } + @JsonProperty("type") public void setType(String type) { this.type = type; } @@ -76,6 +80,7 @@ public String getMessage() { return message; } + @JsonProperty("message") public void setMessage(String message) { this.message = message; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelFile.java new file mode 100644 index 000000000000..8ce42cac839e --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelFile.java @@ -0,0 +1,88 @@ +package org.openapitools.model; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; +import javax.validation.Valid; + +import io.swagger.annotations.*; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Must be named `File` for test. + **/ +@ApiModel(description = "Must be named `File` for test.") +@JsonTypeName("File") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelFile implements Serializable { + + private @Valid String sourceURI; + + /** + * Test capitalization + **/ + public ModelFile sourceURI(String sourceURI) { + this.sourceURI = sourceURI; + return this; + } + + + + + @ApiModelProperty(value = "Test capitalization") + @JsonProperty("sourceURI") + public String getSourceURI() { + return sourceURI; + } + + @JsonProperty("sourceURI") + public void setSourceURI(String sourceURI) { + this.sourceURI = sourceURI; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelFile _file = (ModelFile) o; + return Objects.equals(this.sourceURI, _file.sourceURI); + } + + @Override + public int hashCode() { + return Objects.hash(sourceURI); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelFile {\n"); + + sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelList.java new file mode 100644 index 000000000000..f09d013e2dca --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelList.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; +import javax.validation.Valid; + +import io.swagger.annotations.*; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; + + + +@JsonTypeName("List") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelList implements Serializable { + + private @Valid String _123list; + + /** + **/ + public ModelList _123list(String _123list) { + this._123list = _123list; + return this; + } + + + + + @ApiModelProperty(value = "") + @JsonProperty("123-list") + public String get123list() { + return _123list; + } + + @JsonProperty("123-list") + public void set123list(String _123list) { + this._123list = _123list; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelList _list = (ModelList) o; + return Objects.equals(this._123list, _list._123list); + } + + @Override + public int hashCode() { + return Objects.hash(_123list); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelList {\n"); + + sb.append(" _123list: ").append(toIndentedString(_123list)).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/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelReturn.java index 6d6cb5b806fb..836ae092d183 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelReturn.java @@ -11,11 +11,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words **/ @ApiModel(description = "Model for testing reserved words") +@JsonTypeName("Return") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelReturn implements Serializable { private @Valid Integer _return; @@ -36,6 +38,7 @@ public Integer getReturn() { return _return; } + @JsonProperty("return") public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Name.java index 6fd504dbe9d4..54d09365aedd 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Name.java @@ -11,11 +11,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name **/ @ApiModel(description = "Model for testing model name same as property name") +@JsonTypeName("Name") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Name implements Serializable { private @Valid Integer name; @@ -40,6 +42,7 @@ public Integer getName() { return name; } + @JsonProperty("name") public void setName(Integer name) { this.name = name; } @@ -60,6 +63,7 @@ public Integer getSnakeCase() { return snakeCase; } + @JsonProperty("snake_case") public void setSnakeCase(Integer snakeCase) { this.snakeCase = snakeCase; } @@ -80,6 +84,7 @@ public String getProperty() { return property; } + @JsonProperty("property") public void setProperty(String property) { this.property = property; } @@ -100,6 +105,7 @@ public Integer get123number() { return _123number; } + @JsonProperty("123Number") public void set123number(Integer _123number) { this._123number = _123number; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/NumberOnly.java index 07a70cd9da5b..9ea507266dcc 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/NumberOnly.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("NumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class NumberOnly implements Serializable { private @Valid BigDecimal justNumber; @@ -35,6 +37,7 @@ public BigDecimal getJustNumber() { return justNumber; } + @JsonProperty("JustNumber") public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Order.java index 9929a0d50431..e67d3772f9de 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Order.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Order") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Order implements Serializable { private @Valid Long id; @@ -73,6 +75,7 @@ public Long getId() { return id; } + @JsonProperty("id") public void setId(Long id) { this.id = id; } @@ -93,6 +96,7 @@ public Long getPetId() { return petId; } + @JsonProperty("petId") public void setPetId(Long petId) { this.petId = petId; } @@ -113,6 +117,7 @@ public Integer getQuantity() { return quantity; } + @JsonProperty("quantity") public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -133,6 +138,7 @@ public Date getShipDate() { return shipDate; } + @JsonProperty("shipDate") public void setShipDate(Date shipDate) { this.shipDate = shipDate; } @@ -154,6 +160,7 @@ public StatusEnum getStatus() { return status; } + @JsonProperty("status") public void setStatus(StatusEnum status) { this.status = status; } @@ -174,6 +181,7 @@ public Boolean getComplete() { return complete; } + @JsonProperty("complete") public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterComposite.java index 6e34a0e0a803..95ff03416bb3 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterComposite.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("OuterComposite") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class OuterComposite implements Serializable { private @Valid BigDecimal myNumber; @@ -37,6 +39,7 @@ public BigDecimal getMyNumber() { return myNumber; } + @JsonProperty("my_number") public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -57,6 +60,7 @@ public String getMyString() { return myString; } + @JsonProperty("my_string") public void setMyString(String myString) { this.myString = myString; } @@ -77,6 +81,7 @@ public Boolean getMyBoolean() { return myBoolean; } + @JsonProperty("my_boolean") public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java index 63e1d1abbd35..7162d94b3b88 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; @@ -17,9 +18,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Pet") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Pet implements Serializable { private @Valid Long id; @@ -78,6 +81,7 @@ public Long getId() { return id; } + @JsonProperty("id") public void setId(Long id) { this.id = id; } @@ -98,6 +102,7 @@ public Category getCategory() { return category; } + @JsonProperty("category") public void setCategory(Category category) { this.category = category; } @@ -119,6 +124,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } @@ -140,6 +146,8 @@ public Set getPhotoUrls() { return photoUrls; } + @JsonProperty("photoUrls") + @JsonDeserialize(as = LinkedHashSet.class) public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } @@ -160,6 +168,7 @@ public List getTags() { return tags; } + @JsonProperty("tags") public void setTags(List tags) { this.tags = tags; } @@ -181,6 +190,7 @@ public StatusEnum getStatus() { return status; } + @JsonProperty("status") public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index 72efcebf52c5..71451f9cf68d 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ReadOnlyFirst") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ReadOnlyFirst implements Serializable { private @Valid String bar; @@ -35,6 +37,7 @@ public String getBar() { return bar; } + @JsonProperty("bar") public void setBar(String bar) { this.bar = bar; } @@ -55,6 +58,7 @@ public String getBaz() { return baz; } + @JsonProperty("baz") public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/SpecialModelName.java index ece6b68dc3a8..0340c7996ab1 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("$special[model.name]") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class SpecialModelName implements Serializable { private @Valid Long $specialPropertyName; @@ -34,6 +36,7 @@ return $specialPropertyName; } + @JsonProperty("$special[property.name]") public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Tag.java index 1c7c51988946..db7d608abd57 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Tag.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Tag") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Tag implements Serializable { private @Valid Long id; @@ -35,6 +37,7 @@ public Long getId() { return id; } + @JsonProperty("id") public void setId(Long id) { this.id = id; } @@ -55,6 +58,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 502c22c455e2..a093d79a6d66 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -14,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("TypeHolderDefault") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderDefault implements Serializable { private @Valid String stringItem = "what"; @@ -42,6 +44,7 @@ public String getStringItem() { return stringItem; } + @JsonProperty("string_item") public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -63,6 +66,7 @@ public BigDecimal getNumberItem() { return numberItem; } + @JsonProperty("number_item") public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -84,6 +88,7 @@ public Integer getIntegerItem() { return integerItem; } + @JsonProperty("integer_item") public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -105,6 +110,7 @@ public Boolean getBoolItem() { return boolItem; } + @JsonProperty("bool_item") public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -126,6 +132,7 @@ public List getArrayItem() { return arrayItem; } + @JsonProperty("array_item") public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java index fb31859dedda..daaffc8af457 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -14,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("TypeHolderExample") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderExample implements Serializable { private @Valid String stringItem; @@ -43,6 +45,7 @@ public String getStringItem() { return stringItem; } + @JsonProperty("string_item") public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -64,6 +67,7 @@ public BigDecimal getNumberItem() { return numberItem; } + @JsonProperty("number_item") public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -85,6 +89,7 @@ public Float getFloatItem() { return floatItem; } + @JsonProperty("float_item") public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -106,6 +111,7 @@ public Integer getIntegerItem() { return integerItem; } + @JsonProperty("integer_item") public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -127,6 +133,7 @@ public Boolean getBoolItem() { return boolItem; } + @JsonProperty("bool_item") public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -148,6 +155,7 @@ public List getArrayItem() { return arrayItem; } + @JsonProperty("array_item") public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/User.java index ad16074f63b8..271676fb2e09 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/User.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("User") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class User implements Serializable { private @Valid Long id; @@ -41,6 +43,7 @@ public Long getId() { return id; } + @JsonProperty("id") public void setId(Long id) { this.id = id; } @@ -61,6 +64,7 @@ public String getUsername() { return username; } + @JsonProperty("username") public void setUsername(String username) { this.username = username; } @@ -81,6 +85,7 @@ public String getFirstName() { return firstName; } + @JsonProperty("firstName") public void setFirstName(String firstName) { this.firstName = firstName; } @@ -101,6 +106,7 @@ public String getLastName() { return lastName; } + @JsonProperty("lastName") public void setLastName(String lastName) { this.lastName = lastName; } @@ -121,6 +127,7 @@ public String getEmail() { return email; } + @JsonProperty("email") public void setEmail(String email) { this.email = email; } @@ -141,6 +148,7 @@ public String getPassword() { return password; } + @JsonProperty("password") public void setPassword(String password) { this.password = password; } @@ -161,6 +169,7 @@ public String getPhone() { return phone; } + @JsonProperty("phone") public void setPhone(String phone) { this.phone = phone; } @@ -182,6 +191,7 @@ public Integer getUserStatus() { return userStatus; } + @JsonProperty("userStatus") public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java index 15a5d35673f2..241ebb4e1bc4 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java @@ -14,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("XmlItem") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class XmlItem implements Serializable { private @Valid String attributeString; @@ -65,6 +67,7 @@ public String getAttributeString() { return attributeString; } + @JsonProperty("attribute_string") public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -85,6 +88,7 @@ public BigDecimal getAttributeNumber() { return attributeNumber; } + @JsonProperty("attribute_number") public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -105,6 +109,7 @@ public Integer getAttributeInteger() { return attributeInteger; } + @JsonProperty("attribute_integer") public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -125,6 +130,7 @@ public Boolean getAttributeBoolean() { return attributeBoolean; } + @JsonProperty("attribute_boolean") public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -145,6 +151,7 @@ public List getWrappedArray() { return wrappedArray; } + @JsonProperty("wrapped_array") public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -165,6 +172,7 @@ public String getNameString() { return nameString; } + @JsonProperty("name_string") public void setNameString(String nameString) { this.nameString = nameString; } @@ -185,6 +193,7 @@ public BigDecimal getNameNumber() { return nameNumber; } + @JsonProperty("name_number") public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -205,6 +214,7 @@ public Integer getNameInteger() { return nameInteger; } + @JsonProperty("name_integer") public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -225,6 +235,7 @@ public Boolean getNameBoolean() { return nameBoolean; } + @JsonProperty("name_boolean") public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -245,6 +256,7 @@ public List getNameArray() { return nameArray; } + @JsonProperty("name_array") public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -265,6 +277,7 @@ public List getNameWrappedArray() { return nameWrappedArray; } + @JsonProperty("name_wrapped_array") public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -285,6 +298,7 @@ public String getPrefixString() { return prefixString; } + @JsonProperty("prefix_string") public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -305,6 +319,7 @@ public BigDecimal getPrefixNumber() { return prefixNumber; } + @JsonProperty("prefix_number") public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -325,6 +340,7 @@ public Integer getPrefixInteger() { return prefixInteger; } + @JsonProperty("prefix_integer") public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -345,6 +361,7 @@ public Boolean getPrefixBoolean() { return prefixBoolean; } + @JsonProperty("prefix_boolean") public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -365,6 +382,7 @@ public List getPrefixArray() { return prefixArray; } + @JsonProperty("prefix_array") public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -385,6 +403,7 @@ public List getPrefixWrappedArray() { return prefixWrappedArray; } + @JsonProperty("prefix_wrapped_array") public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -405,6 +424,7 @@ public String getNamespaceString() { return namespaceString; } + @JsonProperty("namespace_string") public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -425,6 +445,7 @@ public BigDecimal getNamespaceNumber() { return namespaceNumber; } + @JsonProperty("namespace_number") public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -445,6 +466,7 @@ public Integer getNamespaceInteger() { return namespaceInteger; } + @JsonProperty("namespace_integer") public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -465,6 +487,7 @@ public Boolean getNamespaceBoolean() { return namespaceBoolean; } + @JsonProperty("namespace_boolean") public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -485,6 +508,7 @@ public List getNamespaceArray() { return namespaceArray; } + @JsonProperty("namespace_array") public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -505,6 +529,7 @@ public List getNamespaceWrappedArray() { return namespaceWrappedArray; } + @JsonProperty("namespace_wrapped_array") public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -525,6 +550,7 @@ public String getPrefixNsString() { return prefixNsString; } + @JsonProperty("prefix_ns_string") public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -545,6 +571,7 @@ public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } + @JsonProperty("prefix_ns_number") public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -565,6 +592,7 @@ public Integer getPrefixNsInteger() { return prefixNsInteger; } + @JsonProperty("prefix_ns_integer") public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -585,6 +613,7 @@ public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } + @JsonProperty("prefix_ns_boolean") public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -605,6 +634,7 @@ public List getPrefixNsArray() { return prefixNsArray; } + @JsonProperty("prefix_ns_array") public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -625,6 +655,7 @@ public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } + @JsonProperty("prefix_ns_wrapped_array") public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml index 232ac76fcc3e..55cc66ba7111 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml @@ -204,7 +204,7 @@ 1.19.1 2.9.9 1.7.21 - 4.13 + 4.13.1 4.0.4 UTF-8 diff --git a/samples/server/petstore/jaxrs/jersey1/pom.xml b/samples/server/petstore/jaxrs/jersey1/pom.xml index 9356dcfe7eb9..3d86b2b27696 100644 --- a/samples/server/petstore/jaxrs/jersey1/pom.xml +++ b/samples/server/petstore/jaxrs/jersey1/pom.xml @@ -204,7 +204,7 @@ 1.19.1 2.9.9 1.7.21 - 4.13 + 4.13.1 4.0.4 UTF-8 From 604c1c0806726dad439eea1680d84afaf0f81e36 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 26 Jan 2022 16:23:41 +0800 Subject: [PATCH 149/175] update jaxrs cxf, resteasy dependencies (#11414) --- .../src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache | 2 +- .../src/main/resources/JavaJaxRS/cxf/server/pom.mustache | 2 +- .../src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache | 2 +- .../src/main/resources/JavaJaxRS/resteasy/gradle.mustache | 2 +- samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml | 2 +- samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml | 2 +- .../petstore/jaxrs-cxf-test-data/.openapi-generator/FILES | 1 - samples/server/petstore/jaxrs-cxf/pom.xml | 2 +- .../server/petstore/jaxrs-resteasy/default-value/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/default/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/eap/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/java8/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/joda/build.gradle | 2 +- 15 files changed, 14 insertions(+), 15 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache index c523f0a994cd..338527fe4899 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache @@ -346,7 +346,7 @@ {{/generateSpringBootApplication}} {{/generateSpringApplication}} {{^generateSpringBootApplication}} - 4.13 + 4.13.1 1.2.0 {{/generateSpringBootApplication}} 3.3.0 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache index 5649020a9ab8..752f94497fe0 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache @@ -266,7 +266,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.13 + 4.13.1 1.2.0 {{#useBeanValidation}} 2.0.2 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache index b343b8ec9548..ca943874af91 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache @@ -25,7 +25,7 @@ dependencies { {{#java8}} compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9' {{/java8}} - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache index cd6febf1470f..4c383c52c6ab 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache @@ -25,7 +25,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml index bb88fe50d589..9643f632d71c 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml @@ -201,7 +201,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.13 + 4.13.1 1.2.0 2.0.2 3.3.0 diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml index 373805422758..07106478d1f9 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml @@ -201,7 +201,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.13 + 4.13.1 1.2.0 2.0.2 3.3.0 diff --git a/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES index 8a46c3fe2118..f62583682996 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES @@ -64,7 +64,6 @@ src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java src/main/resources/ApplicationContext.xml -src/main/resources/test-data.json src/main/webapp/WEB-INF/context.xml src/main/webapp/WEB-INF/web.xml src/test/java/org/openapitools/api/SpringBootApplication.java diff --git a/samples/server/petstore/jaxrs-cxf/pom.xml b/samples/server/petstore/jaxrs-cxf/pom.xml index a4a13cf0922d..5f7076fa0c14 100644 --- a/samples/server/petstore/jaxrs-cxf/pom.xml +++ b/samples/server/petstore/jaxrs-cxf/pom.xml @@ -201,7 +201,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.13 + 4.13.1 1.2.0 2.0.2 3.3.0 diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle b/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle index dd8b11f8b670..e50aba9a14da 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle @@ -23,7 +23,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/default/build.gradle b/samples/server/petstore/jaxrs-resteasy/default/build.gradle index dd8b11f8b670..e50aba9a14da 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/default/build.gradle @@ -23,7 +23,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle index 68567d57b78f..c55a26708d29 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle @@ -17,7 +17,7 @@ dependencies { compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9' - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle index 6c0bb712e06f..6b89e90c1e33 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle @@ -18,7 +18,7 @@ dependencies { providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle index 6c0bb712e06f..6b89e90c1e33 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle @@ -18,7 +18,7 @@ dependencies { providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/java8/build.gradle index dd8b11f8b670..e50aba9a14da 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/java8/build.gradle @@ -23,7 +23,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle index dd8b11f8b670..e50aba9a14da 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle @@ -23,7 +23,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.13', + testCompile 'junit:junit:4.13.1', 'org.hamcrest:hamcrest-core:1.3' } From 34395c31730e5a866224ea4880cda3bd05046d5c Mon Sep 17 00:00:00 2001 From: feech Date: Wed, 26 Jan 2022 08:32:09 +0000 Subject: [PATCH 150/175] Makes the maven plugin to generate Model-tests and API-tests in generated-test-sources (#11294) * added support for independent test-folder * generate updated docs * generate updated docs * generate updated docs * trigger a new CI builds Co-authored-by: William Cheng --- docs/generators/groovy.md | 1 + docs/generators/java-camel.md | 1 + docs/generators/java-inflector.md | 1 + docs/generators/java-micronaut-client.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 + .../codegen/DefaultGenerator.java | 10 ++++-- .../languages/AbstractJavaCodegen.java | 32 +++++++++++++++++-- .../codegen/java/AbstractJavaCodegenTest.java | 18 +++++++++++ 23 files changed, 75 insertions(+), 5 deletions(-) diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 06b15957dde0..4c2b6f644d53 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -59,6 +59,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/groovy| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |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| ## IMPORT MAPPING diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 4a8a1392133b..c38499430200 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -86,6 +86,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |swaggerDocketConfig|Generate Spring OpenAPI Docket configuration class.| |false| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |OpenAPI Spring| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| |useBeanValidation|Use BeanValidation API annotations| |true| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 50f1bfb48173..e924a759037f 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/gen/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |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| ## IMPORT MAPPING diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index c1ba0089f6ba..0de7278de019 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -65,6 +65,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |test|Specify which test tool to generate files for|
**junit**
Use JUnit as test tool
**spock**
Use Spock as test tool
|junit| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|Client service name| |null| |useBeanValidation|Use BeanValidation API annotations| |true| |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| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index b02b75270d88..79aa36220fd0 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -64,6 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useTags|use tags for creating interface and controller classnames| |false| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 4e1183c50be8..f6b391ea4315 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -66,6 +66,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |springBootAdminUri|Spring-Boot URI| |null| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |null| |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| |zipkinUri|Zipkin URI| |null| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index b262f6e44425..002dc7eae11f 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -66,6 +66,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |/app| |supportAsync|Support Async operations| |false| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |openapi-java-playframework| |useBeanValidation|Use BeanValidation API annotations| |true| |useInterfaces|Makes the controllerImp implements an interface to facilitate automatic completion when updating from version x to y of your spec| |true| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index e8c9d5c33bc9..6aa1f1fe2a1d 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |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| ## IMPORT MAPPING diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 24fe9e99f2bc..4089bedda4aa 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |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| ## IMPORT MAPPING diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 873382854ae1..27ba174790d6 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -63,6 +63,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null| |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| diff --git a/docs/generators/java.md b/docs/generators/java.md index 132437fd9bd6..4132f755c123 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -74,6 +74,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |supportStreaming|Support streaming endpoint (beta)| |false| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk. Available on resttemplate, webclient, libraries| |false| |useBeanValidation|Use BeanValidation API annotations| |false| |useGzipFeature|Send gzip-encoded requests| |false| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 4388a69e60c4..9ac40926c75f 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -70,6 +70,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/gen/java| |supportAsync|Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).| |false| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 6d53881cb178..cd9d4fee230c 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/gen/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useBeanValidation|Use BeanValidation API annotations| |false| |useGenericResponse|Use generic response| |false| |useGzipFeatureForTests|Use Gzip Feature for tests| |false| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 65495572e1fb..7518926c80c8 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -73,6 +73,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |supportMultipleSpringServices|Support generation of Spring services from multiple specifications| |false| |testDataControlFile|JSON file to control test data generation| |null| |testDataFile|JSON file to contain generated test data| |null| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useAnnotatedBasePath|Use @Path annotations for basePath| |false| |useBeanValidation|Use BeanValidation API annotations| |true| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 1818ba5b42ef..ca2506a6033c 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -68,6 +68,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useAnnotatedBasePath|Use @Path annotations for basePath| |false| |useBeanValidation|Use BeanValidation API annotations| |true| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index aa4bf2ebf96f..390aeca70a01 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -65,6 +65,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useTags|use tags for creating interface and controller classnames| |false| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index a3ed32580cac..9a63b82d1ce5 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -64,6 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useSwaggerFeature|Use dynamic Swagger generator| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 6ff30a6051e1..fea68a9800ce 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -64,6 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useTags|use tags for creating interface and controller classnames| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 9c8059ccd143..61aa2962a0c7 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -70,6 +70,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |supportAsync|Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).| |false| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index d778596fbf1f..849bd84b8f1f 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -79,6 +79,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |swaggerDocketConfig|Generate Spring OpenAPI Docket configuration class.| |false| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |OpenAPI Spring| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| |useBeanValidation|Use BeanValidation API annotations| |true| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 34c6b4116c3a..aaa30709e109 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -351,7 +351,7 @@ private void generateModelTests(List files, Map models, St if (modelTestFile.exists()) { this.templateProcessor.skip(modelTestFile.toPath(), "Test files never overwrite an existing file of the same name."); } else { - File written = processTemplateToFile(models, templateName, filename, generateModelTests, CodegenConstants.MODEL_TESTS); + File written = processTemplateToFile(models, templateName, filename, generateModelTests, CodegenConstants.MODEL_TESTS, config.modelTestFileFolder()); if (written != null) { files.add(written); if (config.isEnablePostProcessFile() && !dryRun) { @@ -639,7 +639,7 @@ void generateApis(List files, List allOperations, List all if (apiTestFile.exists()) { this.templateProcessor.skip(apiTestFile.toPath(), "Test files never overwrite an existing file of the same name."); } else { - File written = processTemplateToFile(operation, templateName, filename, generateApiTests, CodegenConstants.API_TESTS); + File written = processTemplateToFile(operation, templateName, filename, generateApiTests, CodegenConstants.API_TESTS, config.apiTestFileFolder()); if (written != null) { files.add(written); if (config.isEnablePostProcessFile() && !dryRun) { @@ -1018,11 +1018,15 @@ private void processUserDefinedTemplates() { } protected File processTemplateToFile(Map templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption) throws IOException { + return processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption, this.config.getOutputDir()); + } + + private File processTemplateToFile(Map templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption, String intendedOutputDir) throws IOException { String adjustedOutputFilename = outputFilename.replaceAll("//", "/").replace('/', File.separatorChar); File target = new File(adjustedOutputFilename); if (ignoreProcessor.allowsFile(target)) { if (shouldGenerate) { - Path outDir = java.nio.file.Paths.get(this.config.getOutputDir()).toAbsolutePath(); + Path outDir = java.nio.file.Paths.get(intendedOutputDir).toAbsolutePath(); Path absoluteTarget = target.toPath().toAbsolutePath(); if (!absoluteTarget.startsWith(outDir)) { throw new RuntimeException(String.format(Locale.ROOT, "Target files must be generated within the output directory; absoluteTarget=%s outDir=%s", absoluteTarget, outDir)); 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 05cb3233ebf4..2933bd3302b3 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 @@ -70,6 +70,9 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code public static final String DISCRIMINATOR_CASE_SENSITIVE = "discriminatorCaseSensitive"; public static final String OPENAPI_NULLABLE = "openApiNullable"; public static final String JACKSON = "jackson"; + public static final String TEST_OUTPUT = "testOutput"; + + public static final String DEFAULT_TEST_FOLDER = "${project.build.directory}/generated-test-sources/openapi"; protected String dateLibrary = "threetenbp"; protected boolean supportAsync = false; @@ -113,6 +116,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code protected List additionalModelTypeAnnotations = new LinkedList<>(); protected List additionalEnumTypeAnnotations = new LinkedList<>(); protected boolean openApiNullable = true; + protected String outputTestFolder = ""; protected DocumentationProvider documentationProvider; protected AnnotationLibrary annotationLibrary; @@ -262,6 +266,7 @@ public AbstractJavaCodegen() { snapShotVersionOptions.put("false", "Use a Release Version"); snapShotVersion.setEnum(snapShotVersionOptions); cliOptions.add(snapShotVersion); + cliOptions.add(CliOption.newString(TEST_OUTPUT, "Set output folder for models and APIs tests").defaultValue(DEFAULT_TEST_FOLDER)); if (null != defaultDocumentationProvider()) { CliOption documentationProviderCliOption = new CliOption(DOCUMENTATION_PROVIDER, @@ -638,6 +643,10 @@ public void processOpts() { } else if (dateLibrary.equals("legacy")) { additionalProperties.put("legacyDates", "true"); } + + if (additionalProperties.containsKey(TEST_OUTPUT)) { + setOutputTestFolder(additionalProperties.get(TEST_OUTPUT).toString()); + } } @Override @@ -697,12 +706,12 @@ public String apiFileFolder() { @Override public String apiTestFileFolder() { - return (outputFolder + File.separator + testFolder + File.separator + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar); + return (outputTestFolder + File.separator + testFolder + File.separator + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar); } @Override public String modelTestFileFolder() { - return (outputFolder + File.separator + testFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar); + return (outputTestFolder + File.separator + testFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar); } @Override @@ -1813,6 +1822,25 @@ public void setOpenApiNullable(final boolean openApiNullable) { this.openApiNullable = openApiNullable; } + @Override + public void setOutputDir(String dir) { + super.setOutputDir(dir); + if (this.outputTestFolder.isEmpty()) { + setOutputTestFolder(dir); + } + } + + public String getOutputTestFolder() { + if (outputTestFolder.isEmpty()) { + return DEFAULT_TEST_FOLDER; + } + return outputTestFolder; + } + + public void setOutputTestFolder(String outputTestFolder) { + this.outputTestFolder = outputTestFolder; + } + @Override public DocumentationProvider getDocumentationProvider() { return documentationProvider; 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 7016aa95fe22..13160dc8cda0 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 @@ -350,6 +350,24 @@ public void modelTestFileFolder() { Assert.assertEquals(codegen.modelTestFileFolder(), "/User/open.api.tools/test.folder/org/openapitools/codegen/model".replace('/', File.separatorChar)); } + @Test + public void apiTestFileFolderDirect() { + final AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); + codegen.setOutputTestFolder("/User/open.api.tools"); + codegen.setTestFolder("test.folder"); + codegen.setApiPackage("org.openapitools.codegen.api"); + Assert.assertEquals(codegen.apiTestFileFolder(), "/User/open.api.tools/test.folder/org/openapitools/codegen/api".replace('/', File.separatorChar)); + } + + @Test + public void modelTestFileFolderDirect() { + final AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); + codegen.setOutputTestFolder("/User/open.api.tools"); + codegen.setTestFolder("test.folder"); + codegen.setModelPackage("org.openapitools.codegen.model"); + Assert.assertEquals(codegen.modelTestFileFolder(), "/User/open.api.tools/test.folder/org/openapitools/codegen/model".replace('/', File.separatorChar)); + } + @Test public void modelFileFolder() { final AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); From 9f02759ae4a224a5e55c7db6511a854ffe119ad8 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 26 Jan 2022 16:37:39 +0800 Subject: [PATCH 151/175] update doc --- docs/generators/java-micronaut-server.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 1089565806fd..93b25d43d68b 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -66,6 +66,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| |test|Specify which test tool to generate files for|
**junit**
Use JUnit as test tool
**spock**
Use Spock as test tool
|junit| +|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|Client service name| |null| |useAuth|Whether to import authorization and to annotate controller methods accordingly| |true| |useBeanValidation|Use BeanValidation API annotations| |true| From 0bb08a7268185bc5e445c182dbce7e0b2ea6bf89 Mon Sep 17 00:00:00 2001 From: grzegorz-moto <60603738+grzegorz-moto@users.noreply.github.com> Date: Wed, 26 Jan 2022 13:02:21 +0100 Subject: [PATCH 152/175] [kotlin] back ticks escaping of keywords and more (#11166) * fix base class and back-ticks * back-ticks in key word fix * back-ticks fix in kotlin keywords * samples * remove EOL Co-authored-by: ags039 --- .../src/main/resources/kotlin-spring/dataClass.mustache | 4 ++-- .../src/main/resources/kotlin-spring/dataClassOptVar.mustache | 2 +- .../src/main/resources/kotlin-spring/dataClassReqVar.mustache | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index c13105bcf599..17191e94dd50 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -11,7 +11,7 @@ {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, {{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>dataClassOptVar}}{{^-last}}, {{/-last}}{{/optionalVars}} -) {{/discriminator}}{{#parent}}: {{{.}}}(){{/parent}}{ +) {{/discriminator}}{{#parent}}: {{{.}}}{{/parent}}{ {{#discriminator}} {{#requiredVars}} {{>interfaceReqVar}} @@ -25,7 +25,7 @@ * {{{description}}} * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ - enum class {{nameInCamelCase}}(val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) { + enum class {{{nameInCamelCase}}}(val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) { {{#allowableValues}}{{#enumVars}} @JsonProperty({{{value}}}) {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/enumVars}}{{/allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache index ea6697600045..64b91fd260ec 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache @@ -1,4 +1,4 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}} @Deprecated(message = ""){{/deprecated}} - @field:JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{nameInCamelCase}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + @field:JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInCamelCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache index 33e838a43fb8..d69a07dd85aa 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,3 +1,3 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - @field:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{nameInCamelCase}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}?{{/isReadOnly}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}} \ No newline at end of file + @field:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInCamelCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}?{{/isReadOnly}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}} \ No newline at end of file From 27d322de56fb480a1c374efeed894de1d08e1703 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 27 Jan 2022 21:14:50 +0800 Subject: [PATCH 153/175] fix isArray, isMap tag in jaxrs spec templates (#11424) --- .../resources/JavaJaxRS/spec/pojo.mustache | 8 +- .../model/AdditionalPropertiesClass.java | 128 ++++++++++++++++ .../model/ArrayOfArrayOfNumberOnly.java | 16 ++ .../openapitools/model/ArrayOfNumberOnly.java | 16 ++ .../org/openapitools/model/ArrayTest.java | 48 ++++++ .../org/openapitools/model/EnumArrays.java | 16 ++ .../model/FileSchemaTestClass.java | 16 ++ .../java/org/openapitools/model/MapTest.java | 64 ++++++++ ...ropertiesAndAdditionalPropertiesClass.java | 16 ++ .../gen/java/org/openapitools/model/Pet.java | 32 ++++ .../openapitools/model/TypeHolderDefault.java | 16 ++ .../openapitools/model/TypeHolderExample.java | 16 ++ .../java/org/openapitools/model/XmlItem.java | 144 ++++++++++++++++++ .../model/AdditionalPropertiesClass.java | 128 ++++++++++++++++ .../model/ArrayOfArrayOfNumberOnly.java | 16 ++ .../openapitools/model/ArrayOfNumberOnly.java | 16 ++ .../org/openapitools/model/ArrayTest.java | 48 ++++++ .../org/openapitools/model/EnumArrays.java | 16 ++ .../model/FileSchemaTestClass.java | 16 ++ .../java/org/openapitools/model/MapTest.java | 64 ++++++++ ...ropertiesAndAdditionalPropertiesClass.java | 16 ++ .../gen/java/org/openapitools/model/Pet.java | 32 ++++ .../openapitools/model/TypeHolderDefault.java | 16 ++ .../openapitools/model/TypeHolderExample.java | 16 ++ .../java/org/openapitools/model/XmlItem.java | 144 ++++++++++++++++++ 25 files changed, 1060 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache index 9d0793fe7759..4e9af1007bd0 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -55,7 +55,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; this.{{name}} = {{name}}; } - {{#isListContainer}} + {{#isArray}} public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { if (this.{{name}} == null) { this.{{name}} = {{{defaultValue}}}; @@ -72,8 +72,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; return this; } - {{/isListContainer}} - {{#isMapContainer}} + {{/isArray}} + {{#isMap}} public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { if (this.{{name}} == null) { this.{{name}} = {{{defaultValue}}}; @@ -90,7 +90,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; return this; } - {{/isMapContainer}} + {{/isMap}} {{/vars}} @Override diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 61bec1b6ff49..4ebb303b8370 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -55,6 +55,22 @@ public void setMapString(Map mapString) { this.mapString = mapString; } + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap(); + } + + this.mapString.put(key, mapStringItem); + return this; + } + + public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) { + if (mapStringItem != null && this.mapString != null) { + this.mapString.remove(mapStringItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapNumber(Map mapNumber) { @@ -76,6 +92,22 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap(); + } + + this.mapNumber.put(key, mapNumberItem); + return this; + } + + public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) { + if (mapNumberItem != null && this.mapNumber != null) { + this.mapNumber.remove(mapNumberItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapInteger(Map mapInteger) { @@ -97,6 +129,22 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap(); + } + + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) { + if (mapIntegerItem != null && this.mapInteger != null) { + this.mapInteger.remove(mapIntegerItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { @@ -118,6 +166,22 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap(); + } + + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) { + if (mapBooleanItem != null && this.mapBoolean != null) { + this.mapBoolean.remove(mapBooleanItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { @@ -139,6 +203,22 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap>(); + } + + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + public AdditionalPropertiesClass removeMapArrayIntegerItem(List mapArrayIntegerItem) { + if (mapArrayIntegerItem != null && this.mapArrayInteger != null) { + this.mapArrayInteger.remove(mapArrayIntegerItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { @@ -160,6 +240,22 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap>(); + } + + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + public AdditionalPropertiesClass removeMapArrayAnytypeItem(List mapArrayAnytypeItem) { + if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) { + this.mapArrayAnytype.remove(mapArrayAnytypeItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapMapString(Map> mapMapString) { @@ -181,6 +277,22 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap>(); + } + + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + public AdditionalPropertiesClass removeMapMapStringItem(Map mapMapStringItem) { + if (mapMapStringItem != null && this.mapMapString != null) { + this.mapMapString.remove(mapMapStringItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { @@ -202,6 +314,22 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap>(); + } + + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + public AdditionalPropertiesClass removeMapMapAnytypeItem(Map mapMapAnytypeItem) { + if (mapMapAnytypeItem != null && this.mapMapAnytype != null) { + this.mapMapAnytype.remove(mapMapAnytypeItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass anytype1(Object anytype1) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index cbca7de2f692..e4dc1fd68370 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -44,6 +44,22 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList>(); + } + + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + public ArrayOfArrayOfNumberOnly removeArrayArrayNumberItem(List arrayArrayNumberItem) { + if (arrayArrayNumberItem != null && this.arrayArrayNumber != null) { + this.arrayArrayNumber.remove(arrayArrayNumberItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index ad7cc3db32ef..19e29e9703b0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -44,6 +44,22 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList(); + } + + this.arrayNumber.add(arrayNumberItem); + return this; + } + + public ArrayOfNumberOnly removeArrayNumberItem(BigDecimal arrayNumberItem) { + if (arrayNumberItem != null && this.arrayNumber != null) { + this.arrayNumber.remove(arrayNumberItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java index f2b7469f65c7..bda8bb29dc87 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java @@ -46,6 +46,22 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList(); + } + + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + public ArrayTest removeArrayOfStringItem(String arrayOfStringItem) { + if (arrayOfStringItem != null && this.arrayOfString != null) { + this.arrayOfString.remove(arrayOfStringItem); + } + + return this; + } /** **/ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { @@ -67,6 +83,22 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList>(); + } + + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (arrayArrayOfIntegerItem != null && this.arrayArrayOfInteger != null) { + this.arrayArrayOfInteger.remove(arrayArrayOfIntegerItem); + } + + return this; + } /** **/ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { @@ -88,6 +120,22 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList>(); + } + + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { + this.arrayArrayOfModel.remove(arrayArrayOfModelItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java index bf05c76fd9ee..f9f302e48cc3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java @@ -131,6 +131,22 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList(); + } + + this.arrayEnum.add(arrayEnumItem); + return this; + } + + public EnumArrays removeArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (arrayEnumItem != null && this.arrayEnum != null) { + this.arrayEnum.remove(arrayEnumItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 05ff7b2ea246..6828ddc9bd41 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -66,6 +66,22 @@ public void setFiles(List files) { this.files = files; } + public FileSchemaTestClass addFilesItem(ModelFile filesItem) { + if (this.files == null) { + this.files = new ArrayList(); + } + + this.files.add(filesItem); + return this; + } + + public FileSchemaTestClass removeFilesItem(ModelFile filesItem) { + if (filesItem != null && this.files != null) { + this.files.remove(filesItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java index f5c57914a905..fe54c2dbaf12 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java @@ -80,6 +80,22 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap>(); + } + + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + public MapTest removeMapMapOfStringItem(Map mapMapOfStringItem) { + if (mapMapOfStringItem != null && this.mapMapOfString != null) { + this.mapMapOfString.remove(mapMapOfStringItem); + } + + return this; + } /** **/ public MapTest mapOfEnumString(Map mapOfEnumString) { @@ -101,6 +117,22 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap(); + } + + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) { + if (mapOfEnumStringItem != null && this.mapOfEnumString != null) { + this.mapOfEnumString.remove(mapOfEnumStringItem); + } + + return this; + } /** **/ public MapTest directMap(Map directMap) { @@ -122,6 +154,22 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap(); + } + + this.directMap.put(key, directMapItem); + return this; + } + + public MapTest removeDirectMapItem(Boolean directMapItem) { + if (directMapItem != null && this.directMap != null) { + this.directMap.remove(directMapItem); + } + + return this; + } /** **/ public MapTest indirectMap(Map indirectMap) { @@ -143,6 +191,22 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap(); + } + + this.indirectMap.put(key, indirectMapItem); + return this; + } + + public MapTest removeIndirectMapItem(Boolean indirectMapItem) { + if (indirectMapItem != null && this.indirectMap != null) { + this.indirectMap.remove(indirectMapItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 77464620e9c6..54bbb7ca2f01 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -91,6 +91,22 @@ public void setMap(Map map) { this.map = map; } + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap(); + } + + this.map.put(key, mapItem); + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) { + if (mapItem != null && this.map != null) { + this.map.remove(mapItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java index 7162d94b3b88..b35574db4cd0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java @@ -152,6 +152,22 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet(); + } + + this.photoUrls.add(photoUrlsItem); + return this; + } + + public Pet removePhotoUrlsItem(String photoUrlsItem) { + if (photoUrlsItem != null && this.photoUrls != null) { + this.photoUrls.remove(photoUrlsItem); + } + + return this; + } /** **/ public Pet tags(List tags) { @@ -173,6 +189,22 @@ public void setTags(List tags) { this.tags = tags; } + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList(); + } + + this.tags.add(tagsItem); + return this; + } + + public Pet removeTagsItem(Tag tagsItem) { + if (tagsItem != null && this.tags != null) { + this.tags.remove(tagsItem); + } + + return this; + } /** * pet status in the store **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java index a093d79a6d66..1d7658a94fa3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -137,6 +137,22 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + + this.arrayItem.add(arrayItemItem); + return this; + } + + public TypeHolderDefault removeArrayItemItem(Integer arrayItemItem) { + if (arrayItemItem != null && this.arrayItem != null) { + this.arrayItem.remove(arrayItemItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java index daaffc8af457..cdb7058acec5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -160,6 +160,22 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + + this.arrayItem.add(arrayItemItem); + return this; + } + + public TypeHolderExample removeArrayItemItem(Integer arrayItemItem) { + if (arrayItemItem != null && this.arrayItem != null) { + this.arrayItem.remove(arrayItemItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java index 241ebb4e1bc4..8e593b393928 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java @@ -156,6 +156,22 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList(); + } + + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + public XmlItem removeWrappedArrayItem(Integer wrappedArrayItem) { + if (wrappedArrayItem != null && this.wrappedArray != null) { + this.wrappedArray.remove(wrappedArrayItem); + } + + return this; + } /** **/ public XmlItem nameString(String nameString) { @@ -261,6 +277,22 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList(); + } + + this.nameArray.add(nameArrayItem); + return this; + } + + public XmlItem removeNameArrayItem(Integer nameArrayItem) { + if (nameArrayItem != null && this.nameArray != null) { + this.nameArray.remove(nameArrayItem); + } + + return this; + } /** **/ public XmlItem nameWrappedArray(List nameWrappedArray) { @@ -282,6 +314,22 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList(); + } + + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + public XmlItem removeNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (nameWrappedArrayItem != null && this.nameWrappedArray != null) { + this.nameWrappedArray.remove(nameWrappedArrayItem); + } + + return this; + } /** **/ public XmlItem prefixString(String prefixString) { @@ -387,6 +435,22 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList(); + } + + this.prefixArray.add(prefixArrayItem); + return this; + } + + public XmlItem removePrefixArrayItem(Integer prefixArrayItem) { + if (prefixArrayItem != null && this.prefixArray != null) { + this.prefixArray.remove(prefixArrayItem); + } + + return this; + } /** **/ public XmlItem prefixWrappedArray(List prefixWrappedArray) { @@ -408,6 +472,22 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList(); + } + + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + public XmlItem removePrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (prefixWrappedArrayItem != null && this.prefixWrappedArray != null) { + this.prefixWrappedArray.remove(prefixWrappedArrayItem); + } + + return this; + } /** **/ public XmlItem namespaceString(String namespaceString) { @@ -513,6 +593,22 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList(); + } + + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + public XmlItem removeNamespaceArrayItem(Integer namespaceArrayItem) { + if (namespaceArrayItem != null && this.namespaceArray != null) { + this.namespaceArray.remove(namespaceArrayItem); + } + + return this; + } /** **/ public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { @@ -534,6 +630,22 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList(); + } + + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + public XmlItem removeNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (namespaceWrappedArrayItem != null && this.namespaceWrappedArray != null) { + this.namespaceWrappedArray.remove(namespaceWrappedArrayItem); + } + + return this; + } /** **/ public XmlItem prefixNsString(String prefixNsString) { @@ -639,6 +751,22 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList(); + } + + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + public XmlItem removePrefixNsArrayItem(Integer prefixNsArrayItem) { + if (prefixNsArrayItem != null && this.prefixNsArray != null) { + this.prefixNsArray.remove(prefixNsArrayItem); + } + + return this; + } /** **/ public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { @@ -660,6 +788,22 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList(); + } + + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + public XmlItem removePrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (prefixNsWrappedArrayItem != null && this.prefixNsWrappedArray != null) { + this.prefixNsWrappedArray.remove(prefixNsWrappedArrayItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 61bec1b6ff49..4ebb303b8370 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -55,6 +55,22 @@ public void setMapString(Map mapString) { this.mapString = mapString; } + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap(); + } + + this.mapString.put(key, mapStringItem); + return this; + } + + public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) { + if (mapStringItem != null && this.mapString != null) { + this.mapString.remove(mapStringItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapNumber(Map mapNumber) { @@ -76,6 +92,22 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap(); + } + + this.mapNumber.put(key, mapNumberItem); + return this; + } + + public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) { + if (mapNumberItem != null && this.mapNumber != null) { + this.mapNumber.remove(mapNumberItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapInteger(Map mapInteger) { @@ -97,6 +129,22 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap(); + } + + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) { + if (mapIntegerItem != null && this.mapInteger != null) { + this.mapInteger.remove(mapIntegerItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { @@ -118,6 +166,22 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap(); + } + + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) { + if (mapBooleanItem != null && this.mapBoolean != null) { + this.mapBoolean.remove(mapBooleanItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { @@ -139,6 +203,22 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap>(); + } + + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + public AdditionalPropertiesClass removeMapArrayIntegerItem(List mapArrayIntegerItem) { + if (mapArrayIntegerItem != null && this.mapArrayInteger != null) { + this.mapArrayInteger.remove(mapArrayIntegerItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { @@ -160,6 +240,22 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap>(); + } + + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + public AdditionalPropertiesClass removeMapArrayAnytypeItem(List mapArrayAnytypeItem) { + if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) { + this.mapArrayAnytype.remove(mapArrayAnytypeItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapMapString(Map> mapMapString) { @@ -181,6 +277,22 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap>(); + } + + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + public AdditionalPropertiesClass removeMapMapStringItem(Map mapMapStringItem) { + if (mapMapStringItem != null && this.mapMapString != null) { + this.mapMapString.remove(mapMapStringItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { @@ -202,6 +314,22 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap>(); + } + + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + public AdditionalPropertiesClass removeMapMapAnytypeItem(Map mapMapAnytypeItem) { + if (mapMapAnytypeItem != null && this.mapMapAnytype != null) { + this.mapMapAnytype.remove(mapMapAnytypeItem); + } + + return this; + } /** **/ public AdditionalPropertiesClass anytype1(Object anytype1) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index cbca7de2f692..e4dc1fd68370 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -44,6 +44,22 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList>(); + } + + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + public ArrayOfArrayOfNumberOnly removeArrayArrayNumberItem(List arrayArrayNumberItem) { + if (arrayArrayNumberItem != null && this.arrayArrayNumber != null) { + this.arrayArrayNumber.remove(arrayArrayNumberItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index ad7cc3db32ef..19e29e9703b0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -44,6 +44,22 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList(); + } + + this.arrayNumber.add(arrayNumberItem); + return this; + } + + public ArrayOfNumberOnly removeArrayNumberItem(BigDecimal arrayNumberItem) { + if (arrayNumberItem != null && this.arrayNumber != null) { + this.arrayNumber.remove(arrayNumberItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java index f2b7469f65c7..bda8bb29dc87 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java @@ -46,6 +46,22 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList(); + } + + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + public ArrayTest removeArrayOfStringItem(String arrayOfStringItem) { + if (arrayOfStringItem != null && this.arrayOfString != null) { + this.arrayOfString.remove(arrayOfStringItem); + } + + return this; + } /** **/ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { @@ -67,6 +83,22 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList>(); + } + + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (arrayArrayOfIntegerItem != null && this.arrayArrayOfInteger != null) { + this.arrayArrayOfInteger.remove(arrayArrayOfIntegerItem); + } + + return this; + } /** **/ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { @@ -88,6 +120,22 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList>(); + } + + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { + this.arrayArrayOfModel.remove(arrayArrayOfModelItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java index bf05c76fd9ee..f9f302e48cc3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java @@ -131,6 +131,22 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList(); + } + + this.arrayEnum.add(arrayEnumItem); + return this; + } + + public EnumArrays removeArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (arrayEnumItem != null && this.arrayEnum != null) { + this.arrayEnum.remove(arrayEnumItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 05ff7b2ea246..6828ddc9bd41 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -66,6 +66,22 @@ public void setFiles(List files) { this.files = files; } + public FileSchemaTestClass addFilesItem(ModelFile filesItem) { + if (this.files == null) { + this.files = new ArrayList(); + } + + this.files.add(filesItem); + return this; + } + + public FileSchemaTestClass removeFilesItem(ModelFile filesItem) { + if (filesItem != null && this.files != null) { + this.files.remove(filesItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java index f5c57914a905..fe54c2dbaf12 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java @@ -80,6 +80,22 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap>(); + } + + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + public MapTest removeMapMapOfStringItem(Map mapMapOfStringItem) { + if (mapMapOfStringItem != null && this.mapMapOfString != null) { + this.mapMapOfString.remove(mapMapOfStringItem); + } + + return this; + } /** **/ public MapTest mapOfEnumString(Map mapOfEnumString) { @@ -101,6 +117,22 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap(); + } + + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) { + if (mapOfEnumStringItem != null && this.mapOfEnumString != null) { + this.mapOfEnumString.remove(mapOfEnumStringItem); + } + + return this; + } /** **/ public MapTest directMap(Map directMap) { @@ -122,6 +154,22 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap(); + } + + this.directMap.put(key, directMapItem); + return this; + } + + public MapTest removeDirectMapItem(Boolean directMapItem) { + if (directMapItem != null && this.directMap != null) { + this.directMap.remove(directMapItem); + } + + return this; + } /** **/ public MapTest indirectMap(Map indirectMap) { @@ -143,6 +191,22 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap(); + } + + this.indirectMap.put(key, indirectMapItem); + return this; + } + + public MapTest removeIndirectMapItem(Boolean indirectMapItem) { + if (indirectMapItem != null && this.indirectMap != null) { + this.indirectMap.remove(indirectMapItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 77464620e9c6..54bbb7ca2f01 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -91,6 +91,22 @@ public void setMap(Map map) { this.map = map; } + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap(); + } + + this.map.put(key, mapItem); + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) { + if (mapItem != null && this.map != null) { + this.map.remove(mapItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java index 7162d94b3b88..b35574db4cd0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java @@ -152,6 +152,22 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet(); + } + + this.photoUrls.add(photoUrlsItem); + return this; + } + + public Pet removePhotoUrlsItem(String photoUrlsItem) { + if (photoUrlsItem != null && this.photoUrls != null) { + this.photoUrls.remove(photoUrlsItem); + } + + return this; + } /** **/ public Pet tags(List tags) { @@ -173,6 +189,22 @@ public void setTags(List tags) { this.tags = tags; } + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList(); + } + + this.tags.add(tagsItem); + return this; + } + + public Pet removeTagsItem(Tag tagsItem) { + if (tagsItem != null && this.tags != null) { + this.tags.remove(tagsItem); + } + + return this; + } /** * pet status in the store **/ diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java index a093d79a6d66..1d7658a94fa3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -137,6 +137,22 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + + this.arrayItem.add(arrayItemItem); + return this; + } + + public TypeHolderDefault removeArrayItemItem(Integer arrayItemItem) { + if (arrayItemItem != null && this.arrayItem != null) { + this.arrayItem.remove(arrayItemItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java index daaffc8af457..cdb7058acec5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -160,6 +160,22 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + + this.arrayItem.add(arrayItemItem); + return this; + } + + public TypeHolderExample removeArrayItemItem(Integer arrayItemItem) { + if (arrayItemItem != null && this.arrayItem != null) { + this.arrayItem.remove(arrayItemItem); + } + + return this; + } @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java index 241ebb4e1bc4..8e593b393928 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java @@ -156,6 +156,22 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList(); + } + + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + public XmlItem removeWrappedArrayItem(Integer wrappedArrayItem) { + if (wrappedArrayItem != null && this.wrappedArray != null) { + this.wrappedArray.remove(wrappedArrayItem); + } + + return this; + } /** **/ public XmlItem nameString(String nameString) { @@ -261,6 +277,22 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList(); + } + + this.nameArray.add(nameArrayItem); + return this; + } + + public XmlItem removeNameArrayItem(Integer nameArrayItem) { + if (nameArrayItem != null && this.nameArray != null) { + this.nameArray.remove(nameArrayItem); + } + + return this; + } /** **/ public XmlItem nameWrappedArray(List nameWrappedArray) { @@ -282,6 +314,22 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList(); + } + + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + public XmlItem removeNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (nameWrappedArrayItem != null && this.nameWrappedArray != null) { + this.nameWrappedArray.remove(nameWrappedArrayItem); + } + + return this; + } /** **/ public XmlItem prefixString(String prefixString) { @@ -387,6 +435,22 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList(); + } + + this.prefixArray.add(prefixArrayItem); + return this; + } + + public XmlItem removePrefixArrayItem(Integer prefixArrayItem) { + if (prefixArrayItem != null && this.prefixArray != null) { + this.prefixArray.remove(prefixArrayItem); + } + + return this; + } /** **/ public XmlItem prefixWrappedArray(List prefixWrappedArray) { @@ -408,6 +472,22 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList(); + } + + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + public XmlItem removePrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (prefixWrappedArrayItem != null && this.prefixWrappedArray != null) { + this.prefixWrappedArray.remove(prefixWrappedArrayItem); + } + + return this; + } /** **/ public XmlItem namespaceString(String namespaceString) { @@ -513,6 +593,22 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList(); + } + + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + public XmlItem removeNamespaceArrayItem(Integer namespaceArrayItem) { + if (namespaceArrayItem != null && this.namespaceArray != null) { + this.namespaceArray.remove(namespaceArrayItem); + } + + return this; + } /** **/ public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { @@ -534,6 +630,22 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList(); + } + + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + public XmlItem removeNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (namespaceWrappedArrayItem != null && this.namespaceWrappedArray != null) { + this.namespaceWrappedArray.remove(namespaceWrappedArrayItem); + } + + return this; + } /** **/ public XmlItem prefixNsString(String prefixNsString) { @@ -639,6 +751,22 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList(); + } + + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + public XmlItem removePrefixNsArrayItem(Integer prefixNsArrayItem) { + if (prefixNsArrayItem != null && this.prefixNsArray != null) { + this.prefixNsArray.remove(prefixNsArrayItem); + } + + return this; + } /** **/ public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { @@ -660,6 +788,22 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList(); + } + + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + public XmlItem removePrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (prefixNsWrappedArrayItem != null && this.prefixNsWrappedArray != null) { + this.prefixNsWrappedArray.remove(prefixNsWrappedArrayItem); + } + + return this; + } @Override public boolean equals(Object o) { From ff7c2bdb591dd8fb6dd1c39dbe88367dbea4042d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 27 Jan 2022 21:17:41 +0800 Subject: [PATCH 154/175] comment out groovy test --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 94336ceb9a25..332c899e1ad7 100644 --- a/pom.xml +++ b/pom.xml @@ -1354,7 +1354,8 @@ - samples/client/petstore/groovy + samples/client/petstore/scala-akka samples/client/petstore/scala-sttp samples/client/petstore/scala-httpclient From aed513f65dc086ba7fa2dbc2791acd9fc45cd91e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 28 Jan 2022 10:56:30 +0800 Subject: [PATCH 155/175] [TS][nestjs] fix isListContainer with isArray (#11425) * fix isListContainer with isArray in ts nextjs * update samples --- .../typescript-nestjs/api.service.mustache | 24 +++++++++---------- .../builds/default/api/pet.service.ts | 8 +++---- 2 files changed, 16 insertions(+), 16 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 b95a4fa6e0e2..ddea339cf179 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 @@ -72,7 +72,7 @@ export class {{classname}} { {{#hasQueryParams}} let queryParameters = {}; {{#queryParams}} - {{#isListContainer}} + {{#isArray}} if ({{paramName}}) { {{#isCollectionFormatMulti}} {{paramName}}.forEach((element) => { @@ -83,8 +83,8 @@ export class {{classname}} { queryParameters['{{baseName}}'] = {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']); {{/isCollectionFormatMulti}} } - {{/isListContainer}} - {{^isListContainer}} + {{/isArray}} + {{^isArray}} if ({{paramName}} !== undefined && {{paramName}} !== null) { {{#isDateTime}} queryParameters['{{baseName}}'] = {{paramName}}.toISOString(); @@ -93,22 +93,22 @@ export class {{classname}} { queryParameters['{{baseName}}'] = {{paramName}}; {{/isDateTime}} } - {{/isListContainer}} + {{/isArray}} {{/queryParams}} {{/hasQueryParams}} let headers = this.defaultHeaders; {{#headerParams}} - {{#isListContainer}} + {{#isArray}} if ({{paramName}}) { headers['{{baseName}}'] = {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']); } - {{/isListContainer}} - {{^isListContainer}} + {{/isArray}} + {{^isArray}} if ({{paramName}} !== undefined && {{paramName}} !== null) { headers['{{baseName}}'] = String({{paramName}}); } - {{/isListContainer}} + {{/isArray}} {{/headerParams}} {{#authMethods}} @@ -188,7 +188,7 @@ export class {{classname}} { } {{#formParams}} - {{#isListContainer}} + {{#isArray}} if ({{paramName}}) { {{#isCollectionFormatMulti}} {{paramName}}.forEach((element) => { @@ -199,12 +199,12 @@ export class {{classname}} { formParams.append('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])); {{/isCollectionFormatMulti}} } - {{/isListContainer}} - {{^isListContainer}} + {{/isArray}} + {{^isArray}} if ({{paramName}} !== undefined) { formParams.append('{{baseName}}', {{paramName}}); } - {{/isListContainer}} + {{/isArray}} {{/formParams}} {{/hasFormParams}} 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 d3300f3906a0..5fa20c944db5 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 @@ -153,8 +153,8 @@ export class PetService { } let queryParameters = {}; - if (status !== undefined && status !== null) { - queryParameters['status'] = status; + if (status) { + queryParameters['status'] = status.join(COLLECTION_FORMATS['csv']); } let headers = this.defaultHeaders; @@ -203,8 +203,8 @@ export class PetService { } let queryParameters = {}; - if (tags !== undefined && tags !== null) { - queryParameters['tags'] = tags; + if (tags) { + queryParameters['tags'] = tags.join(COLLECTION_FORMATS['csv']); } let headers = this.defaultHeaders; From 24366be0db4d6baf9da7a426803a645804c79922 Mon Sep 17 00:00:00 2001 From: devhl-labs Date: Thu, 27 Jan 2022 23:05:36 -0500 Subject: [PATCH 156/175] [csharp-netcore] Adding generic host library (#10627) * added generichost library * added templates * added an event, improved docs, added logging * adding event args file * fixed hard coded package name * added an AddTokens overload for a single token * changed api clients to singletons to support the event registration * build samples * log exceptions while executing api responded event * nrt bug fixes, dangling comma fix * resolving comments * removed debugging lines * refactored token provider * rate limit provider now default * updated readme, added ConfigureAwait(false) * DI fixes * removed a hard coded project name * fixed nrt bugs * improved NRT and .net 3.1 support * renamed projectName to apiName, added cli option * trying to avoid conflict * set GenerateAssemlbyInfo to true * created docs/scripts folder * moved ApiTestsBase.cs to not get overwritten * test fixes and improvements * fixed licenseId bug, updated readme * build samples * export docs * removed new language features * added support for .net standard 2.0 * added git_push.ps1 * fixed bug in git_push.sh due to the new directory, prompting user for commit message * moved documentation folders * fixed bug when apiKey in query * bug fix --- docs/generators/csharp-netcore.md | 3 +- .../codegen/CodegenConstants.java | 2 + .../languages/CSharpNetCoreClientCodegen.java | 173 ++++- .../resources/csharp-netcore/api_doc.mustache | 2 +- .../generichost/ApiException.mustache | 44 ++ .../generichost/ApiKeyToken.mustache | 59 ++ .../generichost/ApiResponseEventArgs.mustache | 47 ++ .../generichost/ApiResponse`1.mustache | 97 +++ .../generichost/ApiTestsBase.mustache | 47 ++ .../libraries/generichost/BasicToken.mustache | 44 ++ .../generichost/BearerToken.mustache | 39 + .../generichost/ClientUtils.mustache | 360 ++++++++++ .../DependencyInjectionTests.mustache | 158 ++++ .../generichost/HostConfiguration.mustache | 124 ++++ .../HttpSigningConfiguration.mustache | 676 ++++++++++++++++++ .../generichost/HttpSigningToken.mustache | 43 ++ .../libraries/generichost/IApi.mustache | 21 + .../libraries/generichost/OAuthToken.mustache | 39 + .../libraries/generichost/README.mustache | 214 ++++++ .../generichost/RateLimitProvider`1.mustache | 106 +++ .../libraries/generichost/TokenBase.mustache | 71 ++ .../generichost/TokenContainer`1.mustache | 37 + .../generichost/TokenProvider`1.mustache | 36 + .../libraries/generichost/api.mustache | 391 ++++++++++ .../libraries/generichost/api_test.mustache | 46 ++ .../generichost/git_push.ps1.mustache | 75 ++ .../generichost/git_push.sh.mustache | 49 ++ .../csharp-netcore/modelAnyOf.mustache | 2 + .../csharp-netcore/modelOneOf.mustache | 2 + .../csharp-netcore/model_doc.mustache | 2 +- .../csharp-netcore/netcore_project.mustache | 12 +- .../netcore_testproject.mustache | 3 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- 40 files changed, 3011 insertions(+), 29 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponseEventArgs.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiTestsBase.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DependencyInjectionTests.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IApi.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api_test.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.ps1.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.sh.mustache diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index d693fdf9e441..17bc2cfa9745 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -19,12 +19,13 @@ 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| +|apiName|Must be a valid C# class name. Only used in Generic Host library. Default: Api| |Api| |caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| |conditionalSerialization|Serialize only those properties which are initialized by user, accepted values are true or false, default value is false.| |false| |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| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|library|HTTP library template (sub-template) to use|
**httpclient**
HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) (Experimental. May subject to breaking changes without further notice.)
**restsharp**
RestSharp (https://github.com/restsharp/RestSharp)
|restsharp| +|library|HTTP library template (sub-template) to use|
**generichost**
HttpClient with Generic Host dependency injection (https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host) (Experimental. Subject to breaking changes without notice.)
**httpclient**
HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) (Experimental. Subject to breaking changes without notice.)
**restsharp**
RestSharp (https://github.com/restsharp/RestSharp)
|restsharp| |licenseId|The identifier of the license| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| |netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index ffbd0c5e0a4b..27c47456bc0c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -35,6 +35,8 @@ public class CodegenConstants { public static final String SKIP_FORM_MODEL = "skipFormModel"; /* /end System Properties */ + public static final String API_NAME = "apiName"; + public static final String API_PACKAGE = "apiPackage"; public static final String API_PACKAGE_DESC = "package for generated api classes"; 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 e211deb48abe..67cfd2f1cfae 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 @@ -39,7 +39,9 @@ import static org.openapitools.codegen.utils.StringUtils.underscore; @SuppressWarnings("Duplicates") -public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { +public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { + protected String apiName = "Api"; + // Defines the sdk option for targeted frameworks, which differs from targetFramework and targetFrameworkNuget protected static final String MCS_NET_VERSION_KEY = "x-mcs-sdk"; protected static final String SUPPORTS_UWP = "supportsUWP"; @@ -50,6 +52,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { // HTTP libraries protected static final String RESTSHARP = "restsharp"; protected static final String HTTPCLIENT = "httpclient"; + protected static final String GENERICHOST = "generichost"; // Project Variable, determined from target framework. Not intended to be user-settable. protected static final String TARGET_FRAMEWORK_IDENTIFIER = "targetFrameworkIdentifier"; @@ -172,6 +175,10 @@ public CSharpNetCoreClientCodegen() { "C# package name (convention: Title.Case).", this.packageName); + addOption(CodegenConstants.API_NAME, + "Must be a valid C# class name. Only used in Generic Host library. Default: " + this.apiName, + this.apiName); + addOption(CodegenConstants.PACKAGE_VERSION, "C# package version.", this.packageVersion); @@ -269,8 +276,8 @@ public CSharpNetCoreClientCodegen() { this.optionalEmitDefaultValuesFlag); addSwitch(CodegenConstants.OPTIONAL_CONDITIONAL_SERIALIZATION, - CodegenConstants.OPTIONAL_CONDITIONAL_SERIALIZATION_DESC, - this.conditionalSerialization); + CodegenConstants.OPTIONAL_CONDITIONAL_SERIALIZATION_DESC, + this.conditionalSerialization); addSwitch(CodegenConstants.OPTIONAL_PROJECT_FILE, CodegenConstants.OPTIONAL_PROJECT_FILE_DESC, @@ -310,8 +317,10 @@ public CSharpNetCoreClientCodegen() { regexModifiers.put('s', "Singleline"); regexModifiers.put('x', "IgnorePatternWhitespace"); + supportedLibraries.put(GENERICHOST, "HttpClient with Generic Host dependency injection (https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host) " + + "(Experimental. Subject to breaking changes without notice.)"); supportedLibraries.put(HTTPCLIENT, "HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) " - + "(Experimental. May subject to breaking changes without further notice.)"); + + "(Experimental. Subject to breaking changes without notice.)"); supportedLibraries.put(RESTSHARP, "RestSharp (https://github.com/restsharp/RestSharp)"); CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "HTTP library template (sub-template) to use"); @@ -324,7 +333,11 @@ public CSharpNetCoreClientCodegen() { @Override public String apiDocFileFolder() { - return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar); + if (GENERICHOST.equals(getLibrary())){ + return (outputFolder + "/" + apiDocPath + File.separatorChar + "apis").replace('/', File.separatorChar); + }else{ + return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar); + } } @Override @@ -454,7 +467,11 @@ public void setNonPublicApi(final boolean nonPublicApi) { @Override public String modelDocFileFolder() { - return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar); + if (GENERICHOST.equals(getLibrary())){ + return (outputFolder + "/" + modelDocPath + File.separator + "models").replace('/', File.separatorChar); + }else{ + return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar); + } } @Override @@ -559,6 +576,16 @@ public void processOpts() { setModelPropertyNaming((String) additionalProperties.get(CodegenConstants.MODEL_PROPERTY_NAMING)); } + if (additionalProperties.containsKey((CodegenConstants.LICENSE_ID))) { + setLicenseId((String) additionalProperties.get(CodegenConstants.LICENSE_ID)); + } + + if (additionalProperties.containsKey(CodegenConstants.API_NAME)) { + setApiName((String) additionalProperties.get(CodegenConstants.API_NAME)); + } else { + additionalProperties.put(CodegenConstants.API_NAME, apiName); + } + if (isEmpty(apiPackage)) { setApiPackage("Api"); } @@ -568,7 +595,10 @@ public void processOpts() { clientPackage = "Client"; - if (RESTSHARP.equals(getLibrary())) { + if (GENERICHOST.equals(getLibrary())){ + setLibrary(GENERICHOST); + additionalProperties.put("useGenericHost", true); + } else if (RESTSHARP.equals(getLibrary())) { additionalProperties.put("useRestSharp", true); needsCustomHttpMethod = true; } else if (HTTPCLIENT.equals(getLibrary())) { @@ -670,11 +700,59 @@ public void processOpts() { binRelativePath += "vendor"; additionalProperties.put("binRelativePath", binRelativePath); + // Only write out test related files if excludeTests is unset or explicitly set to false (see start of this method) + if (Boolean.FALSE.equals(excludeTests.get())) { + modelTestTemplateFiles.put("model_test.mustache", ".cs"); + apiTestTemplateFiles.put("api_test.mustache", ".cs"); + } + if(HTTPCLIENT.equals(getLibrary())) { supportingFiles.add(new SupportingFile("FileParameter.mustache", clientPackageDir, "FileParameter.cs")); typeMapping.put("file", "FileParameter"); + addRestSharpSupportingFiles(clientPackageDir, packageFolder, excludeTests, testPackageFolder, testPackageName, modelPackageDir); + additionalProperties.put("apiDocPath", apiDocPath); + additionalProperties.put("modelDocPath", modelDocPath); + } + else if (GENERICHOST.equals(getLibrary())){ + addGenericHostSupportingFiles(clientPackageDir, packageFolder, excludeTests, testPackageFolder, testPackageName, modelPackageDir); + additionalProperties.put("apiDocPath", apiDocPath + File.separatorChar + "apis"); + additionalProperties.put("modelDocPath", modelDocPath + File.separatorChar + "models"); } + else{ + addRestSharpSupportingFiles(clientPackageDir, packageFolder, excludeTests, testPackageFolder, testPackageName, modelPackageDir); + additionalProperties.put("apiDocPath", apiDocPath); + additionalProperties.put("modelDocPath", modelDocPath); + } + + addTestInstructions(); + } + + 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 addRestSharpSupportingFiles(final String clientPackageDir, final String packageFolder, + final AtomicReference excludeTests, final String testPackageFolder, final String testPackageName, final String modelPackageDir){ supportingFiles.add(new SupportingFile("IApiAccessor.mustache", clientPackageDir, "IApiAccessor.cs")); supportingFiles.add(new SupportingFile("Configuration.mustache", clientPackageDir, "Configuration.cs")); supportingFiles.add(new SupportingFile("ApiClient.mustache", clientPackageDir, "ApiClient.cs")); @@ -708,12 +786,6 @@ public void processOpts() { supportingFiles.add(new SupportingFile("GlobalConfiguration.mustache", clientPackageDir, "GlobalConfiguration.cs")); - // Only write out test related files if excludeTests is unset or explicitly set to false (see start of this method) - if (Boolean.FALSE.equals(excludeTests.get())) { - modelTestTemplateFiles.put("model_test.mustache", ".cs"); - apiTestTemplateFiles.put("api_test.mustache", ".cs"); - } - supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); @@ -727,9 +799,64 @@ public void processOpts() { supportingFiles.add(new SupportingFile("appveyor.mustache", "", "appveyor.yml")); 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){ + 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")); + supportingFiles.add(new SupportingFile("TokenBase.mustache", clientPackageDir, "TokenBase.cs")); + supportingFiles.add(new SupportingFile("ApiException.mustache", clientPackageDir, "ApiException.cs")); + 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("AbstractOpenAPISchema.mustache", modelPackageDir, "AbstractOpenAPISchema.cs")); + supportingFiles.add(new SupportingFile("OpenAPIDateConverter.mustache", clientPackageDir, "OpenAPIDateConverter.cs")); + supportingFiles.add(new SupportingFile("ApiResponseEventArgs.mustache", clientPackageDir, "ApiResponseEventArgs.cs")); + supportingFiles.add(new SupportingFile("IApi.mustache", clientPackageDir, getInterfacePrefix() + "Api.cs")); - additionalProperties.put("apiDocPath", apiDocPath); - additionalProperties.put("modelDocPath", modelDocPath); + 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("DependencyInjectionTests.mustache", apiTestFolder, "DependencyInjectionTests.cs")); + + // do not overwrite test file that already exists + File apiTestsBaseFile = new File(apiTestFileFolder() + File.separator + "ApiTestsBase.cs"); + if (!apiTestsBaseFile.exists()) { + supportingFiles.add(new SupportingFile("ApiTestsBase.mustache", apiTestFolder, "ApiTestsBase.cs")); + } + } + + if (ProcessUtils.hasHttpSignatureMethods(openAPI)) { + supportingFiles.add(new SupportingFile("HttpSigningConfiguration.mustache", clientPackageDir, "HttpSigningConfiguration.cs")); + supportingFiles.add(new SupportingFile("HttpSigningToken.mustache", clientPackageDir, "HttpSigningToken.cs")); + } + + if (ProcessUtils.hasHttpBasicMethods(openAPI)) { + supportingFiles.add(new SupportingFile("BasicToken.mustache", clientPackageDir, "BasicToken.cs")); + } + + if (ProcessUtils.hasOAuthMethods(openAPI)) { + supportingFiles.add(new SupportingFile("OAuthToken.mustache", clientPackageDir, "OAuthToken.cs")); + } + + if (ProcessUtils.hasHttpBearerMethods(openAPI)) { + supportingFiles.add(new SupportingFile("BearerToken.mustache", clientPackageDir, "BearerToken.cs")); + } + + if (ProcessUtils.hasApiKeyMethods(openAPI)) { + supportingFiles.add(new SupportingFile("ApiKeyToken.mustache", clientPackageDir, "ApiKeyToken.cs")); + } } public void setNetStandard(Boolean netStandard) { @@ -756,11 +883,24 @@ public void setPackageGuid(String packageGuid) { this.packageGuid = packageGuid; } + // TODO: this does the same as super @Override public void setPackageName(String packageName) { this.packageName = packageName; } + /** + * Sets the api name. This value must be a valid class name. + * @param apiName The api name + */ + public void setApiName(String apiName) { + if (!"".equals(apiName) && (Boolean.FALSE.equals(apiName.matches("^[a-zA-Z0-9_]*$")) || Boolean.FALSE.equals(apiName.matches("^[a-zA-Z].*")))){ + throw new RuntimeException("Invalid project name " + apiName + ". May only contain alphanumeric characaters or underscore and start with a letter."); + } + this.apiName = apiName; + } + + // TODO: this does the same as super @Override public void setPackageVersion(String packageVersion) { this.packageVersion = packageVersion; @@ -1068,6 +1208,9 @@ protected void configureAdditionalPropertiesForFrameworks(final Map Boolean.TRUE.equals(p.isNetStandard))); + for (FrameworkStrategy frameworkStrategy : frameworkStrategies) { + properties.put(frameworkStrategy.name, strategies.stream().anyMatch(s -> s.name.equals(frameworkStrategy.name))); + } } /** diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache index 1286829ad402..3a3870510c94 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache @@ -128,7 +128,7 @@ Name | Type | Description | Notes {{/responses}} {{/responses.0}} -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-api-endpoints) [[Back to Model list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-models) [[Back to README]](../{{#useGenericHost}}../{{/useGenericHost}}README.md) {{/operation}} {{/operations}} 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 new file mode 100644 index 000000000000..77e95ca3d144 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache @@ -0,0 +1,44 @@ +// +{{>partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; + +namespace {{packageName}}.Client +{ + /// + /// API Exception + /// + {{>visibility}} class ApiException : Exception + { + /// + /// The reason the api request failed + /// + public string{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} ReasonPhrase { get; } + + /// + /// The HttpStatusCode + /// + public System.Net.HttpStatusCode StatusCode { get; } + + /// + /// The raw data returned by the api + /// + public string RawContent { get; } + + /// + /// Construct the ApiException from parts of the reponse + /// + /// + /// + /// + public ApiException(string{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent) : base(reasonPhrase ?? rawContent) + { + ReasonPhrase = reasonPhrase; + + StatusCode = statusCode; + + RawContent = rawContent; + } + } +} 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 new file mode 100644 index 000000000000..98434c3b25a2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache @@ -0,0 +1,59 @@ +// +{{partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; + +namespace {{packageName}}.Client +{ + /// + /// A token constructed from an apiKey. + /// + public class ApiKeyToken : TokenBase + { + private string _raw; + + /// + /// Constructs an ApiKeyToken object. + /// + /// + /// + /// + 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. + /// + /// + /// + public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) + { + request.Headers.Add(headerName, _raw); + } + + /// + /// Places the token in the query. + /// + /// + /// + /// + /// + public virtual void UseInQuery(System.Net.Http.HttpRequestMessage request, UriBuilder uriBuilder, System.Collections.Specialized.NameValueCollection parseQueryString, string parameterName) + { + parseQueryString[parameterName] = Uri.EscapeDataString(_raw).ToString(){{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}; + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..5ff16199326e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponseEventArgs.mustache @@ -0,0 +1,47 @@ +using System; +using System.Net; + +namespace {{packageName}}.Client +{ + /// + /// Useful for tracking server health. + /// + public 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; } + /// + /// The elapsed time from request to response. + /// + public TimeSpan ToTimeSpan => this.ReceivedAt - this.RequestedAt; + + /// + /// The event args used to track server health. + /// + /// + /// + /// + /// + public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string path) + { + RequestedAt = requestedAt; + ReceivedAt = receivedAt; + HttpStatus = httpStatus; + 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 new file mode 100644 index 000000000000..ce8b308e9caf --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache @@ -0,0 +1,97 @@ +// +{{>partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; +using System.Collections.Generic; +using System.Net; +using Newtonsoft.Json; + +namespace {{packageName}}.Client +{ + /// + /// Provides a non-generic contract for the ApiResponse wrapper. + /// + public interface IApiResponse + { + /// + /// The data type of + /// + Type ResponseType { get; } + + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + HttpStatusCode StatusCode { get; } + + /// + /// The raw content of this response + /// + string RawContent { get; } + } + + /// + /// API Response + /// + {{>visibility}} partial class ApiResponse : IApiResponse + { + #region Properties + + /// + /// The deserialized content + /// + {{! .net 3.1 does not support unconstrained nullable T }} + public T{{#nullableReferenceTypes}}{{^netcoreapp3.1}}?{{/netcoreapp3.1}}{{/nullableReferenceTypes}} Content { get; set; } + + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public HttpStatusCode StatusCode { get; } + + /// + /// The content of this response + /// + public Type ResponseType + { + get { return typeof(T); } + } + + /// + /// The raw data + /// + public string RawContent { get; } + + /// + /// The IsSuccessStatusCode from the api response + /// + public bool IsSuccessStatusCode { get; } + + /// + /// The reason phrase contained in the api response + /// + public string{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} ReasonPhrase { get; } + + /// + /// The headers contained in the api response + /// + public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } + + #endregion Properties + + /// + /// Construct the reponse using an HttpResponseMessage + /// + /// + /// + public ApiResponse(System.Net.Http.HttpResponseMessage response, string rawContent) + { + StatusCode = response.StatusCode; + Headers = response.Headers; + IsSuccessStatusCode = response.IsSuccessStatusCode; + ReasonPhrase = response.ReasonPhrase; + RawContent = rawContent; + } + } +} 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 new file mode 100644 index 000000000000..57dd3c7edee2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiTestsBase.mustache @@ -0,0 +1,47 @@ +{{>partial_header}} +using System; +using System.Collections.Generic; +using System.Security.Cryptography; +using Microsoft.Extensions.Hosting; +using {{packageName}}.Client;{{#hasImport}} +using {{packageName}}.{{modelPackage}};{{/hasImport}} + + +{{{testInstructions}}} + + +namespace {{packageName}}.Test.Api +{ + /// + /// Base class for API tests + /// + public class ApiTestsBase + { + protected readonly IHost _host; + + public ApiTestsBase(string[] args) + { + _host = CreateHostBuilder(args).Build(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) + .Configure{{apiName}}((context, options) => + { + {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken); + {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + BearerToken bearerToken = new BearerToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken); + {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} + BasicToken basicToken = new BasicToken(context.Configuration[""], context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken); + {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} + HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken); + {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + OAuthToken oauthToken = new OAuthToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken);{{/hasOAuthMethods}} + }); + } +} 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 new file mode 100644 index 000000000000..78fce754c171 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache @@ -0,0 +1,44 @@ +// +{{partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace {{packageName}}.Client +{ + /// + /// A token constructed from a username and password. + /// + public class BasicToken : TokenBase + { + private string _username; + + private string _password; + + /// + /// Constructs a BasicToken object. + /// + /// + /// + /// + public BasicToken(string username, string password, TimeSpan? timeout = null) : base(timeout) + { + _username = username; + + _password = password; + } + + /// + /// Places the token in the header. + /// + /// + /// + public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) + { + request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", {{packageName}}.Client.ClientUtils.Base64Encode(_username + ":" + _password)); + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..0e6a8dbdf231 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache @@ -0,0 +1,39 @@ +// +{{partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace {{packageName}}.Client +{ + /// + /// A token constructed from a token from a bearer token. + /// + public class BearerToken : TokenBase + { + private string _raw; + + /// + /// Constructs a BearerToken object. + /// + /// + /// + public BearerToken(string value, TimeSpan? timeout = null) : base(timeout) + { + _raw = value; + } + + /// + /// Places the token in the header. + /// + /// + /// + public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) + { + request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw); + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..b3b398425e43 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache @@ -0,0 +1,360 @@ +{{>partial_header}} + +using System; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection;{{#supportsRetry}} +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly;{{/supportsRetry}} +using System.Net.Http; +using {{packageName}}.Api;{{#useCompareNetObjects}} +using KellermanSoftware.CompareNetObjects;{{/useCompareNetObjects}} + +namespace {{packageName}}.Client +{ + /// + /// Utility functions providing some benefit to API client consumers. + /// + public static class ClientUtils + { + {{#useCompareNetObjects}} + /// + /// An instance of CompareLogic. + /// + public static CompareLogic compareLogic; + + /// + /// Static constructor to initialise compareLogic. + /// + static ClientUtils() + { + compareLogic = new CompareLogic(); + } + {{/useCompareNetObjects}} + + /// + /// A delegate for events. + /// + /// + /// + /// + /// + public delegate void EventHandler(object sender, T e) where T : EventArgs; + + /// + /// Custom JSON serializer + /// + public static Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; set; } = new Newtonsoft.Json.JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = Newtonsoft.Json.ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore, + ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver + { + NamingStrategy = new Newtonsoft.Json.Serialization.CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Sanitize filename by removing the path + /// + /// Filename + /// Filename + public static string SanitizeFilename(string filename) + { + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + return match.Success ? match.Groups[1].Value : filename; + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// The DateTime serialization format. + /// Formatted string. + public static string{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} ParameterToString(object obj, string{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} format = ISO8601_DATETIME_FORMAT) + { + if (obj is DateTime dateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTime.ToString(format); + if (obj is DateTimeOffset dateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTimeOffset.ToString(format); + if (obj is bool boolean) + return boolean ? "true" : "false"; + if (obj is System.Collections.ICollection collection) + return string.Join(",", collection.Cast()); + + return Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture); + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// string to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + + /// + /// Encode string in base64 format. + /// + /// string to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Convert stream to byte array + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream inputStream) + { + using (var ms = new MemoryStream()) + { + inputStream.CopyTo(ms); + return ms.ToArray(); + } + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON type exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public static string SelectHeaderContentType(string[] contentTypes) + { + if (contentTypes.Length == 0) + return null; + + foreach (var contentType in contentTypes) + { + if (IsJsonMime(contentType)) + return contentType; + } + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// 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) + /// + /// The accepts array to select from. + /// The Accept header to use. + public static string SelectHeaderAccept(string[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return string.Join(",", accepts); + } + + /// + /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. + /// + public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + + /// + /// Check if the given MIME is a JSON MIME. + /// JSON MIME examples: + /// application/json + /// application/json; charset=UTF8 + /// APPLICATION/JSON + /// application/vnd.company+json + /// + /// MIME + /// Returns True if MIME type is json. + public static bool IsJsonMime(string mime) + { + if (string.IsNullOrWhiteSpace(mime)) return false; + + return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); + } + + /// + /// The base path of the API + /// + public const string BASE_ADDRESS = "{{{basePath}}}"; + + /// + /// The scheme of the API + /// + public const string SCHEME = "{{{scheme}}}"; + + /// + /// The context path of the API + /// + public const string CONTEXT_PATH = "{{contextPath}}"; + + /// + /// The host of the API + /// + public const string HOST = "{{{host}}}"; + + /// + /// The format to use for DateTime serialization + /// + public const string ISO8601_DATETIME_FORMAT = "o"; + + /// + /// 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; + } + + /// + /// 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/DependencyInjectionTests.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DependencyInjectionTests.mustache new file mode 100644 index 000000000000..ac4a4d8e2d11 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DependencyInjectionTests.mustache @@ -0,0 +1,158 @@ +{{>partial_header}} +using System; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; +using System.Collections.Generic; +using System.Security.Cryptography; +using {{packageName}}.Client; +using {{packageName}}.{{apiPackage}}; +using Xunit; + +namespace {{packageName}}.Test.Api +{ + /// + /// Tests the dependency injection. + /// + public class DependencyInjectionTest + { + private readonly IHost _hostUsingConfigureWithoutAClient = + Host.CreateDefaultBuilder(Array.Empty()).Configure{{apiName}}((context, options) => + { + {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken); + {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken); + {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} + BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken); + {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} + HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken); + {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken);{{/hasOAuthMethods}} + }) + .Build(); + + private readonly IHost _hostUsingConfigureWithAClient = + Host.CreateDefaultBuilder(Array.Empty()).Configure{{apiName}}((context, options) => + { + {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken); + {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken); + {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} + BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken); + {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} + HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken); + {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken);{{/hasOAuthMethods}} + options.Add{{apiName}}HttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS)); + }) + .Build(); + + private readonly IHost _hostUsingAddWithoutAClient = + Host.CreateDefaultBuilder(Array.Empty()).ConfigureServices((host, services) => + { + services.Add{{apiName}}(options => + { + {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken); + {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken); + {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} + BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken); + {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} + HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken); + {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken);{{/hasOAuthMethods}} + }); + }) + .Build(); + + private readonly IHost _hostUsingAddWithAClient = + Host.CreateDefaultBuilder(Array.Empty()).ConfigureServices((host, services) => + { + services.Add{{apiName}}(options => + { + {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken); + {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken); + {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} + BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken); + {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} + HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken); + {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken);{{/hasOAuthMethods}} + options.Add{{apiName}}HttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS)); + }); + }) + .Build(); + + /// + /// Test dependency injection when using the configure method + /// + [Fact] + public void ConfigureApiWithAClientTest() + { + {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} + + {{/-last}}{{/apis}}{{/apiInfo}} + } + + /// + /// Test dependency injection when using the configure method + /// + [Fact] + public void ConfigureApiWithoutAClientTest() + { + {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} + + {{/-last}}{{/apis}}{{/apiInfo}} + } + + /// + /// Test dependency injection when using the add method + /// + [Fact] + public void AddApiWithAClientTest() + { + {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} + + {{/-last}}{{/apis}}{{/apiInfo}} + } + + /// + /// Test dependency injection when using the add method + /// + [Fact] + public void AddApiWithoutAClientTest() + { + {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{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 new file mode 100644 index 000000000000..24530537f967 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache @@ -0,0 +1,124 @@ +{{>partial_header}} + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.Api; + +namespace {{packageName}}.Client +{ + /// + /// Provides hosting configuration for {{packageName}} + /// + public class HostConfiguration + { + private readonly IServiceCollection _services; + internal bool HttpClientsAdded { get; private set; } + + /// + /// Instantiates the class + /// + /// + public HostConfiguration(IServiceCollection services) + { + _services = services;{{#apiInfo}}{{#apis}} + services.AddSingleton<{{interfacePrefix}}{{classname}}, {{classname}}>();{{/apis}}{{/apiInfo}} + } + + /// + /// Configures the HttpClients. + /// + /// + /// + /// + public HostConfiguration Add{{apiName}}HttpClients<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}> + ( + Action{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} client = null, Action{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} builder = null){{#apis}} + where T{{classname}} : class, {{interfacePrefix}}{{classname}}{{/apis}} + { + 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)); + {{/apis}}{{/apiInfo}} + if (builder != null) + foreach (IHttpClientBuilder instance in builders) + builder(instance); + + HttpClientsAdded = true; + + return this; + } + + /// + /// Configures the HttpClients. + /// + /// + /// + /// + public HostConfiguration Add{{apiName}}HttpClients( + Action{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} client = null, Action{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} builder = null) + { + Add{{apiName}}HttpClients<{{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(client, builder); + + return this; + } + + /// + /// Configures the JsonSerializerSettings + /// + /// + /// + public HostConfiguration ConfigureJsonOptions(Action options) + { + options(Client.ClientUtils.JsonSerializerSettings); + + return this; + } + + /// + /// Adds tokens to your IServiceCollection + /// + /// + /// + /// + public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase + { + return AddTokens(new TTokenBase[]{ token }); + } + + /// + /// Adds tokens to your IServiceCollection + /// + /// + /// + /// + public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase + { + TokenContainer container = new TokenContainer(tokens); + _services.AddSingleton(services => container); + + return this; + } + + /// + /// Adds a token provider to your IServiceCollection + /// + /// + /// + /// + public HostConfiguration UseProvider() + where TTokenProvider : TokenProvider + where TTokenBase : TokenBase + { + _services.AddSingleton(); + _services.AddSingleton>(services => services.GetRequiredService()); + + return this; + } + } +} 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 new file mode 100644 index 000000000000..23b2d9149a1d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache @@ -0,0 +1,676 @@ +// +{{>partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Cryptography; +using System.Text; +using System.Web; + +namespace {{packageName}}.Client +{ + /// + /// Class for HttpSigning auth related parameter and methods + /// + public class HttpSigningConfiguration + { + #region + /// + /// Create an instance + /// + public HttpSigningConfiguration(string keyId, string keyFilePath, SecureString{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} keyPassPhrase, List httpSigningHeader, HashAlgorithmName hashAlgorithm, string signingAlgorithm, int signatureValidityPeriod) + { + KeyId = keyId; + KeyFilePath = keyFilePath; + KeyPassPhrase = keyPassPhrase; + HttpSigningHeader = httpSigningHeader; + HashAlgorithm = hashAlgorithm; + SigningAlgorithm = signingAlgorithm; + SignatureValidityPeriod = signatureValidityPeriod; + } + #endregion + + #region Properties + /// + ///Gets the Api keyId + /// + public string KeyId { get; set; } + + /// + /// Gets the Key file path + /// + public string KeyFilePath { get; set; } + + /// + /// Gets the key pass phrase for password protected key + /// + public SecureString{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} KeyPassPhrase { get; set; } + + /// + /// Gets the HTTP signing header + /// + public List HttpSigningHeader { get; set; } + + /// + /// Gets the hash algorithm sha256 or sha512 + /// + public HashAlgorithmName HashAlgorithm { get; set; } = HashAlgorithmName.SHA256; + + /// + /// Gets the signing algorithm + /// + public string SigningAlgorithm { get; set; } + + /// + /// Gets the Signature validaty period in seconds + /// + public int SignatureValidityPeriod { get; set; } + + #endregion + + #region enum + private enum PrivateKeyType + { + None = 0, + RSA = 1, + ECDSA = 2, + } + #endregion + + #region Methods + /// + /// Gets the Headers for HttpSigning + /// + /// + /// + /// + internal Dictionary GetHttpSignedHeader(System.Net.Http.HttpRequestMessage request, string requestBody, System.Threading.CancellationToken? cancellationToken = null) + { + if (request.RequestUri == null) + throw new NullReferenceException("The request URI was null"); + + const string HEADER_REQUEST_TARGET = "(request-target)"; + + // The time when the HTTP signature expires. The API server should reject HTTP requests that have expired. + const string HEADER_EXPIRES = "(expires)"; + + //The 'Date' header. + const string HEADER_DATE = "Date"; + + //The 'Host' header. + const string HEADER_HOST = "Host"; + + //The time when the HTTP signature was generated. + const string HEADER_CREATED = "(created)"; + + //When the 'Digest' header is included in the HTTP signature, the client automatically + //computes the digest of the HTTP request body, per RFC 3230. + const string HEADER_DIGEST = "Digest"; + + //The 'Authorization' header is automatically generated by the client. It includes + //the list of signed headers and a base64-encoded signature. + const string HEADER_AUTHORIZATION = "Authorization"; + + //Hash table to store singed headers + var HttpSignedRequestHeader = new Dictionary(); + + var httpSignatureHeader = new Dictionary(); + + if (HttpSigningHeader.Count == 0) + HttpSigningHeader.Add("(created)"); + + var dateTime = DateTime.Now; + string digest = String.Empty; + + if (HashAlgorithm == HashAlgorithmName.SHA256) + { + var bodyDigest = GetStringHash(HashAlgorithm.ToString(), requestBody); + digest = string.Format("SHA-256={0}", Convert.ToBase64String(bodyDigest)); + } + else if (HashAlgorithm == HashAlgorithmName.SHA512) + { + var bodyDigest = GetStringHash(HashAlgorithm.ToString(), requestBody); + digest = string.Format("SHA-512={0}", Convert.ToBase64String(bodyDigest)); + } + else + throw new Exception(string.Format("{0} not supported", HashAlgorithm)); + + foreach (var header in HttpSigningHeader) + if (header.Equals(HEADER_REQUEST_TARGET)) + httpSignatureHeader.Add(header.ToLower(), request.RequestUri.ToString()); + else if (header.Equals(HEADER_EXPIRES)) + { + var expireDateTime = dateTime.AddSeconds(SignatureValidityPeriod); + httpSignatureHeader.Add(header.ToLower(), GetUnixTime(expireDateTime).ToString()); + } + else if (header.Equals(HEADER_DATE)) + { + var utcDateTime = dateTime.ToString("r").ToString(); + httpSignatureHeader.Add(header.ToLower(), utcDateTime); + HttpSignedRequestHeader.Add(HEADER_DATE, utcDateTime); + } + else if (header.Equals(HEADER_HOST)) + { + httpSignatureHeader.Add(header.ToLower(), request.RequestUri.ToString()); + HttpSignedRequestHeader.Add(HEADER_HOST, request.RequestUri.ToString()); + } + else if (header.Equals(HEADER_CREATED)) + httpSignatureHeader.Add(header.ToLower(), GetUnixTime(dateTime).ToString()); + else if (header.Equals(HEADER_DIGEST)) + { + HttpSignedRequestHeader.Add(HEADER_DIGEST, digest); + httpSignatureHeader.Add(header.ToLower(), digest); + } + else + { + bool isHeaderFound = false; + foreach (var item in request.Headers) + { + if (string.Equals(item.Key, header, StringComparison.OrdinalIgnoreCase)) + { + httpSignatureHeader.Add(header.ToLower(), item.Value.ToString()); + isHeaderFound = true; + break; + } + } + + if (!isHeaderFound) + throw new Exception(string.Format("Cannot sign HTTP request.Request does not contain the {0} header.",header)); + } + + var headersKeysString = String.Join(" ", httpSignatureHeader.Keys); + var headerValuesList = new List(); + + foreach (var keyVal in httpSignatureHeader) + headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); + + //Concatinate headers value separated by new line + var headerValuesString = string.Join("\n", headerValuesList); + var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); + string{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} headerSignatureStr = null; + var keyType = GetKeyType(KeyFilePath); + + if (keyType == PrivateKeyType.RSA) + headerSignatureStr = GetRSASignature(signatureStringHash); + + else if (keyType == PrivateKeyType.ECDSA) + headerSignatureStr = GetECDSASignature(signatureStringHash); + + var cryptographicScheme = "hs2019"; + var authorizationHeaderValue = string.Format("Signature keyId=\"{0}\",algorithm=\"{1}\"", + KeyId, cryptographicScheme); + + if (httpSignatureHeader.ContainsKey(HEADER_CREATED)) + authorizationHeaderValue += string.Format(",created={0}", httpSignatureHeader[HEADER_CREATED]); + + if (httpSignatureHeader.ContainsKey(HEADER_EXPIRES)) + authorizationHeaderValue += string.Format(",expires={0}", httpSignatureHeader[HEADER_EXPIRES]); + + authorizationHeaderValue += string.Format(",headers=\"{0}\",signature=\"{1}\"", headersKeysString, headerSignatureStr); + + HttpSignedRequestHeader.Add(HEADER_AUTHORIZATION, authorizationHeaderValue); + + return HttpSignedRequestHeader; + } + + private byte[] GetStringHash(string hashName, string stringToBeHashed) + { + var hashAlgorithm = System.Security.Cryptography.HashAlgorithm.Create(hashName); + + if (hashAlgorithm == null) + throw new NullReferenceException($"{ nameof(hashAlgorithm) } was null."); + + var bytes = Encoding.UTF8.GetBytes(stringToBeHashed); + var stringHash = hashAlgorithm.ComputeHash(bytes); + return stringHash; + } + + private int GetUnixTime(DateTime date2) + { + DateTime date1 = new DateTime(1970, 01, 01); + TimeSpan timeSpan = date2 - date1; + return (int)timeSpan.TotalSeconds; + } + + private string GetRSASignature(byte[] stringToSign) + { + if (KeyPassPhrase == null) + throw new NullReferenceException($"{ nameof(KeyPassPhrase) } was null."); + + RSA{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} rsa = GetRSAProviderFromPemFile(KeyFilePath, KeyPassPhrase); + + if (rsa == null) + return string.Empty; + else if (SigningAlgorithm == "RSASSA-PSS") + { + var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pss); + return Convert.ToBase64String(signedbytes); + } + else if (SigningAlgorithm == "PKCS1-v15") + { + var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pkcs1); + return Convert.ToBase64String(signedbytes); + } + + return string.Empty; + } + + /// + /// Gets the ECDSA signature + /// + /// + /// + private string GetECDSASignature(byte[] dataToSign) + { + if (!File.Exists(KeyFilePath)) + { + throw new Exception("key file path does not exist."); + } + + var ecKeyHeader = "-----BEGIN EC PRIVATE KEY-----"; + var ecKeyFooter = "-----END EC PRIVATE KEY-----"; + var keyStr = File.ReadAllText(KeyFilePath); + var ecKeyBase64String = keyStr.Replace(ecKeyHeader, "").Replace(ecKeyFooter, "").Trim(); + var keyBytes = System.Convert.FromBase64String(ecKeyBase64String); + var ecdsa = ECDsa.Create(); + +#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) + var byteCount = 0; + if (KeyPassPhrase != null) + { + IntPtr unmanagedString = IntPtr.Zero; + try + { + // convert secure string to byte array + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); + + string ptrToStringUni = Marshal.PtrToStringUni(unmanagedString) ?? throw new NullReferenceException(); + + ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(ptrToStringUni), keyBytes, out byteCount); + } + finally + { + if (unmanagedString != IntPtr.Zero) + Marshal.ZeroFreeBSTR(unmanagedString); + } + } + else + { + ecdsa.ImportPkcs8PrivateKey(keyBytes, out byteCount); + } + var signedBytes = ecdsa.SignHash(dataToSign); + var derBytes = ConvertToECDSAANS1Format(signedBytes); + var signedString = System.Convert.ToBase64String(derBytes); + + return signedString; +#else + throw new Exception("ECDSA signing is supported only on NETCOREAPP3_0 and above"); +#endif + + } + + private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) + { + var derBytes = new List(); + byte derLength = 68; //default lenght for ECDSA code signinged bit 0x44 + byte rbytesLength = 32; //R length 0x20 + byte sbytesLength = 32; //S length 0x20 + var rBytes = new List(); + var sBytes = new List(); + for (int i = 0; i < 32; i++) + rBytes.Add(signedBytes[i]); + + for (int i = 32; i < 64; i++) + sBytes.Add(signedBytes[i]); + + if (rBytes[0] > 0x7F) + { + derLength++; + rbytesLength++; + var tempBytes = new List(); + tempBytes.AddRange(rBytes); + rBytes.Clear(); + rBytes.Add(0x00); + rBytes.AddRange(tempBytes); + } + + if (sBytes[0] > 0x7F) + { + derLength++; + sbytesLength++; + var tempBytes = new List(); + tempBytes.AddRange(sBytes); + sBytes.Clear(); + sBytes.Add(0x00); + sBytes.AddRange(tempBytes); + + } + + derBytes.Add(48); //start of the sequence 0x30 + derBytes.Add(derLength); //total length r lenth, type and r bytes + + derBytes.Add(2); //tag for integer + derBytes.Add(rbytesLength); //length of r + derBytes.AddRange(rBytes); + + derBytes.Add(2); //tag for integer + derBytes.Add(sbytesLength); //length of s + derBytes.AddRange(sBytes); + return derBytes.ToArray(); + } + + private RSACryptoServiceProvider{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} GetRSAProviderFromPemFile(String pemfile, SecureString{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} keyPassPharse = null) + { + const String pempubheader = "-----BEGIN PUBLIC KEY-----"; + const String pempubfooter = "-----END PUBLIC KEY-----"; + bool isPrivateKeyFile = true; + byte[]{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} pemkey = null; + + if (!File.Exists(pemfile)) + throw new Exception("private key file does not exist."); + + string pemstr = File.ReadAllText(pemfile).Trim(); + + if (pemstr.StartsWith(pempubheader) && pemstr.EndsWith(pempubfooter)) + isPrivateKeyFile = false; + + if (isPrivateKeyFile) + { + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPharse); + + if (pemkey == null) + return null; + + return DecodeRSAPrivateKey(pemkey); + } + return null; + } + + private byte[]{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} ConvertPrivateKeyToBytes(String instr, SecureString{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} keyPassPharse = null) + { + const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; + const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; + String pemstr = instr.Trim(); + byte[] binkey; + + if (!pemstr.StartsWith(pemprivheader) || !pemstr.EndsWith(pemprivfooter)) + return null; + + StringBuilder sb = new StringBuilder(pemstr); + sb.Replace(pemprivheader, ""); + sb.Replace(pemprivfooter, ""); + String pvkstr = sb.ToString().Trim(); + + try + { // if there are no PEM encryption info lines, this is an UNencrypted PEM private key + binkey = Convert.FromBase64String(pvkstr); + return binkey; + } + catch (System.FormatException) + { + StringReader str = new StringReader(pvkstr); + + //-------- read PEM encryption info. lines and extract salt ----- + if (!str.ReadLine(){{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}.StartsWith("Proc-Type: 4,ENCRYPTED")) // TODO: what do we do here if ReadLine is null? + return null; + + String saltline = str.ReadLine(){{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}; // TODO: what do we do here if ReadLine is null? + if (!saltline.StartsWith("DEK-Info: DES-EDE3-CBC,")) + return null; + + String saltstr = saltline.Substring(saltline.IndexOf(",") + 1).Trim(); + byte[] salt = new byte[saltstr.Length / 2]; + for (int i = 0; i < salt.Length; i++) + salt[i] = Convert.ToByte(saltstr.Substring(i * 2, 2), 16); + + if (!(str.ReadLine() == "")) + return null; + + //------ remaining b64 data is encrypted RSA key ---- + String encryptedstr = str.ReadToEnd(); + + try + { //should have b64 encrypted RSA key now + binkey = Convert.FromBase64String(encryptedstr); + } + catch (System.FormatException) + { //data is not in base64 fromat + return null; + } + + // TODO: what do we do here if keyPassPharse is null? + byte[] deskey = GetEncryptedKey(salt, keyPassPharse{{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + if (deskey == null) + return null; + + //------ Decrypt the encrypted 3des-encrypted RSA private key ------ + byte[]{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} rsakey = DecryptKey(binkey, deskey, salt); //OpenSSL uses salt value in PEM header also as 3DES IV + + return rsakey; + } + } + + private RSACryptoServiceProvider{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} DecodeRSAPrivateKey(byte[] privkey) + { + byte[] MODULUS, E, D, P, Q, DP, DQ, IQ; + + // --------- Set up stream to decode the asn.1 encoded RSA private key ------ + MemoryStream mem = new MemoryStream(privkey); + BinaryReader binr = new BinaryReader(mem); //wrap Memory Stream with BinaryReader for easy reading + byte bt = 0; + ushort twobytes = 0; + int elems = 0; + try + { + twobytes = binr.ReadUInt16(); + if (twobytes == 0x8130) //data read as little endian order (actual data order for Sequence is 30 81) + binr.ReadByte(); //advance 1 byte + else if (twobytes == 0x8230) + binr.ReadInt16(); //advance 2 bytes + else + return null; + + twobytes = binr.ReadUInt16(); + if (twobytes != 0x0102) //version number + return null; + + bt = binr.ReadByte(); + if (bt != 0x00) + return null; + + //------ all private key components are Integer sequences ---- + elems = GetIntegerSize(binr); + MODULUS = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + E = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + D = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + P = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + Q = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + DP = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + DQ = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + IQ = binr.ReadBytes(elems); + + // ------- create RSACryptoServiceProvider instance and initialize with public key ----- + RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(); + RSAParameters RSAparams = new RSAParameters(); + RSAparams.Modulus = MODULUS; + RSAparams.Exponent = E; + RSAparams.D = D; + RSAparams.P = P; + RSAparams.Q = Q; + RSAparams.DP = DP; + RSAparams.DQ = DQ; + RSAparams.InverseQ = IQ; + RSA.ImportParameters(RSAparams); + return RSA; + } + catch (Exception) + { + return null; + } + finally + { + binr.Close(); + } + } + + private int GetIntegerSize(BinaryReader binr) + { + byte bt = 0; + byte lowbyte = 0x00; + byte highbyte = 0x00; + int count = 0; + bt = binr.ReadByte(); + if (bt != 0x02) //expect integer + return 0; + + bt = binr.ReadByte(); + + if (bt == 0x81) + count = binr.ReadByte(); // data size in next byte + else if (bt == 0x82) + { + highbyte = binr.ReadByte(); // data size in next 2 bytes + lowbyte = binr.ReadByte(); + byte[] modint = { lowbyte, highbyte, 0x00, 0x00 }; + count = BitConverter.ToInt32(modint, 0); + } + else + count = bt; // we already have the data size + + while (binr.ReadByte() == 0x00) + //remove high order zeros in data + count -= 1; + + binr.BaseStream.Seek(-1, SeekOrigin.Current); + + //last ReadByte wasn't a removed zero, so back up a byte + return count; + } + + private byte[] GetEncryptedKey(byte[] salt, SecureString secpswd, int count, int miter) + { + IntPtr unmanagedPswd = IntPtr.Zero; + int HASHLENGTH = 16; //MD5 bytes + 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); + + // --- 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 concatenate results D1, D2 ... into keymaterial bytes ---- + MD5 md5 = new MD5CryptoServiceProvider(); + byte[]{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} result = null; + byte[] hashtarget = new byte[HASHLENGTH + data00.Length]; //fixed length initial hashtarget + + for (int j = 0; j < miter; j++) + { + // ---- Now hash consecutively for count times ------ + if (j == 0) + result = data00; //initialize + else + { + Array.Copy(result{{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}, hashtarget, result{{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}.Length); // TODO: what do we do if result is null here? + Array.Copy(data00, 0, hashtarget, result.Length, data00.Length); + result = hashtarget; + } + + for (int i = 0; i < count; i++) + result = md5.ComputeHash(result); + + Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length); //concatenate to keymaterial + } + byte[] deskey = new byte[24]; + Array.Copy(keymaterial, deskey, deskey.Length); + + Array.Clear(psbytes, 0, psbytes.Length); + Array.Clear(data00, 0, data00.Length); + Array.Clear(result{{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}, 0, result{{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}.Length); // TODO: what do we do if result is null here? + Array.Clear(hashtarget, 0, hashtarget.Length); + Array.Clear(keymaterial, 0, keymaterial.Length); + return deskey; + } + + private byte[]{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} DecryptKey(byte[] cipherData, byte[] desKey, byte[] IV) + { + MemoryStream memst = new MemoryStream(); + TripleDES alg = TripleDES.Create(); + alg.Key = desKey; + alg.IV = IV; + try + { + CryptoStream cs = new CryptoStream(memst, alg.CreateDecryptor(), CryptoStreamMode.Write); + cs.Write(cipherData, 0, cipherData.Length); + cs.Close(); + } + catch (Exception) + { + return null; + } + byte[] decryptedData = memst.ToArray(); + return decryptedData; + } + + /// + /// Detect the key type from the pem file. + /// + /// key file path in pem format + /// + private PrivateKeyType GetKeyType(string keyFilePath) + { + if (!File.Exists(keyFilePath)) + throw new Exception("Key file path does not exist."); + + var ecPrivateKeyHeader = "BEGIN EC PRIVATE KEY"; + var ecPrivateKeyFooter = "END EC PRIVATE KEY"; + var rsaPrivateKeyHeader = "BEGIN RSA PRIVATE KEY"; + var rsaPrivateFooter = "END RSA PRIVATE KEY"; + //var pkcs8Header = "BEGIN PRIVATE KEY"; + //var pkcs8Footer = "END PRIVATE KEY"; + var keyType = PrivateKeyType.None; + var key = File.ReadAllLines(keyFilePath); + + if (key[0].ToString().Contains(rsaPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(rsaPrivateFooter)) + keyType = PrivateKeyType.RSA; + else if (key[0].ToString().Contains(ecPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) + keyType = PrivateKeyType.ECDSA; + + else if (key[0].ToString().Contains(ecPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) + { + /* this type of key can hold many type different types of private key, but here due lack of pem header + Considering this as EC key + */ + //TODO :- update the key based on oid + keyType = PrivateKeyType.ECDSA; + } + else + throw new Exception("Either the key is invalid or key is not supported"); + + return keyType; + } + #endregion + } +} 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 new file mode 100644 index 000000000000..ca47cca24da3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache @@ -0,0 +1,43 @@ +// +{{partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace {{packageName}}.Client +{ + /// + /// A token constructed from an HttpSigningConfiguration + /// + public class HttpSignatureToken : TokenBase + { + private HttpSigningConfiguration _configuration; + + /// + /// Constructs an HttpSignatureToken object. + /// + /// + /// + public HttpSignatureToken(HttpSigningConfiguration configuration, TimeSpan? timeout = null) : base(timeout) + { + _configuration = configuration; + } + + /// + /// Places the token in the header. + /// + /// + /// + /// + public void UseInHeader(System.Net.Http.HttpRequestMessage request, string requestBody, CancellationToken? cancellationToken = null) + { + var signedHeaders = _configuration.GetHttpSignedHeader(request, requestBody, cancellationToken); + + foreach (var signedHeader in signedHeaders) + request.Headers.Add(signedHeader.Key, signedHeader.Value); + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..78856d47816c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IApi.mustache @@ -0,0 +1,21 @@ +using System.Net.Http; + +namespace {{packageName}}.Client +{ + /// + /// Any Api client + /// + public 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{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} ApiResponded; + } +} \ 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 new file mode 100644 index 000000000000..d15a01cf9d3f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache @@ -0,0 +1,39 @@ +// +{{partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace {{packageName}}.Client +{ + /// + /// A token constructed with OAuth. + /// + public class OAuthToken : TokenBase + { + private string _raw; + + /// + /// Consturcts an OAuthToken object. + /// + /// + /// + public OAuthToken(string value, TimeSpan? timeout = null) : base(timeout) + { + _raw = value; + } + + /// + /// Places the token in the header. + /// + /// + /// + public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) + { + request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw); + } + } +} \ 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.mustache new file mode 100644 index 000000000000..608e3fa8654c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache @@ -0,0 +1,214 @@ +# Created with Openapi Generator + + +## Run the following powershell command to generate the library + +```ps1 +$properties = @( + 'apiName={{apiName}}', + 'targetFramework={{targetFramework}}', + 'validatable={{validatable}}', + 'nullableReferenceTypes={{nullableReferenceTypes}}', + 'hideGenerationTimestamp={{hideGenerationTimestamp}}', + 'packageVersion={{packageVersion}}', + 'packageAuthors={{packageAuthors}}', + 'packageCompany={{packageCompany}}', + 'packageCopyright={{packageCopyright}}', + 'packageDescription={{packageDescription}}',{{#licenseId}} + 'licenseId={{.}}',{{/licenseId}} + 'packageName={{packageName}}', + 'packageTags={{packageTags}}', + 'packageTitle={{packageTitle}}' +) -join "," + +$global = @( + 'apiDocs={{generateApiDocs}}', + 'modelDocs={{generateModelDocs}}', + 'apiTests={{generateApiTests}}', + 'modelTests={{generateModelTests}}' +) -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 "{{gitHost}}" ` + --git-repo-id "{{gitRepoId}}" ` + --git-user-id "{{gitUserId}}" ` + --release-note "{{releaseNote}}" + # -t templates +``` + + +## Using the library in your project + +```cs +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.Api; +using {{packageName}}.Client; +using {{packageName}}.Model; + +namespace YourProject +{ + public class Program + { + public static async Task Main(string[] args) + { + var host = CreateHostBuilder(args).Build();{{#apiInfo}}{{#apis}}{{#-first}} + var api = host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();{{#operations}}{{#-first}}{{#operation}}{{#-first}} + ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}> foo = await api.{{operationId}}WithHttpInfoAsync("todo");{{/-first}}{{/operation}}{{/-first}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} + } + + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) + .Configure{{apiName}}((context, options) => + { + {{#authMethods}}// 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>(); + + {{/authMethods}}options.ConfigureJsonOptions((jsonOptions) => + { + // your custom converters if any + }); + + options.Add{{apiName}}HttpClients(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{{#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.2 or later{{/supportsRetry}} +- [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later +- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later{{#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}} + + +## Documentation for API Endpoints + +All URIs are relative to *{{{basePath}}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | -------------{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} +*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}{{/apiDocs}}{{#modelDocs}} + + +## Documentation for Models + +{{#modelPackage}}{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md){{/model}}{{/models}}{{/modelPackage}} +{{^modelPackage}}No model defined in this package{{/modelPackage}}{{/modelDocs}} + + +## Documentation for Authorization + +{{^authMethods}}All endpoints do not require authorization.{{/authMethods}}{{#authMethods}}{{#-last}}Authentication schemes defined for the API:{{/-last}}{{/authMethods}}{{#authMethods}} + + +### {{name}} + +{{#isApiKey}}- **Type**: API key +- **API key parameter name**: {{keyParamName}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}{{/isApiKey}}{{#isBasicBasic}} +- **Type**: HTTP basic authentication{{/isBasicBasic}}{{#isBasicBearer}} +- **Type**: Bearer Authentication{{/isBasicBearer}}{{#isOAuth}} +- **Type**: OAuth +- **Flow**: {{flow}} +- **Authorization URL**: {{authorizationUrl}} +- **Scopes**: {{^scopes}}N/A{{/scopes}}{{#scopes}} +- {{scope}}: {{description}}{{/scopes}}{{/isOAuth}}{{/authMethods}} + +## Build +- SDK version: {{packageVersion}}{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}}{{/hideGenerationTimestamp}} +- Build package: {{generatorClass}} + +## Api Information +- appName: {{appName}} +- appVersion: {{appVersion}} +- appDescription: {{appDescription}} + +## [OpenApi Global properties](https://openapi-generator.tech/docs/globals) +- generateAliasAsModel: {{generateAliasAsModel}} +- supportingFiles: {{supportingFiles}} +- models: omitted for brevity +- apis: omitted for brevity +- apiDocs: {{generateApiDocs}} +- modelDocs: {{generateModelDocs}} +- apiTests: {{generateApiTests}} +- modelTests: {{generateModelTests}} +- withXml: {{withXml}} + +## [OpenApi Generator Parameteres](https://openapi-generator.tech/docs/generators/csharp-netcore) +- allowUnicodeIdentifiers: {{allowUnicodeIdentifiers}} +- apiName: {{apiName}} +- caseInsensitiveResponseHeaders: {{caseInsensitiveResponseHeaders}} +- conditionalSerialization: {{conditionalSerialization}} +- disallowAdditionalPropertiesIfNotPresent: {{disallowAdditionalPropertiesIfNotPresent}} +- gitHost: {{gitHost}} +- gitRepoId: {{gitRepoId}} +- gitUserId: {{gitUserId}} +- hideGenerationTimestamp: {{hideGenerationTimestamp}} +- interfacePrefix: {{interfacePrefix}} +- library: {{library}} +- licenseId: {{licenseId}} +- modelPropertyNaming: {{modelPropertyNaming}} +- netCoreProjectFile: {{netCoreProjectFile}} +- nonPublicApi: {{nonPublicApi}} +- nullableReferenceTypes: {{nullableReferenceTypes}} +- optionalAssemblyInfo: {{optionalAssemblyInfo}} +- optionalEmitDefaultValues: {{optionalEmitDefaultValues}} +- optionalMethodArgument: {{optionalMethodArgument}} +- optionalProjectFile: {{optionalProjectFile}} +- packageAuthors: {{packageAuthors}} +- packageCompany: {{packageCompany}} +- packageCopyright: {{packageCopyright}} +- packageDescription: {{packageDescription}} +- packageGuid: {{packageGuid}} +- packageName: {{packageName}} +- packageTags: {{packageTags}} +- packageTitle: {{packageTitle}} +- packageVersion: {{packageVersion}} +- releaseNote: {{releaseNote}} +- returnICollection: {{returnICollection}} +- sortParamsByRequiredFlag: {{sortParamsByRequiredFlag}} +- sourceFolder: {{sourceFolder}} +- targetFramework: {{targetFramework}} +- useCollection: {{useCollection}} +- useDateTimeOffset: {{useDateTimeOffset}} +- useOneOfDiscriminatorLookup: {{useOneOfDiscriminatorLookup}} +- validatable: {{validatable}}{{#infoUrl}} +For more information, please visit [{{{.}}}]({{{.}}}){{/infoUrl}} + +This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. \ No newline at end of file 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 new file mode 100644 index 000000000000..3a778c0aeec9 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache @@ -0,0 +1,106 @@ +// +{{>partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System;{{^netStandard}} +using System.Threading.Channels;{{/netStandard}}{{#netStandard}} +using System.Collections.Concurrent; +using System.Linq; +using System.Threading; +using System.Threading.Tasks;{{/netStandard}} + +namespace {{packageName}}.Client {{^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 + { + internal Channel AvailableTokens { get; } + + /// + /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. + /// + /// + public RateLimitProvider(TokenContainer container) : base(container.Tokens) + { + foreach(TTokenBase token in _tokens) + token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40)); + + BoundedChannelOptions options = new BoundedChannelOptions(_tokens.Length) + { + FullMode = BoundedChannelFullMode.DropWrite + }; + + AvailableTokens = Channel.CreateBounded(options); + + for (int i = 0; i < _tokens.Length; i++) + _tokens[i].TokenBecameAvailable += ((sender) => AvailableTokens.Writer.TryWrite((TTokenBase) sender)); + } + + internal override async System.Threading.Tasks.ValueTask GetAsync(System.Threading.CancellationToken? cancellation = null) + => await AvailableTokens.Reader.ReadAsync(cancellation.GetValueOrDefault()).ConfigureAwait(false); + } +} {{/netStandard}}{{#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 + { + internal ConcurrentDictionary AvailableTokens = new ConcurrentDictionary(); + private SemaphoreSlim _semaphore; + + /// + /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. + /// + /// + public RateLimitProvider(TokenContainer container) : base(container.Tokens) + { + _semaphore = new SemaphoreSlim(1, 1); + + foreach(TTokenBase token in _tokens) + token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40)); + + for (int i = 0; i < _tokens.Length; i++) + { + _tokens[i].TokenBecameAvailable += ((sender) => + { + TTokenBase token = (TTokenBase)sender; + + AvailableTokens.TryAdd(token, token); + }); + } + } + + internal override async System.Threading.Tasks.ValueTask GetAsync(System.Threading.CancellationToken? cancellation = null) + { + await _semaphore.WaitAsync().ConfigureAwait(false); + + try + { + TTokenBase result = null; + + while (result == null) + { + TTokenBase tokenToRemove = AvailableTokens.FirstOrDefault().Value; + + if (tokenToRemove != null && AvailableTokens.TryRemove(tokenToRemove, out result)) + return result; + + await Task.Delay(40).ConfigureAwait(false); + + tokenToRemove = AvailableTokens.FirstOrDefault().Value; + } + + return result; + } + finally + { + _semaphore.Release(); + } + } + } +} {{/netStandard}} 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 new file mode 100644 index 000000000000..0b8db5d10ae1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache @@ -0,0 +1,71 @@ +// +{{partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; + +namespace {{packageName}}.Client +{ + /// + /// The base for all tokens. + /// + public abstract class TokenBase + { + private DateTime _nextAvailable = DateTime.UtcNow; + private object _nextAvailableLock = new object(); + private readonly System.Timers.Timer _timer = new System.Timers.Timer(); + + + internal TimeSpan? Timeout { get; set; } + internal delegate void TokenBecameAvailableEventHandler(object sender); + internal event TokenBecameAvailableEventHandler{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} TokenBecameAvailable; + + + /// + /// Initialize a TokenBase object. + /// + /// + internal TokenBase(TimeSpan? timeout = null) + { + Timeout = timeout; + + if (Timeout != null) + StartTimer(Timeout.Value); + } + + + /// + /// Starts the token's timer + /// + /// + internal void StartTimer(TimeSpan timeout) + { + Timeout = timeout; + _timer.Interval = Timeout.Value.TotalMilliseconds; + _timer.Elapsed += OnTimer; + _timer.AutoReset = true; + _timer.Start(); + } + + /// + /// Returns true while the token is rate limited. + /// + public bool IsRateLimited => _nextAvailable > DateTime.UtcNow; + + /// + /// Triggered when the server returns status code TooManyRequests + /// Once triggered the local timeout will be extended an arbitrary length of time. + /// + public void BeginRateLimit() + { + lock(_nextAvailableLock) + _nextAvailable = DateTime.UtcNow.AddSeconds(5); + } + + private void OnTimer(object sender, System.Timers.ElapsedEventArgs e) + { + if (TokenBecameAvailable != null && !IsRateLimited) + TokenBecameAvailable.Invoke(this); + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..113f9206fd19 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache @@ -0,0 +1,37 @@ +// +{{partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System.Linq; +using System.Collections.Generic; + +namespace {{packageName}}.Client +{ + /// + /// A container for a collection of tokens. + /// + /// + public sealed class TokenContainer where TTokenBase : TokenBase + { + /// + /// The collection of tokens + /// + public List Tokens { get; } = new List(); + + /// + /// Instantiates a TokenContainer + /// + public TokenContainer() + { + } + + /// + /// Instantiates a TokenContainer + /// + /// + public TokenContainer(System.Collections.Generic.IEnumerable tokens) + { + Tokens = tokens.ToList(); + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..d8b467a30bf7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache @@ -0,0 +1,36 @@ +// +{{>partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; +using System.Linq; +using System.Collections.Generic; +using {{packageName}}.Client; + +namespace {{packageName}} +{ + /// + /// A class which will provide tokens. + /// + public abstract class TokenProvider where TTokenBase : TokenBase + { + /// + /// The array of tokens. + /// + protected TTokenBase[] _tokens; + + internal abstract System.Threading.Tasks.ValueTask GetAsync(System.Threading.CancellationToken? cancellation = null); + + /// + /// Instantiates a TokenProvider. + /// + /// + public TokenProvider(IEnumerable tokens) + { + _tokens = tokens.ToArray(); + + if (_tokens.Length == 0) + throw new ArgumentException("You did not provide any tokens."); + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..880952325e61 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache @@ -0,0 +1,391 @@ +// +{{>partial_header}} +{{#nullableReferenceTypes}}#nullable enable{{/nullableReferenceTypes}} + +using System; +using System.Collections.Generic; +using System.Net; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using System.Net.Http; +using System.Net.Http.Headers; +using {{packageName}}.Client; +{{#hasImport}} +using {{packageName}}.{{modelPackage}}; +{{/hasImport}} + +namespace {{packageName}}.{{apiPackage}} +{ + {{#operations}} + /// + /// Represents a collection of functions to interact with the API endpoints + /// + {{>visibility}} interface {{interfacePrefix}}{{classname}} : IApi + { + {{#operation}} + /// + /// {{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. + /// Task<ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}>> + 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); + + /// + /// {{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. + /// Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}> + Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}> {{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);{{#nullableReferenceTypes}} + + /// + /// {{summary}} + /// + /// + /// {{notes}} + /// + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}?> + Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}> {{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);{{/nullableReferenceTypes}}{{^-last}} + + {{/-last}}{{/operation}} + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + {{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{classname}} + { + /// + /// 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{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} ApiResponded; + + /// + /// The logger + /// + public ILogger<{{classname}}> Logger { get; } + + /// + /// The HttpClient + /// + public HttpClient HttpClient { get; }{{#hasApiKeyMethods}} + + /// + /// A token provider of type + /// + public TokenProvider ApiKeyProvider { get; }{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + + /// + /// A token provider of type + /// + public TokenProvider BearerTokenProvider { get; }{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} + + /// + /// A token provider of type + /// + public TokenProvider BasicTokenProvider { get; }{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} + + /// + /// A token provider of type + /// + public TokenProvider HttpSignatureTokenProvider { get; }{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + + /// + /// A token provider of type + /// + public TokenProvider OauthTokenProvider { get; }{{/hasOAuthMethods}} + + /// + /// Initializes a new instance of the class. + /// + /// + public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient{{#hasApiKeyMethods}}, + TokenProvider apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}}, + TokenProvider bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}}, + TokenProvider basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}}, + TokenProvider httpSignatureTokenProvider{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}}, + TokenProvider oauthTokenProvider{{/hasOAuthMethods}}) + { + Logger = logger; + HttpClient = httpClient;{{#hasApiKeyMethods}} + ApiKeyProvider = apiKeyProvider;{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + BearerTokenProvider = bearerTokenProvider;{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} + BasicTokenProvider = basicTokenProvider;{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} + HttpSignatureTokenProvider = httpSignatureTokenProvider;{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + OauthTokenProvider = oauthTokenProvider;{{/hasOAuthMethods}} + } + {{#operation}} + + /// + /// {{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}}object{{/returnType}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}> {{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) + { + ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}> result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); + + {{^nullableReferenceTypes}}{{#returnTypeIsPrimitive}}#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}}{{/nullableReferenceTypes}}if (result.Content == null){{^nullableReferenceTypes}}{{#returnTypeIsPrimitive}} + #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}}{{/nullableReferenceTypes}} + throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); + + return result.Content; + }{{#nullableReferenceTypes}} + + /// + /// {{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}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}> {{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}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}>{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} 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; + }{{/nullableReferenceTypes}}{{^nullableReferenceTypes}}{{^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}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}> {{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}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}>{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} 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; + } + {{/returnTypeIsPrimitive}}{{/nullableReferenceTypes}} + + /// + /// {{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. + /// <> 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) + { + 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}}{{#nullableReferenceTypes}} + + if ({{paramName}} == null) + throw new ArgumentNullException(nameof({{paramName}}));{{/nullableReferenceTypes}}{{^nullableReferenceTypes}}{{^vendorExtensions.x-csharp-value-type}} + + if ({{paramName}} == null) + throw new ArgumentNullException(nameof({{paramName}}));{{/vendorExtensions.x-csharp-value-type}}{{/nullableReferenceTypes}}{{/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()) + { + UriBuilder uriBuilder = new UriBuilder(); + uriBuilder.Host = HttpClient.BaseAddress{{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}.Host; + 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}} + + if ({{paramName}} != null) + uriBuilder.Path = uriBuilder.Path + $"/{ Uri.EscapeDataString({{paramName}}).ToString()) }"; + {{/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}} + + {{! all the redundant tags here are to get the spacing just right }} + {{/-first}}{{/required}}{{/queryParams}}{{#queryParams}}{{#required}}parseQueryString["{{baseName}}"] = Uri.EscapeDataString({{paramName}}.ToString(){{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}); + {{/required}}{{/queryParams}}{{#queryParams}}{{#-first}} + {{/-first}}{{/queryParams}}{{#queryParams}}{{^required}}if ({{paramName}} != null) + parseQueryString["{{baseName}}"] = Uri.EscapeDataString({{paramName}}.ToString(){{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}); + + {{/required}}{{#-last}}uriBuilder.Query = parseQueryString.ToString();{{/-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}} + + MultipartContent multipartContent = new MultipartContent(); + + request.Content = multipartContent; + + List> formParams = new List>(); + + multipartContent.Add(new FormUrlEncodedContent(formParams));{{/-first}}{{^isFile}}{{#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}} + + multipartContent.Add(new StreamContent({{paramName}}));{{/required}}{{^required}} + + if ({{paramName}} != null) + multipartContent.Add(new StreamContent({{paramName}}));{{/required}}{{/isFile}}{{/formParams}}{{#bodyParam}} + + if (({{paramName}} as object) is System.IO.Stream stream) + request.Content = new StreamContent(stream); + else + request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject({{paramName}}, ClientUtils.JsonSerializerSettings));{{/bodyParam}}{{#authMethods}}{{#-first}} + + List tokens = new List();{{/-first}}{{#isApiKey}} + + ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); + + tokens.Add(apiKey);{{#isKeyInHeader}} + + apiKey.UseInHeader(request, "{{keyParamName}}");{{/isKeyInHeader}}{{#isKeyInQuery}} + + apiKey.UseInQuery(request, uriBuilder, parseQueryString, "{{keyParamName}}"); + + uriBuilder.Query = parseQueryString.ToString();{{/isKeyInQuery}}{{#isKeyInCookie}} + + apiKey.UseInCookie(request, parseQueryString, "{{keyParamName}}"); + + uriBuilder.Query = parseQueryString.ToString();{{/isKeyInCookie}}{{/isApiKey}}{{/authMethods}} + + {{! below line must be after any UseInQuery calls, but before using the HttpSignatureToken}} + request.RequestUri = uriBuilder.Uri;{{#authMethods}}{{#isBasicBasic}} + + BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); + + tokens.Add(basicToken); + + basicToken.UseInHeader(request, "{{keyParamName}}");{{/isBasicBasic}}{{#isBasicBearer}} + + BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); + + tokens.Add(bearerToken); + + bearerToken.UseInHeader(request, "{{keyParamName}}");{{/isBasicBearer}}{{#isOAuth}} + + OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); + + tokens.Add(oauthToken); + + oauthToken.UseInHeader(request, "{{keyParamName}}");{{/isOAuth}}{{#isHttpSignature}} + + HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); + + tokens.Add(signatureToken); + + string requestBody = await request.Content{{#nullableReferenceTypes}}!{{/nullableReferenceTypes}}.ReadAsStringAsync({{^netStandard}}{{^netcoreapp3.1}}cancellationToken.GetValueOrDefault(){{/netcoreapp3.1}}{{/netStandard}}).ConfigureAwait(false); + + signatureToken.UseInHeader(request, requestBody, cancellationToken);{{/isHttpSignature}}{{/authMethods}}{{#consumes}}{{#-first}} + + string[] contentTypes = new string[] { + {{/-first}}"{{{mediaType}}}"{{^-last}}, + {{/-last}}{{#-last}} + };{{/-last}}{{/consumes}}{{#consumes}}{{#-first}} + + string{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} contentType = ClientUtils.SelectHeaderContentType(contentTypes); + + if (contentType != null) + request.Content.Headers.Add("ContentType", contentType);{{/-first}}{{/consumes}}{{#produces}}{{#-first}} + + string[] accepts = new string[] { {{/-first}}{{/produces}} + {{#produces}}"{{{mediaType}}}"{{^-last}}, + {{/-last}}{{/produces}}{{#produces}}{{#-last}} + };{{/-last}}{{/produces}}{{#produces}}{{#-first}} + + string{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}} accept = ClientUtils.SelectHeaderAccept(accepts); + + if (accept != null) + request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); + {{/-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 }} + + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) + { + DateTime requestedAt = DateTime.UtcNow; + + 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 occured while invoking ApiResponded."); + } + } + + ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}> apiResponse = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{#nullableReferenceTypes}}?{{/nullableReferenceTypes}}>(responseMessage, responseContent); + + if (apiResponse.IsSuccessStatusCode) + apiResponse.Content = Newtonsoft.Json.JsonConvert.DeserializeObject<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(apiResponse.RawContent, ClientUtils.JsonSerializerSettings);{{#authMethods}} + else if (apiResponse.StatusCode == (HttpStatusCode) 429) + foreach(TokenBase token in tokens) + token.BeginRateLimit();{{/authMethods}} + + return apiResponse; + } + } + } + catch(Exception e) + { + Logger.LogError(e, "An error occured while sending the request to the server."); + throw; + } + } + {{/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 new file mode 100644 index 000000000000..b64731f81dd4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api_test.mustache @@ -0,0 +1,46 @@ +{{>partial_header}} +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Xunit; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.{{apiPackage}};{{#hasImport}} +using {{packageName}}.{{modelPackage}};{{/hasImport}} + + +{{{testInstructions}}} + + +namespace {{packageName}}.Test.Api +{ + /// + /// Class for testing {{classname}} + /// + public sealed class {{classname}}Tests : ApiTestsBase + { + private readonly {{interfacePrefix}}{{classname}} _instance; + + public {{classname}}Tests(): base(Array.Empty()) + { + _instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + } + + {{#operations}} + {{#operation}} + + /// + /// Test {{operationId}} + /// + [Fact (Skip = "not implemented")] + public async Task {{operationId}}AsyncTest() + { + {{#allParams}} + {{{dataType}}} {{paramName}} = default; + {{/allParams}} + {{#returnType}}var response = {{/returnType}}await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + Assert.IsType<{{{.}}}>(response);{{/returnType}} + } + {{/operation}} + {{/operations}} + } +} 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 new file mode 100644 index 000000000000..0f4084ef8179 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.ps1.mustache @@ -0,0 +1,75 @@ +param( + [Parameter()][Alias("g")][String]$GitHost = "{{{gitHost}}}", + [Parameter()][Alias("u")][String]$GitUserId = "{{{gitUserId}}}", + [Parameter()][Alias("r")][String]$GitRepoId = "{{{gitRepoId}}}", + [Parameter()][Alias("m")][string]$Message = "{{{releaseNote}}}", + [Parameter()][Alias("h")][switch]$Help +) + +function Publish-ToGitHost{ + if ([string]::IsNullOrWhiteSpace($Message) -or $Message -eq "Minor update"){ + # it seems unlikely that we would want our git commit message to be the default, so lets prompt the user + $Message = Read-Host -Prompt "Please provide a commit message or press enter" + $Message = if([string]::IsNullOrWhiteSpace($Message)) { "no message provided" } else { $Message } + } + + git init + git add . + git commit -am "${Message}" + $branchName=$(git rev-parse --abbrev-ref HEAD) + $gitRemote=$(git remote) + + if([string]::IsNullOrWhiteSpace($gitRemote)){ + git remote add origin https://${GitHost}/${GitUserId}/${GitRepoId}.git + } + + Write-Output "Pulling from https://${GitHost}/${GitUserId}/${GitRepoId}.git" + git pull origin $branchName --ff-only + + if ($LastExitCode -ne 0){ + if (${GitHost} -eq "github.com"){ + Write-Output "The ${GitRepoId} repository may not exist yet. Creating it now with the GitHub CLI." + gh auth login --hostname github.com --web + gh repo create $GitRepoId --private + # sleep 2 seconds to ensure git finishes creation of the repo + Start-Sleep -Seconds 2 + } + else{ + throw "There was an issue pulling the origin branch. The remote repository may not exist yet." + } + } + + Write-Output "Pushing to https://${GitHost}/${GitUserId}/${GitRepoId}.git" + git push origin $branchName +} + +$ErrorActionPreference = "Stop" +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. + 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. + + Parameters: + -g | -GitHost -> ex: github.com + -m | -Message -> the git commit message + -r | -GitRepoId -> the name of the repository + -u | -GitUserId -> your user id + " + + return +} + +$rootPath=Resolve-Path -Path $PSScriptRoot/../.. + +Push-Location $rootPath + +try { + Publish-ToGitHost $GitHost $GitUserId $GitRepoId $Message +} +finally{ + Pop-Location +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.sh.mustache new file mode 100644 index 000000000000..3d4b710dc039 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.sh.mustache @@ -0,0 +1,49 @@ +#!/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:-{{{gitUserId}}}} +git_repo_id=${2:-{{{gitRepoId}}}} +release_note=${3:-{{{releaseNote}}}} +git_host=${4:-{{{gitHost}}}} + +starting_directory=$(pwd) +script_root="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +cd $script_root +cd ../.. + +if [ "$release_note" = "" ] || [ "$release_note" = "Minor update" ]; then + # it seems unlikely that we would want our git commit message to be the default, so lets prompt the user + echo "Please provide a commit message or press enter" + read user_input + release_note=$user_input + if [ "$release_note" = "" ]; then + release_note="no message provided" + fi +fi + +git init +git add . +git commit -am "$release_note" +branch_name=$(git rev-parse --abbrev-ref HEAD) +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 + +echo "[INFO] Pulling from https://${git_host}/${git_user_id}/${git_repo_id}.git" +git pull origin $branch_name --ff-only + +echo "[INFO] Pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin $branch_name + +cd $starting_directory diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache index 7c3b0cc2d94a..f216a9911309 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache @@ -171,6 +171,7 @@ } } + {{#validatable}} /// /// To validate all properties of the instance /// @@ -180,6 +181,7 @@ { yield break; } + {{/validatable}} } /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache index d99b82a1e9e6..f60d3cf10f38 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache @@ -216,6 +216,7 @@ } } + {{#validatable}} /// /// To validate all properties of the instance /// @@ -225,6 +226,7 @@ { yield break; } + {{/validatable}} } /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache index babf25481c4e..3c7f8b2db810 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache @@ -16,7 +16,7 @@ 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}} {{/vars}} -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +[[Back to Model list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-models) [[Back to API list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-api-endpoints) [[Back to README]](../{{#useGenericHost}}../{{/useGenericHost}}README.md) {{/model}} {{/models}} 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 cdb95110a9e8..1a544ad8bb1e 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 @@ -1,7 +1,8 @@ - - false + {{#useGenericHost}} + true {{/useGenericHost}}{{^useGenericHost}} + false{{/useGenericHost}} {{targetFramework}} {{packageName}} {{packageName}} @@ -33,6 +34,13 @@ {{#useRestSharp}} {{/useRestSharp}} + {{#useGenericHost}} + + + {{#supportsRetry}} + + {{/supportsRetry}} + {{/useGenericHost}} {{#supportsRetry}} {{/supportsRetry}} 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 b20a94c76c1a..d01627884333 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 @@ -4,7 +4,8 @@ {{testPackageName}} {{testPackageName}} {{testTargetFramework}} - false + false{{#nullableReferenceTypes}} + annotations{{/nullableReferenceTypes}} diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Org.OpenAPITools.csproj index c445b1abb7cb..ea3a254a4d22 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -1,7 +1,7 @@ - false + false netstandard2.0 Org.OpenAPITools Org.OpenAPITools diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj index c445b1abb7cb..ea3a254a4d22 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -1,7 +1,7 @@ - false + false netstandard2.0 Org.OpenAPITools Org.OpenAPITools diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 0b425a6b53a1..2d4de6e7cccf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -1,7 +1,7 @@ - false + false netstandard2.0 Org.OpenAPITools Org.OpenAPITools diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 74dc32216c87..5e0f256b4cc5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -1,7 +1,7 @@ - false + false net47 Org.OpenAPITools Org.OpenAPITools 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 d2fb8de69812..40cff9b3c47c 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 @@ -1,7 +1,7 @@ - false + false net5.0 Org.OpenAPITools Org.OpenAPITools diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj index c445b1abb7cb..ea3a254a4d22 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -1,7 +1,7 @@ - false + false netstandard2.0 Org.OpenAPITools Org.OpenAPITools diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 19789c359524..97a88c1cbe33 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -1,7 +1,7 @@ - false + false netcoreapp2.0 Org.OpenAPITools Org.OpenAPITools diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj index eaf3365f5f6d..6310b388e6e9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -1,7 +1,7 @@ - false + false netstandard2.1;netcoreapp3.0 Org.OpenAPITools Org.OpenAPITools From b2bb5d071e296adff31dca8a72fd2f558538b502 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Fri, 28 Jan 2022 06:01:32 -0500 Subject: [PATCH 157/175] [typescript] Adding Custom Agent Support for fetch call (#11400) * add custom agent support * samples * more samples * merge master files * only enable custom agent on nodejs not browser * samples again * samples * samples once more --- .../resources/typescript/http/http.mustache | 19 +++++++++++++++++++ .../typescript/http/isomorphic-fetch.mustache | 3 +++ .../typescript/builds/default/http/http.ts | 11 +++++++++++ .../builds/default/http/isomorphic-fetch.ts | 1 + .../typescript/builds/inversify/http/http.ts | 11 +++++++++++ .../builds/inversify/http/isomorphic-fetch.ts | 1 + .../builds/object_params/http/http.ts | 11 +++++++++++ .../object_params/http/isomorphic-fetch.ts | 1 + 8 files changed, 58 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache index 2f71d86109f2..2f66d4b8996e 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache @@ -3,6 +3,8 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; +import * as http from 'http'; +import * as https from 'https'; {{/node}} {{/platforms}} {{#platforms}} @@ -113,6 +115,11 @@ export class RequestContext { private headers: { [key: string]: string } = {}; private body: RequestBody = undefined; private url: URLParse; + {{#platforms}} + {{#node}} + private agent: http.Agent | https.Agent | undefined = undefined; + {{/node}} + {{/platforms}} /** * Creates the request context using a http method and request resource url @@ -185,6 +192,18 @@ export class RequestContext { public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } + {{#platforms}} + {{#node}} + + public setAgent(agent: http.Agent | https.Agent) { + this.agent = agent; + } + + public getAgent(): http.Agent | https.Agent | undefined { + return this.agent; + } + {{/node}} + {{/platforms}} } export interface ResponseBody { diff --git a/modules/openapi-generator/src/main/resources/typescript/http/isomorphic-fetch.mustache b/modules/openapi-generator/src/main/resources/typescript/http/isomorphic-fetch.mustache index 7646836694b3..57b1ae594f6f 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/isomorphic-fetch.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/isomorphic-fetch.mustache @@ -20,6 +20,9 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary { body: body as any, headers: request.getHeaders(), {{#platforms}} + {{#node}} + agent: request.getAgent(), + {{/node}} {{#browser}} credentials: "same-origin" {{/browser}} diff --git a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts index a623aef12789..3b6e1461d924 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts @@ -1,6 +1,8 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; +import * as http from 'http'; +import * as https from 'https'; // typings of url-parse are incorrect... // @ts-ignore import * as URLParse from "url-parse"; @@ -50,6 +52,7 @@ export class RequestContext { private headers: { [key: string]: string } = {}; private body: RequestBody = undefined; private url: URLParse; + private agent: http.Agent | https.Agent | undefined = undefined; /** * Creates the request context using a http method and request resource url @@ -122,6 +125,14 @@ export class RequestContext { public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } + + public setAgent(agent: http.Agent | https.Agent) { + this.agent = agent; + } + + public getAgent(): http.Agent | https.Agent | undefined { + return this.agent; + } } export interface ResponseBody { diff --git a/samples/openapi3/client/petstore/typescript/builds/default/http/isomorphic-fetch.ts b/samples/openapi3/client/petstore/typescript/builds/default/http/isomorphic-fetch.ts index ed390df7ce10..26d267cfc063 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/http/isomorphic-fetch.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/http/isomorphic-fetch.ts @@ -12,6 +12,7 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary { method: method, body: body as any, headers: request.getHeaders(), + agent: request.getAgent(), }).then((resp: any) => { const headers: { [name: string]: string } = {}; resp.headers.forEach((value: string, name: string) => { diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts index a623aef12789..3b6e1461d924 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts @@ -1,6 +1,8 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; +import * as http from 'http'; +import * as https from 'https'; // typings of url-parse are incorrect... // @ts-ignore import * as URLParse from "url-parse"; @@ -50,6 +52,7 @@ export class RequestContext { private headers: { [key: string]: string } = {}; private body: RequestBody = undefined; private url: URLParse; + private agent: http.Agent | https.Agent | undefined = undefined; /** * Creates the request context using a http method and request resource url @@ -122,6 +125,14 @@ export class RequestContext { public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } + + public setAgent(agent: http.Agent | https.Agent) { + this.agent = agent; + } + + public getAgent(): http.Agent | https.Agent | undefined { + return this.agent; + } } export interface ResponseBody { diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/http/isomorphic-fetch.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/http/isomorphic-fetch.ts index ed390df7ce10..26d267cfc063 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/http/isomorphic-fetch.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/http/isomorphic-fetch.ts @@ -12,6 +12,7 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary { method: method, body: body as any, headers: request.getHeaders(), + agent: request.getAgent(), }).then((resp: any) => { const headers: { [name: string]: string } = {}; resp.headers.forEach((value: string, name: string) => { diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts index a623aef12789..3b6e1461d924 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts @@ -1,6 +1,8 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; +import * as http from 'http'; +import * as https from 'https'; // typings of url-parse are incorrect... // @ts-ignore import * as URLParse from "url-parse"; @@ -50,6 +52,7 @@ export class RequestContext { private headers: { [key: string]: string } = {}; private body: RequestBody = undefined; private url: URLParse; + private agent: http.Agent | https.Agent | undefined = undefined; /** * Creates the request context using a http method and request resource url @@ -122,6 +125,14 @@ export class RequestContext { public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } + + public setAgent(agent: http.Agent | https.Agent) { + this.agent = agent; + } + + public getAgent(): http.Agent | https.Agent | undefined { + return this.agent; + } } export interface ResponseBody { diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/http/isomorphic-fetch.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/http/isomorphic-fetch.ts index ed390df7ce10..26d267cfc063 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/http/isomorphic-fetch.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/http/isomorphic-fetch.ts @@ -12,6 +12,7 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary { method: method, body: body as any, headers: request.getHeaders(), + agent: request.getAgent(), }).then((resp: any) => { const headers: { [name: string]: string } = {}; resp.headers.forEach((value: string, name: string) => { From 7dad57c8b62818a7f3fb9f53718b7e92c1d339c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Lepp=C3=A4?= Date: Sat, 29 Jan 2022 04:37:51 +0200 Subject: [PATCH 158/175] [kotlin-server][jax-rs] Added support for JAX-RS library into Kotlin Server generator (#10830) * Added templates for Kotlin JAX-RS server * Fixed Kotlin Server JAX-RS template directory * Added support for Kotlin Server JAX-RS library * Added support using coroutines with Kotlin server JAX-RS library * Added sample for Kotlin server JAX-RS library * Added support for returnResponse option into Kotlin server JAX-RS library * Fixed issue with optional parameters in Kotlin JAX-RS spec * Fixed oneOf issue in Kotlin jaxrs-spec generator * Added better documentation to Kotlin Server JAX-RS options * Updated kotlin-server.md * Updated kotlin-server jaxrs-spec samples * Fixed issue with Kotlin JAX-RS spec and reserved names * Regenerated samples --- bin/configs/kotlin-server-jaxrs-spec.yaml | 7 ++ docs/generators/kotlin-server.md | 6 +- .../languages/KotlinServerCodegen.java | 80 ++++++++++++++--- .../additionalModelTypeAnnotations.mustache | 2 + .../libraries/jaxrs-spec/api.mustache | 31 +++++++ .../jaxrs-spec/apiInterface.mustache | 13 +++ .../libraries/jaxrs-spec/apiMethod.mustache | 16 ++++ .../jaxrs-spec/beanValidation.mustache | 5 ++ .../jaxrs-spec/beanValidationCore.mustache | 20 +++++ .../beanValidationHeaderParams.mustache | 1 + .../beanValidationPathParams.mustache | 1 + .../beanValidationQueryParams.mustache | 1 + .../libraries/jaxrs-spec/bodyParams.mustache | 1 + .../jaxrs-spec/build.gradle.mustache | 57 ++++++++++++ .../jaxrs-spec/cookieParams.mustache | 1 + .../libraries/jaxrs-spec/data_class.mustache | 73 +++++++++++++++ .../jaxrs-spec/data_class_opt_var.mustache | 6 ++ .../jaxrs-spec/data_class_req_var.mustache | 6 ++ .../libraries/jaxrs-spec/enum_class.mustache | 58 ++++++++++++ .../libraries/jaxrs-spec/enum_doc.mustache | 7 ++ .../libraries/jaxrs-spec/formParams.mustache | 1 + .../jaxrs-spec/generatedAnnotation.mustache | 1 + .../libraries/jaxrs-spec/gradle.properties | 1 + .../jaxrs-spec/headerParams.mustache | 1 + .../libraries/jaxrs-spec/model.mustache | 14 +++ .../libraries/jaxrs-spec/model_doc.mustache | 3 + .../libraries/jaxrs-spec/oneof_model.mustache | 3 + .../libraries/jaxrs-spec/pathParams.mustache | 1 + .../libraries/jaxrs-spec/queryParams.mustache | 1 + .../jaxrs-spec/.openapi-generator-ignore | 23 +++++ .../jaxrs-spec/.openapi-generator/FILES | 13 +++ .../jaxrs-spec/.openapi-generator/VERSION | 1 + .../kotlin-server/jaxrs-spec/README.md | 89 +++++++++++++++++++ .../kotlin-server/jaxrs-spec/build.gradle | 51 +++++++++++ .../jaxrs-spec/gradle.properties | 1 + .../kotlin-server/jaxrs-spec/settings.gradle | 1 + .../org/openapitools/server/apis/PetApi.kt | 66 ++++++++++++++ .../org/openapitools/server/apis/StoreApi.kt | 40 +++++++++ .../org/openapitools/server/apis/UserApi.kt | 59 ++++++++++++ .../openapitools/server/models/ApiResponse.kt | 33 +++++++ .../openapitools/server/models/Category.kt | 34 +++++++ .../server/models/ModelApiResponse.kt | 39 ++++++++ .../org/openapitools/server/models/Order.kt | 67 ++++++++++++++ .../org/openapitools/server/models/Pet.kt | 69 ++++++++++++++ .../org/openapitools/server/models/Tag.kt | 34 +++++++ .../org/openapitools/server/models/User.kt | 65 ++++++++++++++ 46 files changed, 1091 insertions(+), 12 deletions(-) create mode 100644 bin/configs/kotlin-server-jaxrs-spec.yaml create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/additionalModelTypeAnnotations.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/apiInterface.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/apiMethod.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidation.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationCore.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationHeaderParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationPathParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationQueryParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/bodyParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/build.gradle.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_opt_var.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_req_var.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/enum_class.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/enum_doc.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/formParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/generatedAnnotation.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/gradle.properties create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/model.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/model_doc.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/oneof_model.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/pathParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator-ignore create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/FILES create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/README.md create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/build.gradle create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/gradle.properties create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/settings.gradle create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/PetApi.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/UserApi.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Category.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Pet.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Tag.kt create mode 100644 samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/User.kt diff --git a/bin/configs/kotlin-server-jaxrs-spec.yaml b/bin/configs/kotlin-server-jaxrs-spec.yaml new file mode 100644 index 000000000000..11d4fcec7a8d --- /dev/null +++ b/bin/configs/kotlin-server-jaxrs-spec.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin-server +outputDir: samples/server/petstore/kotlin-server/jaxrs-spec +library: jaxrs-spec +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-server +additionalProperties: + useCoroutines: "true" diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 4d79d17024f5..9fa866983a43 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -30,15 +30,19 @@ These options may be applied as additional-properties (cli) or configOptions (pl |featureLocations|Generates routes in a typed way, for both: constructing URLs and reading the parameters.| |true| |featureMetrics|Enables metrics feature.| |true| |groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| -|library|library template (sub-template)|
**ktor**
ktor framework
|ktor| +|interfaceOnly|Whether to generate only API interface stubs without the server files. This option is currently supported only when using jaxrs-spec library.| |false| +|library|library template (sub-template)|
**ktor**
ktor framework
**jaxrs-spec**
JAX-RS spec only
|ktor| |modelMutable|Create mutable models| |false| |packageName|Generated artifact package name.| |org.openapitools.server| |parcelizeModels|toggle "@Parcelize" for generated models| |null| +|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true. This option is currently supported only when using jaxrs-spec library.| |false| |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| |serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| |sourceFolder|source folder for generated code| |src/main/kotlin| +|useBeanValidation|Use BeanValidation API annotations. This option is currently supported only when using jaxrs-spec library.| |false| +|useCoroutines|Whether to use the Coroutines. This option is currently supported only when using jaxrs-spec library.| |false| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java index 3caa91e404dc..d1b1d1d57fb6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java @@ -23,6 +23,7 @@ import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,9 +34,14 @@ import java.util.List; import java.util.Map; -public class KotlinServerCodegen extends AbstractKotlinCodegen { +public class KotlinServerCodegen extends AbstractKotlinCodegen implements BeanValidationFeatures { + + public static final String INTERFACE_ONLY = "interfaceOnly"; + public static final String USE_COROUTINES = "useCoroutines"; + public static final String RETURN_RESPONSE = "returnResponse"; public static final String DEFAULT_LIBRARY = Constants.KTOR; private final Logger LOGGER = LoggerFactory.getLogger(KotlinServerCodegen.class); + private Boolean autoHeadFeatureEnabled = true; private Boolean conditionalHeadersFeatureEnabled = false; private Boolean hstsFeatureEnabled = true; @@ -43,6 +49,10 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen { private Boolean compressionFeatureEnabled = true; private Boolean locationsFeatureEnabled = true; private Boolean metricsFeatureEnabled = true; + private boolean interfaceOnly = false; + private boolean useBeanValidation = false; + private boolean useCoroutines = false; + private boolean returnResponse = false; // This is here to potentially warn the user when an option is not supported by the target framework. private Map> optionsSupportedPerFramework = new ImmutableMap.Builder>() @@ -102,6 +112,7 @@ public KotlinServerCodegen() { modelPackage = packageName + ".models"; supportedLibraries.put(Constants.KTOR, "ktor framework"); + supportedLibraries.put(Constants.JAXRS_SPEC, "JAX-RS spec only"); // TODO: Configurable server engine. Defaults to netty in build.gradle. CliOption library = new CliOption(CodegenConstants.LIBRARY, CodegenConstants.LIBRARY_DESC); @@ -117,6 +128,11 @@ public KotlinServerCodegen() { addSwitch(Constants.COMPRESSION, Constants.COMPRESSION_DESC, getCompressionFeatureEnabled()); addSwitch(Constants.LOCATIONS, Constants.LOCATIONS_DESC, getLocationsFeatureEnabled()); addSwitch(Constants.METRICS, Constants.METRICS_DESC, getMetricsFeatureEnabled()); + + cliOptions.add(CliOption.newBoolean(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files. This option is currently supported only when using jaxrs-spec library.").defaultValue(String.valueOf(interfaceOnly))); + cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations. This option is currently supported only when using jaxrs-spec library.", useBeanValidation)); + cliOptions.add(CliOption.newBoolean(USE_COROUTINES, "Whether to use the Coroutines. This option is currently supported only when using jaxrs-spec library.")); + cliOptions.add(CliOption.newBoolean(RETURN_RESPONSE, "Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true. This option is currently supported only when using jaxrs-spec library.").defaultValue(String.valueOf(returnResponse))); } public Boolean getAutoHeadFeatureEnabled() { @@ -191,6 +207,37 @@ public CodegenType getTag() { public void processOpts() { super.processOpts(); + if (additionalProperties.containsKey(CodegenConstants.LIBRARY)) { + this.setLibrary((String) additionalProperties.get(CodegenConstants.LIBRARY)); + } + + if (additionalProperties.containsKey(INTERFACE_ONLY)) { + interfaceOnly = Boolean.parseBoolean(additionalProperties.get(INTERFACE_ONLY).toString()); + if (!interfaceOnly) { + additionalProperties.remove(INTERFACE_ONLY); + } + } + + if (additionalProperties.containsKey(USE_COROUTINES)) { + useCoroutines = Boolean.parseBoolean(additionalProperties.get(USE_COROUTINES).toString()); + if (!useCoroutines) { + additionalProperties.remove(USE_COROUTINES); + } + } + + if (additionalProperties.containsKey(RETURN_RESPONSE)) { + returnResponse = Boolean.parseBoolean(additionalProperties.get(RETURN_RESPONSE).toString()); + if (!returnResponse) { + additionalProperties.remove(RETURN_RESPONSE); + } + } + + if (additionalProperties.containsKey(USE_BEANVALIDATION)) { + setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION)); + } + + writePropertyBack(USE_BEANVALIDATION, useBeanValidation); + // set default library to "ktor" if (StringUtils.isEmpty(library)) { this.setLibrary(DEFAULT_LIBRARY); @@ -245,29 +292,40 @@ public void processOpts() { String resourcesFolder = "src/main/resources"; // not sure this can be user configurable. supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile")); + + if (library.equals(Constants.KTOR)) { + supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile")); + } supportingFiles.add(new SupportingFile("build.gradle.mustache", "", "build.gradle")); supportingFiles.add(new SupportingFile("settings.gradle.mustache", "", "settings.gradle")); supportingFiles.add(new SupportingFile("gradle.properties", "", "gradle.properties")); - supportingFiles.add(new SupportingFile("AppMain.kt.mustache", packageFolder, "AppMain.kt")); - supportingFiles.add(new SupportingFile("Configuration.kt.mustache", packageFolder, "Configuration.kt")); + if (library.equals(Constants.KTOR)) { + supportingFiles.add(new SupportingFile("AppMain.kt.mustache", packageFolder, "AppMain.kt")); + supportingFiles.add(new SupportingFile("Configuration.kt.mustache", packageFolder, "Configuration.kt")); - if (generateApis && locationsFeatureEnabled) { - supportingFiles.add(new SupportingFile("Paths.kt.mustache", packageFolder, "Paths.kt")); - } + if (generateApis && locationsFeatureEnabled) { + supportingFiles.add(new SupportingFile("Paths.kt.mustache", packageFolder, "Paths.kt")); + } - supportingFiles.add(new SupportingFile("application.conf.mustache", resourcesFolder, "application.conf")); - supportingFiles.add(new SupportingFile("logback.xml", resourcesFolder, "logback.xml")); + supportingFiles.add(new SupportingFile("application.conf.mustache", resourcesFolder, "application.conf")); + supportingFiles.add(new SupportingFile("logback.xml", resourcesFolder, "logback.xml")); - final String infrastructureFolder = (sourceFolder + File.separator + packageName + File.separator + "infrastructure").replace(".", File.separator); + final String infrastructureFolder = (sourceFolder + File.separator + packageName + File.separator + "infrastructure").replace(".", File.separator); - supportingFiles.add(new SupportingFile("ApiKeyAuth.kt.mustache", infrastructureFolder, "ApiKeyAuth.kt")); + supportingFiles.add(new SupportingFile("ApiKeyAuth.kt.mustache", infrastructureFolder, "ApiKeyAuth.kt")); + } + } + + @Override + public void setUseBeanValidation(boolean useBeanValidation) { + this.useBeanValidation = useBeanValidation; } public static class Constants { public final static String KTOR = "ktor"; + public final static String JAXRS_SPEC = "jaxrs-spec"; public final static String AUTOMATIC_HEAD_REQUESTS = "featureAutoHead"; public final static String AUTOMATIC_HEAD_REQUESTS_DESC = "Automatically provide responses to HEAD requests for existing routes that have the GET verb defined."; public final static String CONDITIONAL_HEADERS = "featureConditionalHeaders"; diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/additionalModelTypeAnnotations.mustache new file mode 100644 index 000000000000..f4871c02cc2e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/additionalModelTypeAnnotations.mustache @@ -0,0 +1,2 @@ +{{#additionalModelTypeAnnotations}}{{{.}}} +{{/additionalModelTypeAnnotations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/api.mustache new file mode 100644 index 000000000000..2d716bd7fdfd --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/api.mustache @@ -0,0 +1,31 @@ +package {{package}}; + +{{#imports}}import {{import}} +{{/imports}} + +import javax.ws.rs.* +import javax.ws.rs.core.Response + +{{#useSwaggerAnnotations}} +import io.swagger.annotations.* +{{/useSwaggerAnnotations}} + +import java.io.InputStream +import java.util.Map +import java.util.List +{{#useBeanValidation}}import javax.validation.constraints.* +import javax.validation.Valid{{/useBeanValidation}} + +{{#useSwaggerAnnotations}} +@Api(description = "the {{{baseName}}} API"){{/useSwaggerAnnotations}}{{#hasConsumes}} +@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}} +@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} +@Path("/") +{{>generatedAnnotation}}{{#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/kotlin-server/libraries/jaxrs-spec/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/apiInterface.mustache new file mode 100644 index 000000000000..d64ab7579383 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/apiInterface.mustache @@ -0,0 +1,13 @@ + @{{httpMethod}} + @Path("{{{path}}}"){{#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}} }) + @ApiResponses(value = { {{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} + {{#useCoroutines}}suspend {{/useCoroutines}}fun {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}){{#returnResponse}}: Response{{/returnResponse}}{{^returnResponse}}{{#returnType}}: {{{returnType}}}{{/returnType}}{{/returnResponse}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/apiMethod.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/apiMethod.mustache new file mode 100644 index 000000000000..bfe70607f176 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/apiMethod.mustache @@ -0,0 +1,16 @@ + @{{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}} }) + @ApiResponses(value = { {{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} + }){{/useSwaggerAnnotations}} + {{#useCoroutines}}suspend {{/useCoroutines}}fun {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}): Response { + return Response.ok().entity("magic!").build(); + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidation.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidation.mustache new file mode 100644 index 000000000000..ef7ab3fb7a9f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidation.mustache @@ -0,0 +1,5 @@ + @Valid +{{#required}} + @NotNull +{{/required}} +{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationCore.mustache new file mode 100644 index 000000000000..d6e2f13b457c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationCore.mustache @@ -0,0 +1,20 @@ +{{#pattern}} @Pattern(regexp="{{{.}}}"){{/pattern}}{{! +minLength && maxLength set +}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +minLength set, maxLength not +}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! +minLength not set, maxLength set +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! +@Size: minItems && maxItems set +}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +@Size: minItems set, maxItems not +}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! +@Size: minItems not set && maxItems set +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! +check for integer or long / all others=decimal type with @Decimal* +isInteger set +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! +isLong set +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! +Not Integer, not Long => we have a decimal value! +}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationHeaderParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationHeaderParams.mustache new file mode 100644 index 000000000000..c4ff01d7e552 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationHeaderParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationPathParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationPathParams.mustache new file mode 100644 index 000000000000..051bd53c0a58 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationPathParams.mustache @@ -0,0 +1 @@ +{{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationQueryParams.mustache new file mode 100644 index 000000000000..c4ff01d7e552 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/beanValidationQueryParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/bodyParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/bodyParams.mustache new file mode 100644 index 000000000000..ba9197f35a49 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/bodyParams.mustache @@ -0,0 +1 @@ +{{#isBodyParam}}{{#useBeanValidation}}@Valid {{#required}}{{^isNullable}}@NotNull {{/isNullable}}{{/required}}{{/useBeanValidation}} {{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/build.gradle.mustache new file mode 100644 index 000000000000..639084ec35b0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/build.gradle.mustache @@ -0,0 +1,57 @@ +group "{{groupId}}" +version "{{artifactVersion}}" + +wrapper { + gradleVersion = "6.9" + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +buildscript { + ext.kotlin_version = "1.4.32" + ext.jakarta_ws_rs_version = "2.1.6" + ext.swagger_annotations_version = "1.5.3" + ext.jakarta_annotations_version = "1.3.5" + ext.jackson_version = "2.9.9" +{{#useBeanValidation}} + ext.beanvalidation_version = "2.0.2" +{{/useBeanValidation}} + repositories { + maven { url "https://repo1.maven.org/maven2" } + maven { url "https://plugins.gradle.org/m2/" } + } + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +apply plugin: "java" +apply plugin: "kotlin" +apply plugin: "application" + +sourceCompatibility = 1.8 + +compileKotlin { + kotlinOptions.jvmTarget = "1.8" +} + +compileTestKotlin { + kotlinOptions.jvmTarget = "1.8" +} + +repositories { + maven { setUrl("https://repo1.maven.org/maven2") } +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") + implementation("ch.qos.logback:logback-classic:1.2.1") + implementation("jakarta.ws.rs:jakarta.ws.rs-api:$jakarta_ws_rs_version") + implementation("jakarta.annotation:jakarta.annotation-api:$jakarta_annotations_version") + implementation("io.swagger:swagger-annotations:$swagger_annotations_version") + implementation("com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version") + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version") +{{#useBeanValidation}} + implementation("jakarta.validation:jakarta.validation-api:$beanvalidation_version") +{{/useBeanValidation}} + testImplementation("junit:junit:4.13.2") +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache new file mode 100644 index 000000000000..eda2d526ebd4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}@CookieParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class.mustache new file mode 100644 index 000000000000..c0fdd457ba7b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class.mustache @@ -0,0 +1,73 @@ +import com.fasterxml.jackson.annotation.JsonProperty +{{#kotlinx_serialization}} +import {{#serializableModel}}kotlinx.serialization.Serializable as KSerializable{{/serializableModel}}{{^serializableModel}}kotlinx.serialization.Serializable{{/serializableModel}} +import kotlinx.serialization.SerialName +import kotlinx.serialization.Contextual +{{#hasEnums}} +{{/hasEnums}} +{{/kotlinx_serialization}} +{{#parcelizeModels}} +import android.os.Parcelable +import kotlinx.parcelize.Parcelize +{{/parcelizeModels}} +{{#serializableModel}} +import java.io.Serializable +{{/serializableModel}} +/** + * {{{description}}} + * +{{#allVars}} + * @param {{{name}}} {{{description}}} +{{/allVars}} + */ +{{#parcelizeModels}} +@Parcelize +{{/parcelizeModels}} +{{#multiplatform}}{{^discriminator}}@Serializable{{/discriminator}}{{/multiplatform}}{{#kotlinx_serialization}}{{#serializableModel}}@KSerializable{{/serializableModel}}{{^serializableModel}}@Serializable{{/serializableModel}}{{/kotlinx_serialization}}{{#moshi}}{{#moshiCodeGen}}@JsonClass(generateAdapter = true){{/moshiCodeGen}}{{/moshi}}{{#jackson}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{/jackson}} +{{#isDeprecated}} +@Deprecated(message = "This schema is deprecated.") +{{/isDeprecated}} +{{>additionalModelTypeAnnotations}} +{{#nonPublicApi}}internal {{/nonPublicApi}}{{#discriminator}}interface{{/discriminator}}{{^discriminator}}data class{{/discriminator}} {{classname}}{{^discriminator}} ( + +{{#allVars}} +{{#required}}{{>data_class_req_var}}{{/required}}{{^required}}{{>data_class_opt_var}}{{/required}}{{^-last}},{{/-last}} + +{{/allVars}} +){{/discriminator}}{{#parent}}{{^serializableModel}}{{^parcelizeModels}} : {{{parent}}}{{#isMap}}(){{/isMap}}{{#isArray}}(){{/isArray}}{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{#serializableModel}}{{^parcelizeModels}} : {{{parent}}}{{#isMap}}(){{/isMap}}{{#isArray}}(){{/isArray}}, Serializable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{^serializableModel}}{{#parcelizeModels}} : {{{parent}}}{{#isMap}}(){{/isMap}}{{#isArray}}(){{/isArray}}, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{#serializableModel}}{{#parcelizeModels}} : {{{parent}}}{{#isMap}}(){{/isMap}}{{#isArray}}(){{/isArray}}, Serializable, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}{{^parcelizeModels}} : Serializable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}{{#parcelizeModels}} : Serializable, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#vendorExtensions.x-has-data-class-body}} { +{{/vendorExtensions.x-has-data-class-body}} +{{#serializableModel}} + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { + private const val serialVersionUID: Long = 123 + } +{{/serializableModel}} +{{#discriminator}}{{#vars}}{{#required}} +{{>interface_req_var}}{{/required}}{{^required}} +{{>interface_opt_var}}{{/required}}{{/vars}}{{/discriminator}} +{{#hasEnums}} +{{#vars}} +{{#isEnum}} + /** + * {{{description}}} + * + * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} + */ + {{#kotlinx_serialization}} + {{#serializableModel}}@KSerializable{{/serializableModel}}{{^serializableModel}}@Serializable{{/serializableModel}} + {{/kotlinx_serialization}} + {{#nonPublicApi}}internal {{/nonPublicApi}}enum class {{{nameInCamelCase}}}(val value: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}kotlin.String{{/isContainer}}) { + {{#allowableValues}} + {{#enumVars}} + @JsonProperty(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{#kotlinx_serialization}} + @SerialName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{/kotlinx_serialization}} + {{/enumVars}} + {{/allowableValues}} + } +{{/isEnum}} +{{/vars}} +{{/hasEnums}} +{{#vendorExtensions.x-has-data-class-body}} +} +{{/vendorExtensions.x-has-data-class-body}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_opt_var.mustache new file mode 100644 index 000000000000..d99ccd902fa3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_opt_var.mustache @@ -0,0 +1,6 @@ +{{#description}} + /* {{{.}}} */ +{{/description}} + + @JsonProperty("{{{baseName}}}") +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_req_var.mustache new file mode 100644 index 000000000000..5c69ae13e510 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/data_class_req_var.mustache @@ -0,0 +1,6 @@ +{{#description}} + /* {{{.}}} */ +{{/description}} + + @JsonProperty("{{{baseName}}}") +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/enum_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/enum_class.mustache new file mode 100644 index 000000000000..005b9daa5965 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/enum_class.mustache @@ -0,0 +1,58 @@ +import com.fasterxml.jackson.annotation.JsonProperty +{{#kotlinx_serialization}} +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +{{/kotlinx_serialization}} + +/** + * {{{description}}} + * + * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} + */ +{{#kotlinx_serialization}}@Serializable{{/kotlinx_serialization}} +{{>additionalModelTypeAnnotations}} +{{#nonPublicApi}}internal {{/nonPublicApi}}enum class {{classname}}(val value: {{{dataType}}}) { +{{#allowableValues}}{{#enumVars}} + @JsonProperty(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) + {{#kotlinx_serialization}} + @SerialName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) + {{/kotlinx_serialization}} + {{#isArray}} + {{#isList}} + {{&name}}(listOf({{{value}}})){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{/isList}} + {{^isList}} + {{&name}}(arrayOf({{{value}}})){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{/isList}} + {{/isArray}} + {{^isArray}} + {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{/isArray}} +{{/enumVars}}{{/allowableValues}} + /** + * Override toString() to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): String = value{{^isString}}.toString(){{/isString}} + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: Any?): kotlin.String? = if (data is {{classname}}) "$data" else null + + /** + * Returns a valid [{{classname}}] for [data], null otherwise. + */ + @OptIn(ExperimentalStdlibApi::class) + fun decode(data: Any?): {{classname}}? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/enum_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/enum_doc.mustache new file mode 100644 index 000000000000..fcb3d7e61aa6 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/enum_doc.mustache @@ -0,0 +1,7 @@ +# {{classname}} + +## Enum + +{{#allowableValues}}{{#enumVars}} + * `{{name}}` (value: `{{{value}}}`) +{{/enumVars}}{{/allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/formParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/formParams.mustache new file mode 100644 index 000000000000..5427f037ae0b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/formParams.mustache @@ -0,0 +1 @@ +{{#isFormParam}}{{^isFile}}@FormParam(value = "{{baseName}}") {{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{/isFile}}{{#isFile}} @FormParam(value = "{{baseName}}") {{paramName}}InputStream: InputStream{{^required}}?{{/required}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/generatedAnnotation.mustache new file mode 100644 index 000000000000..624b44019ad7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/generatedAnnotation.mustache @@ -0,0 +1 @@ +@javax.annotation.Generated(value = arrayOf("{{generatorClass}}"){{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/gradle.properties b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/gradle.properties new file mode 100644 index 000000000000..5f1ed7bbe024 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/gradle.properties @@ -0,0 +1 @@ +org.gradle.caching=true \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache new file mode 100644 index 000000000000..980d55c7e51c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache @@ -0,0 +1 @@ +{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/model.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/model.mustache new file mode 100644 index 000000000000..03eecdc64ac9 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/model.mustache @@ -0,0 +1,14 @@ +{{>licenseInfo}} +package {{modelPackage}} + +{{#imports}}import {{import}} +{{/imports}} +{{#useBeanValidation}} +import javax.validation.constraints.* +import javax.validation.Valid +{{/useBeanValidation}} +{{#models}} +{{#model}} +{{#isEnum}}{{>enum_class}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{>oneof_model}}{{/oneOf}}{{^oneOf}}{{#isAlias}}typealias {{classname}} = {{{dataType}}}{{/isAlias}}{{^isAlias}}{{>data_class}}{{/isAlias}}{{/oneOf}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/model_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/model_doc.mustache new file mode 100644 index 000000000000..e3b718421188 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/model_doc.mustache @@ -0,0 +1,3 @@ +{{#models}}{{#model}} +{{#isEnum}}{{>enum_doc}}{{/isEnum}}{{^isEnum}}{{>class_doc}}{{/isEnum}} +{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/oneof_model.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/oneof_model.mustache new file mode 100644 index 000000000000..83c841f56001 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/oneof_model.mustache @@ -0,0 +1,3 @@ +{{#-first}} +typealias {{classname}} = Any +{{/-first}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/pathParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/pathParams.mustache new file mode 100644 index 000000000000..7839f91302bb --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/pathParams.mustache @@ -0,0 +1 @@ +{{#isPathParam}}@PathParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache new file mode 100644 index 000000000000..91a0dfdb6644 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache @@ -0,0 +1 @@ +{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{/isQueryParam}} \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator-ignore b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/.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/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/FILES b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/FILES new file mode 100644 index 000000000000..8311b1e0d0af --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/FILES @@ -0,0 +1,13 @@ +README.md +build.gradle +gradle.properties +settings.gradle +src/main/kotlin/org/openapitools/server/apis/PetApi.kt +src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +src/main/kotlin/org/openapitools/server/apis/UserApi.kt +src/main/kotlin/org/openapitools/server/models/Category.kt +src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt +src/main/kotlin/org/openapitools/server/models/Order.kt +src/main/kotlin/org/openapitools/server/models/Pet.kt +src/main/kotlin/org/openapitools/server/models/Tag.kt +src/main/kotlin/org/openapitools/server/models/User.kt diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/README.md b/samples/server/petstore/kotlin-server/jaxrs-spec/README.md new file mode 100644 index 000000000000..d5e7ab18e685 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/README.md @@ -0,0 +1,89 @@ +# org.openapitools.server - Kotlin Server library for OpenAPI Petstore + +## Requires + +* Kotlin 1.4.31 +* Gradle 6.8.2 + +## Build + +First, create the gradle wrapper script: + +``` +gradle wrapper +``` + +Then, run: + +``` +./gradlew check assemble +``` + +This runs all tests and packages the library. + +## Features/Implementation Notes + +* Supports JSON inputs/outputs, File inputs, and Form inputs. +* Supports collection formats for query parameters: csv, tsv, ssv, pipes. +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. + + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + + +## Documentation for Models + + - [org.openapitools.server.models.Category](docs/Category.md) + - [org.openapitools.server.models.ModelApiResponse](docs/ModelApiResponse.md) + - [org.openapitools.server.models.Order](docs/Order.md) + - [org.openapitools.server.models.Pet](docs/Pet.md) + - [org.openapitools.server.models.Tag](docs/Tag.md) + - [org.openapitools.server.models.User](docs/User.md) + + + +## Documentation for Authorization + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +### 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 + diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/build.gradle b/samples/server/petstore/kotlin-server/jaxrs-spec/build.gradle new file mode 100644 index 000000000000..b85cf7303677 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/build.gradle @@ -0,0 +1,51 @@ +group "org.openapitools" +version "1.0.0" + +wrapper { + gradleVersion = "6.9" + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +buildscript { + ext.kotlin_version = "1.4.32" + ext.jakarta_ws_rs_version = "2.1.6" + ext.swagger_annotations_version = "1.5.3" + ext.jakarta_annotations_version = "1.3.5" + ext.jackson_version = "2.9.9" + repositories { + maven { url "https://repo1.maven.org/maven2" } + maven { url "https://plugins.gradle.org/m2/" } + } + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +apply plugin: "java" +apply plugin: "kotlin" +apply plugin: "application" + +sourceCompatibility = 1.8 + +compileKotlin { + kotlinOptions.jvmTarget = "1.8" +} + +compileTestKotlin { + kotlinOptions.jvmTarget = "1.8" +} + +repositories { + maven { setUrl("https://repo1.maven.org/maven2") } +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") + implementation("ch.qos.logback:logback-classic:1.2.1") + implementation("jakarta.ws.rs:jakarta.ws.rs-api:$jakarta_ws_rs_version") + implementation("jakarta.annotation:jakarta.annotation-api:$jakarta_annotations_version") + implementation("io.swagger:swagger-annotations:$swagger_annotations_version") + implementation("com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version") + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version") + testImplementation("junit:junit:4.13.2") +} \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/gradle.properties b/samples/server/petstore/kotlin-server/jaxrs-spec/gradle.properties new file mode 100644 index 000000000000..5f1ed7bbe024 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/gradle.properties @@ -0,0 +1 @@ +org.gradle.caching=true \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/settings.gradle b/samples/server/petstore/kotlin-server/jaxrs-spec/settings.gradle new file mode 100644 index 000000000000..a09a58efab11 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'kotlin-server' \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/PetApi.kt new file mode 100644 index 000000000000..eb94d6065e61 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -0,0 +1,66 @@ +package org.openapitools.server.apis; + +import org.openapitools.server.models.ModelApiResponse +import org.openapitools.server.models.Pet + +import javax.ws.rs.* +import javax.ws.rs.core.Response + + +import java.io.InputStream +import java.util.Map +import java.util.List + + + +@Path("/") +@javax.annotation.Generated(value = arrayOf("org.openapitools.codegen.languages.KotlinServerCodegen"))class PetApi { + + @POST + @Consumes("application/json", "application/xml") + suspend fun addPet( body: Pet): Response { + return Response.ok().entity("magic!").build(); + } + + @DELETE + suspend fun deletePet(@PathParam("petId") petId: kotlin.Long,@HeaderParam("api_key") apiKey: kotlin.String?): Response { + return Response.ok().entity("magic!").build(); + } + + @GET + @Produces("application/xml", "application/json") + suspend fun findPetsByStatus(@QueryParam("status") status: kotlin.collections.List): Response { + return Response.ok().entity("magic!").build(); + } + + @GET + @Produces("application/xml", "application/json") + suspend fun findPetsByTags(@QueryParam("tags") tags: kotlin.collections.List): Response { + return Response.ok().entity("magic!").build(); + } + + @GET + @Produces("application/xml", "application/json") + suspend fun getPetById(@PathParam("petId") petId: kotlin.Long): Response { + return Response.ok().entity("magic!").build(); + } + + @PUT + @Consumes("application/json", "application/xml") + suspend fun updatePet( body: Pet): Response { + return Response.ok().entity("magic!").build(); + } + + @POST + @Consumes("application/x-www-form-urlencoded") + suspend fun updatePetWithForm(@PathParam("petId") petId: kotlin.Long,@FormParam(value = "name") name: kotlin.String?,@FormParam(value = "status") status: kotlin.String?): Response { + return Response.ok().entity("magic!").build(); + } + + @POST + @Consumes("multipart/form-data") + @Produces("application/json") + suspend fun uploadFile(@PathParam("petId") petId: kotlin.Long,@FormParam(value = "additionalMetadata") additionalMetadata: kotlin.String?, @FormParam(value = "file") fileInputStream: InputStream?): Response { + return Response.ok().entity("magic!").build(); + } +} diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt new file mode 100644 index 000000000000..f297a11661db --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -0,0 +1,40 @@ +package org.openapitools.server.apis; + +import org.openapitools.server.models.Order + +import javax.ws.rs.* +import javax.ws.rs.core.Response + + +import java.io.InputStream +import java.util.Map +import java.util.List + + + +@Path("/") +@javax.annotation.Generated(value = arrayOf("org.openapitools.codegen.languages.KotlinServerCodegen"))class StoreApi { + + @DELETE + suspend fun deleteOrder(@PathParam("orderId") orderId: kotlin.String): Response { + return Response.ok().entity("magic!").build(); + } + + @GET + @Produces("application/json") + suspend fun getInventory(): Response { + return Response.ok().entity("magic!").build(); + } + + @GET + @Produces("application/xml", "application/json") + suspend fun getOrderById(@PathParam("orderId") orderId: kotlin.Long): Response { + return Response.ok().entity("magic!").build(); + } + + @POST + @Produces("application/xml", "application/json") + suspend fun placeOrder( body: Order): Response { + return Response.ok().entity("magic!").build(); + } +} diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/UserApi.kt new file mode 100644 index 000000000000..f824ebc217ab --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -0,0 +1,59 @@ +package org.openapitools.server.apis; + +import org.openapitools.server.models.User + +import javax.ws.rs.* +import javax.ws.rs.core.Response + + +import java.io.InputStream +import java.util.Map +import java.util.List + + + +@Path("/") +@javax.annotation.Generated(value = arrayOf("org.openapitools.codegen.languages.KotlinServerCodegen"))class UserApi { + + @POST + suspend fun createUser( body: User): Response { + return Response.ok().entity("magic!").build(); + } + + @POST + suspend fun createUsersWithArrayInput( body: kotlin.collections.List): Response { + return Response.ok().entity("magic!").build(); + } + + @POST + suspend fun createUsersWithListInput( body: kotlin.collections.List): Response { + return Response.ok().entity("magic!").build(); + } + + @DELETE + suspend fun deleteUser(@PathParam("username") username: kotlin.String): Response { + return Response.ok().entity("magic!").build(); + } + + @GET + @Produces("application/xml", "application/json") + suspend fun getUserByName(@PathParam("username") username: kotlin.String): Response { + return Response.ok().entity("magic!").build(); + } + + @GET + @Produces("application/xml", "application/json") + suspend fun loginUser(@QueryParam("username") username: kotlin.String,@QueryParam("password") password: kotlin.String): Response { + return Response.ok().entity("magic!").build(); + } + + @GET + suspend fun logoutUser(): Response { + return Response.ok().entity("magic!").build(); + } + + @PUT + suspend fun updateUser(@PathParam("username") username: kotlin.String, body: User): Response { + return Response.ok().entity("magic!").build(); + } +} diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt new file mode 100644 index 000000000000..974c9589a7f6 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt @@ -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 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package org.openapitools.server.models + +import com.fasterxml.jackson.annotation.JsonProperty +/** + * Describes the result of uploading an image resource + * + * @param code + * @param type + * @param message + */ + + +data class ApiResponse ( + + val code: kotlin.Int? = null, + + val type: kotlin.String? = null, + + val message: kotlin.String? = null + +) + diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Category.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Category.kt new file mode 100644 index 000000000000..9a39acd8aea7 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Category.kt @@ -0,0 +1,34 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package org.openapitools.server.models + +import com.fasterxml.jackson.annotation.JsonProperty +/** + * A category for a pet + * + * @param id + * @param name + */ + + +data class Category ( + + + @JsonProperty("id") + val id: kotlin.Long? = null, + + + @JsonProperty("name") + val name: kotlin.String? = null + +) + diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt new file mode 100644 index 000000000000..531f364e2f72 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt @@ -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. +*/ +package org.openapitools.server.models + +import com.fasterxml.jackson.annotation.JsonProperty +/** + * Describes the result of uploading an image resource + * + * @param code + * @param type + * @param message + */ + + +data class ModelApiResponse ( + + + @JsonProperty("code") + val code: kotlin.Int? = null, + + + @JsonProperty("type") + val type: kotlin.String? = null, + + + @JsonProperty("message") + val message: kotlin.String? = null + +) + diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt new file mode 100644 index 000000000000..d4a39a2c2bb2 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -0,0 +1,67 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package org.openapitools.server.models + +import com.fasterxml.jackson.annotation.JsonProperty +/** + * An order for a pets from the pet store + * + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ + + +data class Order ( + + + @JsonProperty("id") + val id: kotlin.Long? = null, + + + @JsonProperty("petId") + val petId: kotlin.Long? = null, + + + @JsonProperty("quantity") + val quantity: kotlin.Int? = null, + + + @JsonProperty("shipDate") + val shipDate: java.time.OffsetDateTime? = null, + + /* Order Status */ + + @JsonProperty("status") + val status: Order.Status? = null, + + + @JsonProperty("complete") + val complete: kotlin.Boolean? = false + +) { + + /** + * Order Status + * + * Values: placed,approved,delivered + */ + enum class Status(val value: kotlin.String) { + @JsonProperty(value = "placed") placed("placed"), + @JsonProperty(value = "approved") approved("approved"), + @JsonProperty(value = "delivered") delivered("delivered"); + } +} + diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Pet.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Pet.kt new file mode 100644 index 000000000000..826d87a73031 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Pet.kt @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package org.openapitools.server.models + +import org.openapitools.server.models.Category +import org.openapitools.server.models.Tag +import com.fasterxml.jackson.annotation.JsonProperty +/** + * A pet for sale in the pet store + * + * @param name + * @param photoUrls + * @param id + * @param category + * @param tags + * @param status pet status in the store + */ + + +data class Pet ( + + + @JsonProperty("name") + val name: kotlin.String, + + + @JsonProperty("photoUrls") + val photoUrls: kotlin.collections.List, + + + @JsonProperty("id") + val id: kotlin.Long? = null, + + + @JsonProperty("category") + val category: Category? = null, + + + @JsonProperty("tags") + val tags: kotlin.collections.List? = null, + + /* pet status in the store */ + + @JsonProperty("status") + val status: Pet.Status? = null + +) { + + /** + * pet status in the store + * + * Values: available,pending,sold + */ + enum class Status(val value: kotlin.String) { + @JsonProperty(value = "available") available("available"), + @JsonProperty(value = "pending") pending("pending"), + @JsonProperty(value = "sold") sold("sold"); + } +} + diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Tag.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Tag.kt new file mode 100644 index 000000000000..ded0e6fab036 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/Tag.kt @@ -0,0 +1,34 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package org.openapitools.server.models + +import com.fasterxml.jackson.annotation.JsonProperty +/** + * A tag for a pet + * + * @param id + * @param name + */ + + +data class Tag ( + + + @JsonProperty("id") + val id: kotlin.Long? = null, + + + @JsonProperty("name") + val name: kotlin.String? = null + +) + diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/User.kt b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/User.kt new file mode 100644 index 000000000000..4d0dcec66911 --- /dev/null +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/models/User.kt @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. +*/ +package org.openapitools.server.models + +import com.fasterxml.jackson.annotation.JsonProperty +/** + * A User who is purchasing from the pet store + * + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ + + +data class User ( + + + @JsonProperty("id") + val id: kotlin.Long? = null, + + + @JsonProperty("username") + val username: kotlin.String? = null, + + + @JsonProperty("firstName") + val firstName: kotlin.String? = null, + + + @JsonProperty("lastName") + val lastName: kotlin.String? = null, + + + @JsonProperty("email") + val email: kotlin.String? = null, + + + @JsonProperty("password") + val password: kotlin.String? = null, + + + @JsonProperty("phone") + val phone: kotlin.String? = null, + + /* User Status */ + + @JsonProperty("userStatus") + val userStatus: kotlin.Int? = null + +) + From 3f0f92fb653d11eee6bb7d5f59e3d1c10c57040c Mon Sep 17 00:00:00 2001 From: Chao Yang Date: Fri, 28 Jan 2022 20:55:44 -0600 Subject: [PATCH 159/175] [crystal][client] Make optional properties nillable in models (#10723) * Add nillable data types to models Only REQUIRED and NOT NULLABLE variables can NOT have type Nil All OPTIONAL and NULLABLE-REQUIRED variables have type Nil Only NULLABLE-REQUIRED variables should emit keys with null values when they are serialized, json example: property name : String? = nil; the json representation for this property is {"name": null} For all OPTIONAL variables having Nil values, their variable keys would be skipped during serialization. The json representation for OPTIONAL property name : String? = nil; would be: {} * Fix failed tests in samples/client/petstore/crystal/spec/api/pet_api_spec.cr * Remove isNullable from model template * No need to check nillability of required property For any required property, assigning nil value to it will result in compilation error The datatype simply can not hold value nil, so there's no need to check it * Place required vars first in initializor * Refresh generated sample code for crystal client * Required properties are not nillable * Fix compilation error of undefined method equal? Crystal lang doesn't have method equal? We should use method same? instead of ruby's equal? method Reference: https://crystal-lang.org/api/master/Reference.html#same?(other:Reference):Bool-instance-method * Add tests for add_pet api endpoint with only required parameters Setting Pet optional properties to nil values is allowed by add_pet api endpoint * Add helper method to test compilation errors * Add tests to Pet model Test model initializations Test compilation error when model is initialized without required properties * Test required properties in json deserialization for Pet model --- .../crystal/partial_model_generic.mustache | 45 ++++++++----------- .../resources/crystal/spec_helper.mustache | 10 ++++- .../crystal/pet_compilation_error_spec.cr | 11 +++++ .../petstore/crystal/spec/api/pet_api_spec.cr | 39 +++++++++++----- .../petstore/crystal/spec/models/pet_spec.cr | 44 ++++++++++++++++-- .../petstore/crystal/spec/models/tag_spec.cr | 15 +++++++ .../petstore/crystal/spec/spec_helper.cr | 10 ++++- .../src/petstore/models/api_response.cr | 15 ++++--- .../crystal/src/petstore/models/category.cr | 11 ++--- .../crystal/src/petstore/models/order.cr | 27 +++++------ .../crystal/src/petstore/models/pet.cr | 40 +++++++---------- .../crystal/src/petstore/models/tag.cr | 11 ++--- .../crystal/src/petstore/models/user.cr | 35 ++++++++------- 13 files changed, 200 insertions(+), 113 deletions(-) create mode 100644 samples/client/petstore/crystal/pet_compilation_error_spec.cr diff --git a/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache index 4f2de178b0eb..8e09ec2aba31 100644 --- a/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache @@ -4,14 +4,28 @@ class {{classname}}{{#parent}} < {{{.}}}{{/parent}} include JSON::Serializable - {{#vars}} + {{#hasRequired}} + # Required properties + {{/hasRequired}} + {{#requiredVars}} {{#description}} # {{{.}}} {{/description}} - @[JSON::Field(key: "{{{baseName}}}", type: {{{dataType}}}{{#defaultValue}}, default: {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}, nillable: true, emit_null: true{{/isNullable}})] + @[JSON::Field(key: "{{{baseName}}}", type: {{{dataType}}}{{#defaultValue}}, default: {{{defaultValue}}}{{/defaultValue}}, nillable: false, emit_null: false)] property {{{name}}} : {{{dataType}}} - {{/vars}} + {{/requiredVars}} + {{#hasOptional}} + # Optional properties + {{/hasOptional}} + {{#optionalVars}} + {{#description}} + # {{{.}}} + {{/description}} + @[JSON::Field(key: "{{{baseName}}}", type: {{{dataType}}}?{{#defaultValue}}, default: {{{defaultValue}}}{{/defaultValue}}, nillable: true, emit_null: false)] + property {{{name}}} : {{{dataType}}}? + + {{/optionalVars}} {{#hasEnums}} class EnumAttributeValidator getter datatype : String @@ -74,7 +88,7 @@ {{/discriminator}} # Initializes the object # @param [Hash] attributes Model attributes in the form of hash - def initialize({{#vars}}@{{{name}}} : {{{dataType}}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/vars}}) + def initialize({{#requiredVars}}@{{{name}}} : {{{dataType}}}{{^-last}}, {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, {{/hasOptional}}{{/hasRequired}}{{#optionalVars}}@{{{name}}} : {{{dataType}}}?{{^-last}}, {{/-last}}{{/optionalVars}}) end # Show invalid properties with the reasons. Usually used together with valid? @@ -82,14 +96,6 @@ def list_invalid_properties invalid_properties = {{^parent}}Array(String).new{{/parent}}{{#parent}}super{{/parent}} {{#vars}} - {{^isNullable}} - {{#required}} - if @{{{name}}}.nil? - invalid_properties.push("invalid value for \"{{{name}}}\", {{{name}}} cannot be nil.") - end - - {{/required}} - {{/isNullable}} {{#hasValidation}} {{#maxLength}} if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.size > {{{maxLength}}} @@ -143,11 +149,6 @@ # @return true if the model is valid def valid? {{#vars}} - {{^isNullable}} - {{#required}} - return false if @{{{name}}}.nil? - {{/required}} - {{/isNullable}} {{#isEnum}} {{^isContainer}} {{{name}}}_validator = EnumAttributeValidator.new("{{{dataType}}}", [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]) @@ -217,14 +218,6 @@ # Custom attribute writer method with validation # @param [Object] {{{name}}} Value to be assigned def {{{name}}}=({{{name}}}) - {{^isNullable}} - {{#required}} - if {{{name}}}.nil? - raise ArgumentError.new("{{{name}}} cannot be nil") - end - - {{/required}} - {{/isNullable}} {{#maxLength}} if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.to_s.size > {{{maxLength}}} raise ArgumentError.new("invalid value for \"{{{name}}}\", the character length must be smaller than or equal to {{{maxLength}}}.") @@ -277,7 +270,7 @@ # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) - return true if self.equal?(o) + return true if self.same?(o) self.class == o.class{{#vars}} && {{name}} == o.{{name}}{{/vars}}{{#parent}} && super(o){{/parent}} end diff --git a/modules/openapi-generator/src/main/resources/crystal/spec_helper.mustache b/modules/openapi-generator/src/main/resources/crystal/spec_helper.mustache index 9facafa4a931..56675bb68767 100644 --- a/modules/openapi-generator/src/main/resources/crystal/spec_helper.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/spec_helper.mustache @@ -3,4 +3,12 @@ # load modules require "spec" require "json" -require "../src/{{{shardName}}}" \ No newline at end of file +require "../src/{{{shardName}}}" + +def assert_compilation_error(path : String, message : String) : Nil + buffer = IO::Memory.new + result = Process.run("crystal", ["run", "--no-color", "--no-codegen", path], error: buffer) + result.success?.should be_false + buffer.to_s.should contain message + buffer.close +end diff --git a/samples/client/petstore/crystal/pet_compilation_error_spec.cr b/samples/client/petstore/crystal/pet_compilation_error_spec.cr new file mode 100644 index 000000000000..519cb5b73e39 --- /dev/null +++ b/samples/client/petstore/crystal/pet_compilation_error_spec.cr @@ -0,0 +1,11 @@ +require "./spec/spec_helper" +require "json" +require "time" + +describe Petstore::Pet do + describe "test an instance of Pet" do + it "should fail to compile if any required properties is missing" do + pet = Petstore::Pet.new(id: nil, category: nil, name: nil, photo_urls: Array(String).new, tags: nil, status: nil) + end + end +end diff --git a/samples/client/petstore/crystal/spec/api/pet_api_spec.cr b/samples/client/petstore/crystal/spec/api/pet_api_spec.cr index 5c5f56295acc..5eb508ebd72a 100644 --- a/samples/client/petstore/crystal/spec/api/pet_api_spec.cr +++ b/samples/client/petstore/crystal/spec/api/pet_api_spec.cr @@ -29,8 +29,28 @@ describe "PetApi" do # @param [Hash] opts the optional parameters # @return [Pet] describe "add_pet test" do - it "should work" do + it "should work with only required attributes" do # assertion here. ref: https://crystal-lang.org/reference/guides/testing.html + + config = Petstore::Configuration.new + config.access_token = "yyy" + config.api_key[:api_key] = "xxx" + config.api_key_prefix[:api_key] = "Token" + + api_client = Petstore::ApiClient.new(config) + + api_instance = Petstore::PetApi.new(api_client) + + pet_name = "new pet" + new_pet = Petstore::Pet.new(id: nil, category: nil, name: pet_name, photo_urls: Array(String).new, tags: nil, status: nil) + + pet = api_instance.add_pet(new_pet) + pet.id.should_not be_nil + pet.category.should be_nil + pet.name.should eq pet_name + pet.photo_urls.should eq Array(String).new + pet.status.should be_nil + pet.tags.should eq Array(Petstore::Tag).new end end @@ -89,20 +109,17 @@ describe "PetApi" do api_instance = Petstore::PetApi.new(api_client) - # create a pet to start with - pet_id = Int64.new(91829) - pet = Petstore::Pet.new(id: pet_id, category: Petstore::Category.new(id: pet_id + 10, name: "crystal category"), name: "crystal", photo_urls: ["https://crystal-lang.org"], tags: [Petstore::Tag.new(id: pet_id + 100, name: "crystal tag")], status: "available") - - api_instance.add_pet(pet) + new_pet = Petstore::Pet.new(id: nil, category: nil, name: "crystal", photo_urls: Array(String).new, tags: nil, status: nil) + pet = api_instance.add_pet(new_pet) + pet_id = pet.id.not_nil! result = api_instance.get_pet_by_id(pet_id: pet_id) result.id.should eq pet_id - result.category.id.should eq pet_id + 10 - result.category.name.should eq "crystal category" + result.category.should be_nil result.name.should eq "crystal" - result.photo_urls.should eq ["https://crystal-lang.org"] - result.status.should eq "available" - result.tags[0].id.should eq pet_id + 100 + result.photo_urls.should eq Array(String).new + result.status.should be_nil + result.tags.should eq Array(Petstore::Tag).new end end diff --git a/samples/client/petstore/crystal/spec/models/pet_spec.cr b/samples/client/petstore/crystal/spec/models/pet_spec.cr index d3eaf60dfc11..16117449db50 100644 --- a/samples/client/petstore/crystal/spec/models/pet_spec.cr +++ b/samples/client/petstore/crystal/spec/models/pet_spec.cr @@ -18,11 +18,49 @@ require "time" describe Petstore::Pet do describe "test an instance of Pet" do - it "should create an instance of Pet" do - #instance = Petstore::Pet.new - #expect(instance).to be_instance_of(Petstore::Pet) + it "should fail to compile if any required properties is missing" do + assert_compilation_error(path: "./pet_compilation_error_spec.cr", message: "Error: no overload matches 'Petstore::Pet.new', id: Nil, category: Nil, name: Nil, photo_urls: Array(String), tags: Nil, status: Nil") + end + + it "should create an instance of Pet with only required properties" do + pet = Petstore::Pet.new(id: nil, category: nil, name: "new pet", photo_urls: Array(String).new, tags: nil, status: nil) + pet.should be_a(Petstore::Pet) + end + + it "should create an instance of Pet with all properties" do + pet_id = 12345_i64 + pet = Petstore::Pet.new(id: pet_id, category: Petstore::Category.new(id: pet_id + 10, name: "crystal category"), name: "crystal", photo_urls: ["https://crystal-lang.org"], tags: [Petstore::Tag.new(id: pet_id + 100, name: "crystal tag")], status: "available") + pet.should be_a(Petstore::Pet) + end + end + + describe "#from_json" do + it "should instantiate a new instance from json string with required properties" do + pet = Petstore::Pet.from_json("{\"name\": \"json pet\", \"photoUrls\": []}") + pet.should be_a(Petstore::Pet) + pet.name.should eq "json pet" + pet.photo_urls.should eq Array(String).new + end + + it "should raise error when instantiating a new instance from json string with missing required properties" do + expect_raises(JSON::SerializableError, "Missing JSON attribute: name") do + Petstore::Pet.from_json("{\"photoUrls\": []}") + end + expect_raises(JSON::SerializableError, "Missing JSON attribute: photoUrls") do + Petstore::Pet.from_json("{\"name\": \"json pet\"}") + end + end + + it "should raise error when instantiating a new instance from json string with required properties set to null value" do + expect_raises(JSON::SerializableError, "Expected String but was Null") do + Petstore::Pet.from_json("{\"name\": null, \"photoUrls\": []}") + end + expect_raises(JSON::SerializableError, "Expected BeginArray but was Null") do + Petstore::Pet.from_json("{\"name\": \"json pet\", \"photoUrls\": null}") + end end end + describe "test attribute 'id'" do it "should work" do # assertion here. ref: https://crystal-lang.org/reference/guides/testing.html diff --git a/samples/client/petstore/crystal/spec/models/tag_spec.cr b/samples/client/petstore/crystal/spec/models/tag_spec.cr index f79e12657fc5..64a05f292ce2 100644 --- a/samples/client/petstore/crystal/spec/models/tag_spec.cr +++ b/samples/client/petstore/crystal/spec/models/tag_spec.cr @@ -23,6 +23,21 @@ describe Petstore::Tag do #expect(instance).to be_instance_of(Petstore::Tag) end end + + describe "test equality of Tag instances" do + it "should equal to itself" do + tag1 = Petstore::Tag.new(id: 0, name: "same") + tag2 = tag1 + (tag1 == tag2).should be_true + end + + it "should equal to another instance with same attributes" do + tag1 = Petstore::Tag.new(id: 0, name: "tag") + tag2 = Petstore::Tag.new(id: 0, name: "tag") + (tag1 == tag2).should be_true + end + end + describe "test attribute 'id'" do it "should work" do # assertion here. ref: https://crystal-lang.org/reference/guides/testing.html diff --git a/samples/client/petstore/crystal/spec/spec_helper.cr b/samples/client/petstore/crystal/spec/spec_helper.cr index c6eb4e7a6030..7349161df1e2 100644 --- a/samples/client/petstore/crystal/spec/spec_helper.cr +++ b/samples/client/petstore/crystal/spec/spec_helper.cr @@ -11,4 +11,12 @@ # load modules require "spec" require "json" -require "../src/petstore" \ No newline at end of file +require "../src/petstore" + +def assert_compilation_error(path : String, message : String) : Nil + buffer = IO::Memory.new + result = Process.run("crystal", ["run", "--no-color", "--no-codegen", path], error: buffer) + result.success?.should be_false + buffer.to_s.should contain message + buffer.close +end diff --git a/samples/client/petstore/crystal/src/petstore/models/api_response.cr b/samples/client/petstore/crystal/src/petstore/models/api_response.cr index be5511349070..7a0719b6615f 100644 --- a/samples/client/petstore/crystal/src/petstore/models/api_response.cr +++ b/samples/client/petstore/crystal/src/petstore/models/api_response.cr @@ -16,14 +16,15 @@ module Petstore class ApiResponse include JSON::Serializable - @[JSON::Field(key: "code", type: Int32)] - property code : Int32 + # Optional properties + @[JSON::Field(key: "code", type: Int32?, nillable: true, emit_null: false)] + property code : Int32? - @[JSON::Field(key: "type", type: String)] - property _type : String + @[JSON::Field(key: "type", type: String?, nillable: true, emit_null: false)] + property _type : String? - @[JSON::Field(key: "message", type: String)] - property message : String + @[JSON::Field(key: "message", type: String?, nillable: true, emit_null: false)] + property message : String? # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -46,7 +47,7 @@ module Petstore # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) - return true if self.equal?(o) + return true if self.same?(o) self.class == o.class && code == o.code && _type == o._type && diff --git a/samples/client/petstore/crystal/src/petstore/models/category.cr b/samples/client/petstore/crystal/src/petstore/models/category.cr index 55c64154d97c..65dd3f8cdd07 100644 --- a/samples/client/petstore/crystal/src/petstore/models/category.cr +++ b/samples/client/petstore/crystal/src/petstore/models/category.cr @@ -16,11 +16,12 @@ module Petstore class Category include JSON::Serializable - @[JSON::Field(key: "id", type: Int64)] - property id : Int64 + # Optional properties + @[JSON::Field(key: "id", type: Int64?, nillable: true, emit_null: false)] + property id : Int64? - @[JSON::Field(key: "name", type: String)] - property name : String + @[JSON::Field(key: "name", type: String?, nillable: true, emit_null: false)] + property name : String? # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -60,7 +61,7 @@ module Petstore # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) - return true if self.equal?(o) + return true if self.same?(o) self.class == o.class && id == o.id && name == o.name diff --git a/samples/client/petstore/crystal/src/petstore/models/order.cr b/samples/client/petstore/crystal/src/petstore/models/order.cr index 5d00ea6688ff..0536a0c3de66 100644 --- a/samples/client/petstore/crystal/src/petstore/models/order.cr +++ b/samples/client/petstore/crystal/src/petstore/models/order.cr @@ -16,24 +16,25 @@ module Petstore class Order include JSON::Serializable - @[JSON::Field(key: "id", type: Int64)] - property id : Int64 + # Optional properties + @[JSON::Field(key: "id", type: Int64?, nillable: true, emit_null: false)] + property id : Int64? - @[JSON::Field(key: "petId", type: Int64)] - property pet_id : Int64 + @[JSON::Field(key: "petId", type: Int64?, nillable: true, emit_null: false)] + property pet_id : Int64? - @[JSON::Field(key: "quantity", type: Int32)] - property quantity : Int32 + @[JSON::Field(key: "quantity", type: Int32?, nillable: true, emit_null: false)] + property quantity : Int32? - @[JSON::Field(key: "shipDate", type: Time)] - property ship_date : Time + @[JSON::Field(key: "shipDate", type: Time?, nillable: true, emit_null: false)] + property ship_date : Time? # Order Status - @[JSON::Field(key: "status", type: String)] - property status : String + @[JSON::Field(key: "status", type: String?, nillable: true, emit_null: false)] + property status : String? - @[JSON::Field(key: "complete", type: Bool, default: false)] - property complete : Bool + @[JSON::Field(key: "complete", type: Bool?, default: false, nillable: true, emit_null: false)] + property complete : Bool? class EnumAttributeValidator getter datatype : String @@ -91,7 +92,7 @@ module Petstore # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) - return true if self.equal?(o) + return true if self.same?(o) self.class == o.class && id == o.id && pet_id == o.pet_id && diff --git a/samples/client/petstore/crystal/src/petstore/models/pet.cr b/samples/client/petstore/crystal/src/petstore/models/pet.cr index cdac65776d76..8edf5789c9a5 100644 --- a/samples/client/petstore/crystal/src/petstore/models/pet.cr +++ b/samples/client/petstore/crystal/src/petstore/models/pet.cr @@ -16,24 +16,26 @@ module Petstore class Pet include JSON::Serializable - @[JSON::Field(key: "id", type: Int64)] - property id : Int64 - - @[JSON::Field(key: "category", type: Category)] - property category : Category - - @[JSON::Field(key: "name", type: String)] + # Required properties + @[JSON::Field(key: "name", type: String, nillable: false, emit_null: false)] property name : String - @[JSON::Field(key: "photoUrls", type: Array(String))] + @[JSON::Field(key: "photoUrls", type: Array(String), nillable: false, emit_null: false)] property photo_urls : Array(String) - @[JSON::Field(key: "tags", type: Array(Tag))] - property tags : Array(Tag) + # Optional properties + @[JSON::Field(key: "id", type: Int64?, nillable: true, emit_null: false)] + property id : Int64? + + @[JSON::Field(key: "category", type: Category?, nillable: true, emit_null: false)] + property category : Category? + + @[JSON::Field(key: "tags", type: Array(Tag)?, nillable: true, emit_null: false)] + property tags : Array(Tag)? # pet status in the store - @[JSON::Field(key: "status", type: String)] - property status : String + @[JSON::Field(key: "status", type: String?, nillable: true, emit_null: false)] + property status : String? class EnumAttributeValidator getter datatype : String @@ -60,29 +62,19 @@ module Petstore # Initializes the object # @param [Hash] attributes Model attributes in the form of hash - def initialize(@id : Int64?, @category : Category?, @name : String, @photo_urls : Array(String), @tags : Array(Tag)?, @status : String?) + def initialize(@name : String, @photo_urls : Array(String), @id : Int64?, @category : Category?, @tags : Array(Tag)?, @status : String?) end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array(String).new - if @name.nil? - invalid_properties.push("invalid value for \"name\", name cannot be nil.") - end - - if @photo_urls.nil? - invalid_properties.push("invalid value for \"photo_urls\", photo_urls cannot be nil.") - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @name.nil? - return false if @photo_urls.nil? status_validator = EnumAttributeValidator.new("String", ["available", "pending", "sold"]) return false unless status_validator.valid?(@status) true @@ -101,7 +93,7 @@ module Petstore # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) - return true if self.equal?(o) + return true if self.same?(o) self.class == o.class && id == o.id && category == o.category && diff --git a/samples/client/petstore/crystal/src/petstore/models/tag.cr b/samples/client/petstore/crystal/src/petstore/models/tag.cr index bd2933291853..cd5e7ed2989f 100644 --- a/samples/client/petstore/crystal/src/petstore/models/tag.cr +++ b/samples/client/petstore/crystal/src/petstore/models/tag.cr @@ -16,11 +16,12 @@ module Petstore class Tag include JSON::Serializable - @[JSON::Field(key: "id", type: Int64)] - property id : Int64 + # Optional properties + @[JSON::Field(key: "id", type: Int64?, nillable: true, emit_null: false)] + property id : Int64? - @[JSON::Field(key: "name", type: String)] - property name : String + @[JSON::Field(key: "name", type: String?, nillable: true, emit_null: false)] + property name : String? # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -43,7 +44,7 @@ module Petstore # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) - return true if self.equal?(o) + return true if self.same?(o) self.class == o.class && id == o.id && name == o.name diff --git a/samples/client/petstore/crystal/src/petstore/models/user.cr b/samples/client/petstore/crystal/src/petstore/models/user.cr index 47430b4452a9..a80b2574d2cf 100644 --- a/samples/client/petstore/crystal/src/petstore/models/user.cr +++ b/samples/client/petstore/crystal/src/petstore/models/user.cr @@ -16,30 +16,31 @@ module Petstore class User include JSON::Serializable - @[JSON::Field(key: "id", type: Int64)] - property id : Int64 + # Optional properties + @[JSON::Field(key: "id", type: Int64?, nillable: true, emit_null: false)] + property id : Int64? - @[JSON::Field(key: "username", type: String)] - property username : String + @[JSON::Field(key: "username", type: String?, nillable: true, emit_null: false)] + property username : String? - @[JSON::Field(key: "firstName", type: String)] - property first_name : String + @[JSON::Field(key: "firstName", type: String?, nillable: true, emit_null: false)] + property first_name : String? - @[JSON::Field(key: "lastName", type: String)] - property last_name : String + @[JSON::Field(key: "lastName", type: String?, nillable: true, emit_null: false)] + property last_name : String? - @[JSON::Field(key: "email", type: String)] - property email : String + @[JSON::Field(key: "email", type: String?, nillable: true, emit_null: false)] + property email : String? - @[JSON::Field(key: "password", type: String)] - property password : String + @[JSON::Field(key: "password", type: String?, nillable: true, emit_null: false)] + property password : String? - @[JSON::Field(key: "phone", type: String)] - property phone : String + @[JSON::Field(key: "phone", type: String?, nillable: true, emit_null: false)] + property phone : String? # User Status - @[JSON::Field(key: "userStatus", type: Int32)] - property user_status : Int32 + @[JSON::Field(key: "userStatus", type: Int32?, nillable: true, emit_null: false)] + property user_status : Int32? # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -62,7 +63,7 @@ module Petstore # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) - return true if self.equal?(o) + return true if self.same?(o) self.class == o.class && id == o.id && username == o.username && From d8f70b33908b80750dd58018f38561e01383aae4 Mon Sep 17 00:00:00 2001 From: Chao Yang Date: Fri, 28 Jan 2022 21:02:50 -0600 Subject: [PATCH 160/175] Fix crystal code gen null pointer exception error (#11437) Checks if codegenParameter.items is null in constructExampleCode --- .../codegen/languages/CrystalClientCodegen.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java index d4c83e5d5f01..19fa27e7acf7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java @@ -595,8 +595,14 @@ public Map postProcessOperationsWithModels(Map o private String constructExampleCode(CodegenParameter codegenParameter, HashMap modelMaps, HashMap processedModelMap) { if (codegenParameter.isArray) { // array + if (codegenParameter.items == null) { + return "[]"; + } return "[" + constructExampleCode(codegenParameter.items, modelMaps, processedModelMap) + "]"; } else if (codegenParameter.isMap) { + if (codegenParameter.items == null) { + return "{}"; + } return "{ key: " + constructExampleCode(codegenParameter.items, modelMaps, processedModelMap) + "}"; } else if (codegenParameter.isPrimitiveType) { // primitive type if (codegenParameter.isEnum) { From b901f11e85a01e8ce1a83e531e57ecffe855c936 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 29 Jan 2022 14:01:27 +0800 Subject: [PATCH 161/175] use encode_path instead in crystal (#11439) --- README.md | 1 + .../src/main/resources/crystal/api.mustache | 2 +- .../client/petstore/crystal/src/petstore/api/pet_api.cr | 8 ++++---- .../client/petstore/crystal/src/petstore/api/store_api.cr | 4 ++-- .../client/petstore/crystal/src/petstore/api/user_api.cr | 6 +++--- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6a23fc7554a2..52ce37403e8d 100644 --- a/README.md +++ b/README.md @@ -1052,6 +1052,7 @@ If you want to join the committee, please kindly apply by sending an email to te | C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) | | C# | @mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) | | Clojure | | +| Crystal | @cyangle (2021/01) | | Dart | @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08) | | Eiffel | @jvelilla (2017/09) | | Elixir | @mrmstn (2018/12) | diff --git a/modules/openapi-generator/src/main/resources/crystal/api.mustache b/modules/openapi-generator/src/main/resources/crystal/api.mustache index 28758d68a5f3..c39d99bf0fe6 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api.mustache @@ -125,7 +125,7 @@ module {{moduleName}} {{/hasValidation}} {{/allParams}} # resource path - local_var_path = "{{{path}}}"{{#pathParams}}.sub("{" + "{{baseName}}" + "}", URI.encode({{paramName}}.to_s){{^strictSpecBehavior}}.gsub("%2F", "/"){{/strictSpecBehavior}}){{/pathParams}} + local_var_path = "{{{path}}}"{{#pathParams}}.sub("{" + "{{baseName}}" + "}", URI.encode_path({{paramName}}.to_s){{^strictSpecBehavior}}.gsub("%2F", "/"){{/strictSpecBehavior}}){{/pathParams}} # query parameters query_params = Hash(String, String).new diff --git a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr index a808853db0c5..e4c825e67953 100644 --- a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr @@ -96,7 +96,7 @@ module Petstore raise ArgumentError.new("Missing the required parameter 'pet_id' when calling PetApi.delete_pet") end # resource path - local_var_path = "/pet/{petId}".sub("{" + "petId" + "}", URI.encode(pet_id.to_s).gsub("%2F", "/")) + local_var_path = "/pet/{petId}".sub("{" + "petId" + "}", URI.encode_path(pet_id.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new @@ -274,7 +274,7 @@ module Petstore raise ArgumentError.new("Missing the required parameter 'pet_id' when calling PetApi.get_pet_by_id") end # resource path - local_var_path = "/pet/{petId}".sub("{" + "petId" + "}", URI.encode(pet_id.to_s).gsub("%2F", "/")) + local_var_path = "/pet/{petId}".sub("{" + "petId" + "}", URI.encode_path(pet_id.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new @@ -390,7 +390,7 @@ module Petstore raise ArgumentError.new("Missing the required parameter 'pet_id' when calling PetApi.update_pet_with_form") end # resource path - local_var_path = "/pet/{petId}".sub("{" + "petId" + "}", URI.encode(pet_id.to_s).gsub("%2F", "/")) + local_var_path = "/pet/{petId}".sub("{" + "petId" + "}", URI.encode_path(pet_id.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new @@ -449,7 +449,7 @@ module Petstore raise ArgumentError.new("Missing the required parameter 'pet_id' when calling PetApi.upload_file") end # resource path - local_var_path = "/pet/{petId}/uploadImage".sub("{" + "petId" + "}", URI.encode(pet_id.to_s).gsub("%2F", "/")) + local_var_path = "/pet/{petId}/uploadImage".sub("{" + "petId" + "}", URI.encode_path(pet_id.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new 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 633b3ca71fd0..c653a8714a38 100644 --- a/samples/client/petstore/crystal/src/petstore/api/store_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/store_api.cr @@ -39,7 +39,7 @@ module Petstore raise ArgumentError.new("Missing the required parameter 'order_id' when calling StoreApi.delete_order") end # resource path - local_var_path = "/store/order/{orderId}".sub("{" + "orderId" + "}", URI.encode(order_id.to_s).gsub("%2F", "/")) + local_var_path = "/store/order/{orderId}".sub("{" + "orderId" + "}", URI.encode_path(order_id.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new @@ -157,7 +157,7 @@ module Petstore end # resource path - local_var_path = "/store/order/{orderId}".sub("{" + "orderId" + "}", URI.encode(order_id.to_s).gsub("%2F", "/")) + local_var_path = "/store/order/{orderId}".sub("{" + "orderId" + "}", URI.encode_path(order_id.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new diff --git a/samples/client/petstore/crystal/src/petstore/api/user_api.cr b/samples/client/petstore/crystal/src/petstore/api/user_api.cr index 9809fc615e87..e40ed1611723 100644 --- a/samples/client/petstore/crystal/src/petstore/api/user_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/user_api.cr @@ -212,7 +212,7 @@ module Petstore raise ArgumentError.new("Missing the required parameter 'username' when calling UserApi.delete_user") end # resource path - local_var_path = "/user/{username}".sub("{" + "username" + "}", URI.encode(username.to_s).gsub("%2F", "/")) + local_var_path = "/user/{username}".sub("{" + "username" + "}", URI.encode_path(username.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new @@ -267,7 +267,7 @@ module Petstore raise ArgumentError.new("Missing the required parameter 'username' when calling UserApi.get_user_by_name") end # resource path - local_var_path = "/user/{username}".sub("{" + "username" + "}", URI.encode(username.to_s).gsub("%2F", "/")) + local_var_path = "/user/{username}".sub("{" + "username" + "}", URI.encode_path(username.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new @@ -451,7 +451,7 @@ module Petstore raise ArgumentError.new("Missing the required parameter 'user' when calling UserApi.update_user") end # resource path - local_var_path = "/user/{username}".sub("{" + "username" + "}", URI.encode(username.to_s).gsub("%2F", "/")) + local_var_path = "/user/{username}".sub("{" + "username" + "}", URI.encode_path(username.to_s).gsub("%2F", "/")) # query parameters query_params = Hash(String, String).new From 088c65c9c6a6ddf2192f7b1fcb095945f39b68d5 Mon Sep 17 00:00:00 2001 From: y-tomida Date: Sat, 29 Jan 2022 16:07:30 +0900 Subject: [PATCH 162/175] [typescript-axios] Add stringEnums option (#11368) * add stringEnums option * update templates * add export * update samples * update document * improve readability * remove unnecessary code * add config file for sample * add sample * update sample * remove enum variable form modelObjetEnum template because this variable is not used in modelStringEnum template. * change the indentation to be the same as modelGeneric template --- .../typescript-axios-with-string-enums.yaml | 6 + docs/generators/typescript-axios.md | 1 + .../TypeScriptAxiosClientCodegen.java | 9 + .../typescript-axios/modelEnum.mustache | 18 +- .../typescript-axios/modelGeneric.mustache | 18 + .../typescript-axios/modelObjectEnum.mustache | 14 + .../typescript-axios/modelStringEnum.mustache | 12 + .../builds/composed-schemas/api.ts | 50 +- .../typescript-axios/builds/default/api.ts | 32 +- .../typescript-axios/builds/es6-target/api.ts | 32 +- .../builds/test-petstore/api.ts | 253 ++- .../builds/with-complex-headers/api.ts | 32 +- .../api.ts | 215 +- .../builds/with-interfaces/api.ts | 32 +- .../builds/with-node-imports/api.ts | 32 +- .../model/some/levels/deep/order.ts | 16 +- .../model/some/levels/deep/pet.ts | 16 +- .../builds/with-npm-version/api.ts | 32 +- .../with-single-request-parameters/api.ts | 32 +- .../builds/with-string-enums/.gitignore | 4 + .../builds/with-string-enums/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 8 + .../.openapi-generator/VERSION | 1 + .../builds/with-string-enums/api.ts | 1816 +++++++++++++++++ .../builds/with-string-enums/base.ts | 71 + .../builds/with-string-enums/common.ts | 138 ++ .../builds/with-string-enums/configuration.ts | 101 + .../builds/with-string-enums/git_push.sh | 57 + .../builds/with-string-enums/index.ts | 18 + 30 files changed, 2664 insertions(+), 426 deletions(-) create mode 100644 bin/configs/typescript-axios-with-string-enums.yaml create mode 100644 modules/openapi-generator/src/main/resources/typescript-axios/modelObjectEnum.mustache create mode 100644 modules/openapi-generator/src/main/resources/typescript-axios/modelStringEnum.mustache create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/.gitignore create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/.npmignore create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator-ignore create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/FILES create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/configuration.ts create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/git_push.sh create mode 100644 samples/client/petstore/typescript-axios/builds/with-string-enums/index.ts diff --git a/bin/configs/typescript-axios-with-string-enums.yaml b/bin/configs/typescript-axios-with-string-enums.yaml new file mode 100644 index 000000000000..4ea5a08e30dd --- /dev/null +++ b/bin/configs/typescript-axios-with-string-enums.yaml @@ -0,0 +1,6 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/with-string-enums +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-axios +additionalProperties: + stringEnums: true diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 0bbf056acc10..a205ff3f7999 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -34,6 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|stringEnums|Generate string enums instead of objects for enum values.| |false| |supportsES6|Generate code that conforms to ES6.| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| 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 539313d513c5..d76292d47412 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 @@ -34,8 +34,11 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege public static final String WITHOUT_PREFIX_ENUMS = "withoutPrefixEnums"; public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter"; public static final String WITH_NODE_IMPORTS = "withNodeImports"; + public static final String STRING_ENUMS = "stringEnums"; + public static final String STRING_ENUMS_DESC = "Generate string enums instead of objects for enum values."; protected String npmRepository = null; + protected Boolean stringEnums = false; private String tsModelPackage = ""; @@ -57,6 +60,7 @@ public TypeScriptAxiosClientCodegen() { 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())); + this.cliOptions.add(new CliOption(STRING_ENUMS, STRING_ENUMS_DESC).defaultValue(String.valueOf(this.stringEnums))); // Templates have no mapping between formatted property names and original base names so use only "original" and remove this option removeOption(CodegenConstants.MODEL_PROPERTY_NAMING); } @@ -127,6 +131,11 @@ public void processOpts() { } } + if (additionalProperties.containsKey(STRING_ENUMS)) { + this.stringEnums = Boolean.parseBoolean(additionalProperties.get(STRING_ENUMS).toString()); + additionalProperties.put("stringEnums", this.stringEnums); + } + if (additionalProperties.containsKey(NPM_NAME)) { addNpmPackageGeneration(); } diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache index 5f1a5f44b6ad..e18f5c09859b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache @@ -8,16 +8,10 @@ export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last {{/isBoolean}} {{^isBoolean}} -export enum {{classname}} { -{{#allowableValues}} -{{#enumVars}} - {{#enumDescription}} - /** - * {{.}} - */ - {{/enumDescription}} - {{{name}}} = {{{value}}}{{^-last}},{{/-last}} -{{/enumVars}} -{{/allowableValues}} -} +{{^stringEnums}} +{{>modelObjectEnum}} +{{/stringEnums}} +{{#stringEnums}} +{{>modelStringEnum}} +{{/stringEnums}} {{/isBoolean}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache index b64c34e2cc98..06da8db77a66 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache @@ -23,6 +23,7 @@ export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#vars}} {{#isEnum}} +{{#stringEnums}} /** * @export * @enum {string} @@ -39,6 +40,23 @@ export enum {{enumName}} { {{/enumVars}} {{/allowableValues}} } +{{/stringEnums}} +{{^stringEnums}} +export const {{enumName}} = { +{{#allowableValues}} + {{#enumVars}} + {{#enumDescription}} + /** + * {{.}} + */ + {{/enumDescription}} + {{{name}}}: {{{value}}}{{^-last}},{{/-last}} + {{/enumVars}} +{{/allowableValues}} +} as const; + +export type {{enumName}} = typeof {{enumName}}[keyof typeof {{enumName}}]; +{{/stringEnums}} {{/isEnum}} {{/vars}} {{/hasEnums}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelObjectEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelObjectEnum.mustache new file mode 100644 index 000000000000..ce2c8208f37c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelObjectEnum.mustache @@ -0,0 +1,14 @@ +export const {{classname}} = { +{{#allowableValues}} + {{#enumVars}} + {{#enumDescription}} + /** + * {{.}} + */ + {{/enumDescription}} + {{{name}}}: {{{value}}}{{^-last}},{{/-last}} + {{/enumVars}} +{{/allowableValues}} +} as const; + +export type {{classname}} = typeof {{classname}}[keyof typeof {{classname}}]; diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelStringEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelStringEnum.mustache new file mode 100644 index 000000000000..c2886f750f5c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelStringEnum.mustache @@ -0,0 +1,12 @@ +export enum {{classname}} { +{{#allowableValues}} + {{#enumVars}} + {{#enumDescription}} + /** + * {{.}} + */ + {{/enumDescription}} + {{{name}}} = {{{value}}}{{^-last}},{{/-last}} + {{/enumVars}} +{{/allowableValues}} +} 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 13c92e708ca2..e6572b57346b 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts @@ -79,16 +79,14 @@ export interface Dog { 'breed'?: DogBreedEnum; } -/** - * @export - * @enum {string} - */ -export enum DogBreedEnum { - Dingo = 'Dingo', - Husky = 'Husky', - Retriever = 'Retriever', - Shepherd = 'Shepherd' -} +export const DogBreedEnum = { + Dingo: 'Dingo', + Husky: 'Husky', + Retriever: 'Retriever', + Shepherd: 'Shepherd' +} as const; + +export type DogBreedEnum = typeof DogBreedEnum[keyof typeof DogBreedEnum]; /** * @@ -110,16 +108,14 @@ export interface DogAllOf { 'breed'?: DogAllOfBreedEnum; } -/** - * @export - * @enum {string} - */ -export enum DogAllOfBreedEnum { - Dingo = 'Dingo', - Husky = 'Husky', - Retriever = 'Retriever', - Shepherd = 'Shepherd' -} +export const DogAllOfBreedEnum = { + Dingo: 'Dingo', + Husky: 'Husky', + Retriever: 'Retriever', + Shepherd: 'Shepherd' +} as const; + +export type DogAllOfBreedEnum = typeof DogAllOfBreedEnum[keyof typeof DogAllOfBreedEnum]; /** * @@ -173,14 +169,12 @@ export interface PetByType { 'hunts'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum PetByTypePetTypeEnum { - Cat = 'Cat', - Dog = 'Dog' -} +export const PetByTypePetTypeEnum = { + Cat: 'Cat', + Dog: 'Dog' +} as const; + +export type PetByTypePetTypeEnum = typeof PetByTypePetTypeEnum[keyof typeof PetByTypePetTypeEnum]; /** diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index fd8ae456d7a7..893802cbed3b 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -109,15 +109,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * A pet for sale in the pet store @@ -163,15 +161,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * A tag for a pet 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 fd8ae456d7a7..893802cbed3b 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -109,15 +109,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * A pet for sale in the pet store @@ -163,15 +161,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * A tag for a pet 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 3d2a576b59c1..7d715d7ea75b 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -362,13 +362,11 @@ export interface ChildCat extends ParentPet { 'pet_type': ChildCatPetTypeEnum; } -/** - * @export - * @enum {string} - */ -export enum ChildCatPetTypeEnum { - ChildCat = 'ChildCat' -} +export const ChildCatPetTypeEnum = { + ChildCat: 'ChildCat' +} as const; + +export type ChildCatPetTypeEnum = typeof ChildCatPetTypeEnum[keyof typeof ChildCatPetTypeEnum]; /** * @@ -390,13 +388,11 @@ export interface ChildCatAllOf { 'pet_type'?: ChildCatAllOfPetTypeEnum; } -/** - * @export - * @enum {string} - */ -export enum ChildCatAllOfPetTypeEnum { - ChildCat = 'ChildCat' -} +export const ChildCatAllOfPetTypeEnum = { + ChildCat: 'ChildCat' +} as const; + +export type ChildCatAllOfPetTypeEnum = typeof ChildCatAllOfPetTypeEnum[keyof typeof ChildCatAllOfPetTypeEnum]; /** * Model for testing model with \"_class\" property @@ -548,22 +544,18 @@ export interface EnumArrays { 'array_enum'?: Array; } -/** - * @export - * @enum {string} - */ -export enum EnumArraysJustSymbolEnum { - GreaterThanOrEqualTo = '>=', - Dollar = '$' -} -/** - * @export - * @enum {string} - */ -export enum EnumArraysArrayEnumEnum { - Fish = 'fish', - Crab = 'crab' -} +export const EnumArraysJustSymbolEnum = { + GreaterThanOrEqualTo: '>=', + Dollar: '$' +} as const; + +export type EnumArraysJustSymbolEnum = typeof EnumArraysJustSymbolEnum[keyof typeof EnumArraysJustSymbolEnum]; +export const EnumArraysArrayEnumEnum = { + Fish: 'fish', + Crab: 'crab' +} as const; + +export type EnumArraysArrayEnumEnum = typeof EnumArraysArrayEnumEnum[keyof typeof EnumArraysArrayEnumEnum]; /** * @@ -571,11 +563,14 @@ export enum EnumArraysArrayEnumEnum { * @enum {string} */ -export enum EnumClass { - Abc = '_abc', - Efg = '-efg', - Xyz = '(xyz)' -} +export const EnumClass = { + Abc: '_abc', + Efg: '-efg', + Xyz: '(xyz)' +} as const; + +export type EnumClass = typeof EnumClass[keyof typeof EnumClass]; + /** * @@ -639,48 +634,38 @@ export interface EnumTest { 'outerEnumIntegerDefaultValue'?: OuterEnumIntegerDefaultValue; } -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumStringEnum { - Upper = 'UPPER', - Lower = 'lower', - Empty = '' -} -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumStringRequiredEnum { - Upper = 'UPPER', - Lower = 'lower', - Empty = '' -} -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumIntegerEnum { - NUMBER_1 = 1, - NUMBER_MINUS_1 = -1 -} -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumIntegerOnlyEnum { - NUMBER_2 = 2, - NUMBER_MINUS_2 = -2 -} -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumNumberEnum { - NUMBER_1_DOT_1 = 1.1, - NUMBER_MINUS_1_DOT_2 = -1.2 -} +export const EnumTestEnumStringEnum = { + Upper: 'UPPER', + Lower: 'lower', + Empty: '' +} as const; + +export type EnumTestEnumStringEnum = typeof EnumTestEnumStringEnum[keyof typeof EnumTestEnumStringEnum]; +export const EnumTestEnumStringRequiredEnum = { + Upper: 'UPPER', + Lower: 'lower', + Empty: '' +} as const; + +export type EnumTestEnumStringRequiredEnum = typeof EnumTestEnumStringRequiredEnum[keyof typeof EnumTestEnumStringRequiredEnum]; +export const EnumTestEnumIntegerEnum = { + NUMBER_1: 1, + NUMBER_MINUS_1: -1 +} as const; + +export type EnumTestEnumIntegerEnum = typeof EnumTestEnumIntegerEnum[keyof typeof EnumTestEnumIntegerEnum]; +export const EnumTestEnumIntegerOnlyEnum = { + NUMBER_2: 2, + NUMBER_MINUS_2: -2 +} as const; + +export type EnumTestEnumIntegerOnlyEnum = typeof EnumTestEnumIntegerOnlyEnum[keyof typeof EnumTestEnumIntegerOnlyEnum]; +export const EnumTestEnumNumberEnum = { + NUMBER_1_DOT_1: 1.1, + NUMBER_MINUS_1_DOT_2: -1.2 +} as const; + +export type EnumTestEnumNumberEnum = typeof EnumTestEnumNumberEnum[keyof typeof EnumTestEnumNumberEnum]; /** * @@ -1007,14 +992,12 @@ export interface MapTest { 'indirect_map'?: { [key: string]: boolean; }; } -/** - * @export - * @enum {string} - */ -export enum MapTestMapOfEnumStringEnum { - Upper = 'UPPER', - Lower = 'lower' -} +export const MapTestMapOfEnumStringEnum = { + Upper: 'UPPER', + Lower: 'lower' +} as const; + +export type MapTestMapOfEnumStringEnum = typeof MapTestMapOfEnumStringEnum[keyof typeof MapTestMapOfEnumStringEnum]; /** * @@ -1283,15 +1266,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * @@ -1324,11 +1305,14 @@ export interface OuterComposite { * @enum {string} */ -export enum OuterEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OuterEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OuterEnum = typeof OuterEnum[keyof typeof OuterEnum]; + /** * @@ -1336,11 +1320,14 @@ export enum OuterEnum { * @enum {string} */ -export enum OuterEnumDefaultValue { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OuterEnumDefaultValue = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OuterEnumDefaultValue = typeof OuterEnumDefaultValue[keyof typeof OuterEnumDefaultValue]; + /** * @@ -1348,11 +1335,14 @@ export enum OuterEnumDefaultValue { * @enum {string} */ -export enum OuterEnumInteger { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2 -} +export const OuterEnumInteger = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2 +} as const; + +export type OuterEnumInteger = typeof OuterEnumInteger[keyof typeof OuterEnumInteger]; + /** * @@ -1360,11 +1350,14 @@ export enum OuterEnumInteger { * @enum {string} */ -export enum OuterEnumIntegerDefaultValue { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2 -} +export const OuterEnumIntegerDefaultValue = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2 +} as const; + +export type OuterEnumIntegerDefaultValue = typeof OuterEnumIntegerDefaultValue[keyof typeof OuterEnumIntegerDefaultValue]; + /** * @@ -1417,15 +1410,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * @type Pig @@ -1731,15 +1722,13 @@ export interface Zebra { 'className': string; } -/** - * @export - * @enum {string} - */ -export enum ZebraTypeEnum { - Plains = 'plains', - Mountain = 'mountain', - Grevys = 'grevys' -} +export const ZebraTypeEnum = { + Plains: 'plains', + Mountain: 'mountain', + Grevys: 'grevys' +} as const; + +export type ZebraTypeEnum = typeof ZebraTypeEnum[keyof typeof ZebraTypeEnum]; /** 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 4966ecd507d5..8c7d0abac4ab 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 @@ -109,15 +109,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * A pet for sale in the pet store @@ -163,15 +161,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * A tag for a pet 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 5ef2fa3cbbfc..62742e15f671 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 @@ -361,22 +361,18 @@ export interface EnumArrays { 'array_enum'?: Array; } -/** - * @export - * @enum {string} - */ -export enum EnumArraysJustSymbolEnum { - GreaterThanOrEqualTo = '>=', - Dollar = '$' -} -/** - * @export - * @enum {string} - */ -export enum EnumArraysArrayEnumEnum { - Fish = 'fish', - Crab = 'crab' -} +export const EnumArraysJustSymbolEnum = { + GreaterThanOrEqualTo: '>=', + Dollar: '$' +} as const; + +export type EnumArraysJustSymbolEnum = typeof EnumArraysJustSymbolEnum[keyof typeof EnumArraysJustSymbolEnum]; +export const EnumArraysArrayEnumEnum = { + Fish: 'fish', + Crab: 'crab' +} as const; + +export type EnumArraysArrayEnumEnum = typeof EnumArraysArrayEnumEnum[keyof typeof EnumArraysArrayEnumEnum]; /** * @@ -384,11 +380,14 @@ export enum EnumArraysArrayEnumEnum { * @enum {string} */ -export enum EnumClass { - Abc = '_abc', - Efg = '-efg', - Xyz = '(xyz)' -} +export const EnumClass = { + Abc: '_abc', + Efg: '-efg', + Xyz: '(xyz)' +} as const; + +export type EnumClass = typeof EnumClass[keyof typeof EnumClass]; + /** * @@ -446,40 +445,32 @@ export interface EnumTest { 'outerEnumIntegerDefaultValue'?: OuterEnumIntegerDefaultValue; } -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumStringEnum { - Upper = 'UPPER', - Lower = 'lower', - Empty = '' -} -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumStringRequiredEnum { - Upper = 'UPPER', - Lower = 'lower', - Empty = '' -} -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumIntegerEnum { - NUMBER_1 = 1, - NUMBER_MINUS_1 = -1 -} -/** - * @export - * @enum {string} - */ -export enum EnumTestEnumNumberEnum { - NUMBER_1_DOT_1 = 1.1, - NUMBER_MINUS_1_DOT_2 = -1.2 -} +export const EnumTestEnumStringEnum = { + Upper: 'UPPER', + Lower: 'lower', + Empty: '' +} as const; + +export type EnumTestEnumStringEnum = typeof EnumTestEnumStringEnum[keyof typeof EnumTestEnumStringEnum]; +export const EnumTestEnumStringRequiredEnum = { + Upper: 'UPPER', + Lower: 'lower', + Empty: '' +} as const; + +export type EnumTestEnumStringRequiredEnum = typeof EnumTestEnumStringRequiredEnum[keyof typeof EnumTestEnumStringRequiredEnum]; +export const EnumTestEnumIntegerEnum = { + NUMBER_1: 1, + NUMBER_MINUS_1: -1 +} as const; + +export type EnumTestEnumIntegerEnum = typeof EnumTestEnumIntegerEnum[keyof typeof EnumTestEnumIntegerEnum]; +export const EnumTestEnumNumberEnum = { + NUMBER_1_DOT_1: 1.1, + NUMBER_MINUS_1_DOT_2: -1.2 +} as const; + +export type EnumTestEnumNumberEnum = typeof EnumTestEnumNumberEnum[keyof typeof EnumTestEnumNumberEnum]; /** * @@ -743,14 +734,12 @@ export interface MapTest { 'indirect_map'?: { [key: string]: boolean; }; } -/** - * @export - * @enum {string} - */ -export enum MapTestMapOfEnumStringEnum { - Upper = 'UPPER', - Lower = 'lower' -} +export const MapTestMapOfEnumStringEnum = { + Upper: 'UPPER', + Lower: 'lower' +} as const; + +export type MapTestMapOfEnumStringEnum = typeof MapTestMapOfEnumStringEnum[keyof typeof MapTestMapOfEnumStringEnum]; /** * @@ -978,15 +967,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * @@ -1019,11 +1006,14 @@ export interface OuterComposite { * @enum {string} */ -export enum OuterEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OuterEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OuterEnum = typeof OuterEnum[keyof typeof OuterEnum]; + /** * @@ -1031,11 +1021,14 @@ export enum OuterEnum { * @enum {string} */ -export enum OuterEnumDefaultValue { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OuterEnumDefaultValue = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OuterEnumDefaultValue = typeof OuterEnumDefaultValue[keyof typeof OuterEnumDefaultValue]; + /** * @@ -1043,11 +1036,14 @@ export enum OuterEnumDefaultValue { * @enum {string} */ -export enum OuterEnumInteger { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2 -} +export const OuterEnumInteger = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2 +} as const; + +export type OuterEnumInteger = typeof OuterEnumInteger[keyof typeof OuterEnumInteger]; + /** * @@ -1055,11 +1051,14 @@ export enum OuterEnumInteger { * @enum {string} */ -export enum OuterEnumIntegerDefaultValue { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2 -} +export const OuterEnumIntegerDefaultValue = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2 +} as const; + +export type OuterEnumIntegerDefaultValue = typeof OuterEnumIntegerDefaultValue[keyof typeof OuterEnumIntegerDefaultValue]; + /** * @@ -1106,15 +1105,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * @@ -1353,15 +1350,13 @@ export interface Zebra { 'className': string; } -/** - * @export - * @enum {string} - */ -export enum ZebraTypeEnum { - Plains = 'plains', - Mountain = 'mountain', - Grevys = 'grevys' -} +export const ZebraTypeEnum = { + Plains: 'plains', + Mountain: 'mountain', + Grevys: 'grevys' +} as const; + +export type ZebraTypeEnum = typeof ZebraTypeEnum[keyof typeof ZebraTypeEnum]; /** 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 986bfee57879..d808b5aa937b 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -109,15 +109,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * A pet for sale in the pet store @@ -163,15 +161,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * A tag for a pet 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 81a0a2962453..0cfec1ad4b34 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 @@ -113,15 +113,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * A pet for sale in the pet store @@ -167,15 +165,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * A tag for a pet diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts index b2ad43c3e40a..1ed788e1ec8f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts @@ -58,14 +58,12 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts index 14d646fe1493..e32493df7359 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts @@ -60,14 +60,12 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; 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 fd8ae456d7a7..893802cbed3b 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 @@ -109,15 +109,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * A pet for sale in the pet store @@ -163,15 +161,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * A tag for a pet 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 3afadf82f367..5a06a70cb99e 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 @@ -109,15 +109,13 @@ export interface Order { 'complete'?: boolean; } -/** - * @export - * @enum {string} - */ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} +export const OrderStatusEnum = { + Placed: 'placed', + Approved: 'approved', + Delivered: 'delivered' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; /** * A pet for sale in the pet store @@ -163,15 +161,13 @@ export interface Pet { 'status'?: PetStatusEnum; } -/** - * @export - * @enum {string} - */ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} +export const PetStatusEnum = { + Available: 'available', + Pending: 'pending', + Sold: 'sold' +} as const; + +export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum]; /** * A tag for a pet diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/.gitignore b/samples/client/petstore/typescript-axios/builds/with-string-enums/.gitignore new file mode 100644 index 000000000000..149b57654723 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/.npmignore b/samples/client/petstore/typescript-axios/builds/with-string-enums/.npmignore new file mode 100644 index 000000000000..999d88df6939 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator-ignore b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/.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-axios/builds/with-string-enums/.openapi-generator/FILES b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/FILES new file mode 100644 index 000000000000..a80cd4f07b06 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/FILES @@ -0,0 +1,8 @@ +.gitignore +.npmignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file 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 new file mode 100644 index 000000000000..fd8ae456d7a7 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts @@ -0,0 +1,1816 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } 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'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * Describes the result of uploading an image resource + * @export + * @interface ApiResponse + */ +export interface ApiResponse { + /** + * + * @type {number} + * @memberof ApiResponse + */ + 'code'?: number; + /** + * + * @type {string} + * @memberof ApiResponse + */ + 'type'?: string; + /** + * + * @type {string} + * @memberof ApiResponse + */ + 'message'?: string; +} +/** + * A category for a pet + * @export + * @interface Category + */ +export interface Category { + /** + * + * @type {number} + * @memberof Category + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof Category + */ + 'name'?: string; +} +/** + * An order for a pets from the pet store + * @export + * @interface Order + */ +export interface Order { + /** + * + * @type {number} + * @memberof Order + */ + 'id'?: number; + /** + * + * @type {number} + * @memberof Order + */ + 'petId'?: number; + /** + * + * @type {number} + * @memberof Order + */ + 'quantity'?: number; + /** + * + * @type {string} + * @memberof Order + */ + 'shipDate'?: string; + /** + * Order Status + * @type {string} + * @memberof Order + */ + 'status'?: OrderStatusEnum; + /** + * + * @type {boolean} + * @memberof Order + */ + 'complete'?: boolean; +} + +/** + * @export + * @enum {string} + */ +export enum OrderStatusEnum { + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' +} + +/** + * A pet for sale in the pet store + * @export + * @interface Pet + */ +export interface Pet { + /** + * + * @type {number} + * @memberof Pet + */ + 'id'?: number; + /** + * + * @type {Category} + * @memberof Pet + */ + 'category'?: Category; + /** + * + * @type {string} + * @memberof Pet + */ + 'name': string; + /** + * + * @type {Array} + * @memberof Pet + */ + 'photoUrls': Array; + /** + * + * @type {Array} + * @memberof Pet + */ + 'tags'?: Array; + /** + * pet status in the store + * @type {string} + * @memberof Pet + */ + 'status'?: PetStatusEnum; +} + +/** + * @export + * @enum {string} + */ +export enum PetStatusEnum { + Available = 'available', + Pending = 'pending', + Sold = 'sold' +} + +/** + * A tag for a pet + * @export + * @interface Tag + */ +export interface Tag { + /** + * + * @type {number} + * @memberof Tag + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof Tag + */ + 'name'?: string; +} +/** + * A User who is purchasing from the pet store + * @export + * @interface User + */ +export interface User { + /** + * + * @type {number} + * @memberof User + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof User + */ + 'username'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'firstName'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'lastName'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'email'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'password'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'phone'?: string; + /** + * User Status + * @type {number} + * @memberof User + */ + 'userStatus'?: number; +} + +/** + * PetApi - axios parameter creator + * @export + */ +export const PetApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('addPet', 'body', body) + const localVarPath = `/pet`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('deletePet', 'petId', petId) + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + if (apiKey !== undefined && apiKey !== null) { + localVarHeaderParameter['api_key'] = String(apiKey); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'status' is not null or undefined + assertParamExists('findPetsByStatus', 'status', status) + const localVarPath = `/pet/findByStatus`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + if (status) { + localVarQueryParameter['status'] = status.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'tags' is not null or undefined + assertParamExists('findPetsByTags', 'tags', tags) + const localVarPath = `/pet/findByTags`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + if (tags) { + localVarQueryParameter['tags'] = tags.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('getPetById', 'petId', petId) + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update an existing pet + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('updatePet', 'body', body) + const localVarPath = `/pet`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('updatePetWithForm', 'petId', petId) + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + if (name !== undefined) { + localVarFormParams.set('name', name as any); + } + + if (status !== undefined) { + localVarFormParams.set('status', status as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams.toString(); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('uploadFile', 'petId', petId) + const localVarPath = `/pet/{petId}/uploadImage` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + if (additionalMetadata !== undefined) { + localVarFormParams.append('additionalMetadata', additionalMetadata as any); + } + + if (file !== undefined) { + localVarFormParams.append('file', file as any); + } + + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * PetApi - functional programming interface + * @export + */ +export const PetApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = PetApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Update an existing pet + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * PetApi - factory interface + * @export + */ +export const PetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PetApiFp(configuration) + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addPet(body: Pet, options?: any): AxiosPromise { + return localVarFp.addPet(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise { + return localVarFp.deletePet(petId, apiKey, options).then((request) => request(axios, basePath)); + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise> { + return localVarFp.findPetsByStatus(status, options).then((request) => request(axios, basePath)); + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + findPetsByTags(tags: Array, options?: any): AxiosPromise> { + return localVarFp.findPetsByTags(tags, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPetById(petId: number, options?: any): AxiosPromise { + return localVarFp.getPetById(petId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update an existing pet + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePet(body: Pet, options?: any): AxiosPromise { + return localVarFp.updatePet(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise { + return localVarFp.updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise { + return localVarFp.uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * PetApi - object-oriented interface + * @export + * @class PetApi + * @extends {BaseAPI} + */ +export class PetApi extends BaseAPI { + /** + * + * @summary Add a new pet to the store + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public addPet(body: Pet, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof PetApi + */ + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public getPetById(petId: number, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update an existing pet + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public updatePet(body: Pet, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * StoreApi - axios parameter creator + * @export + */ +export const StoreApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('deleteOrder', 'orderId', orderId) + const localVarPath = `/store/order/{orderId}` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInventory: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/store/inventory`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('getOrderById', 'orderId', orderId) + const localVarPath = `/store/order/{orderId}` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Place an order for a pet + * @param {Order} body order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('placeOrder', 'body', body) + const localVarPath = `/store/order`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * StoreApi - functional programming interface + * @export + */ +export const StoreApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StoreApiAxiosParamCreator(configuration) + return { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Place an order for a pet + * @param {Order} body order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * StoreApi - factory interface + * @export + */ +export const StoreApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StoreApiFp(configuration) + return { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOrder(orderId: string, options?: any): AxiosPromise { + return localVarFp.deleteOrder(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> { + return localVarFp.getInventory(options).then((request) => request(axios, basePath)); + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderById(orderId: number, options?: any): AxiosPromise { + return localVarFp.getOrderById(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Place an order for a pet + * @param {Order} body order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + placeOrder(body: Order, options?: any): AxiosPromise { + return localVarFp.placeOrder(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * StoreApi - object-oriented interface + * @export + * @class StoreApi + * @extends {BaseAPI} + */ +export class StoreApi extends BaseAPI { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public getInventory(options?: AxiosRequestConfig) { + return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public getOrderById(orderId: number, options?: AxiosRequestConfig) { + return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Place an order for a pet + * @param {Order} body order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public placeOrder(body: Order, options?: AxiosRequestConfig) { + return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * UserApi - axios parameter creator + * @export + */ +export const UserApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} body Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createUser', 'body', body) + const localVarPath = `/user`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createUsersWithArrayInput', 'body', body) + const localVarPath = `/user/createWithArray`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createUsersWithListInput', 'body', body) + const localVarPath = `/user/createWithList`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('deleteUser', 'username', username) + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('getUserByName', 'username', username) + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('loginUser', 'username', username) + // verify required parameter 'password' is not null or undefined + assertParamExists('loginUser', 'password', password) + const localVarPath = `/user/login`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (username !== undefined) { + localVarQueryParameter['username'] = username; + } + + if (password !== undefined) { + localVarQueryParameter['password'] = password; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/user/logout`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} body Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('updateUser', 'username', username) + // verify required parameter 'body' is not null or undefined + assertParamExists('updateUser', 'body', body) + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UserApi - functional programming interface + * @export + */ +export const UserApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration) + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} body Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} body Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * UserApi - factory interface + * @export + */ +export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserApiFp(configuration) + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} body Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUser(body: User, options?: any): AxiosPromise { + return localVarFp.createUser(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithArrayInput(body: Array, options?: any): AxiosPromise { + return localVarFp.createUsersWithArrayInput(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithListInput(body: Array, options?: any): AxiosPromise { + return localVarFp.createUsersWithListInput(body, options).then((request) => request(axios, basePath)); + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser(username: string, options?: any): AxiosPromise { + return localVarFp.deleteUser(username, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserByName(username: string, options?: any): AxiosPromise { + return localVarFp.getUserByName(username, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loginUser(username: string, password: string, options?: any): AxiosPromise { + return localVarFp.loginUser(username, password, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + logoutUser(options?: any): AxiosPromise { + return localVarFp.logoutUser(options).then((request) => request(axios, basePath)); + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} body Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser(username: string, body: User, options?: any): AxiosPromise { + return localVarFp.updateUser(username, body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UserApi - object-oriented interface + * @export + * @class UserApi + * @extends {BaseAPI} + */ +export class UserApi extends BaseAPI { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} body Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUser(body: User, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public deleteUser(username: string, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public getUserByName(username: string, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public logoutUser(options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} body Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts new file mode 100644 index 000000000000..e23d972eeb04 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; + +export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts new file mode 100644 index 000000000000..1b1d3a4b7aef --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance, AxiosResponse } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + if (Array.isArray(object[key])) { + searchParams.delete(key); + for (const item of object[key]) { + searchParams.append(key, item); + } + } else { + searchParams.set(key, object[key]); + } + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/configuration.ts new file mode 100644 index 000000000000..b8780457121d --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/git_push.sh b/samples/client/petstore/typescript-axios/builds/with-string-enums/git_push.sh new file mode 100644 index 000000000000..f53a75d4fabe --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/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-axios/builds/with-string-enums/index.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/index.ts new file mode 100644 index 000000000000..ed3d348fdfec --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + From e5bb98ce3e2f055e92279e090f0befce00ccfa54 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 29 Jan 2022 17:11:47 +0800 Subject: [PATCH 163/175] [java][spring] use Github action instead (#11441) * spring ci * update samples * remove tests in circleci * update workflow * Revert "update samples" This reverts commit 27acc8217144aeca41da2ab14c369ebba4bac7d8. * trigger build failure * Revert "trigger build failure" This reverts commit a93258468d3e2fee41a9d6c8de2e197724608f88. * remove branchs, prs --- .github/workflows/samples-spring.yaml | 59 +++++++++++++++++++++++++++ pom.xml | 21 ---------- 2 files changed, 59 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/samples-spring.yaml diff --git a/.github/workflows/samples-spring.yaml b/.github/workflows/samples-spring.yaml new file mode 100644 index 000000000000..d266c3584821 --- /dev/null +++ b/.github/workflows/samples-spring.yaml @@ -0,0 +1,59 @@ +name: Samples Java Spring + +on: + push: + paths: + - 'samples/server/petstore/spring*/**' + - 'samples/openapi3/server/petstore/spring*/**' + pull_request: + paths: + - 'samples/server/petstore/spring*/**' + - 'samples/openapi3/server/petstore/spring*/**' +jobs: + build: + name: Build Java Spring + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/petstore/spring-cloud + - samples/openapi3/client/petstore/spring-cloud + - samples/client/petstore/spring-cloud-date-time + - samples/openapi3/client/petstore/spring-cloud-date-time + - samples/client/petstore/spring-stubs + - samples/openapi3/client/petstore/spring-stubs + # servers + - samples/server/petstore/spring-mvc + - samples/server/petstore/spring-mvc-default-value + - samples/server/petstore/spring-mvc-j8-async + - samples/server/petstore/spring-mvc-j8-localdatetime + - samples/server/petstore/springboot + - samples/openapi3/server/petstore/springboot + - samples/server/petstore/springboot-beanvalidation + - samples/server/petstore/springboot-useoptional + - samples/openapi3/server/petstore/springboot-useoptional + - samples/server/petstore/springboot-reactive + - samples/openapi3/server/petstore/springboot-reactive + - samples/server/petstore/springboot-implicitHeaders + - samples/openapi3/server/petstore/springboot-implicitHeaders + - samples/server/petstore/springboot-delegate + - samples/openapi3/server/petstore/springboot-delegate + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: 8 + - name: Cache maven dependencies + uses: actions/cache@v2.1.7 + env: + cache-name: maven-repository + with: + path: | + ~/.m2 + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + - name: Build + working-directory: ${{ matrix.sample }} + run: mvn clean package diff --git a/pom.xml b/pom.xml index 332c899e1ad7..9618190ac097 100644 --- a/pom.xml +++ b/pom.xml @@ -1261,27 +1261,6 @@ samples/client/petstore/spring-cloud - samples/openapi3/client/petstore/spring-cloud - samples/client/petstore/spring-cloud-date-time - samples/openapi3/client/petstore/spring-cloud-date-time - samples/client/petstore/spring-stubs - samples/openapi3/client/petstore/spring-stubs - - samples/server/petstore/spring-mvc - samples/server/petstore/spring-mvc-default-value - samples/server/petstore/spring-mvc-j8-async - samples/server/petstore/spring-mvc-j8-localdatetime - samples/server/petstore/springboot - samples/openapi3/server/petstore/springboot - samples/server/petstore/springboot-beanvalidation - samples/server/petstore/springboot-useoptional - samples/openapi3/server/petstore/springboot-useoptional - samples/server/petstore/springboot-reactive - samples/openapi3/server/petstore/springboot-reactive - samples/server/petstore/springboot-implicitHeaders - samples/openapi3/server/petstore/springboot-implicitHeaders - samples/server/petstore/springboot-delegate - samples/openapi3/server/petstore/springboot-delegate From 35fea62b3bf4ccf7b8239e8c52369d2c668d9ada Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 30 Jan 2022 02:01:26 +0800 Subject: [PATCH 164/175] [c#][netcore] mark EOL frameworks as deprecated (#11450) * removed old frameworks from csharp-netcore * removed another reference and build samples * updated readme * deprecated frameworks * fix test csproj file * update doc Co-authored-by: devhl-labs --- README.md | 2 +- .../csharp-netcore-OpenAPIClientCore.yaml | 2 +- ...arp-netcore-OpenAPIClientCoreAndNet47.yaml | 2 +- docs/generators/aspnetcore.md | 2 +- docs/generators/csharp-netcore-functions.md | 4 ++-- docs/generators/csharp-netcore.md | 4 ++-- docs/generators/csharp.md | 2 +- .../codegen/CodegenConstants.java | 4 ++-- .../languages/CSharpNetCoreClientCodegen.java | 20 +++++++++---------- .../Org.OpenAPITools.Test.csproj | 2 +- .../Org.OpenAPITools.Test.csproj | 2 +- .../Org.OpenAPITools.Test.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../Org.OpenAPITools.Test.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 52ce37403e8d..b66fcfa6fb93 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0, .NET 5.0. Libraries: RestSharp, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) | +| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) | | **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) | | **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** | | **Configuration files** | [**Apache2**](https://httpd.apache.org/) | diff --git a/bin/configs/csharp-netcore-OpenAPIClientCore.yaml b/bin/configs/csharp-netcore-OpenAPIClientCore.yaml index fbc12cef7e7c..81c2ed9b0f1c 100644 --- a/bin/configs/csharp-netcore-OpenAPIClientCore.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClientCore.yaml @@ -4,5 +4,5 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-f templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' - targetFramework: netcoreapp2.0 + targetFramework: netcoreapp3.1 useCompareNetObjects: "true" diff --git a/bin/configs/csharp-netcore-OpenAPIClientCoreAndNet47.yaml b/bin/configs/csharp-netcore-OpenAPIClientCoreAndNet47.yaml index 58b30f42acb2..45750b9f03e0 100644 --- a/bin/configs/csharp-netcore-OpenAPIClientCoreAndNet47.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClientCoreAndNet47.yaml @@ -4,5 +4,5 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' - targetFramework: netstandard2.1;netcoreapp3.0 + targetFramework: netstandard2.1;net47 useCompareNetObjects: "true" diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 6956ac6d9c1a..a85eac91e7ff 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |licenseUrl|The URL of the license| |http://localhost| |modelClassModifier|Model Class Modifier can be nothing or partial| |partial| |newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0| -|nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.0 or newer.| |false| +|nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.1 or newer.| |false| |operationIsAsync|Set methods to async or sync (default).| |false| |operationModifier|Operation Modifier can be virtual or abstract|
**virtual**
Keep method virtual
**abstract**
Make method abstract
|virtual| |operationResultTask|Set methods result to Task<>.| |false| diff --git a/docs/generators/csharp-netcore-functions.md b/docs/generators/csharp-netcore-functions.md index c694b4626ffa..5030dee051a9 100644 --- a/docs/generators/csharp-netcore-functions.md +++ b/docs/generators/csharp-netcore-functions.md @@ -29,7 +29,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| |netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| |nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.0 or newer.| |false| +|nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.1 or newer.| |false| |optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| |optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| |optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| @@ -42,7 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |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.0`|
**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
**netcoreapp2.0**
.NET Core 2.0 compatible
**netcoreapp2.1**
.NET Core 2.1 compatible
**netcoreapp3.0**
.NET Core 3.0 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 compatible
**net5.0**
.NET 5.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
**netcoreapp2.0**
.NET Core 2.0 compatible
**netcoreapp2.1**
.NET Core 2.1 compatible
**netcoreapp3.0**
.NET Core 3.0 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 compatible
**net5.0**
.NET 5.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/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 17bc2cfa9745..6e4a146c8944 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| |netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| |nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.0 or newer.| |false| +|nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.1 or newer.| |false| |optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| |optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| |optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| @@ -43,7 +43,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |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.0`|
**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
**netcoreapp2.0**
.NET Core 2.0 compatible
**netcoreapp2.1**
.NET Core 2.1 compatible
**netcoreapp3.0**
.NET Core 3.0 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 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
**netcoreapp2.0**
.NET Core 2.0 compatible (deprecated)
**netcoreapp2.1**
.NET Core 2.1 compatible (deprecated)
**netcoreapp3.0**
.NET Core 3.0 compatible (deprecated)
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 compatible
**net5.0**
.NET 5.0 compatible
**net6.0**
.NET 6.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/docs/generators/csharp.md b/docs/generators/csharp.md index 0dd162bc8d60..4caf9db56c8c 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -36,7 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |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.0`|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5 compatible
**v4.5.2**
.NET Framework 4.5.2+ compatible
**netstandard1.3**
.NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
**uwp**
Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
|v4.5| +|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5 compatible
**v4.5.2**
.NET Framework 4.5.2+ compatible
**netstandard1.3**
.NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
**uwp**
Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
|v4.5| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useCompareNetObjects|Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 27c47456bc0c..d0906a4caf09 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -214,10 +214,10 @@ public class CodegenConstants { public static final String PARAM_NAMING_DESC = "Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name"; public static final String DOTNET_FRAMEWORK = "targetFramework"; - public static final String DOTNET_FRAMEWORK_DESC = "The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.0`"; + public static final String DOTNET_FRAMEWORK_DESC = "The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`"; public static final String NULLABLE_REFERENCE_TYPES = "nullableReferenceTypes"; - public static final String NULLABLE_REFERENCE_TYPES_DESC = "Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.0 or newer."; + public static final String NULLABLE_REFERENCE_TYPES_DESC = "Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.1 or newer."; public static final String TEMPLATING_ENGINE = "templatingEngine"; public static final String TEMPLATING_ENGINE_DESC = "The templating engine plugin to use: \"mustache\" (default) or \"handlebars\" (beta)"; 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 67cfd2f1cfae..1e882ca18191 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 @@ -39,7 +39,7 @@ import static org.openapitools.codegen.utils.StringUtils.underscore; @SuppressWarnings("Duplicates") -public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { +public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { protected String apiName = "Api"; // Defines the sdk option for targeted frameworks, which differs from targetFramework and targetFrameworkNuget @@ -1118,23 +1118,23 @@ private static abstract class FrameworkStrategy { private final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); - static FrameworkStrategy NETSTANDARD_1_3 = new FrameworkStrategy("netstandard1.3", ".NET Standard 1.3 compatible", "netcoreapp2.0") { + static FrameworkStrategy NETSTANDARD_1_3 = new FrameworkStrategy("netstandard1.3", ".NET Standard 1.3 compatible", "netcoreapp3.1") { }; - static FrameworkStrategy NETSTANDARD_1_4 = new FrameworkStrategy("netstandard1.4", ".NET Standard 1.4 compatible", "netcoreapp2.0") { + static FrameworkStrategy NETSTANDARD_1_4 = new FrameworkStrategy("netstandard1.4", ".NET Standard 1.4 compatible", "netcoreapp3.1") { }; - static FrameworkStrategy NETSTANDARD_1_5 = new FrameworkStrategy("netstandard1.5", ".NET Standard 1.5 compatible", "netcoreapp2.0") { + static FrameworkStrategy NETSTANDARD_1_5 = new FrameworkStrategy("netstandard1.5", ".NET Standard 1.5 compatible", "netcoreapp3.1") { }; - static FrameworkStrategy NETSTANDARD_1_6 = new FrameworkStrategy("netstandard1.6", ".NET Standard 1.6 compatible", "netcoreapp2.0") { + static FrameworkStrategy NETSTANDARD_1_6 = new FrameworkStrategy("netstandard1.6", ".NET Standard 1.6 compatible", "netcoreapp3.1") { }; - static FrameworkStrategy NETSTANDARD_2_0 = new FrameworkStrategy("netstandard2.0", ".NET Standard 2.0 compatible", "netcoreapp2.0") { + static FrameworkStrategy NETSTANDARD_2_0 = new FrameworkStrategy("netstandard2.0", ".NET Standard 2.0 compatible", "netcoreapp3.1") { }; - static FrameworkStrategy NETSTANDARD_2_1 = new FrameworkStrategy("netstandard2.1", ".NET Standard 2.1 compatible", "netcoreapp3.0") { + static FrameworkStrategy NETSTANDARD_2_1 = new FrameworkStrategy("netstandard2.1", ".NET Standard 2.1 compatible", "netcoreapp3.1") { }; - static FrameworkStrategy NETCOREAPP_2_0 = new FrameworkStrategy("netcoreapp2.0", ".NET Core 2.0 compatible", "netcoreapp2.0", Boolean.FALSE) { + static FrameworkStrategy NETCOREAPP_2_0 = new FrameworkStrategy("netcoreapp2.0", ".NET Core 2.0 compatible (deprecated)", "netcoreapp2.0", Boolean.FALSE) { }; - static FrameworkStrategy NETCOREAPP_2_1 = new FrameworkStrategy("netcoreapp2.1", ".NET Core 2.1 compatible", "netcoreapp2.1", Boolean.FALSE) { + static FrameworkStrategy NETCOREAPP_2_1 = new FrameworkStrategy("netcoreapp2.1", ".NET Core 2.1 compatible (deprecated)", "netcoreapp2.1", Boolean.FALSE) { }; - static FrameworkStrategy NETCOREAPP_3_0 = new FrameworkStrategy("netcoreapp3.0", ".NET Core 3.0 compatible", "netcoreapp3.0", Boolean.FALSE) { + static FrameworkStrategy NETCOREAPP_3_0 = new FrameworkStrategy("netcoreapp3.0", ".NET Core 3.0 compatible (deprecated)", "netcoreapp3.0", Boolean.FALSE) { }; static FrameworkStrategy NETCOREAPP_3_1 = new FrameworkStrategy("netcoreapp3.1", ".NET Core 3.1 compatible", "netcoreapp3.1", Boolean.FALSE) { }; 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 d58f7e14d8d5..a68e9179c812 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 @@ -3,7 +3,7 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - netcoreapp2.0 + netcoreapp3.1 false 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 d58f7e14d8d5..a68e9179c812 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 @@ -3,7 +3,7 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - netcoreapp2.0 + netcoreapp3.1 false diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index d1694dcffd1d..ac868f2e6ba3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -10,7 +10,7 @@ OpenAPI spec version: 1.0.0 - netcoreapp2.0 + netcoreapp3.1 false diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 97a88c1cbe33..8e1483670bb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ false - netcoreapp2.0 + netcoreapp3.1 Org.OpenAPITools Org.OpenAPITools Library 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 bc9730b03666..f75257161b7e 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 @@ -3,7 +3,7 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - netcoreapp3.0;netcoreapp3.0 + netcoreapp3.1;net47 false diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 6310b388e6e9..fd30b32a72fe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ false - netstandard2.1;netcoreapp3.0 + netstandard2.1;net47 Org.OpenAPITools Org.OpenAPITools Library From 8b017bc855e43c2bcf346390a2f8ea00b8f64133 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 30 Jan 2022 15:53:27 +0800 Subject: [PATCH 165/175] mark csharp-nancyfx generator as deprecated (#11454) --- .github/.test/samples.json | 14 +- .github/auto-labeler.yml | 2 - .../other/csharp-nancyfx-nancyfx-async.yaml | 7 - bin/configs/other/csharp-nancyfx-nancyfx.yaml | 7 - docs/generators.md | 2 +- ...ancyfx.md => csharp-nancyfx-deprecated.md} | 8 +- .../languages/CSharpNancyFXServerCodegen.java | 10 +- .../server/petstore/nancyfx-async/.gitignore | 362 -------------- .../nancyfx-async/.openapi-generator-ignore | 23 - .../nancyfx-async/.openapi-generator/FILES | 16 - .../nancyfx-async/.openapi-generator/VERSION | 1 - .../nancyfx-async/Org.OpenAPITools.sln | 25 - .../src/IO.Swagger/IO.Swagger.csproj | 66 --- .../src/IO.Swagger/IO.Swagger.nuspec | 14 - .../src/IO.Swagger/Models/ApiResponse.cs | 185 ------- .../src/IO.Swagger/Models/Category.cs | 165 ------- .../src/IO.Swagger/Models/Order.cs | 247 ---------- .../src/IO.Swagger/Models/Pet.cs | 254 ---------- .../src/IO.Swagger/Models/Tag.cs | 165 ------- .../src/IO.Swagger/Models/User.cs | 285 ----------- .../src/IO.Swagger/Modules/PetModule.cs | 247 ---------- .../src/IO.Swagger/Modules/StoreModule.cs | 129 ----- .../src/IO.Swagger/Modules/UserModule.cs | 234 --------- .../IO.Swagger/Utils/LocalDateConverter.cs | 55 --- .../src/IO.Swagger/Utils/Parameters.cs | 450 ------------------ .../src/IO.Swagger/packages.config | 7 - .../Org.OpenAPITools/Models/ApiResponse.cs | 185 ------- .../src/Org.OpenAPITools/Models/Category.cs | 165 ------- .../src/Org.OpenAPITools/Models/Order.cs | 247 ---------- .../src/Org.OpenAPITools/Models/Pet.cs | 254 ---------- .../src/Org.OpenAPITools/Models/Tag.cs | 165 ------- .../src/Org.OpenAPITools/Models/User.cs | 285 ----------- .../src/Org.OpenAPITools/Modules/PetModule.cs | 250 ---------- .../Org.OpenAPITools/Modules/StoreModule.cs | 129 ----- .../Org.OpenAPITools/Modules/UserModule.cs | 234 --------- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 66 --- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 13 - .../Utils/LocalDateConverter.cs | 55 --- .../src/Org.OpenAPITools/Utils/Parameters.cs | 450 ------------------ .../src/Org.OpenAPITools/packages.config | 7 - samples/server/petstore/nancyfx/.gitignore | 362 -------------- .../nancyfx/.openapi-generator-ignore | 23 - .../petstore/nancyfx/.openapi-generator/FILES | 16 - .../nancyfx/.openapi-generator/VERSION | 1 - .../petstore/nancyfx/Org.OpenAPITools.sln | 25 - .../Org.OpenAPITools/Models/ApiResponse.cs | 185 ------- .../src/Org.OpenAPITools/Models/Category.cs | 165 ------- .../src/Org.OpenAPITools/Models/Order.cs | 247 ---------- .../src/Org.OpenAPITools/Models/Pet.cs | 254 ---------- .../src/Org.OpenAPITools/Models/Tag.cs | 165 ------- .../src/Org.OpenAPITools/Models/User.cs | 285 ----------- .../src/Org.OpenAPITools/Modules/PetModule.cs | 249 ---------- .../Org.OpenAPITools/Modules/StoreModule.cs | 128 ----- .../Org.OpenAPITools/Modules/UserModule.cs | 233 --------- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 66 --- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 13 - .../Utils/LocalDateConverter.cs | 55 --- .../src/Org.OpenAPITools/Utils/Parameters.cs | 450 ------------------ .../src/Org.OpenAPITools/packages.config | 7 - 59 files changed, 14 insertions(+), 8400 deletions(-) delete mode 100644 bin/configs/other/csharp-nancyfx-nancyfx-async.yaml delete mode 100644 bin/configs/other/csharp-nancyfx-nancyfx.yaml rename docs/generators/{csharp-nancyfx.md => csharp-nancyfx-deprecated.md} (95%) delete mode 100644 samples/server/petstore/nancyfx-async/.gitignore delete mode 100644 samples/server/petstore/nancyfx-async/.openapi-generator-ignore delete mode 100644 samples/server/petstore/nancyfx-async/.openapi-generator/FILES delete mode 100644 samples/server/petstore/nancyfx-async/.openapi-generator/VERSION delete mode 100644 samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.csproj delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.nuspec delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/ApiResponse.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Category.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Order.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Pet.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Tag.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/User.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/PetModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/StoreModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/UserModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Utils/LocalDateConverter.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/Utils/Parameters.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/IO.Swagger/packages.config delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config delete mode 100644 samples/server/petstore/nancyfx/.gitignore delete mode 100644 samples/server/petstore/nancyfx/.openapi-generator-ignore delete mode 100644 samples/server/petstore/nancyfx/.openapi-generator/FILES delete mode 100644 samples/server/petstore/nancyfx/.openapi-generator/VERSION delete mode 100644 samples/server/petstore/nancyfx/Org.OpenAPITools.sln delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config diff --git a/.github/.test/samples.json b/.github/.test/samples.json index d756cc45dfd4..471241ab9c80 100644 --- a/.github/.test/samples.json +++ b/.github/.test/samples.json @@ -722,18 +722,6 @@ "Schema: MySQL" ] }, - { - "input": "nancyfx-petstore-server-async.sh", - "matches": [ - "Server: C-Sharp" - ] - }, - { - "input": "nancyfx-petstore-server.sh", - "matches": [ - "Server: C-Sharp" - ] - }, { "input": "nodejs-petstore-google-cloud-functions.sh", "matches": [ @@ -1401,4 +1389,4 @@ "matches": [] } ] -} \ No newline at end of file +} diff --git a/.github/auto-labeler.yml b/.github/auto-labeler.yml index 5bff51d5cec0..2bb9a71d44ee 100644 --- a/.github/auto-labeler.yml +++ b/.github/auto-labeler.yml @@ -223,8 +223,6 @@ labels: 'Server: C-Sharp': - '\s*?\[aspnetcore\]\s*?' - '\s*?-[gl] aspnetcore\s*?' - - '\s*?\[csharp-nancyfx\]\s*?' - - '\s*?-[gl] csharp-nancyfx\s*?' # 'Server: Ceylon': # TODO: REMOVE UNUSED LABEL 'Server: Eiffel': - '\s*?\[eiffel(-.*)?-server\]\s*?' diff --git a/bin/configs/other/csharp-nancyfx-nancyfx-async.yaml b/bin/configs/other/csharp-nancyfx-nancyfx-async.yaml deleted file mode 100644 index ae5e4671753e..000000000000 --- a/bin/configs/other/csharp-nancyfx-nancyfx-async.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: csharp-nancyfx -outputDir: samples/server/petstore/nancyfx-async -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml -templateDir: modules/openapi-generator/src/main/resources/csharp-nancyfx -additionalProperties: - asyncServer: "true" - packageGuid: '{768B8DC6-54EE-4D40-9B20-7857E1D742A4}' diff --git a/bin/configs/other/csharp-nancyfx-nancyfx.yaml b/bin/configs/other/csharp-nancyfx-nancyfx.yaml deleted file mode 100644 index 5fd6cdffafe3..000000000000 --- a/bin/configs/other/csharp-nancyfx-nancyfx.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: csharp-nancyfx -outputDir: samples/server/petstore/nancyfx -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml -templateDir: modules/openapi-generator/src/main/resources/csharp-nancyfx -additionalProperties: - asyncServer: "false" - packageGuid: '{768B8DC6-54EE-4D40-9B20-7857E1D742A4}' diff --git a/docs/generators.md b/docs/generators.md index afd41cba7e37..65595bbbe893 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -86,7 +86,7 @@ The following generators are available: * [cpp-pistache-server](generators/cpp-pistache-server.md) * [cpp-qt-qhttpengine-server](generators/cpp-qt-qhttpengine-server.md) * [cpp-restbed-server](generators/cpp-restbed-server.md) -* [csharp-nancyfx](generators/csharp-nancyfx.md) +* [csharp-nancyfx-deprecated (deprecated)](generators/csharp-nancyfx-deprecated.md) * [csharp-netcore-functions (beta)](generators/csharp-netcore-functions.md) * [erlang-server](generators/erlang-server.md) * [fsharp-functions (beta)](generators/fsharp-functions.md) diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx-deprecated.md similarity index 95% rename from docs/generators/csharp-nancyfx.md rename to docs/generators/csharp-nancyfx-deprecated.md index 37d2be9eb02e..519edc27307d 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx-deprecated.md @@ -1,17 +1,17 @@ --- -title: Documentation for the csharp-nancyfx Generator +title: Documentation for the csharp-nancyfx-deprecated Generator --- ## METADATA | Property | Value | Notes | | -------- | ----- | ----- | -| generator name | csharp-nancyfx | pass this to the generate command after -g | -| generator stability | STABLE | | +| generator name | csharp-nancyfx-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | | generator type | SERVER | | | generator language | C# | | | generator default templating engine | mustache | | -| helpTxt | Generates a C# NancyFX Web API server. | | +| helpTxt | Generates a C# NancyFX Web API server (deprecated). | | ## 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. diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java index a99243ab3593..280d26f7a16f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java @@ -23,6 +23,8 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -86,6 +88,10 @@ public CSharpNancyFXServerCodegen() { ) ); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.DEPRECATED) + .build(); + outputFolder = "generated-code" + File.separator + getName(); apiTemplateFiles.put("api.mustache", ".cs"); @@ -127,12 +133,12 @@ public CodegenType getTag() { @Override public String getName() { - return "csharp-nancyfx"; + return "csharp-nancyfx-deprecated"; } @Override public String getHelp() { - return "Generates a C# NancyFX Web API server."; + return "Generates a C# NancyFX Web API server (deprecated)."; } @Override diff --git a/samples/server/petstore/nancyfx-async/.gitignore b/samples/server/petstore/nancyfx-async/.gitignore deleted file mode 100644 index 1ee53850b84c..000000000000 --- a/samples/server/petstore/nancyfx-async/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/samples/server/petstore/nancyfx-async/.openapi-generator-ignore b/samples/server/petstore/nancyfx-async/.openapi-generator-ignore deleted file mode 100644 index c5fa491b4c55..000000000000 --- a/samples/server/petstore/nancyfx-async/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# 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 Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/nancyfx-async/.openapi-generator/FILES b/samples/server/petstore/nancyfx-async/.openapi-generator/FILES deleted file mode 100644 index eabec10a061c..000000000000 --- a/samples/server/petstore/nancyfx-async/.openapi-generator/FILES +++ /dev/null @@ -1,16 +0,0 @@ -.gitignore -Org.OpenAPITools.sln -src/Org.OpenAPITools/Models/ApiResponse.cs -src/Org.OpenAPITools/Models/Category.cs -src/Org.OpenAPITools/Models/Order.cs -src/Org.OpenAPITools/Models/Pet.cs -src/Org.OpenAPITools/Models/Tag.cs -src/Org.OpenAPITools/Models/User.cs -src/Org.OpenAPITools/Modules/PetModule.cs -src/Org.OpenAPITools/Modules/StoreModule.cs -src/Org.OpenAPITools/Modules/UserModule.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj -src/Org.OpenAPITools/Org.OpenAPITools.nuspec -src/Org.OpenAPITools/Utils/LocalDateConverter.cs -src/Org.OpenAPITools/Utils/Parameters.cs -src/Org.OpenAPITools/packages.config diff --git a/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION b/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01f..000000000000 --- a/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln b/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln deleted file mode 100644 index 757078a1383c..000000000000 --- a/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}" -EndProject -Global -GlobalSection(SolutionConfigurationPlatforms) = preSolution -Debug|Any CPU = Debug|Any CPU -Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU -EndGlobalSection -GlobalSection(SolutionProperties) = preSolution -HideSolutionNode = FALSE -EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.csproj b/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.csproj deleted file mode 100644 index e1577197b6fc..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.csproj +++ /dev/null @@ -1,66 +0,0 @@ - - - - Debug - AnyCPU - {768B8DC6-54EE-4D40-9B20-7857E1D742A4} - Library - Properties - IO.Swagger.v2 - IO.Swagger - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\IO.Swagger.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\IO.Swagger.XML - - - - ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True - - - ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll - True - - - ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll - True - - - ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - - - - - - - - - - - - - - - - diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.nuspec b/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.nuspec deleted file mode 100644 index 360effbaf7f1..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.nuspec +++ /dev/null @@ -1,14 +0,0 @@ - - - - IO.Swagger - IO.Swagger - 1.0.0 - swagger-codegen - swagger-codegen - false - NancyFx IO.Swagger API - http://swagger.io/terms/ - https://www.apache.org/licenses/LICENSE-2.0.html - - \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/ApiResponse.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/ApiResponse.cs deleted file mode 100644 index ebaa3c8d4f16..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/ApiResponse.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace IO.Swagger.v2.Models -{ - /// - /// Describes the result of uploading an image resource - /// - public sealed class ApiResponse: IEquatable - { - /// - /// Code - /// - public int? Code { get; private set; } - - /// - /// Type - /// - public string Type { get; private set; } - - /// - /// Message - /// - public string Message { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use ApiResponse.Builder() for instance creation instead. - /// - [Obsolete] - public ApiResponse() - { - } - - private ApiResponse(int? Code, string Type, string Message) - { - - this.Code = Code; - - this.Type = Type; - - this.Message = Message; - - } - - /// - /// Returns builder of ApiResponse. - /// - /// ApiResponseBuilder - public static ApiResponseBuilder Builder() - { - return new ApiResponseBuilder(); - } - - /// - /// Returns ApiResponseBuilder with properties set. - /// Use it to change properties. - /// - /// ApiResponseBuilder - public ApiResponseBuilder With() - { - return Builder() - .Code(Code) - .Type(Type) - .Message(Message); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(ApiResponse other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are equals, false otherwise - public static bool operator == (ApiResponse left, ApiResponse right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are not equals, false otherwise - public static bool operator != (ApiResponse left, ApiResponse right) - { - return !Equals(left, right); - } - - /// - /// Builder of ApiResponse. - /// - public sealed class ApiResponseBuilder - { - private int? _Code; - private string _Type; - private string _Message; - - internal ApiResponseBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for ApiResponse.Code property. - /// - /// Code - public ApiResponseBuilder Code(int? value) - { - _Code = value; - return this; - } - - /// - /// Sets value for ApiResponse.Type property. - /// - /// Type - public ApiResponseBuilder Type(string value) - { - _Type = value; - return this; - } - - /// - /// Sets value for ApiResponse.Message property. - /// - /// Message - public ApiResponseBuilder Message(string value) - { - _Message = value; - return this; - } - - - /// - /// Builds instance of ApiResponse. - /// - /// ApiResponse - public ApiResponse Build() - { - Validate(); - return new ApiResponse( - Code: _Code, - Type: _Type, - Message: _Message - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Category.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Category.cs deleted file mode 100644 index bf811614b37f..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Category.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace IO.Swagger.v2.Models -{ - /// - /// A category for a pet - /// - public sealed class Category: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Category.Builder() for instance creation instead. - /// - [Obsolete] - public Category() - { - } - - private Category(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Category. - /// - /// CategoryBuilder - public static CategoryBuilder Builder() - { - return new CategoryBuilder(); - } - - /// - /// Returns CategoryBuilder with properties set. - /// Use it to change properties. - /// - /// CategoryBuilder - public CategoryBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Category other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are equals, false otherwise - public static bool operator == (Category left, Category right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are not equals, false otherwise - public static bool operator != (Category left, Category right) - { - return !Equals(left, right); - } - - /// - /// Builder of Category. - /// - public sealed class CategoryBuilder - { - private long? _Id; - private string _Name; - - internal CategoryBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Category.Id property. - /// - /// Id - public CategoryBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Category.Name property. - /// - /// Name - public CategoryBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Category. - /// - /// Category - public Category Build() - { - Validate(); - return new Category( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Order.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Order.cs deleted file mode 100644 index 0495a36f138c..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Order.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace IO.Swagger.v2.Models -{ - /// - /// An order for a pets from the pet store - /// - public sealed class Order: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// PetId - /// - public long? PetId { get; private set; } - - /// - /// Quantity - /// - public int? Quantity { get; private set; } - - /// - /// ShipDate - /// - public ZonedDateTime? ShipDate { get; private set; } - - /// - /// Order Status - /// - public StatusEnum? Status { get; private set; } - - /// - /// Complete - /// - public bool? Complete { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Order.Builder() for instance creation instead. - /// - [Obsolete] - public Order() - { - } - - private Order(long? Id, long? PetId, int? Quantity, ZonedDateTime? ShipDate, StatusEnum? Status, bool? Complete) - { - - this.Id = Id; - - this.PetId = PetId; - - this.Quantity = Quantity; - - this.ShipDate = ShipDate; - - this.Status = Status; - - this.Complete = Complete; - - } - - /// - /// Returns builder of Order. - /// - /// OrderBuilder - public static OrderBuilder Builder() - { - return new OrderBuilder(); - } - - /// - /// Returns OrderBuilder with properties set. - /// Use it to change properties. - /// - /// OrderBuilder - public OrderBuilder With() - { - return Builder() - .Id(Id) - .PetId(PetId) - .Quantity(Quantity) - .ShipDate(ShipDate) - .Status(Status) - .Complete(Complete); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Order other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are equals, false otherwise - public static bool operator == (Order left, Order right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are not equals, false otherwise - public static bool operator != (Order left, Order right) - { - return !Equals(left, right); - } - - /// - /// Builder of Order. - /// - public sealed class OrderBuilder - { - private long? _Id; - private long? _PetId; - private int? _Quantity; - private ZonedDateTime? _ShipDate; - private StatusEnum? _Status; - private bool? _Complete; - - internal OrderBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - _Complete = false; - } - - /// - /// Sets value for Order.Id property. - /// - /// Id - public OrderBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Order.PetId property. - /// - /// PetId - public OrderBuilder PetId(long? value) - { - _PetId = value; - return this; - } - - /// - /// Sets value for Order.Quantity property. - /// - /// Quantity - public OrderBuilder Quantity(int? value) - { - _Quantity = value; - return this; - } - - /// - /// Sets value for Order.ShipDate property. - /// - /// ShipDate - public OrderBuilder ShipDate(ZonedDateTime? value) - { - _ShipDate = value; - return this; - } - - /// - /// Sets value for Order.Status property. - /// - /// Order Status - public OrderBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - /// - /// Sets value for Order.Complete property. - /// - /// Complete - public OrderBuilder Complete(bool? value) - { - _Complete = value; - return this; - } - - - /// - /// Builds instance of Order. - /// - /// Order - public Order Build() - { - Validate(); - return new Order( - Id: _Id, - PetId: _PetId, - Quantity: _Quantity, - ShipDate: _ShipDate, - Status: _Status, - Complete: _Complete - ); - } - - private void Validate() - { - } - } - - - public enum StatusEnum { Placed, Approved, Delivered }; - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Pet.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Pet.cs deleted file mode 100644 index f945a0fdd78a..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Pet.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace IO.Swagger.v2.Models -{ - /// - /// A pet for sale in the pet store - /// - public sealed class Pet: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Category - /// - public Category Category { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - /// - /// PhotoUrls - /// - public List PhotoUrls { get; private set; } - - /// - /// Tags - /// - public List Tags { get; private set; } - - /// - /// pet status in the store - /// - public StatusEnum? Status { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Pet.Builder() for instance creation instead. - /// - [Obsolete] - public Pet() - { - } - - private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) - { - - this.Id = Id; - - this.Category = Category; - - this.Name = Name; - - this.PhotoUrls = PhotoUrls; - - this.Tags = Tags; - - this.Status = Status; - - } - - /// - /// Returns builder of Pet. - /// - /// PetBuilder - public static PetBuilder Builder() - { - return new PetBuilder(); - } - - /// - /// Returns PetBuilder with properties set. - /// Use it to change properties. - /// - /// PetBuilder - public PetBuilder With() - { - return Builder() - .Id(Id) - .Category(Category) - .Name(Name) - .PhotoUrls(PhotoUrls) - .Tags(Tags) - .Status(Status); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Pet other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are equals, false otherwise - public static bool operator == (Pet left, Pet right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are not equals, false otherwise - public static bool operator != (Pet left, Pet right) - { - return !Equals(left, right); - } - - /// - /// Builder of Pet. - /// - public sealed class PetBuilder - { - private long? _Id; - private Category _Category; - private string _Name; - private List _PhotoUrls; - private List _Tags; - private StatusEnum? _Status; - - internal PetBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Pet.Id property. - /// - /// Id - public PetBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Pet.Category property. - /// - /// Category - public PetBuilder Category(Category value) - { - _Category = value; - return this; - } - - /// - /// Sets value for Pet.Name property. - /// - /// Name - public PetBuilder Name(string value) - { - _Name = value; - return this; - } - - /// - /// Sets value for Pet.PhotoUrls property. - /// - /// PhotoUrls - public PetBuilder PhotoUrls(List value) - { - _PhotoUrls = value; - return this; - } - - /// - /// Sets value for Pet.Tags property. - /// - /// Tags - public PetBuilder Tags(List value) - { - _Tags = value; - return this; - } - - /// - /// Sets value for Pet.Status property. - /// - /// pet status in the store - public PetBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - - /// - /// Builds instance of Pet. - /// - /// Pet - public Pet Build() - { - Validate(); - return new Pet( - Id: _Id, - Category: _Category, - Name: _Name, - PhotoUrls: _PhotoUrls, - Tags: _Tags, - Status: _Status - ); - } - - private void Validate() - { - if (_Name == null) - { - throw new ArgumentException("Name is a required property for Pet and cannot be null"); - } - if (_PhotoUrls == null) - { - throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); - } - } - } - - - public enum StatusEnum { Available, Pending, Sold }; - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Tag.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Tag.cs deleted file mode 100644 index 02d1e40f1ece..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/Tag.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace IO.Swagger.v2.Models -{ - /// - /// A tag for a pet - /// - public sealed class Tag: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Tag.Builder() for instance creation instead. - /// - [Obsolete] - public Tag() - { - } - - private Tag(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Tag. - /// - /// TagBuilder - public static TagBuilder Builder() - { - return new TagBuilder(); - } - - /// - /// Returns TagBuilder with properties set. - /// Use it to change properties. - /// - /// TagBuilder - public TagBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Tag other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are equals, false otherwise - public static bool operator == (Tag left, Tag right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are not equals, false otherwise - public static bool operator != (Tag left, Tag right) - { - return !Equals(left, right); - } - - /// - /// Builder of Tag. - /// - public sealed class TagBuilder - { - private long? _Id; - private string _Name; - - internal TagBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Tag.Id property. - /// - /// Id - public TagBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Tag.Name property. - /// - /// Name - public TagBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Tag. - /// - /// Tag - public Tag Build() - { - Validate(); - return new Tag( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/User.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/User.cs deleted file mode 100644 index 99f401750dfc..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Models/User.cs +++ /dev/null @@ -1,285 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace IO.Swagger.v2.Models -{ - /// - /// A User who is purchasing from the pet store - /// - public sealed class User: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Username - /// - public string Username { get; private set; } - - /// - /// FirstName - /// - public string FirstName { get; private set; } - - /// - /// LastName - /// - public string LastName { get; private set; } - - /// - /// Email - /// - public string Email { get; private set; } - - /// - /// Password - /// - public string Password { get; private set; } - - /// - /// Phone - /// - public string Phone { get; private set; } - - /// - /// User Status - /// - public int? UserStatus { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use User.Builder() for instance creation instead. - /// - [Obsolete] - public User() - { - } - - private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) - { - - this.Id = Id; - - this.Username = Username; - - this.FirstName = FirstName; - - this.LastName = LastName; - - this.Email = Email; - - this.Password = Password; - - this.Phone = Phone; - - this.UserStatus = UserStatus; - - } - - /// - /// Returns builder of User. - /// - /// UserBuilder - public static UserBuilder Builder() - { - return new UserBuilder(); - } - - /// - /// Returns UserBuilder with properties set. - /// Use it to change properties. - /// - /// UserBuilder - public UserBuilder With() - { - return Builder() - .Id(Id) - .Username(Username) - .FirstName(FirstName) - .LastName(LastName) - .Email(Email) - .Password(Password) - .Phone(Phone) - .UserStatus(UserStatus); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(User other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are equals, false otherwise - public static bool operator == (User left, User right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are not equals, false otherwise - public static bool operator != (User left, User right) - { - return !Equals(left, right); - } - - /// - /// Builder of User. - /// - public sealed class UserBuilder - { - private long? _Id; - private string _Username; - private string _FirstName; - private string _LastName; - private string _Email; - private string _Password; - private string _Phone; - private int? _UserStatus; - - internal UserBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for User.Id property. - /// - /// Id - public UserBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for User.Username property. - /// - /// Username - public UserBuilder Username(string value) - { - _Username = value; - return this; - } - - /// - /// Sets value for User.FirstName property. - /// - /// FirstName - public UserBuilder FirstName(string value) - { - _FirstName = value; - return this; - } - - /// - /// Sets value for User.LastName property. - /// - /// LastName - public UserBuilder LastName(string value) - { - _LastName = value; - return this; - } - - /// - /// Sets value for User.Email property. - /// - /// Email - public UserBuilder Email(string value) - { - _Email = value; - return this; - } - - /// - /// Sets value for User.Password property. - /// - /// Password - public UserBuilder Password(string value) - { - _Password = value; - return this; - } - - /// - /// Sets value for User.Phone property. - /// - /// Phone - public UserBuilder Phone(string value) - { - _Phone = value; - return this; - } - - /// - /// Sets value for User.UserStatus property. - /// - /// User Status - public UserBuilder UserStatus(int? value) - { - _UserStatus = value; - return this; - } - - - /// - /// Builds instance of User. - /// - /// User - public User Build() - { - Validate(); - return new User( - Id: _Id, - Username: _Username, - FirstName: _FirstName, - LastName: _LastName, - Email: _Email, - Password: _Password, - Phone: _Phone, - UserStatus: _UserStatus - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/PetModule.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/PetModule.cs deleted file mode 100644 index 6b3e8cc1db84..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/PetModule.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using IO.Swagger.v2.Models; -using IO.Swagger.v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace IO.Swagger.v2.Modules -{ - /// - /// Status values that need to be considered for filter - /// - public enum FindPetsByStatusStatusEnum - { - available = 1, - pending = 2, - sold = 3 - }; - - - /// - /// Module processing requests of Pet domain. - /// - public sealed class PetModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public PetModule(PetService service) : base("/v2") - { - Post["/pet", true] = async (parameters, ct) => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'AddPet'"); - - await service.AddPet(Context, body); - return new Response { ContentType = "application/xml"}; - }; - - Delete["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); - - await service.DeletePet(Context, petId, apiKey); - return new Response { ContentType = "application/xml"}; - }; - - Get["/pet/findByStatus", true] = async (parameters, ct) => - { - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); - Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); - - return await service.FindPetsByStatus(Context, status).ToArray(); - }; - - Get["/pet/findByTags", true] = async (parameters, ct) => - { - var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); - Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); - - return await service.FindPetsByTags(Context, tags).ToArray(); - }; - - Get["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); - - return await service.GetPetById(Context, petId); - }; - - Put["/pet", true] = async (parameters, ct) => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'UpdatePet'"); - - await service.UpdatePet(Context, body); - return new Response { ContentType = "application/xml"}; - }; - - Post["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); - - await service.UpdatePetWithForm(Context, petId, name, status); - return new Response { ContentType = "application/xml"}; - }; - - Post["/pet/{petId}/uploadImage", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); - var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); - - return await service.UploadFile(Context, petId, additionalMetadata, file); - }; - } - } - - /// - /// Service handling Pet requests. - /// - public interface PetService - { - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - Task AddPet(NancyContext context, Pet body); - - /// - /// - /// - /// Context of request - /// Pet id to delete - /// (optional) - /// - Task DeletePet(NancyContext context, long? petId, string apiKey); - - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Context of request - /// Status values that need to be considered for filter - /// List<Pet> - Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); - - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Context of request - /// Tags to filter by - /// List<Pet> - Task> FindPetsByTags(NancyContext context, List tags); - - /// - /// Returns a single pet - /// - /// Context of request - /// ID of pet to return - /// Pet - Task GetPetById(NancyContext context, long? petId); - - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - Task UpdatePet(NancyContext context, Pet body); - - /// - /// - /// - /// Context of request - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status); - - /// - /// - /// - /// Context of request - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); - } - - /// - /// Abstraction of PetService. - /// - public abstract class AbstractPetService: PetService - { - public virtual Task AddPet(NancyContext context, Pet body) - { - return AddPet(body); - } - - public virtual Task DeletePet(NancyContext context, long? petId, string apiKey) - { - return DeletePet(petId, apiKey); - } - - public virtual Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) - { - return FindPetsByStatus(status); - } - - public virtual Task> FindPetsByTags(NancyContext context, List tags) - { - return FindPetsByTags(tags); - } - - public virtual Task GetPetById(NancyContext context, long? petId) - { - return GetPetById(petId); - } - - public virtual Task UpdatePet(NancyContext context, Pet body) - { - return UpdatePet(body); - } - - public virtual Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status) - { - return UpdatePetWithForm(petId, name, status); - } - - public virtual Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) - { - return UploadFile(petId, additionalMetadata, file); - } - - protected abstract Task AddPet(Pet body); - - protected abstract Task DeletePet(long? petId, string apiKey); - - protected abstract Task> FindPetsByStatus(FindPetsByStatusStatusEnum? status); - - protected abstract Task> FindPetsByTags(List tags); - - protected abstract Task GetPetById(long? petId); - - protected abstract Task UpdatePet(Pet body); - - protected abstract Task UpdatePetWithForm(long? petId, string name, string status); - - protected abstract Task UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/StoreModule.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/StoreModule.cs deleted file mode 100644 index 30c462342561..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/StoreModule.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using IO.Swagger.v2.Models; -using IO.Swagger.v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace IO.Swagger.v2.Modules -{ - - /// - /// Module processing requests of Store domain. - /// - public sealed class StoreModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public StoreModule(StoreService service) : base("/v2") - { - Delete["/store/order/{orderId}", true] = async (parameters, ct) => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); - - await service.DeleteOrder(Context, orderId); - return new Response { ContentType = "application/xml"}; - }; - - Get["/store/inventory", true] = async (parameters, ct) => - { - - return await service.GetInventory(Context); - }; - - Get["/store/order/{orderId}", true] = async (parameters, ct) => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); - - return await service.GetOrderById(Context, orderId); - }; - - Post["/store/order", true] = async (parameters, ct) => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'PlaceOrder'"); - - return await service.PlaceOrder(Context, body); - }; - } - } - - /// - /// Service handling Store requests. - /// - public interface StoreService - { - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Context of request - /// ID of the order that needs to be deleted - /// - Task DeleteOrder(NancyContext context, string orderId); - - /// - /// Returns a map of status codes to quantities - /// - /// Context of request - /// Dictionary<string, int?> - Task> GetInventory(NancyContext context); - - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - /// - /// Context of request - /// ID of pet that needs to be fetched - /// Order - Task GetOrderById(NancyContext context, long? orderId); - - /// - /// - /// - /// Context of request - /// order placed for purchasing the pet - /// Order - Task PlaceOrder(NancyContext context, Order body); - } - - /// - /// Abstraction of StoreService. - /// - public abstract class AbstractStoreService: StoreService - { - public virtual Task DeleteOrder(NancyContext context, string orderId) - { - return DeleteOrder(orderId); - } - - public virtual Task> GetInventory(NancyContext context) - { - return GetInventory(); - } - - public virtual Task GetOrderById(NancyContext context, long? orderId) - { - return GetOrderById(orderId); - } - - public virtual Task PlaceOrder(NancyContext context, Order body) - { - return PlaceOrder(body); - } - - protected abstract Task DeleteOrder(string orderId); - - protected abstract Task> GetInventory(); - - protected abstract Task GetOrderById(long? orderId); - - protected abstract Task PlaceOrder(Order body); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/UserModule.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/UserModule.cs deleted file mode 100644 index 4faf9e38dbd3..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Modules/UserModule.cs +++ /dev/null @@ -1,234 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using IO.Swagger.v2.Models; -using IO.Swagger.v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace IO.Swagger.v2.Modules -{ - - /// - /// Module processing requests of User domain. - /// - public sealed class UserModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public UserModule(UserService service) : base("/v2") - { - Post["/user", true] = async (parameters, ct) => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUser'"); - - await service.CreateUser(Context, body); - return new Response { ContentType = "application/xml"}; - }; - - Post["/user/createWithArray", true] = async (parameters, ct) => - { - var body = this.Bind>(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUsersWithArrayInput'"); - - await service.CreateUsersWithArrayInput(Context, body); - return new Response { ContentType = "application/xml"}; - }; - - Post["/user/createWithList", true] = async (parameters, ct) => - { - var body = this.Bind>(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUsersWithListInput'"); - - await service.CreateUsersWithListInput(Context, body); - return new Response { ContentType = "application/xml"}; - }; - - Delete["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); - - await service.DeleteUser(Context, username); - return new Response { ContentType = "application/xml"}; - }; - - Get["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); - - return await service.GetUserByName(Context, username); - }; - - Get["/user/login", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); - var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); - - Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); - - return await service.LoginUser(Context, username, password); - }; - - Get["/user/logout", true] = async (parameters, ct) => - { - - await service.LogoutUser(Context); - return new Response { ContentType = "application/xml"}; - }; - - Put["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - var body = this.Bind(); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); - - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'UpdateUser'"); - - await service.UpdateUser(Context, username, body); - return new Response { ContentType = "application/xml"}; - }; - } - } - - /// - /// Service handling User requests. - /// - public interface UserService - { - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// Created user object - /// - Task CreateUser(NancyContext context, User body); - - /// - /// - /// - /// Context of request - /// List of user object - /// - Task CreateUsersWithArrayInput(NancyContext context, List body); - - /// - /// - /// - /// Context of request - /// List of user object - /// - Task CreateUsersWithListInput(NancyContext context, List body); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// The name that needs to be deleted - /// - Task DeleteUser(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The name that needs to be fetched. Use user1 for testing. - /// User - Task GetUserByName(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The user name for login - /// The password for login in clear text - /// string - Task LoginUser(NancyContext context, string username, string password); - - /// - /// - /// - /// Context of request - /// - Task LogoutUser(NancyContext context); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// name that need to be deleted - /// Updated user object - /// - Task UpdateUser(NancyContext context, string username, User body); - } - - /// - /// Abstraction of UserService. - /// - public abstract class AbstractUserService: UserService - { - public virtual Task CreateUser(NancyContext context, User body) - { - return CreateUser(body); - } - - public virtual Task CreateUsersWithArrayInput(NancyContext context, List body) - { - return CreateUsersWithArrayInput(body); - } - - public virtual Task CreateUsersWithListInput(NancyContext context, List body) - { - return CreateUsersWithListInput(body); - } - - public virtual Task DeleteUser(NancyContext context, string username) - { - return DeleteUser(username); - } - - public virtual Task GetUserByName(NancyContext context, string username) - { - return GetUserByName(username); - } - - public virtual Task LoginUser(NancyContext context, string username, string password) - { - return LoginUser(username, password); - } - - public virtual Task LogoutUser(NancyContext context) - { - return LogoutUser(); - } - - public virtual Task UpdateUser(NancyContext context, string username, User body) - { - return UpdateUser(username, body); - } - - protected abstract Task CreateUser(User body); - - protected abstract Task CreateUsersWithArrayInput(List body); - - protected abstract Task CreateUsersWithListInput(List body); - - protected abstract Task DeleteUser(string username); - - protected abstract Task GetUserByName(string username); - - protected abstract Task LoginUser(string username, string password); - - protected abstract Task LogoutUser(); - - protected abstract Task UpdateUser(string username, User body); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Utils/LocalDateConverter.cs deleted file mode 100644 index d801e962c6a5..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Utils/LocalDateConverter.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Nancy.Bootstrapper; -using Nancy.Json; -using NodaTime; -using NodaTime.Text; -using System; -using System.Collections.Generic; - -namespace IO.Swagger.v2.Utils -{ - /// - /// (De)serializes a to a string using - /// the RFC3339 - /// full-date format. - /// - public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup - { - public override IEnumerable SupportedTypes - { - get - { - yield return typeof(LocalDate); - yield return typeof(LocalDate?); - } - } - - public void Initialize(IPipelines pipelines) - { - JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); - } - - - public override object Serialize(object obj, JavaScriptSerializer serializer) - { - if (obj is LocalDate) - { - LocalDate localDate = (LocalDate)obj; - return LocalDatePattern.IsoPattern.Format(localDate); - } - return null; - } - - public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) - { - if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) - { - try - { - return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); - } - catch { } - } - return null; - } - } -} diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Utils/Parameters.cs b/samples/server/petstore/nancyfx-async/src/IO.Swagger/Utils/Parameters.cs deleted file mode 100644 index d21989457639..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/Utils/Parameters.cs +++ /dev/null @@ -1,450 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; -using Nancy; -using NodaTime; -using NodaTime.Text; -using Sharpility.Base; -using Sharpility.Extensions; -using Sharpility.Util; - -namespace IO.Swagger.v2.Utils -{ - internal static class Parameters - { - private static readonly IDictionary> Parsers = CreateParsers(); - - internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - var valueType = typeof(TValue); - var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); - var isNullable = default(TValue) == null; - string value = RawValueOf(parameters, request, name, parameterType); - Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); - if (value == null && isNullable) - { - return default(TValue); - } - if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) - { - return EnumValueOf(name, value); - } - return ValueOf(parameters, name, value, valueType, request, parameterType); - } - - private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - try - { - switch (parameterType) - { - case ParameterType.Query: - string querValue = request.Query[name]; - return querValue; - case ParameterType.Path: - string pathValue = parameters[name]; - return pathValue; - case ParameterType.Header: - var headerValue = request.Headers[name]; - return headerValue != null ? string.Join(",", headerValue) : null; - } - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); - } - throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); - } - - private static TValue EnumValueOf(string name, string value) - { - var valueType = typeof(TValue); - var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); - Preconditions.IsNotNull(enumType, () => new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); - var values = Enum.GetValues(enumType); - foreach (var entry in values) - { - if (entry.ToString().EqualsIgnoreCases(value) - || ((int)entry).ToString().EqualsIgnoreCases(value)) - { - return (TValue)entry; - } - } - throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", - name, value, Strings.ToString(values))); - } - - private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) - { - var parser = Parsers.GetIfPresent(valueType); - if (parser != null) - { - return ParseValueUsing(name, value, valueType, parser); - } - if (parameterType == ParameterType.Path) - { - return DynamicValueOf(parameters, name); - } - if (parameterType == ParameterType.Query) - { - return DynamicValueOf(request.Query, name); - } - throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); - } - - private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) - { - var result = parser(Parameter.Of(name, value)); - try - { - return (TValue)result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + - "Received: '{2}', expected: '{3}'.", - name, value, result.GetType(), valueType)); - } - } - - private static TValue DynamicValueOf(dynamic parameters, string name) - { - string value = parameters[name]; - try - { - TValue result = parameters[name]; - return result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + - "Expected type: '{2}' is not supported", - name, value, typeof(TValue))); - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", - name, typeof(TValue)), e); - } - } - - private static IDictionary> CreateParsers() - { - var parsers = ImmutableDictionary.CreateBuilder>(); - parsers.Put(typeof(string), value => value.Value); - parsers.Put(typeof(bool), SafeParse(bool.Parse)); - parsers.Put(typeof(bool?), SafeParse(bool.Parse)); - parsers.Put(typeof(byte), SafeParse(byte.Parse)); - parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); - parsers.Put(typeof(short), SafeParse(short.Parse)); - parsers.Put(typeof(short?), SafeParse(short.Parse)); - parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); - parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); - parsers.Put(typeof(int), SafeParse(int.Parse)); - parsers.Put(typeof(int?), SafeParse(int.Parse)); - parsers.Put(typeof(uint), SafeParse(uint.Parse)); - parsers.Put(typeof(uint?), SafeParse(uint.Parse)); - parsers.Put(typeof(long), SafeParse(long.Parse)); - parsers.Put(typeof(long?), SafeParse(long.Parse)); - parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); - parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); - parsers.Put(typeof(float), SafeParse(float.Parse)); - parsers.Put(typeof(float?), SafeParse(float.Parse)); - parsers.Put(typeof(double), SafeParse(double.Parse)); - parsers.Put(typeof(double?), SafeParse(double.Parse)); - parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); - parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); - parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); - parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); - parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); - parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); - parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); - parsers.Put(typeof(IList), ImmutableListParse(value => value)); - parsers.Put(typeof(List), ListParse(value => value)); - parsers.Put(typeof(ISet), ImmutableListParse(value => value)); - parsers.Put(typeof(HashSet), SetParse(value => value)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(List), NullableListParse(bool.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(List), ListParse(byte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); - parsers.Put(typeof(HashSet), SetParse(byte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(List), ListParse(sbyte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); - parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); - parsers.Put(typeof(List), ListParse(short.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); - parsers.Put(typeof(HashSet), SetParse(short.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(List), ListParse(ushort.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); - parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(List), NullableListParse(int.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(List), ListParse(uint.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); - parsers.Put(typeof(HashSet), SetParse(uint.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(List), NullableListParse(long.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(List), ListParse(ulong.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); - parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(List), NullableListParse(float.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(List), NullableListParse(double.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(List), NullableListParse(decimal.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); - parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); - - return parsers.ToImmutableDictionary(); - } - - private static Func SafeParse(Func parse) - { - return parameter => - { - try - { - return parse(parameter.Value); - } - catch (OverflowException) - { - throw ParameterOutOfRange(parameter, typeof(T)); - } - catch (FormatException) - { - throw InvalidParameterFormat(parameter, typeof(T)); - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", - parameter.Name, parameter.Value, typeof(T)), e); - } - }; - } - - private static Func NullableListParse(Func itemParser) where T: struct - { - return ListParse(it => it.ToNullable(itemParser)); - } - - private static Func ListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new List(); - } - return ParseCollection(parameter.Value, itemParser).ToList(); - }; - } - - private static Func NullableImmutableListParse(Func itemParser) where T: struct - { - return ImmutableListParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Lists.EmptyList(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableList(); - }; - } - - private static Func NullableSetParse(Func itemParser) where T: struct - { - return SetParse(it => it.ToNullable(itemParser)); - } - - private static Func SetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new HashSet(); - } - return ParseCollection(parameter.Value, itemParser).ToSet(); - }; - } - - private static Func NullableImmutableSetParse(Func itemParser) where T: struct - { - return ImmutableSetParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableSetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Sets.EmptySet(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); - }; - } - - private static ZonedDateTime ParseZonedDateTime(string value) - { - var dateTime = DateTime.Parse(value); - return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); - } - - private static LocalDate ParseLocalDate(string value) - { - return LocalDatePattern.IsoPattern.Parse(value).Value; - } - - private static LocalTime ParseLocalTime(string value) - { - return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; - } - - private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static IEnumerable ParseCollection(string value, Func itemParser) - { - var results = value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser); - return results; - } - - public static T? ToNullable(this string s, Func itemParser) where T : struct - { - T? result = new T?(); - try - { - if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) - { - result = itemParser(s); - } - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); - } - return result; - } - - private class Parameter - { - internal string Name { get; private set; } - internal string Value { get; private set; } - - private Parameter(string name, string value) - { - Name = name; - Value = value; - } - - internal static Parameter Of(string name, string value) - { - return new Parameter(name, value); - } - } - } - - internal enum ParameterType - { - Undefined, - Query, - Path, - Header - } -} diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/packages.config b/samples/server/petstore/nancyfx-async/src/IO.Swagger/packages.config deleted file mode 100644 index e3401566e5d2..000000000000 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs deleted file mode 100644 index 2c35c0c5fd9b..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// Describes the result of uploading an image resource - /// - public sealed class ApiResponse: IEquatable - { - /// - /// Code - /// - public int? Code { get; private set; } - - /// - /// Type - /// - public string Type { get; private set; } - - /// - /// Message - /// - public string Message { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use ApiResponse.Builder() for instance creation instead. - /// - [Obsolete] - public ApiResponse() - { - } - - private ApiResponse(int? Code, string Type, string Message) - { - - this.Code = Code; - - this.Type = Type; - - this.Message = Message; - - } - - /// - /// Returns builder of ApiResponse. - /// - /// ApiResponseBuilder - public static ApiResponseBuilder Builder() - { - return new ApiResponseBuilder(); - } - - /// - /// Returns ApiResponseBuilder with properties set. - /// Use it to change properties. - /// - /// ApiResponseBuilder - public ApiResponseBuilder With() - { - return Builder() - .Code(Code) - .Type(Type) - .Message(Message); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(ApiResponse other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are equals, false otherwise - public static bool operator == (ApiResponse left, ApiResponse right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are not equals, false otherwise - public static bool operator != (ApiResponse left, ApiResponse right) - { - return !Equals(left, right); - } - - /// - /// Builder of ApiResponse. - /// - public sealed class ApiResponseBuilder - { - private int? _Code; - private string _Type; - private string _Message; - - internal ApiResponseBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for ApiResponse.Code property. - /// - /// Code - public ApiResponseBuilder Code(int? value) - { - _Code = value; - return this; - } - - /// - /// Sets value for ApiResponse.Type property. - /// - /// Type - public ApiResponseBuilder Type(string value) - { - _Type = value; - return this; - } - - /// - /// Sets value for ApiResponse.Message property. - /// - /// Message - public ApiResponseBuilder Message(string value) - { - _Message = value; - return this; - } - - - /// - /// Builds instance of ApiResponse. - /// - /// ApiResponse - public ApiResponse Build() - { - Validate(); - return new ApiResponse( - Code: _Code, - Type: _Type, - Message: _Message - ); - } - - private void Validate() - { - } - } - - - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs deleted file mode 100644 index 3cadeec39fe5..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// A category for a pet - /// - public sealed class Category: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Category.Builder() for instance creation instead. - /// - [Obsolete] - public Category() - { - } - - private Category(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Category. - /// - /// CategoryBuilder - public static CategoryBuilder Builder() - { - return new CategoryBuilder(); - } - - /// - /// Returns CategoryBuilder with properties set. - /// Use it to change properties. - /// - /// CategoryBuilder - public CategoryBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Category other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are equals, false otherwise - public static bool operator == (Category left, Category right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are not equals, false otherwise - public static bool operator != (Category left, Category right) - { - return !Equals(left, right); - } - - /// - /// Builder of Category. - /// - public sealed class CategoryBuilder - { - private long? _Id; - private string _Name; - - internal CategoryBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Category.Id property. - /// - /// Id - public CategoryBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Category.Name property. - /// - /// Name - public CategoryBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Category. - /// - /// Category - public Category Build() - { - Validate(); - return new Category( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs deleted file mode 100644 index 3ef8e9133c7a..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// An order for a pets from the pet store - /// - public sealed class Order: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// PetId - /// - public long? PetId { get; private set; } - - /// - /// Quantity - /// - public int? Quantity { get; private set; } - - /// - /// ShipDate - /// - public DateTime? ShipDate { get; private set; } - - /// - /// Order Status - /// - public StatusEnum? Status { get; private set; } - - /// - /// Complete - /// - public bool? Complete { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Order.Builder() for instance creation instead. - /// - [Obsolete] - public Order() - { - } - - private Order(long? Id, long? PetId, int? Quantity, DateTime? ShipDate, StatusEnum? Status, bool? Complete) - { - - this.Id = Id; - - this.PetId = PetId; - - this.Quantity = Quantity; - - this.ShipDate = ShipDate; - - this.Status = Status; - - this.Complete = Complete; - - } - - /// - /// Returns builder of Order. - /// - /// OrderBuilder - public static OrderBuilder Builder() - { - return new OrderBuilder(); - } - - /// - /// Returns OrderBuilder with properties set. - /// Use it to change properties. - /// - /// OrderBuilder - public OrderBuilder With() - { - return Builder() - .Id(Id) - .PetId(PetId) - .Quantity(Quantity) - .ShipDate(ShipDate) - .Status(Status) - .Complete(Complete); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Order other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are equals, false otherwise - public static bool operator == (Order left, Order right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are not equals, false otherwise - public static bool operator != (Order left, Order right) - { - return !Equals(left, right); - } - - /// - /// Builder of Order. - /// - public sealed class OrderBuilder - { - private long? _Id; - private long? _PetId; - private int? _Quantity; - private DateTime? _ShipDate; - private StatusEnum? _Status; - private bool? _Complete; - - internal OrderBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - _Complete = false; - } - - /// - /// Sets value for Order.Id property. - /// - /// Id - public OrderBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Order.PetId property. - /// - /// PetId - public OrderBuilder PetId(long? value) - { - _PetId = value; - return this; - } - - /// - /// Sets value for Order.Quantity property. - /// - /// Quantity - public OrderBuilder Quantity(int? value) - { - _Quantity = value; - return this; - } - - /// - /// Sets value for Order.ShipDate property. - /// - /// ShipDate - public OrderBuilder ShipDate(DateTime? value) - { - _ShipDate = value; - return this; - } - - /// - /// Sets value for Order.Status property. - /// - /// Order Status - public OrderBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - /// - /// Sets value for Order.Complete property. - /// - /// Complete - public OrderBuilder Complete(bool? value) - { - _Complete = value; - return this; - } - - - /// - /// Builds instance of Order. - /// - /// Order - public Order Build() - { - Validate(); - return new Order( - Id: _Id, - PetId: _PetId, - Quantity: _Quantity, - ShipDate: _ShipDate, - Status: _Status, - Complete: _Complete - ); - } - - private void Validate() - { - } - } - - - public enum StatusEnum { Placed, Approved, Delivered }; - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs deleted file mode 100644 index a9e839bb9692..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// A pet for sale in the pet store - /// - public sealed class Pet: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Category - /// - public Category Category { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - /// - /// PhotoUrls - /// - public List PhotoUrls { get; private set; } - - /// - /// Tags - /// - public List Tags { get; private set; } - - /// - /// pet status in the store - /// - public StatusEnum? Status { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Pet.Builder() for instance creation instead. - /// - [Obsolete] - public Pet() - { - } - - private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) - { - - this.Id = Id; - - this.Category = Category; - - this.Name = Name; - - this.PhotoUrls = PhotoUrls; - - this.Tags = Tags; - - this.Status = Status; - - } - - /// - /// Returns builder of Pet. - /// - /// PetBuilder - public static PetBuilder Builder() - { - return new PetBuilder(); - } - - /// - /// Returns PetBuilder with properties set. - /// Use it to change properties. - /// - /// PetBuilder - public PetBuilder With() - { - return Builder() - .Id(Id) - .Category(Category) - .Name(Name) - .PhotoUrls(PhotoUrls) - .Tags(Tags) - .Status(Status); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Pet other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are equals, false otherwise - public static bool operator == (Pet left, Pet right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are not equals, false otherwise - public static bool operator != (Pet left, Pet right) - { - return !Equals(left, right); - } - - /// - /// Builder of Pet. - /// - public sealed class PetBuilder - { - private long? _Id; - private Category _Category; - private string _Name; - private List _PhotoUrls; - private List _Tags; - private StatusEnum? _Status; - - internal PetBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Pet.Id property. - /// - /// Id - public PetBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Pet.Category property. - /// - /// Category - public PetBuilder Category(Category value) - { - _Category = value; - return this; - } - - /// - /// Sets value for Pet.Name property. - /// - /// Name - public PetBuilder Name(string value) - { - _Name = value; - return this; - } - - /// - /// Sets value for Pet.PhotoUrls property. - /// - /// PhotoUrls - public PetBuilder PhotoUrls(List value) - { - _PhotoUrls = value; - return this; - } - - /// - /// Sets value for Pet.Tags property. - /// - /// Tags - public PetBuilder Tags(List value) - { - _Tags = value; - return this; - } - - /// - /// Sets value for Pet.Status property. - /// - /// pet status in the store - public PetBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - - /// - /// Builds instance of Pet. - /// - /// Pet - public Pet Build() - { - Validate(); - return new Pet( - Id: _Id, - Category: _Category, - Name: _Name, - PhotoUrls: _PhotoUrls, - Tags: _Tags, - Status: _Status - ); - } - - private void Validate() - { - if (_Name == null) - { - throw new ArgumentException("Name is a required property for Pet and cannot be null"); - } - if (_PhotoUrls == null) - { - throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); - } - } - } - - - public enum StatusEnum { Available, Pending, Sold }; - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs deleted file mode 100644 index e46182c334c5..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// A tag for a pet - /// - public sealed class Tag: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Tag.Builder() for instance creation instead. - /// - [Obsolete] - public Tag() - { - } - - private Tag(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Tag. - /// - /// TagBuilder - public static TagBuilder Builder() - { - return new TagBuilder(); - } - - /// - /// Returns TagBuilder with properties set. - /// Use it to change properties. - /// - /// TagBuilder - public TagBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Tag other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are equals, false otherwise - public static bool operator == (Tag left, Tag right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are not equals, false otherwise - public static bool operator != (Tag left, Tag right) - { - return !Equals(left, right); - } - - /// - /// Builder of Tag. - /// - public sealed class TagBuilder - { - private long? _Id; - private string _Name; - - internal TagBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Tag.Id property. - /// - /// Id - public TagBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Tag.Name property. - /// - /// Name - public TagBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Tag. - /// - /// Tag - public Tag Build() - { - Validate(); - return new Tag( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs deleted file mode 100644 index 29c94bbfefe3..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs +++ /dev/null @@ -1,285 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// A User who is purchasing from the pet store - /// - public sealed class User: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Username - /// - public string Username { get; private set; } - - /// - /// FirstName - /// - public string FirstName { get; private set; } - - /// - /// LastName - /// - public string LastName { get; private set; } - - /// - /// Email - /// - public string Email { get; private set; } - - /// - /// Password - /// - public string Password { get; private set; } - - /// - /// Phone - /// - public string Phone { get; private set; } - - /// - /// User Status - /// - public int? UserStatus { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use User.Builder() for instance creation instead. - /// - [Obsolete] - public User() - { - } - - private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) - { - - this.Id = Id; - - this.Username = Username; - - this.FirstName = FirstName; - - this.LastName = LastName; - - this.Email = Email; - - this.Password = Password; - - this.Phone = Phone; - - this.UserStatus = UserStatus; - - } - - /// - /// Returns builder of User. - /// - /// UserBuilder - public static UserBuilder Builder() - { - return new UserBuilder(); - } - - /// - /// Returns UserBuilder with properties set. - /// Use it to change properties. - /// - /// UserBuilder - public UserBuilder With() - { - return Builder() - .Id(Id) - .Username(Username) - .FirstName(FirstName) - .LastName(LastName) - .Email(Email) - .Password(Password) - .Phone(Phone) - .UserStatus(UserStatus); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(User other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are equals, false otherwise - public static bool operator == (User left, User right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are not equals, false otherwise - public static bool operator != (User left, User right) - { - return !Equals(left, right); - } - - /// - /// Builder of User. - /// - public sealed class UserBuilder - { - private long? _Id; - private string _Username; - private string _FirstName; - private string _LastName; - private string _Email; - private string _Password; - private string _Phone; - private int? _UserStatus; - - internal UserBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for User.Id property. - /// - /// Id - public UserBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for User.Username property. - /// - /// Username - public UserBuilder Username(string value) - { - _Username = value; - return this; - } - - /// - /// Sets value for User.FirstName property. - /// - /// FirstName - public UserBuilder FirstName(string value) - { - _FirstName = value; - return this; - } - - /// - /// Sets value for User.LastName property. - /// - /// LastName - public UserBuilder LastName(string value) - { - _LastName = value; - return this; - } - - /// - /// Sets value for User.Email property. - /// - /// Email - public UserBuilder Email(string value) - { - _Email = value; - return this; - } - - /// - /// Sets value for User.Password property. - /// - /// Password - public UserBuilder Password(string value) - { - _Password = value; - return this; - } - - /// - /// Sets value for User.Phone property. - /// - /// Phone - public UserBuilder Phone(string value) - { - _Phone = value; - return this; - } - - /// - /// Sets value for User.UserStatus property. - /// - /// User Status - public UserBuilder UserStatus(int? value) - { - _UserStatus = value; - return this; - } - - - /// - /// Builds instance of User. - /// - /// User - public User Build() - { - Validate(); - return new User( - Id: _Id, - Username: _Username, - FirstName: _FirstName, - LastName: _LastName, - Email: _Email, - Password: _Password, - Phone: _Phone, - UserStatus: _UserStatus - ); - } - - private void Validate() - { - } - } - - - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs deleted file mode 100644 index 7ea7c760147d..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs +++ /dev/null @@ -1,250 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools._v2.Models; -using Org.OpenAPITools._v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace Org.OpenAPITools._v2.Modules -{ - /// - /// Status values that need to be considered for filter - /// - public enum FindPetsByStatusStatusEnum - { - available = 1, - pending = 2, - sold = 3 - }; - - - /// - /// Module processing requests of Pet domain. - /// - public sealed class PetModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public PetModule(PetService service) : base("/v2") - { - Post["/pet", true] = async (parameters, ct) => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'AddPet'"); - - await service.AddPet(Context, body); - return new Response { ContentType = ""}; - }; - - Delete["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); - - await service.DeletePet(Context, petId, apiKey); - return new Response { ContentType = ""}; - }; - - Get["/pet/findByStatus", true] = async (parameters, ct) => - { - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); - Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); - - return await service.FindPetsByStatus(Context, status).ToArray(); - }; - - Get["/pet/findByTags", true] = async (parameters, ct) => - { - var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); - Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); - - return await service.FindPetsByTags(Context, tags).ToArray(); - }; - - Get["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); - - return await service.GetPetById(Context, petId); - }; - - Put["/pet", true] = async (parameters, ct) => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'UpdatePet'"); - - await service.UpdatePet(Context, body); - return new Response { ContentType = ""}; - }; - - Post["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); - - await service.UpdatePetWithForm(Context, petId, name, status); - return new Response { ContentType = ""}; - }; - - Post["/pet/{petId}/uploadImage", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); - var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); - - return await service.UploadFile(Context, petId, additionalMetadata, file); - }; - } - } - - /// - /// Service handling Pet requests. - /// - public interface PetService - { - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - Task AddPet(NancyContext context, Pet body); - - /// - /// - /// - /// Context of request - /// Pet id to delete - /// (optional) - /// - Task DeletePet(NancyContext context, long? petId, string apiKey); - - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Context of request - /// Status values that need to be considered for filter - /// List<Pet> - Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); - - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Context of request - /// Tags to filter by - /// List<Pet> - [Obsolete] - Task> FindPetsByTags(NancyContext context, List tags); - - /// - /// Returns a single pet - /// - /// Context of request - /// ID of pet to return - /// Pet - Task GetPetById(NancyContext context, long? petId); - - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - Task UpdatePet(NancyContext context, Pet body); - - /// - /// - /// - /// Context of request - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status); - - /// - /// - /// - /// Context of request - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); - } - - /// - /// Abstraction of PetService. - /// - public abstract class AbstractPetService: PetService - { - public virtual Task AddPet(NancyContext context, Pet body) - { - return AddPet(body); - } - - public virtual Task DeletePet(NancyContext context, long? petId, string apiKey) - { - return DeletePet(petId, apiKey); - } - - public virtual Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) - { - return FindPetsByStatus(status); - } - - [Obsolete] - public virtual Task> FindPetsByTags(NancyContext context, List tags) - { - return FindPetsByTags(tags); - } - - public virtual Task GetPetById(NancyContext context, long? petId) - { - return GetPetById(petId); - } - - public virtual Task UpdatePet(NancyContext context, Pet body) - { - return UpdatePet(body); - } - - public virtual Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status) - { - return UpdatePetWithForm(petId, name, status); - } - - public virtual Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) - { - return UploadFile(petId, additionalMetadata, file); - } - - protected abstract Task AddPet(Pet body); - - protected abstract Task DeletePet(long? petId, string apiKey); - - protected abstract Task> FindPetsByStatus(FindPetsByStatusStatusEnum? status); - - [Obsolete] - protected abstract Task> FindPetsByTags(List tags); - - protected abstract Task GetPetById(long? petId); - - protected abstract Task UpdatePet(Pet body); - - protected abstract Task UpdatePetWithForm(long? petId, string name, string status); - - protected abstract Task UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs deleted file mode 100644 index eed0645da35b..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools._v2.Models; -using Org.OpenAPITools._v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace Org.OpenAPITools._v2.Modules -{ - - /// - /// Module processing requests of Store domain. - /// - public sealed class StoreModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public StoreModule(StoreService service) : base("/v2") - { - Delete["/store/order/{orderId}", true] = async (parameters, ct) => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); - - await service.DeleteOrder(Context, orderId); - return new Response { ContentType = ""}; - }; - - Get["/store/inventory", true] = async (parameters, ct) => - { - - return await service.GetInventory(Context); - }; - - Get["/store/order/{orderId}", true] = async (parameters, ct) => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); - - return await service.GetOrderById(Context, orderId); - }; - - Post["/store/order", true] = async (parameters, ct) => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'PlaceOrder'"); - - return await service.PlaceOrder(Context, body); - }; - } - } - - /// - /// Service handling Store requests. - /// - public interface StoreService - { - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Context of request - /// ID of the order that needs to be deleted - /// - Task DeleteOrder(NancyContext context, string orderId); - - /// - /// Returns a map of status codes to quantities - /// - /// Context of request - /// Dictionary<string, int?> - Task> GetInventory(NancyContext context); - - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - /// - /// Context of request - /// ID of pet that needs to be fetched - /// Order - Task GetOrderById(NancyContext context, long? orderId); - - /// - /// - /// - /// Context of request - /// order placed for purchasing the pet - /// Order - Task PlaceOrder(NancyContext context, Order body); - } - - /// - /// Abstraction of StoreService. - /// - public abstract class AbstractStoreService: StoreService - { - public virtual Task DeleteOrder(NancyContext context, string orderId) - { - return DeleteOrder(orderId); - } - - public virtual Task> GetInventory(NancyContext context) - { - return GetInventory(); - } - - public virtual Task GetOrderById(NancyContext context, long? orderId) - { - return GetOrderById(orderId); - } - - public virtual Task PlaceOrder(NancyContext context, Order body) - { - return PlaceOrder(body); - } - - protected abstract Task DeleteOrder(string orderId); - - protected abstract Task> GetInventory(); - - protected abstract Task GetOrderById(long? orderId); - - protected abstract Task PlaceOrder(Order body); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs deleted file mode 100644 index 23d99c214e4c..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs +++ /dev/null @@ -1,234 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools._v2.Models; -using Org.OpenAPITools._v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace Org.OpenAPITools._v2.Modules -{ - - /// - /// Module processing requests of User domain. - /// - public sealed class UserModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public UserModule(UserService service) : base("/v2") - { - Post["/user", true] = async (parameters, ct) => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUser'"); - - await service.CreateUser(Context, body); - return new Response { ContentType = ""}; - }; - - Post["/user/createWithArray", true] = async (parameters, ct) => - { - var body = this.Bind>(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUsersWithArrayInput'"); - - await service.CreateUsersWithArrayInput(Context, body); - return new Response { ContentType = ""}; - }; - - Post["/user/createWithList", true] = async (parameters, ct) => - { - var body = this.Bind>(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUsersWithListInput'"); - - await service.CreateUsersWithListInput(Context, body); - return new Response { ContentType = ""}; - }; - - Delete["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); - - await service.DeleteUser(Context, username); - return new Response { ContentType = ""}; - }; - - Get["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); - - return await service.GetUserByName(Context, username); - }; - - Get["/user/login", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); - var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); - - Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); - - return await service.LoginUser(Context, username, password); - }; - - Get["/user/logout", true] = async (parameters, ct) => - { - - await service.LogoutUser(Context); - return new Response { ContentType = ""}; - }; - - Put["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - var body = this.Bind(); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); - - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'UpdateUser'"); - - await service.UpdateUser(Context, username, body); - return new Response { ContentType = ""}; - }; - } - } - - /// - /// Service handling User requests. - /// - public interface UserService - { - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// Created user object - /// - Task CreateUser(NancyContext context, User body); - - /// - /// - /// - /// Context of request - /// List of user object - /// - Task CreateUsersWithArrayInput(NancyContext context, List body); - - /// - /// - /// - /// Context of request - /// List of user object - /// - Task CreateUsersWithListInput(NancyContext context, List body); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// The name that needs to be deleted - /// - Task DeleteUser(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The name that needs to be fetched. Use user1 for testing. - /// User - Task GetUserByName(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The user name for login - /// The password for login in clear text - /// string - Task LoginUser(NancyContext context, string username, string password); - - /// - /// - /// - /// Context of request - /// - Task LogoutUser(NancyContext context); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// name that need to be deleted - /// Updated user object - /// - Task UpdateUser(NancyContext context, string username, User body); - } - - /// - /// Abstraction of UserService. - /// - public abstract class AbstractUserService: UserService - { - public virtual Task CreateUser(NancyContext context, User body) - { - return CreateUser(body); - } - - public virtual Task CreateUsersWithArrayInput(NancyContext context, List body) - { - return CreateUsersWithArrayInput(body); - } - - public virtual Task CreateUsersWithListInput(NancyContext context, List body) - { - return CreateUsersWithListInput(body); - } - - public virtual Task DeleteUser(NancyContext context, string username) - { - return DeleteUser(username); - } - - public virtual Task GetUserByName(NancyContext context, string username) - { - return GetUserByName(username); - } - - public virtual Task LoginUser(NancyContext context, string username, string password) - { - return LoginUser(username, password); - } - - public virtual Task LogoutUser(NancyContext context) - { - return LogoutUser(); - } - - public virtual Task UpdateUser(NancyContext context, string username, User body) - { - return UpdateUser(username, body); - } - - protected abstract Task CreateUser(User body); - - protected abstract Task CreateUsersWithArrayInput(List body); - - protected abstract Task CreateUsersWithListInput(List body); - - protected abstract Task DeleteUser(string username); - - protected abstract Task GetUserByName(string username); - - protected abstract Task LoginUser(string username, string password); - - protected abstract Task LogoutUser(); - - protected abstract Task UpdateUser(string username, User body); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index b26666605cd3..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,66 +0,0 @@ - - - - Debug - AnyCPU - {768B8DC6-54EE-4D40-9B20-7857E1D742A4} - Library - Properties - Org.OpenAPITools._v2 - Org.OpenAPITools - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.XML - - - - ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True - - - ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll - True - - - ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll - True - - - ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - - - - - - - - - - - - - - - - diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec deleted file mode 100644 index d4ee2fc102a4..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ /dev/null @@ -1,13 +0,0 @@ - - - - Org.OpenAPITools - Org.OpenAPITools - 1.0.0 - openapi-generator - openapi-generator - false - NancyFx Org.OpenAPITools API - https://www.apache.org/licenses/LICENSE-2.0.html - - \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs deleted file mode 100644 index dd90cbf5133d..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Nancy.Bootstrapper; -using Nancy.Json; -using NodaTime; -using NodaTime.Text; -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools._v2.Utils -{ - /// - /// (De)serializes a to a string using - /// the RFC3339 - /// full-date format. - /// - public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup - { - public override IEnumerable SupportedTypes - { - get - { - yield return typeof(LocalDate); - yield return typeof(LocalDate?); - } - } - - public void Initialize(IPipelines pipelines) - { - JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); - } - - - public override object Serialize(object obj, JavaScriptSerializer serializer) - { - if (obj is LocalDate) - { - LocalDate localDate = (LocalDate)obj; - return LocalDatePattern.IsoPattern.Format(localDate); - } - return null; - } - - public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) - { - if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) - { - try - { - return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); - } - catch { } - } - return null; - } - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs deleted file mode 100644 index 847527a2dbb7..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs +++ /dev/null @@ -1,450 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; -using Nancy; -using NodaTime; -using NodaTime.Text; -using Sharpility.Base; -using Sharpility.Extensions; -using Sharpility.Util; - -namespace Org.OpenAPITools._v2.Utils -{ - internal static class Parameters - { - private static readonly IDictionary> Parsers = CreateParsers(); - - internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - var valueType = typeof(TValue); - var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); - var isNullable = default(TValue) == null; - string value = RawValueOf(parameters, request, name, parameterType); - Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); - if (value == null && isNullable) - { - return default(TValue); - } - if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) - { - return EnumValueOf(name, value); - } - return ValueOf(parameters, name, value, valueType, request, parameterType); - } - - private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - try - { - switch (parameterType) - { - case ParameterType.Query: - string querValue = request.Query[name]; - return querValue; - case ParameterType.Path: - string pathValue = parameters[name]; - return pathValue; - case ParameterType.Header: - var headerValue = request.Headers[name]; - return headerValue != null ? string.Join(",", headerValue) : null; - } - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); - } - throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); - } - - private static TValue EnumValueOf(string name, string value) - { - var valueType = typeof(TValue); - var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); - Preconditions.IsNotNull(enumType, () => new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); - var values = Enum.GetValues(enumType); - foreach (var entry in values) - { - if (entry.ToString().EqualsIgnoreCases(value) - || ((int)entry).ToString().EqualsIgnoreCases(value)) - { - return (TValue)entry; - } - } - throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", - name, value, Strings.ToString(values))); - } - - private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) - { - var parser = Parsers.GetIfPresent(valueType); - if (parser != null) - { - return ParseValueUsing(name, value, valueType, parser); - } - if (parameterType == ParameterType.Path) - { - return DynamicValueOf(parameters, name); - } - if (parameterType == ParameterType.Query) - { - return DynamicValueOf(request.Query, name); - } - throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); - } - - private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) - { - var result = parser(Parameter.Of(name, value)); - try - { - return (TValue)result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + - "Received: '{2}', expected: '{3}'.", - name, value, result.GetType(), valueType)); - } - } - - private static TValue DynamicValueOf(dynamic parameters, string name) - { - string value = parameters[name]; - try - { - TValue result = parameters[name]; - return result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + - "Expected type: '{2}' is not supported", - name, value, typeof(TValue))); - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", - name, typeof(TValue)), e); - } - } - - private static IDictionary> CreateParsers() - { - var parsers = ImmutableDictionary.CreateBuilder>(); - parsers.Put(typeof(string), value => value.Value); - parsers.Put(typeof(bool), SafeParse(bool.Parse)); - parsers.Put(typeof(bool?), SafeParse(bool.Parse)); - parsers.Put(typeof(byte), SafeParse(byte.Parse)); - parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); - parsers.Put(typeof(short), SafeParse(short.Parse)); - parsers.Put(typeof(short?), SafeParse(short.Parse)); - parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); - parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); - parsers.Put(typeof(int), SafeParse(int.Parse)); - parsers.Put(typeof(int?), SafeParse(int.Parse)); - parsers.Put(typeof(uint), SafeParse(uint.Parse)); - parsers.Put(typeof(uint?), SafeParse(uint.Parse)); - parsers.Put(typeof(long), SafeParse(long.Parse)); - parsers.Put(typeof(long?), SafeParse(long.Parse)); - parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); - parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); - parsers.Put(typeof(float), SafeParse(float.Parse)); - parsers.Put(typeof(float?), SafeParse(float.Parse)); - parsers.Put(typeof(double), SafeParse(double.Parse)); - parsers.Put(typeof(double?), SafeParse(double.Parse)); - parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); - parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); - parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); - parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); - parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); - parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); - parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); - parsers.Put(typeof(IList), ImmutableListParse(value => value)); - parsers.Put(typeof(List), ListParse(value => value)); - parsers.Put(typeof(ISet), ImmutableListParse(value => value)); - parsers.Put(typeof(HashSet), SetParse(value => value)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(List), NullableListParse(bool.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(List), ListParse(byte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); - parsers.Put(typeof(HashSet), SetParse(byte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(List), ListParse(sbyte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); - parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); - parsers.Put(typeof(List), ListParse(short.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); - parsers.Put(typeof(HashSet), SetParse(short.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(List), ListParse(ushort.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); - parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(List), NullableListParse(int.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(List), ListParse(uint.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); - parsers.Put(typeof(HashSet), SetParse(uint.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(List), NullableListParse(long.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(List), ListParse(ulong.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); - parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(List), NullableListParse(float.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(List), NullableListParse(double.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(List), NullableListParse(decimal.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); - parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); - - return parsers.ToImmutableDictionary(); - } - - private static Func SafeParse(Func parse) - { - return parameter => - { - try - { - return parse(parameter.Value); - } - catch (OverflowException) - { - throw ParameterOutOfRange(parameter, typeof(T)); - } - catch (FormatException) - { - throw InvalidParameterFormat(parameter, typeof(T)); - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", - parameter.Name, parameter.Value, typeof(T)), e); - } - }; - } - - private static Func NullableListParse(Func itemParser) where T: struct - { - return ListParse(it => it.ToNullable(itemParser)); - } - - private static Func ListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new List(); - } - return ParseCollection(parameter.Value, itemParser).ToList(); - }; - } - - private static Func NullableImmutableListParse(Func itemParser) where T: struct - { - return ImmutableListParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Lists.EmptyList(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableList(); - }; - } - - private static Func NullableSetParse(Func itemParser) where T: struct - { - return SetParse(it => it.ToNullable(itemParser)); - } - - private static Func SetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new HashSet(); - } - return ParseCollection(parameter.Value, itemParser).ToSet(); - }; - } - - private static Func NullableImmutableSetParse(Func itemParser) where T: struct - { - return ImmutableSetParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableSetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Sets.EmptySet(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); - }; - } - - private static ZonedDateTime ParseZonedDateTime(string value) - { - var dateTime = DateTime.Parse(value); - return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); - } - - private static LocalDate ParseLocalDate(string value) - { - return LocalDatePattern.IsoPattern.Parse(value).Value; - } - - private static LocalTime ParseLocalTime(string value) - { - return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; - } - - private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static IEnumerable ParseCollection(string value, Func itemParser) - { - var results = value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser); - return results; - } - - public static T? ToNullable(this string s, Func itemParser) where T : struct - { - T? result = new T?(); - try - { - if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) - { - result = itemParser(s); - } - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); - } - return result; - } - - private class Parameter - { - internal string Name { get; private set; } - internal string Value { get; private set; } - - private Parameter(string name, string value) - { - Name = name; - Value = value; - } - - internal static Parameter Of(string name, string value) - { - return new Parameter(name, value); - } - } - } - - internal enum ParameterType - { - Undefined, - Query, - Path, - Header - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config deleted file mode 100644 index e3401566e5d2..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/.gitignore b/samples/server/petstore/nancyfx/.gitignore deleted file mode 100644 index 1ee53850b84c..000000000000 --- a/samples/server/petstore/nancyfx/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/samples/server/petstore/nancyfx/.openapi-generator-ignore b/samples/server/petstore/nancyfx/.openapi-generator-ignore deleted file mode 100644 index c5fa491b4c55..000000000000 --- a/samples/server/petstore/nancyfx/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# 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 Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/nancyfx/.openapi-generator/FILES b/samples/server/petstore/nancyfx/.openapi-generator/FILES deleted file mode 100644 index eabec10a061c..000000000000 --- a/samples/server/petstore/nancyfx/.openapi-generator/FILES +++ /dev/null @@ -1,16 +0,0 @@ -.gitignore -Org.OpenAPITools.sln -src/Org.OpenAPITools/Models/ApiResponse.cs -src/Org.OpenAPITools/Models/Category.cs -src/Org.OpenAPITools/Models/Order.cs -src/Org.OpenAPITools/Models/Pet.cs -src/Org.OpenAPITools/Models/Tag.cs -src/Org.OpenAPITools/Models/User.cs -src/Org.OpenAPITools/Modules/PetModule.cs -src/Org.OpenAPITools/Modules/StoreModule.cs -src/Org.OpenAPITools/Modules/UserModule.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj -src/Org.OpenAPITools/Org.OpenAPITools.nuspec -src/Org.OpenAPITools/Utils/LocalDateConverter.cs -src/Org.OpenAPITools/Utils/Parameters.cs -src/Org.OpenAPITools/packages.config diff --git a/samples/server/petstore/nancyfx/.openapi-generator/VERSION b/samples/server/petstore/nancyfx/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01f..000000000000 --- a/samples/server/petstore/nancyfx/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/Org.OpenAPITools.sln b/samples/server/petstore/nancyfx/Org.OpenAPITools.sln deleted file mode 100644 index 757078a1383c..000000000000 --- a/samples/server/petstore/nancyfx/Org.OpenAPITools.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}" -EndProject -Global -GlobalSection(SolutionConfigurationPlatforms) = preSolution -Debug|Any CPU = Debug|Any CPU -Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU -EndGlobalSection -GlobalSection(SolutionProperties) = preSolution -HideSolutionNode = FALSE -EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs deleted file mode 100644 index 2c35c0c5fd9b..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// Describes the result of uploading an image resource - /// - public sealed class ApiResponse: IEquatable - { - /// - /// Code - /// - public int? Code { get; private set; } - - /// - /// Type - /// - public string Type { get; private set; } - - /// - /// Message - /// - public string Message { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use ApiResponse.Builder() for instance creation instead. - /// - [Obsolete] - public ApiResponse() - { - } - - private ApiResponse(int? Code, string Type, string Message) - { - - this.Code = Code; - - this.Type = Type; - - this.Message = Message; - - } - - /// - /// Returns builder of ApiResponse. - /// - /// ApiResponseBuilder - public static ApiResponseBuilder Builder() - { - return new ApiResponseBuilder(); - } - - /// - /// Returns ApiResponseBuilder with properties set. - /// Use it to change properties. - /// - /// ApiResponseBuilder - public ApiResponseBuilder With() - { - return Builder() - .Code(Code) - .Type(Type) - .Message(Message); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(ApiResponse other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are equals, false otherwise - public static bool operator == (ApiResponse left, ApiResponse right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are not equals, false otherwise - public static bool operator != (ApiResponse left, ApiResponse right) - { - return !Equals(left, right); - } - - /// - /// Builder of ApiResponse. - /// - public sealed class ApiResponseBuilder - { - private int? _Code; - private string _Type; - private string _Message; - - internal ApiResponseBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for ApiResponse.Code property. - /// - /// Code - public ApiResponseBuilder Code(int? value) - { - _Code = value; - return this; - } - - /// - /// Sets value for ApiResponse.Type property. - /// - /// Type - public ApiResponseBuilder Type(string value) - { - _Type = value; - return this; - } - - /// - /// Sets value for ApiResponse.Message property. - /// - /// Message - public ApiResponseBuilder Message(string value) - { - _Message = value; - return this; - } - - - /// - /// Builds instance of ApiResponse. - /// - /// ApiResponse - public ApiResponse Build() - { - Validate(); - return new ApiResponse( - Code: _Code, - Type: _Type, - Message: _Message - ); - } - - private void Validate() - { - } - } - - - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs deleted file mode 100644 index 3cadeec39fe5..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// A category for a pet - /// - public sealed class Category: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Category.Builder() for instance creation instead. - /// - [Obsolete] - public Category() - { - } - - private Category(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Category. - /// - /// CategoryBuilder - public static CategoryBuilder Builder() - { - return new CategoryBuilder(); - } - - /// - /// Returns CategoryBuilder with properties set. - /// Use it to change properties. - /// - /// CategoryBuilder - public CategoryBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Category other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are equals, false otherwise - public static bool operator == (Category left, Category right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are not equals, false otherwise - public static bool operator != (Category left, Category right) - { - return !Equals(left, right); - } - - /// - /// Builder of Category. - /// - public sealed class CategoryBuilder - { - private long? _Id; - private string _Name; - - internal CategoryBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Category.Id property. - /// - /// Id - public CategoryBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Category.Name property. - /// - /// Name - public CategoryBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Category. - /// - /// Category - public Category Build() - { - Validate(); - return new Category( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs deleted file mode 100644 index 3ef8e9133c7a..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// An order for a pets from the pet store - /// - public sealed class Order: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// PetId - /// - public long? PetId { get; private set; } - - /// - /// Quantity - /// - public int? Quantity { get; private set; } - - /// - /// ShipDate - /// - public DateTime? ShipDate { get; private set; } - - /// - /// Order Status - /// - public StatusEnum? Status { get; private set; } - - /// - /// Complete - /// - public bool? Complete { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Order.Builder() for instance creation instead. - /// - [Obsolete] - public Order() - { - } - - private Order(long? Id, long? PetId, int? Quantity, DateTime? ShipDate, StatusEnum? Status, bool? Complete) - { - - this.Id = Id; - - this.PetId = PetId; - - this.Quantity = Quantity; - - this.ShipDate = ShipDate; - - this.Status = Status; - - this.Complete = Complete; - - } - - /// - /// Returns builder of Order. - /// - /// OrderBuilder - public static OrderBuilder Builder() - { - return new OrderBuilder(); - } - - /// - /// Returns OrderBuilder with properties set. - /// Use it to change properties. - /// - /// OrderBuilder - public OrderBuilder With() - { - return Builder() - .Id(Id) - .PetId(PetId) - .Quantity(Quantity) - .ShipDate(ShipDate) - .Status(Status) - .Complete(Complete); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Order other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are equals, false otherwise - public static bool operator == (Order left, Order right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are not equals, false otherwise - public static bool operator != (Order left, Order right) - { - return !Equals(left, right); - } - - /// - /// Builder of Order. - /// - public sealed class OrderBuilder - { - private long? _Id; - private long? _PetId; - private int? _Quantity; - private DateTime? _ShipDate; - private StatusEnum? _Status; - private bool? _Complete; - - internal OrderBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - _Complete = false; - } - - /// - /// Sets value for Order.Id property. - /// - /// Id - public OrderBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Order.PetId property. - /// - /// PetId - public OrderBuilder PetId(long? value) - { - _PetId = value; - return this; - } - - /// - /// Sets value for Order.Quantity property. - /// - /// Quantity - public OrderBuilder Quantity(int? value) - { - _Quantity = value; - return this; - } - - /// - /// Sets value for Order.ShipDate property. - /// - /// ShipDate - public OrderBuilder ShipDate(DateTime? value) - { - _ShipDate = value; - return this; - } - - /// - /// Sets value for Order.Status property. - /// - /// Order Status - public OrderBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - /// - /// Sets value for Order.Complete property. - /// - /// Complete - public OrderBuilder Complete(bool? value) - { - _Complete = value; - return this; - } - - - /// - /// Builds instance of Order. - /// - /// Order - public Order Build() - { - Validate(); - return new Order( - Id: _Id, - PetId: _PetId, - Quantity: _Quantity, - ShipDate: _ShipDate, - Status: _Status, - Complete: _Complete - ); - } - - private void Validate() - { - } - } - - - public enum StatusEnum { Placed, Approved, Delivered }; - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs deleted file mode 100644 index a9e839bb9692..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// A pet for sale in the pet store - /// - public sealed class Pet: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Category - /// - public Category Category { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - /// - /// PhotoUrls - /// - public List PhotoUrls { get; private set; } - - /// - /// Tags - /// - public List Tags { get; private set; } - - /// - /// pet status in the store - /// - public StatusEnum? Status { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Pet.Builder() for instance creation instead. - /// - [Obsolete] - public Pet() - { - } - - private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) - { - - this.Id = Id; - - this.Category = Category; - - this.Name = Name; - - this.PhotoUrls = PhotoUrls; - - this.Tags = Tags; - - this.Status = Status; - - } - - /// - /// Returns builder of Pet. - /// - /// PetBuilder - public static PetBuilder Builder() - { - return new PetBuilder(); - } - - /// - /// Returns PetBuilder with properties set. - /// Use it to change properties. - /// - /// PetBuilder - public PetBuilder With() - { - return Builder() - .Id(Id) - .Category(Category) - .Name(Name) - .PhotoUrls(PhotoUrls) - .Tags(Tags) - .Status(Status); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Pet other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are equals, false otherwise - public static bool operator == (Pet left, Pet right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are not equals, false otherwise - public static bool operator != (Pet left, Pet right) - { - return !Equals(left, right); - } - - /// - /// Builder of Pet. - /// - public sealed class PetBuilder - { - private long? _Id; - private Category _Category; - private string _Name; - private List _PhotoUrls; - private List _Tags; - private StatusEnum? _Status; - - internal PetBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Pet.Id property. - /// - /// Id - public PetBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Pet.Category property. - /// - /// Category - public PetBuilder Category(Category value) - { - _Category = value; - return this; - } - - /// - /// Sets value for Pet.Name property. - /// - /// Name - public PetBuilder Name(string value) - { - _Name = value; - return this; - } - - /// - /// Sets value for Pet.PhotoUrls property. - /// - /// PhotoUrls - public PetBuilder PhotoUrls(List value) - { - _PhotoUrls = value; - return this; - } - - /// - /// Sets value for Pet.Tags property. - /// - /// Tags - public PetBuilder Tags(List value) - { - _Tags = value; - return this; - } - - /// - /// Sets value for Pet.Status property. - /// - /// pet status in the store - public PetBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - - /// - /// Builds instance of Pet. - /// - /// Pet - public Pet Build() - { - Validate(); - return new Pet( - Id: _Id, - Category: _Category, - Name: _Name, - PhotoUrls: _PhotoUrls, - Tags: _Tags, - Status: _Status - ); - } - - private void Validate() - { - if (_Name == null) - { - throw new ArgumentException("Name is a required property for Pet and cannot be null"); - } - if (_PhotoUrls == null) - { - throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); - } - } - } - - - public enum StatusEnum { Available, Pending, Sold }; - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs deleted file mode 100644 index e46182c334c5..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// A tag for a pet - /// - public sealed class Tag: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Tag.Builder() for instance creation instead. - /// - [Obsolete] - public Tag() - { - } - - private Tag(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Tag. - /// - /// TagBuilder - public static TagBuilder Builder() - { - return new TagBuilder(); - } - - /// - /// Returns TagBuilder with properties set. - /// Use it to change properties. - /// - /// TagBuilder - public TagBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Tag other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are equals, false otherwise - public static bool operator == (Tag left, Tag right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are not equals, false otherwise - public static bool operator != (Tag left, Tag right) - { - return !Equals(left, right); - } - - /// - /// Builder of Tag. - /// - public sealed class TagBuilder - { - private long? _Id; - private string _Name; - - internal TagBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Tag.Id property. - /// - /// Id - public TagBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Tag.Name property. - /// - /// Name - public TagBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Tag. - /// - /// Tag - public Tag Build() - { - Validate(); - return new Tag( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs deleted file mode 100644 index 29c94bbfefe3..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs +++ /dev/null @@ -1,285 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools._v2.Models -{ - /// - /// A User who is purchasing from the pet store - /// - public sealed class User: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Username - /// - public string Username { get; private set; } - - /// - /// FirstName - /// - public string FirstName { get; private set; } - - /// - /// LastName - /// - public string LastName { get; private set; } - - /// - /// Email - /// - public string Email { get; private set; } - - /// - /// Password - /// - public string Password { get; private set; } - - /// - /// Phone - /// - public string Phone { get; private set; } - - /// - /// User Status - /// - public int? UserStatus { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use User.Builder() for instance creation instead. - /// - [Obsolete] - public User() - { - } - - private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) - { - - this.Id = Id; - - this.Username = Username; - - this.FirstName = FirstName; - - this.LastName = LastName; - - this.Email = Email; - - this.Password = Password; - - this.Phone = Phone; - - this.UserStatus = UserStatus; - - } - - /// - /// Returns builder of User. - /// - /// UserBuilder - public static UserBuilder Builder() - { - return new UserBuilder(); - } - - /// - /// Returns UserBuilder with properties set. - /// Use it to change properties. - /// - /// UserBuilder - public UserBuilder With() - { - return Builder() - .Id(Id) - .Username(Username) - .FirstName(FirstName) - .LastName(LastName) - .Email(Email) - .Password(Password) - .Phone(Phone) - .UserStatus(UserStatus); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(User other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are equals, false otherwise - public static bool operator == (User left, User right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are not equals, false otherwise - public static bool operator != (User left, User right) - { - return !Equals(left, right); - } - - /// - /// Builder of User. - /// - public sealed class UserBuilder - { - private long? _Id; - private string _Username; - private string _FirstName; - private string _LastName; - private string _Email; - private string _Password; - private string _Phone; - private int? _UserStatus; - - internal UserBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for User.Id property. - /// - /// Id - public UserBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for User.Username property. - /// - /// Username - public UserBuilder Username(string value) - { - _Username = value; - return this; - } - - /// - /// Sets value for User.FirstName property. - /// - /// FirstName - public UserBuilder FirstName(string value) - { - _FirstName = value; - return this; - } - - /// - /// Sets value for User.LastName property. - /// - /// LastName - public UserBuilder LastName(string value) - { - _LastName = value; - return this; - } - - /// - /// Sets value for User.Email property. - /// - /// Email - public UserBuilder Email(string value) - { - _Email = value; - return this; - } - - /// - /// Sets value for User.Password property. - /// - /// Password - public UserBuilder Password(string value) - { - _Password = value; - return this; - } - - /// - /// Sets value for User.Phone property. - /// - /// Phone - public UserBuilder Phone(string value) - { - _Phone = value; - return this; - } - - /// - /// Sets value for User.UserStatus property. - /// - /// User Status - public UserBuilder UserStatus(int? value) - { - _UserStatus = value; - return this; - } - - - /// - /// Builds instance of User. - /// - /// User - public User Build() - { - Validate(); - return new User( - Id: _Id, - Username: _Username, - FirstName: _FirstName, - LastName: _LastName, - Email: _Email, - Password: _Password, - Phone: _Phone, - UserStatus: _UserStatus - ); - } - - private void Validate() - { - } - } - - - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs deleted file mode 100644 index 8dc52f8275b2..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs +++ /dev/null @@ -1,249 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools._v2.Models; -using Org.OpenAPITools._v2.Utils; -using NodaTime; - -namespace Org.OpenAPITools._v2.Modules -{ - /// - /// Status values that need to be considered for filter - /// - public enum FindPetsByStatusStatusEnum - { - available = 1, - pending = 2, - sold = 3 - }; - - - /// - /// Module processing requests of Pet domain. - /// - public sealed class PetModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public PetModule(PetService service) : base("/v2") - { - Post["/pet"] = parameters => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'AddPet'"); - - service.AddPet(Context, body); - return new Response { ContentType = ""}; - }; - - Delete["/pet/{petId}"] = parameters => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); - - service.DeletePet(Context, petId, apiKey); - return new Response { ContentType = ""}; - }; - - Get["/pet/findByStatus"] = parameters => - { - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); - Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); - - return service.FindPetsByStatus(Context, status).ToArray(); - }; - - Get["/pet/findByTags"] = parameters => - { - var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); - Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); - - return service.FindPetsByTags(Context, tags).ToArray(); - }; - - Get["/pet/{petId}"] = parameters => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); - - return service.GetPetById(Context, petId); - }; - - Put["/pet"] = parameters => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'UpdatePet'"); - - service.UpdatePet(Context, body); - return new Response { ContentType = ""}; - }; - - Post["/pet/{petId}"] = parameters => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); - - service.UpdatePetWithForm(Context, petId, name, status); - return new Response { ContentType = ""}; - }; - - Post["/pet/{petId}/uploadImage"] = parameters => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); - var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); - - return service.UploadFile(Context, petId, additionalMetadata, file); - }; - } - } - - /// - /// Service handling Pet requests. - /// - public interface PetService - { - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - void AddPet(NancyContext context, Pet body); - - /// - /// - /// - /// Context of request - /// Pet id to delete - /// (optional) - /// - void DeletePet(NancyContext context, long? petId, string apiKey); - - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Context of request - /// Status values that need to be considered for filter - /// List<Pet> - List FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); - - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Context of request - /// Tags to filter by - /// List<Pet> - [Obsolete] - List FindPetsByTags(NancyContext context, List tags); - - /// - /// Returns a single pet - /// - /// Context of request - /// ID of pet to return - /// Pet - Pet GetPetById(NancyContext context, long? petId); - - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - void UpdatePet(NancyContext context, Pet body); - - /// - /// - /// - /// Context of request - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - void UpdatePetWithForm(NancyContext context, long? petId, string name, string status); - - /// - /// - /// - /// Context of request - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - ApiResponse UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); - } - - /// - /// Abstraction of PetService. - /// - public abstract class AbstractPetService: PetService - { - public virtual void AddPet(NancyContext context, Pet body) - { - AddPet(body); - } - - public virtual void DeletePet(NancyContext context, long? petId, string apiKey) - { - DeletePet(petId, apiKey); - } - - public virtual List FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) - { - return FindPetsByStatus(status); - } - - [Obsolete] - public virtual List FindPetsByTags(NancyContext context, List tags) - { - return FindPetsByTags(tags); - } - - public virtual Pet GetPetById(NancyContext context, long? petId) - { - return GetPetById(petId); - } - - public virtual void UpdatePet(NancyContext context, Pet body) - { - UpdatePet(body); - } - - public virtual void UpdatePetWithForm(NancyContext context, long? petId, string name, string status) - { - UpdatePetWithForm(petId, name, status); - } - - public virtual ApiResponse UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) - { - return UploadFile(petId, additionalMetadata, file); - } - - protected abstract void AddPet(Pet body); - - protected abstract void DeletePet(long? petId, string apiKey); - - protected abstract List FindPetsByStatus(FindPetsByStatusStatusEnum? status); - - [Obsolete] - protected abstract List FindPetsByTags(List tags); - - protected abstract Pet GetPetById(long? petId); - - protected abstract void UpdatePet(Pet body); - - protected abstract void UpdatePetWithForm(long? petId, string name, string status); - - protected abstract ApiResponse UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); - } - -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs deleted file mode 100644 index 0c75b02fd9ae..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools._v2.Models; -using Org.OpenAPITools._v2.Utils; -using NodaTime; - -namespace Org.OpenAPITools._v2.Modules -{ - - /// - /// Module processing requests of Store domain. - /// - public sealed class StoreModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public StoreModule(StoreService service) : base("/v2") - { - Delete["/store/order/{orderId}"] = parameters => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); - - service.DeleteOrder(Context, orderId); - return new Response { ContentType = ""}; - }; - - Get["/store/inventory"] = parameters => - { - - return service.GetInventory(Context); - }; - - Get["/store/order/{orderId}"] = parameters => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); - - return service.GetOrderById(Context, orderId); - }; - - Post["/store/order"] = parameters => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'PlaceOrder'"); - - return service.PlaceOrder(Context, body); - }; - } - } - - /// - /// Service handling Store requests. - /// - public interface StoreService - { - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Context of request - /// ID of the order that needs to be deleted - /// - void DeleteOrder(NancyContext context, string orderId); - - /// - /// Returns a map of status codes to quantities - /// - /// Context of request - /// Dictionary<string, int?> - Dictionary GetInventory(NancyContext context); - - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - /// - /// Context of request - /// ID of pet that needs to be fetched - /// Order - Order GetOrderById(NancyContext context, long? orderId); - - /// - /// - /// - /// Context of request - /// order placed for purchasing the pet - /// Order - Order PlaceOrder(NancyContext context, Order body); - } - - /// - /// Abstraction of StoreService. - /// - public abstract class AbstractStoreService: StoreService - { - public virtual void DeleteOrder(NancyContext context, string orderId) - { - DeleteOrder(orderId); - } - - public virtual Dictionary GetInventory(NancyContext context) - { - return GetInventory(); - } - - public virtual Order GetOrderById(NancyContext context, long? orderId) - { - return GetOrderById(orderId); - } - - public virtual Order PlaceOrder(NancyContext context, Order body) - { - return PlaceOrder(body); - } - - protected abstract void DeleteOrder(string orderId); - - protected abstract Dictionary GetInventory(); - - protected abstract Order GetOrderById(long? orderId); - - protected abstract Order PlaceOrder(Order body); - } - -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs deleted file mode 100644 index cc268b9a2c54..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs +++ /dev/null @@ -1,233 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools._v2.Models; -using Org.OpenAPITools._v2.Utils; -using NodaTime; - -namespace Org.OpenAPITools._v2.Modules -{ - - /// - /// Module processing requests of User domain. - /// - public sealed class UserModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public UserModule(UserService service) : base("/v2") - { - Post["/user"] = parameters => - { - var body = this.Bind(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUser'"); - - service.CreateUser(Context, body); - return new Response { ContentType = ""}; - }; - - Post["/user/createWithArray"] = parameters => - { - var body = this.Bind>(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUsersWithArrayInput'"); - - service.CreateUsersWithArrayInput(Context, body); - return new Response { ContentType = ""}; - }; - - Post["/user/createWithList"] = parameters => - { - var body = this.Bind>(); - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'CreateUsersWithListInput'"); - - service.CreateUsersWithListInput(Context, body); - return new Response { ContentType = ""}; - }; - - Delete["/user/{username}"] = parameters => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); - - service.DeleteUser(Context, username); - return new Response { ContentType = ""}; - }; - - Get["/user/{username}"] = parameters => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); - - return service.GetUserByName(Context, username); - }; - - Get["/user/login"] = parameters => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); - var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); - - Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); - - return service.LoginUser(Context, username, password); - }; - - Get["/user/logout"] = parameters => - { - - service.LogoutUser(Context); - return new Response { ContentType = ""}; - }; - - Put["/user/{username}"] = parameters => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - var body = this.Bind(); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); - - Preconditions.IsNotNull(body, "Required parameter: 'body' is missing at 'UpdateUser'"); - - service.UpdateUser(Context, username, body); - return new Response { ContentType = ""}; - }; - } - } - - /// - /// Service handling User requests. - /// - public interface UserService - { - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// Created user object - /// - void CreateUser(NancyContext context, User body); - - /// - /// - /// - /// Context of request - /// List of user object - /// - void CreateUsersWithArrayInput(NancyContext context, List body); - - /// - /// - /// - /// Context of request - /// List of user object - /// - void CreateUsersWithListInput(NancyContext context, List body); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// The name that needs to be deleted - /// - void DeleteUser(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The name that needs to be fetched. Use user1 for testing. - /// User - User GetUserByName(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The user name for login - /// The password for login in clear text - /// string - string LoginUser(NancyContext context, string username, string password); - - /// - /// - /// - /// Context of request - /// - void LogoutUser(NancyContext context); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// name that need to be deleted - /// Updated user object - /// - void UpdateUser(NancyContext context, string username, User body); - } - - /// - /// Abstraction of UserService. - /// - public abstract class AbstractUserService: UserService - { - public virtual void CreateUser(NancyContext context, User body) - { - CreateUser(body); - } - - public virtual void CreateUsersWithArrayInput(NancyContext context, List body) - { - CreateUsersWithArrayInput(body); - } - - public virtual void CreateUsersWithListInput(NancyContext context, List body) - { - CreateUsersWithListInput(body); - } - - public virtual void DeleteUser(NancyContext context, string username) - { - DeleteUser(username); - } - - public virtual User GetUserByName(NancyContext context, string username) - { - return GetUserByName(username); - } - - public virtual string LoginUser(NancyContext context, string username, string password) - { - return LoginUser(username, password); - } - - public virtual void LogoutUser(NancyContext context) - { - LogoutUser(); - } - - public virtual void UpdateUser(NancyContext context, string username, User body) - { - UpdateUser(username, body); - } - - protected abstract void CreateUser(User body); - - protected abstract void CreateUsersWithArrayInput(List body); - - protected abstract void CreateUsersWithListInput(List body); - - protected abstract void DeleteUser(string username); - - protected abstract User GetUserByName(string username); - - protected abstract string LoginUser(string username, string password); - - protected abstract void LogoutUser(); - - protected abstract void UpdateUser(string username, User body); - } - -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index b26666605cd3..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,66 +0,0 @@ - - - - Debug - AnyCPU - {768B8DC6-54EE-4D40-9B20-7857E1D742A4} - Library - Properties - Org.OpenAPITools._v2 - Org.OpenAPITools - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.XML - - - - ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True - - - ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll - True - - - ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll - True - - - ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - - - - - - - - - - - - - - - - diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec deleted file mode 100644 index d4ee2fc102a4..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ /dev/null @@ -1,13 +0,0 @@ - - - - Org.OpenAPITools - Org.OpenAPITools - 1.0.0 - openapi-generator - openapi-generator - false - NancyFx Org.OpenAPITools API - https://www.apache.org/licenses/LICENSE-2.0.html - - \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs deleted file mode 100644 index dd90cbf5133d..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Nancy.Bootstrapper; -using Nancy.Json; -using NodaTime; -using NodaTime.Text; -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools._v2.Utils -{ - /// - /// (De)serializes a to a string using - /// the RFC3339 - /// full-date format. - /// - public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup - { - public override IEnumerable SupportedTypes - { - get - { - yield return typeof(LocalDate); - yield return typeof(LocalDate?); - } - } - - public void Initialize(IPipelines pipelines) - { - JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); - } - - - public override object Serialize(object obj, JavaScriptSerializer serializer) - { - if (obj is LocalDate) - { - LocalDate localDate = (LocalDate)obj; - return LocalDatePattern.IsoPattern.Format(localDate); - } - return null; - } - - public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) - { - if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) - { - try - { - return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); - } - catch { } - } - return null; - } - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs deleted file mode 100644 index 847527a2dbb7..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs +++ /dev/null @@ -1,450 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; -using Nancy; -using NodaTime; -using NodaTime.Text; -using Sharpility.Base; -using Sharpility.Extensions; -using Sharpility.Util; - -namespace Org.OpenAPITools._v2.Utils -{ - internal static class Parameters - { - private static readonly IDictionary> Parsers = CreateParsers(); - - internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - var valueType = typeof(TValue); - var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); - var isNullable = default(TValue) == null; - string value = RawValueOf(parameters, request, name, parameterType); - Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); - if (value == null && isNullable) - { - return default(TValue); - } - if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) - { - return EnumValueOf(name, value); - } - return ValueOf(parameters, name, value, valueType, request, parameterType); - } - - private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - try - { - switch (parameterType) - { - case ParameterType.Query: - string querValue = request.Query[name]; - return querValue; - case ParameterType.Path: - string pathValue = parameters[name]; - return pathValue; - case ParameterType.Header: - var headerValue = request.Headers[name]; - return headerValue != null ? string.Join(",", headerValue) : null; - } - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); - } - throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); - } - - private static TValue EnumValueOf(string name, string value) - { - var valueType = typeof(TValue); - var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); - Preconditions.IsNotNull(enumType, () => new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); - var values = Enum.GetValues(enumType); - foreach (var entry in values) - { - if (entry.ToString().EqualsIgnoreCases(value) - || ((int)entry).ToString().EqualsIgnoreCases(value)) - { - return (TValue)entry; - } - } - throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", - name, value, Strings.ToString(values))); - } - - private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) - { - var parser = Parsers.GetIfPresent(valueType); - if (parser != null) - { - return ParseValueUsing(name, value, valueType, parser); - } - if (parameterType == ParameterType.Path) - { - return DynamicValueOf(parameters, name); - } - if (parameterType == ParameterType.Query) - { - return DynamicValueOf(request.Query, name); - } - throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); - } - - private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) - { - var result = parser(Parameter.Of(name, value)); - try - { - return (TValue)result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + - "Received: '{2}', expected: '{3}'.", - name, value, result.GetType(), valueType)); - } - } - - private static TValue DynamicValueOf(dynamic parameters, string name) - { - string value = parameters[name]; - try - { - TValue result = parameters[name]; - return result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + - "Expected type: '{2}' is not supported", - name, value, typeof(TValue))); - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", - name, typeof(TValue)), e); - } - } - - private static IDictionary> CreateParsers() - { - var parsers = ImmutableDictionary.CreateBuilder>(); - parsers.Put(typeof(string), value => value.Value); - parsers.Put(typeof(bool), SafeParse(bool.Parse)); - parsers.Put(typeof(bool?), SafeParse(bool.Parse)); - parsers.Put(typeof(byte), SafeParse(byte.Parse)); - parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); - parsers.Put(typeof(short), SafeParse(short.Parse)); - parsers.Put(typeof(short?), SafeParse(short.Parse)); - parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); - parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); - parsers.Put(typeof(int), SafeParse(int.Parse)); - parsers.Put(typeof(int?), SafeParse(int.Parse)); - parsers.Put(typeof(uint), SafeParse(uint.Parse)); - parsers.Put(typeof(uint?), SafeParse(uint.Parse)); - parsers.Put(typeof(long), SafeParse(long.Parse)); - parsers.Put(typeof(long?), SafeParse(long.Parse)); - parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); - parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); - parsers.Put(typeof(float), SafeParse(float.Parse)); - parsers.Put(typeof(float?), SafeParse(float.Parse)); - parsers.Put(typeof(double), SafeParse(double.Parse)); - parsers.Put(typeof(double?), SafeParse(double.Parse)); - parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); - parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); - parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); - parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); - parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); - parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); - parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); - parsers.Put(typeof(IList), ImmutableListParse(value => value)); - parsers.Put(typeof(List), ListParse(value => value)); - parsers.Put(typeof(ISet), ImmutableListParse(value => value)); - parsers.Put(typeof(HashSet), SetParse(value => value)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(List), NullableListParse(bool.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(List), ListParse(byte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); - parsers.Put(typeof(HashSet), SetParse(byte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(List), ListParse(sbyte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); - parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); - parsers.Put(typeof(List), ListParse(short.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); - parsers.Put(typeof(HashSet), SetParse(short.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(List), ListParse(ushort.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); - parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(List), NullableListParse(int.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(List), ListParse(uint.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); - parsers.Put(typeof(HashSet), SetParse(uint.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(List), NullableListParse(long.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(List), ListParse(ulong.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); - parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(List), NullableListParse(float.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(List), NullableListParse(double.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(List), NullableListParse(decimal.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); - parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); - - return parsers.ToImmutableDictionary(); - } - - private static Func SafeParse(Func parse) - { - return parameter => - { - try - { - return parse(parameter.Value); - } - catch (OverflowException) - { - throw ParameterOutOfRange(parameter, typeof(T)); - } - catch (FormatException) - { - throw InvalidParameterFormat(parameter, typeof(T)); - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", - parameter.Name, parameter.Value, typeof(T)), e); - } - }; - } - - private static Func NullableListParse(Func itemParser) where T: struct - { - return ListParse(it => it.ToNullable(itemParser)); - } - - private static Func ListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new List(); - } - return ParseCollection(parameter.Value, itemParser).ToList(); - }; - } - - private static Func NullableImmutableListParse(Func itemParser) where T: struct - { - return ImmutableListParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Lists.EmptyList(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableList(); - }; - } - - private static Func NullableSetParse(Func itemParser) where T: struct - { - return SetParse(it => it.ToNullable(itemParser)); - } - - private static Func SetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new HashSet(); - } - return ParseCollection(parameter.Value, itemParser).ToSet(); - }; - } - - private static Func NullableImmutableSetParse(Func itemParser) where T: struct - { - return ImmutableSetParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableSetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Sets.EmptySet(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); - }; - } - - private static ZonedDateTime ParseZonedDateTime(string value) - { - var dateTime = DateTime.Parse(value); - return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); - } - - private static LocalDate ParseLocalDate(string value) - { - return LocalDatePattern.IsoPattern.Parse(value).Value; - } - - private static LocalTime ParseLocalTime(string value) - { - return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; - } - - private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static IEnumerable ParseCollection(string value, Func itemParser) - { - var results = value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser); - return results; - } - - public static T? ToNullable(this string s, Func itemParser) where T : struct - { - T? result = new T?(); - try - { - if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) - { - result = itemParser(s); - } - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); - } - return result; - } - - private class Parameter - { - internal string Name { get; private set; } - internal string Value { get; private set; } - - private Parameter(string name, string value) - { - Name = name; - Value = value; - } - - internal static Parameter Of(string name, string value) - { - return new Parameter(name, value); - } - } - } - - internal enum ParameterType - { - Undefined, - Query, - Path, - Header - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config deleted file mode 100644 index e3401566e5d2..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file From 91087b59c5268c5f3915bd4a0ae6b470818ca13a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 30 Jan 2022 15:56:08 +0800 Subject: [PATCH 166/175] remove swift4 generator (#11455) --- docs/generators.md | 1 - docs/generators/swift4-deprecated.md | 333 ----- .../codegen/languages/Swift4Codegen.java | 1097 ----------------- .../org.openapitools.codegen.CodegenConfig | 4 +- .../main/resources/swift4/APIHelper.mustache | 70 -- .../src/main/resources/swift4/APIs.mustache | 62 - .../swift4/AlamofireImplementations.mustache | 451 ------- .../main/resources/swift4/Cartfile.mustache | 3 - .../resources/swift4/CodableHelper.mustache | 75 -- .../resources/swift4/Configuration.mustache | 15 - .../main/resources/swift4/Extensions.mustache | 188 --- .../swift4/JSONEncodableEncoding.mustache | 54 - .../swift4/JSONEncodingHelper.mustache | 43 - .../src/main/resources/swift4/Models.mustache | 36 - .../resources/swift4/Package.swift.mustache | 33 - .../main/resources/swift4/Podspec.mustache | 38 - .../src/main/resources/swift4/README.mustache | 69 -- .../src/main/resources/swift4/Result.mustache | 17 - .../main/resources/swift4/XcodeGen.mustache | 17 - .../src/main/resources/swift4/_param.mustache | 1 - .../src/main/resources/swift4/api.mustache | 216 ---- .../main/resources/swift4/api_doc.mustache | 97 -- .../resources/swift4/git_push.sh.mustache | 57 - .../main/resources/swift4/gitignore.mustache | 63 - .../src/main/resources/swift4/model.mustache | 24 - .../main/resources/swift4/modelArray.mustache | 1 - .../main/resources/swift4/modelEnum.mustache | 7 - .../modelInlineEnumDeclaration.mustache | 7 - .../resources/swift4/modelObject.mustache | 81 -- .../main/resources/swift4/model_doc.mustache | 11 - 30 files changed, 1 insertion(+), 3170 deletions(-) delete mode 100644 docs/generators/swift4-deprecated.md delete mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java delete mode 100644 modules/openapi-generator/src/main/resources/swift4/APIHelper.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/APIs.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/AlamofireImplementations.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/CodableHelper.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/Configuration.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/Extensions.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/JSONEncodableEncoding.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/Models.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/Podspec.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/README.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/Result.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/_param.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/api.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/api_doc.mustache delete mode 100755 modules/openapi-generator/src/main/resources/swift4/git_push.sh.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/gitignore.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/model.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/modelArray.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/modelEnum.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/modelInlineEnumDeclaration.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/modelObject.mustache delete mode 100644 modules/openapi-generator/src/main/resources/swift4/model_doc.mustache diff --git a/docs/generators.md b/docs/generators.md index 65595bbbe893..0ec7569496cf 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -64,7 +64,6 @@ The following generators are available: * [scala-httpclient-deprecated (deprecated)](generators/scala-httpclient-deprecated.md) * [scala-sttp (beta)](generators/scala-sttp.md) * [scalaz](generators/scalaz.md) -* [swift4-deprecated (deprecated)](generators/swift4-deprecated.md) * [swift5](generators/swift5.md) * [typescript (experimental)](generators/typescript.md) * [typescript-angular](generators/typescript-angular.md) diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md deleted file mode 100644 index dd39ea987763..000000000000 --- a/docs/generators/swift4-deprecated.md +++ /dev/null @@ -1,333 +0,0 @@ ---- -title: Documentation for the swift4-deprecated Generator ---- - -## METADATA - -| Property | Value | Notes | -| -------- | ----- | ----- | -| generator name | swift4-deprecated | pass this to the generate command after -g | -| generator stability | DEPRECATED | | -| generator type | CLIENT | | -| generator language | Swift | | -| generator default templating engine | mustache | | -| helpTxt | Generates a Swift 4.x client library (Deprecated and will be removed in 5.x releases. Please use `swift5` instead.) | | - -## 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. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|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| -|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| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|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| -|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| -|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| -|podAuthors|Authors used for Podspec| |null| -|podDescription|Description used for Podspec| |null| -|podDocsetURL|Docset URL used for Podspec| |null| -|podDocumentationURL|Documentation URL used for Podspec| |null| -|podHomepage|Homepage used for Podspec| |null| -|podLicense|License used for Podspec| |null| -|podScreenshots|Screenshots used for Podspec| |null| -|podSocialMediaURL|Social Media URL used for Podspec| |null| -|podSource|Source information used for Podspec| |null| -|podSummary|Summary used for Podspec| |null| -|podVersion|Version used for Podspec| |null| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|projectName|Project name in Xcode| |null| -|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result are available.| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| -|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | - - -## LANGUAGE PRIMITIVES - -
    -
  • Any
  • -
  • AnyObject
  • -
  • Bool
  • -
  • Character
  • -
  • Data
  • -
  • Date
  • -
  • Decimal
  • -
  • Double
  • -
  • Float
  • -
  • Int
  • -
  • Int32
  • -
  • Int64
  • -
  • String
  • -
  • URL
  • -
  • UUID
  • -
  • Void
  • -
- -## RESERVED WORDS - -
    -
  • #available
  • -
  • #colorLiteral
  • -
  • #column
  • -
  • #else
  • -
  • #elseif
  • -
  • #endif
  • -
  • #file
  • -
  • #fileLiteral
  • -
  • #function
  • -
  • #if
  • -
  • #imageLiteral
  • -
  • #line
  • -
  • #selector
  • -
  • #sourceLocation
  • -
  • Any
  • -
  • AnyObject
  • -
  • Array
  • -
  • Bool
  • -
  • COLUMN
  • -
  • Character
  • -
  • Class
  • -
  • ClosedRange
  • -
  • Codable
  • -
  • CountableClosedRange
  • -
  • CountableRange
  • -
  • Data
  • -
  • Decodable
  • -
  • Dictionary
  • -
  • Double
  • -
  • Encodable
  • -
  • Error
  • -
  • ErrorResponse
  • -
  • FILE
  • -
  • FUNCTION
  • -
  • Float
  • -
  • Float32
  • -
  • Float64
  • -
  • Float80
  • -
  • Int
  • -
  • Int16
  • -
  • Int32
  • -
  • Int64
  • -
  • Int8
  • -
  • LINE
  • -
  • OptionSet
  • -
  • Optional
  • -
  • Protocol
  • -
  • Range
  • -
  • Response
  • -
  • Self
  • -
  • Set
  • -
  • StaticString
  • -
  • String
  • -
  • Type
  • -
  • UInt
  • -
  • UInt16
  • -
  • UInt32
  • -
  • UInt64
  • -
  • UInt8
  • -
  • URL
  • -
  • Unicode
  • -
  • Void
  • -
  • _
  • -
  • as
  • -
  • associatedtype
  • -
  • associativity
  • -
  • break
  • -
  • case
  • -
  • catch
  • -
  • class
  • -
  • continue
  • -
  • convenience
  • -
  • default
  • -
  • defer
  • -
  • deinit
  • -
  • didSet
  • -
  • do
  • -
  • dynamic
  • -
  • dynamicType
  • -
  • else
  • -
  • enum
  • -
  • extension
  • -
  • fallthrough
  • -
  • false
  • -
  • fileprivate
  • -
  • final
  • -
  • for
  • -
  • func
  • -
  • get
  • -
  • guard
  • -
  • if
  • -
  • import
  • -
  • in
  • -
  • indirect
  • -
  • infix
  • -
  • init
  • -
  • inout
  • -
  • internal
  • -
  • is
  • -
  • lazy
  • -
  • left
  • -
  • let
  • -
  • mutating
  • -
  • nil
  • -
  • none
  • -
  • nonmutating
  • -
  • open
  • -
  • operator
  • -
  • optional
  • -
  • override
  • -
  • postfix
  • -
  • precedence
  • -
  • prefix
  • -
  • private
  • -
  • protocol
  • -
  • public
  • -
  • repeat
  • -
  • required
  • -
  • rethrows
  • -
  • return
  • -
  • right
  • -
  • self
  • -
  • set
  • -
  • static
  • -
  • struct
  • -
  • subscript
  • -
  • super
  • -
  • switch
  • -
  • throw
  • -
  • throws
  • -
  • true
  • -
  • try
  • -
  • typealias
  • -
  • unowned
  • -
  • var
  • -
  • weak
  • -
  • where
  • -
  • while
  • -
  • willSet
  • -
- -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✗|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✗|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✗|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✓|OAS2,OAS3 -|Polymorphism|✓|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✗|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java deleted file mode 100644 index 5adc13172bf7..000000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ /dev/null @@ -1,1097 +0,0 @@ -/* - * 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.languages; - -import io.swagger.v3.oas.models.media.ArraySchema; -import io.swagger.v3.oas.models.media.Schema; -import org.apache.commons.io.FilenameUtils; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.text.WordUtils; -import org.openapitools.codegen.*; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; -import org.openapitools.codegen.meta.features.*; -import org.openapitools.codegen.utils.ModelUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.IOException; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import static org.openapitools.codegen.utils.StringUtils.camelize; - -public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { - private final Logger LOGGER = LoggerFactory.getLogger(Swift4Codegen.class); - - public static final String PROJECT_NAME = "projectName"; - public static final String RESPONSE_AS = "responseAs"; - public static final String UNWRAP_REQUIRED = "unwrapRequired"; - public static final String OBJC_COMPATIBLE = "objcCompatible"; - public static final String POD_SOURCE = "podSource"; - public static final String POD_AUTHORS = "podAuthors"; - public static final String POD_SOCIAL_MEDIA_URL = "podSocialMediaURL"; - public static final String POD_DOCSET_URL = "podDocsetURL"; - public static final String POD_LICENSE = "podLicense"; - public static final String POD_HOMEPAGE = "podHomepage"; - public static final String POD_SUMMARY = "podSummary"; - public static final String POD_DESCRIPTION = "podDescription"; - public static final String POD_SCREENSHOTS = "podScreenshots"; - public static final String POD_DOCUMENTATION_URL = "podDocumentationURL"; - public static final String SWIFT_USE_API_NAMESPACE = "swiftUseApiNamespace"; - public static final String DEFAULT_POD_AUTHORS = "OpenAPI Generator"; - public static final String LENIENT_TYPE_CAST = "lenientTypeCast"; - protected static final String LIBRARY_PROMISE_KIT = "PromiseKit"; - protected static final String LIBRARY_RX_SWIFT = "RxSwift"; - protected static final String LIBRARY_RESULT = "Result"; - protected static final String[] RESPONSE_LIBRARIES = {LIBRARY_PROMISE_KIT, LIBRARY_RX_SWIFT, LIBRARY_RESULT}; - protected String projectName = "OpenAPIClient"; - protected boolean nonPublicApi = false; - protected boolean unwrapRequired; - protected boolean objcCompatible = false; - protected boolean lenientTypeCast = false; - protected boolean swiftUseApiNamespace; - protected String[] responseAs = new String[0]; - protected String sourceFolder = "Classes" + File.separator + "OpenAPIs"; - protected HashSet objcReservedWords; - protected String apiDocPath = "docs/"; - protected String modelDocPath = "docs/"; - - /** - * Constructor for the swift4 language codegen module. - */ - public Swift4Codegen() { - super(); - - modifyFeatureSet(features -> features - .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) - .securityFeatures(EnumSet.of( - SecurityFeature.BasicAuth, - SecurityFeature.ApiKey, - SecurityFeature.OAuth2_Implicit - )) - .excludeGlobalFeatures( - GlobalFeature.XMLStructureDefinitions, - GlobalFeature.Callbacks, - GlobalFeature.LinkObjects, - GlobalFeature.ParameterStyling - ) - .includeSchemaSupportFeatures( - SchemaSupportFeature.Polymorphism - ) - .excludeParameterFeatures( - ParameterFeature.Cookie - ) - ); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.DEPRECATED) - .build(); - - outputFolder = "generated-code" + File.separator + "swift"; - modelTemplateFiles.put("model.mustache", ".swift"); - apiTemplateFiles.put("api.mustache", ".swift"); - embeddedTemplateDir = templateDir = "swift4"; - apiPackage = File.separator + "APIs"; - modelPackage = File.separator + "Models"; - modelDocTemplateFiles.put("model_doc.mustache", ".md"); - apiDocTemplateFiles.put("api_doc.mustache", ".md"); - - languageSpecificPrimitives = new HashSet<>( - Arrays.asList( - "Int", - "Int32", - "Int64", - "Float", - "Double", - "Bool", - "Void", - "String", - "URL", - "Data", - "Date", - "Character", - "UUID", - "URL", - "AnyObject", - "Any", - "Decimal") - ); - defaultIncludes = new HashSet<>( - Arrays.asList( - "Data", - "Date", - "URL", // for file - "UUID", - "Array", - "Dictionary", - "Set", - "Any", - "Empty", - "AnyObject", - "Any", - "Decimal") - ); - - objcReservedWords = new HashSet<>( - Arrays.asList( - // Added for Objective-C compatibility - "id", "description", "NSArray", "NSURL", "CGFloat", "NSSet", "NSString", "NSInteger", "NSUInteger", - "NSError", "NSDictionary", - // Cannot override with a stored property 'className' - "className" - ) - ); - - reservedWords = new HashSet<>( - Arrays.asList( - // name used by swift client - "ErrorResponse", "Response", - - // Swift keywords. This list is taken from here: - // https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/doc/uid/TP40014097-CH30-ID410 - // - // Keywords used in declarations - "associatedtype", "class", "deinit", "enum", "extension", "fileprivate", "func", "import", "init", - "inout", "internal", "let", "open", "operator", "private", "protocol", "public", "static", "struct", - "subscript", "typealias", "var", - // Keywords uses in statements - "break", "case", "continue", "default", "defer", "do", "else", "fallthrough", "for", "guard", "if", - "in", "repeat", "return", "switch", "where", "while", - // Keywords used in expressions and types - "as", "Any", "catch", "false", "is", "nil", "rethrows", "super", "self", "Self", "throw", "throws", "true", "try", - // Keywords used in patterns - "_", - // Keywords that begin with a number sign - "#available", "#colorLiteral", "#column", "#else", "#elseif", "#endif", "#file", "#fileLiteral", "#function", "#if", - "#imageLiteral", "#line", "#selector", "#sourceLocation", - // Keywords reserved in particular contexts - "associativity", "convenience", "dynamic", "didSet", "final", "get", "infix", "indirect", "lazy", "left", - "mutating", "none", "nonmutating", "optional", "override", "postfix", "precedence", "prefix", "Protocol", - "required", "right", "set", "Type", "unowned", "weak", "willSet", - - // - // Swift Standard Library types - // https://developer.apple.com/documentation/swift - // - // Numbers and Basic Values - "Bool", "Int", "Double", "Float", "Range", "ClosedRange", "Error", "Optional", - // Special-Use Numeric Types - "UInt", "UInt8", "UInt16", "UInt32", "UInt64", "Int8", "Int16", "Int32", "Int64", "Float80", "Float32", "Float64", - // Strings and Text - "String", "Character", "Unicode", "StaticString", - // Collections - "Array", "Dictionary", "Set", "OptionSet", "CountableRange", "CountableClosedRange", - - // The following are commonly-used Foundation types - "URL", "Data", "Codable", "Encodable", "Decodable", - - // The following are other words we want to reserve - "Void", "AnyObject", "Class", "dynamicType", "COLUMN", "FILE", "FUNCTION", "LINE" - ) - ); - - typeMapping = new HashMap<>(); - typeMapping.put("array", "Array"); - typeMapping.put("List", "Array"); - typeMapping.put("map", "Dictionary"); - typeMapping.put("date", "Date"); - typeMapping.put("Date", "Date"); - typeMapping.put("DateTime", "Date"); - typeMapping.put("boolean", "Bool"); - typeMapping.put("string", "String"); - typeMapping.put("char", "Character"); - typeMapping.put("short", "Int"); - typeMapping.put("int", "Int"); - typeMapping.put("long", "Int64"); - typeMapping.put("integer", "Int"); - typeMapping.put("Integer", "Int"); - typeMapping.put("float", "Float"); - typeMapping.put("number", "Double"); - typeMapping.put("double", "Double"); - typeMapping.put("file", "URL"); - typeMapping.put("binary", "URL"); - typeMapping.put("ByteArray", "Data"); - typeMapping.put("UUID", "UUID"); - typeMapping.put("URI", "String"); - typeMapping.put("decimal", "Decimal"); - typeMapping.put("object", "Any"); - typeMapping.put("AnyType", "Any"); - - importMapping = new HashMap<>(); - - cliOptions.add(new CliOption(PROJECT_NAME, "Project name in Xcode")); - cliOptions.add(new CliOption(RESPONSE_AS, - "Optionally use libraries to manage response. Currently " - + StringUtils.join(RESPONSE_LIBRARIES, ", ") - + " are available.")); - cliOptions.add(new CliOption(CodegenConstants.NON_PUBLIC_API, - CodegenConstants.NON_PUBLIC_API_DESC - + "(default: false)")); - cliOptions.add(new CliOption(UNWRAP_REQUIRED, - "Treat 'required' properties in response as non-optional " - + "(which would crash the app if api returns null as opposed " - + "to required option specified in json schema")); - cliOptions.add(new CliOption(OBJC_COMPATIBLE, - "Add additional properties and methods for Objective-C " - + "compatibility (default: false)")); - cliOptions.add(new CliOption(POD_SOURCE, "Source information used for Podspec")); - cliOptions.add(new CliOption(CodegenConstants.POD_VERSION, "Version used for Podspec")); - cliOptions.add(new CliOption(POD_AUTHORS, "Authors used for Podspec")); - cliOptions.add(new CliOption(POD_SOCIAL_MEDIA_URL, "Social Media URL used for Podspec")); - cliOptions.add(new CliOption(POD_DOCSET_URL, "Docset URL used for Podspec")); - cliOptions.add(new CliOption(POD_LICENSE, "License used for Podspec")); - cliOptions.add(new CliOption(POD_HOMEPAGE, "Homepage used for Podspec")); - cliOptions.add(new CliOption(POD_SUMMARY, "Summary used for Podspec")); - cliOptions.add(new CliOption(POD_DESCRIPTION, "Description used for Podspec")); - cliOptions.add(new CliOption(POD_SCREENSHOTS, "Screenshots used for Podspec")); - cliOptions.add(new CliOption(POD_DOCUMENTATION_URL, - "Documentation URL used for Podspec")); - cliOptions.add(new CliOption(SWIFT_USE_API_NAMESPACE, - "Flag to make all the API classes inner-class " - + "of {{projectName}}API")); - cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, - CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) - .defaultValue(Boolean.TRUE.toString())); - cliOptions.add(new CliOption(LENIENT_TYPE_CAST, - "Accept and cast values for simple types (string->bool, " - + "string->int, int->string)") - .defaultValue(Boolean.FALSE.toString())); - } - - private static CodegenModel reconcileProperties(CodegenModel codegenModel, - CodegenModel parentCodegenModel) { - // To support inheritance in this generator, we will analyze - // the parent and child models, look for properties that match, and remove - // them from the child models and leave them in the parent. - // Because the child models extend the parents, the properties - // will be available via the parent. - - // Get the properties for the parent and child models - final List parentModelCodegenProperties = parentCodegenModel.vars; - List codegenProperties = codegenModel.vars; - codegenModel.allVars = new ArrayList(codegenProperties); - codegenModel.parentVars = parentCodegenModel.allVars; - - // Iterate over all of the parent model properties - boolean removedChildProperty = false; - - for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) { - // Now that we have found a prop in the parent class, - // and search the child class for the same prop. - Iterator iterator = codegenProperties.iterator(); - while (iterator.hasNext()) { - CodegenProperty codegenProperty = iterator.next(); - if (codegenProperty.baseName.equals(parentModelCodegenProperty.baseName)) { - // We found a property in the child class that is - // a duplicate of the one in the parent, so remove it. - iterator.remove(); - removedChildProperty = true; - } - } - } - - if (removedChildProperty) { - codegenModel.vars = codegenProperties; - } - - - return codegenModel; - } - - @Override - public CodegenType getTag() { - return CodegenType.CLIENT; - } - - @Override - public String getName() { - return "swift4-deprecated"; - } - - @Override - public String getHelp() { - return "Generates a Swift 4.x client library (Deprecated and will be removed in 5.x releases. Please use `swift5` instead.)"; - } - - @Override - protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, - Schema schema) { - - final Schema additionalProperties = getAdditionalProperties(schema); - - if (additionalProperties != null) { - codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); - } - } - - @Override - public void processOpts() { - super.processOpts(); - - if (StringUtils.isEmpty(System.getenv("SWIFT_POST_PROCESS_FILE"))) { - LOGGER.info("Environment variable SWIFT_POST_PROCESS_FILE not defined so the Swift code may not be properly formatted. To define it, try 'export SWIFT_POST_PROCESS_FILE=/usr/local/bin/swiftformat' (Linux/Mac)"); - LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); - } - - // Setup project name - if (additionalProperties.containsKey(PROJECT_NAME)) { - setProjectName((String) additionalProperties.get(PROJECT_NAME)); - } else { - additionalProperties.put(PROJECT_NAME, projectName); - } - sourceFolder = projectName + File.separator + sourceFolder; - - // Setup nonPublicApi option, which generates code with reduced access - // modifiers; allows embedding elsewhere without exposing non-public API calls - // to consumers - if (additionalProperties.containsKey(CodegenConstants.NON_PUBLIC_API)) { - setNonPublicApi(convertPropertyToBooleanAndWriteBack(CodegenConstants.NON_PUBLIC_API)); - } - additionalProperties.put(CodegenConstants.NON_PUBLIC_API, nonPublicApi); - - // Setup unwrapRequired option, which makes all the - // properties with "required" non-optional - if (additionalProperties.containsKey(UNWRAP_REQUIRED)) { - setUnwrapRequired(convertPropertyToBooleanAndWriteBack(UNWRAP_REQUIRED)); - } - additionalProperties.put(UNWRAP_REQUIRED, unwrapRequired); - - // Setup objcCompatible option, which adds additional properties - // and methods for Objective-C compatibility - if (additionalProperties.containsKey(OBJC_COMPATIBLE)) { - setObjcCompatible(convertPropertyToBooleanAndWriteBack(OBJC_COMPATIBLE)); - } - additionalProperties.put(OBJC_COMPATIBLE, objcCompatible); - - // add objc reserved words - if (Boolean.TRUE.equals(objcCompatible)) { - reservedWords.addAll(objcReservedWords); - } - - // Setup unwrapRequired option, which makes all the properties with "required" non-optional - if (additionalProperties.containsKey(RESPONSE_AS)) { - Object responseAsObject = additionalProperties.get(RESPONSE_AS); - if (responseAsObject instanceof String) { - setResponseAs(((String) responseAsObject).split(",")); - } else { - setResponseAs((String[]) responseAsObject); - } - } - additionalProperties.put(RESPONSE_AS, responseAs); - if (ArrayUtils.contains(responseAs, LIBRARY_PROMISE_KIT)) { - additionalProperties.put("usePromiseKit", true); - } - if (ArrayUtils.contains(responseAs, LIBRARY_RX_SWIFT)) { - additionalProperties.put("useRxSwift", true); - } - if (ArrayUtils.contains(responseAs, LIBRARY_RESULT)) { - additionalProperties.put("useResult", true); - } - - // Setup swiftUseApiNamespace option, which makes all the API - // classes inner-class of {{projectName}}API - if (additionalProperties.containsKey(SWIFT_USE_API_NAMESPACE)) { - setSwiftUseApiNamespace(convertPropertyToBooleanAndWriteBack(SWIFT_USE_API_NAMESPACE)); - } - - if (!additionalProperties.containsKey(POD_AUTHORS)) { - additionalProperties.put(POD_AUTHORS, DEFAULT_POD_AUTHORS); - } - - setLenientTypeCast(convertPropertyToBooleanAndWriteBack(LENIENT_TYPE_CAST)); - - // make api and model doc path available in mustache template - additionalProperties.put("apiDocPath", apiDocPath); - additionalProperties.put("modelDocPath", modelDocPath); - - supportingFiles.add(new SupportingFile("Podspec.mustache", - "", - projectName + ".podspec")); - supportingFiles.add(new SupportingFile("Cartfile.mustache", - "", - "Cartfile")); - supportingFiles.add(new SupportingFile("Package.swift.mustache", - "", - "Package.swift")); - supportingFiles.add(new SupportingFile("APIHelper.mustache", - sourceFolder, - "APIHelper.swift")); - supportingFiles.add(new SupportingFile("AlamofireImplementations.mustache", - sourceFolder, - "AlamofireImplementations.swift")); - supportingFiles.add(new SupportingFile("Configuration.mustache", - sourceFolder, - "Configuration.swift")); - supportingFiles.add(new SupportingFile("Extensions.mustache", - sourceFolder, - "Extensions.swift")); - supportingFiles.add(new SupportingFile("Models.mustache", - sourceFolder, - "Models.swift")); - supportingFiles.add(new SupportingFile("APIs.mustache", - sourceFolder, - "APIs.swift")); - supportingFiles.add(new SupportingFile("CodableHelper.mustache", - sourceFolder, - "CodableHelper.swift")); - supportingFiles.add(new SupportingFile("JSONEncodableEncoding.mustache", - sourceFolder, - "JSONEncodableEncoding.swift")); - supportingFiles.add(new SupportingFile("JSONEncodingHelper.mustache", - sourceFolder, - "JSONEncodingHelper.swift")); - if (ArrayUtils.contains(responseAs, LIBRARY_RESULT)) { - supportingFiles.add(new SupportingFile("Result.mustache", - sourceFolder, - "Result.swift")); - } - supportingFiles.add(new SupportingFile("git_push.sh.mustache", - "", - "git_push.sh")); - supportingFiles.add(new SupportingFile("gitignore.mustache", - "", - ".gitignore")); - supportingFiles.add(new SupportingFile("README.mustache", - "", - "README.md")); - supportingFiles.add(new SupportingFile("XcodeGen.mustache", - "", - "project.yml")); - - } - - @Override - protected boolean isReservedWord(String word) { - return word != null && reservedWords.contains(word); //don't lowercase as super does - } - - @Override - public String escapeReservedWord(String name) { - if (this.reservedWordsMappings().containsKey(name)) { - return this.reservedWordsMappings().get(name); - } - return "_" + name; // add an underscore to the name - } - - @Override - public String modelFileFolder() { - return outputFolder + File.separator + sourceFolder - + modelPackage().replace('.', File.separatorChar); - } - - @Override - public String apiFileFolder() { - return outputFolder + File.separator + sourceFolder - + apiPackage().replace('.', File.separatorChar); - } - - @Override - public String getTypeDeclaration(Schema p) { - if (ModelUtils.isArraySchema(p)) { - ArraySchema ap = (ArraySchema) p; - Schema inner = ap.getItems(); - return "[" + getTypeDeclaration(inner) + "]"; - } else if (ModelUtils.isMapSchema(p)) { - Schema inner = getAdditionalProperties(p); - return "[String:" + getTypeDeclaration(inner) + "]"; - } - return super.getTypeDeclaration(p); - } - - @Override - public String getSchemaType(Schema p) { - String openAPIType = super.getSchemaType(p); - String type; - if (typeMapping.containsKey(openAPIType)) { - type = typeMapping.get(openAPIType); - if (languageSpecificPrimitives.contains(type) || defaultIncludes.contains(type)) { - return type; - } - } else { - type = openAPIType; - } - return toModelName(type); - } - - @Override - public boolean isDataTypeFile(String dataType) { - return "URL".equals(dataType); - } - - @Override - public boolean isDataTypeBinary(final String dataType) { - return "Data".equals(dataType); - } - - /** - * Output the proper model name (capitalized). - * - * @param name the name of the model - * @return capitalized model name - */ - @Override - public String toModelName(String name) { - // FIXME parameter should not be assigned. Also declare it as "final" - name = sanitizeName(name); - - if (!StringUtils.isEmpty(modelNameSuffix)) { // set model suffix - name = name + "_" + modelNameSuffix; - } - - if (!StringUtils.isEmpty(modelNamePrefix)) { // set model prefix - name = modelNamePrefix + "_" + name; - } - - // camelize the model name - // phone_number => PhoneNumber - name = camelize(name); - - // model name cannot use reserved keyword, e.g. return - if (isReservedWord(name)) { - String modelName = "Model" + name; - LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", name, modelName); - return modelName; - } - - // model name starts with number - if (name.matches("^\\d.*")) { - // e.g. 200Response => Model200Response (after camelize) - String modelName = "Model" + name; - LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", name, - modelName); - return modelName; - } - - return name; - } - - /** - * Return the capitalized file name of the model. - * - * @param name the model name - * @return the file name of the model - */ - @Override - public String toModelFilename(String name) { - // should be the same as the model name - return toModelName(name); - } - - @Override - public String toDefaultValue(Schema p) { - if (p.getEnum() != null && !p.getEnum().isEmpty()) { - if (p.getDefault() != null) { - if (ModelUtils.isStringSchema(p)) { - return "." + toEnumVarName(escapeText((String) p.getDefault()), p.getType()); - } else { - return "." + toEnumVarName(escapeText(p.getDefault().toString()), p.getType()); - } - } - } - if (ModelUtils.isIntegerSchema(p) || ModelUtils.isNumberSchema(p) || ModelUtils.isBooleanSchema(p)) { - if (p.getDefault() != null) { - return p.getDefault().toString(); - } - } else if (ModelUtils.isStringSchema(p)) { - if (p.getDefault() != null) { - return "\"" + escapeText((String) p.getDefault()) + "\""; - } - } - return null; - } - - @Override - public String toInstantiationType(Schema p) { - if (ModelUtils.isMapSchema(p)) { - return getSchemaType(getAdditionalProperties(p)); - } else if (ModelUtils.isArraySchema(p)) { - ArraySchema ap = (ArraySchema) p; - String inner = getSchemaType(ap.getItems()); - return "[" + inner + "]"; - } - return null; - } - - @Override - public String toApiName(String name) { - if (name.length() == 0) { - return "DefaultAPI"; - } - return camelize(name) + "API"; - } - - @Override - public String apiDocFileFolder() { - return (outputFolder + "/" + apiDocPath).replace("/", File.separator); - } - - @Override - public String modelDocFileFolder() { - return (outputFolder + "/" + modelDocPath).replace("/", File.separator); - } - - @Override - public String toModelDocFilename(String name) { - return toModelName(name); - } - - @Override - public String toApiDocFilename(String name) { - return toApiName(name); - } - - @Override - public String toOperationId(String operationId) { - operationId = camelize(sanitizeName(operationId), true); - - // Throw exception if method name is empty. - // This should not happen but keep the check just in case - if (StringUtils.isEmpty(operationId)) { - throw new RuntimeException("Empty method name (operationId) not allowed"); - } - - // method name cannot use reserved keyword, e.g. return - if (isReservedWord(operationId)) { - String newOperationId = camelize(("call_" + operationId), true); - LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId); - return newOperationId; - } - - // operationId starts with a number - if (operationId.matches("^\\d.*")) { - LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, camelize(sanitizeName("call_" + operationId), true)); - operationId = camelize(sanitizeName("call_" + operationId), true); - } - - - return operationId; - } - - @Override - public String toVarName(String name) { - // sanitize name - name = sanitizeName(name); - - // if it's all upper case, do nothing - if (name.matches("^[A-Z_]*$")) { - return name; - } - - // camelize the variable name - // pet_id => petId - name = camelize(name, true); - - // for reserved word or word starting with number, append _ - if (isReservedWord(name) || name.matches("^\\d.*")) { - name = escapeReservedWord(name); - } - - return name; - } - - @Override - public String toParamName(String name) { - // sanitize name - name = sanitizeName(name); - - // replace - with _ e.g. created-at => created_at - name = name.replaceAll("-", "_"); - - // if it's all upper case, do nothing - if (name.matches("^[A-Z_]*$")) { - return name; - } - - // camelize(lower) the variable name - // pet_id => petId - name = camelize(name, true); - - // for reserved word or word starting with number, append _ - if (isReservedWord(name) || name.matches("^\\d.*")) { - name = escapeReservedWord(name); - } - - return name; - } - - @Override - public CodegenModel fromModel(String name, Schema model) { - Map allDefinitions = ModelUtils.getSchemas(this.openAPI); - CodegenModel codegenModel = super.fromModel(name, model); - if (codegenModel.description != null) { - codegenModel.imports.add("ApiModel"); - } - if (allDefinitions != null) { - String parentSchema = codegenModel.parentSchema; - - // multilevel inheritance: reconcile properties of all the parents - while (parentSchema != null) { - final Schema parentModel = allDefinitions.get(parentSchema); - final CodegenModel parentCodegenModel = super.fromModel(codegenModel.parent, - parentModel); - codegenModel = Swift4Codegen.reconcileProperties(codegenModel, parentCodegenModel); - - // get the next parent - parentSchema = parentCodegenModel.parentSchema; - } - } - - return codegenModel; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public void setNonPublicApi(boolean nonPublicApi) { - this.nonPublicApi = nonPublicApi; - } - - public void setUnwrapRequired(boolean unwrapRequired) { - this.unwrapRequired = unwrapRequired; - } - - public void setObjcCompatible(boolean objcCompatible) { - this.objcCompatible = objcCompatible; - } - - public void setLenientTypeCast(boolean lenientTypeCast) { - this.lenientTypeCast = lenientTypeCast; - } - - public void setResponseAs(String[] responseAs) { - this.responseAs = responseAs; - } - - public void setSwiftUseApiNamespace(boolean swiftUseApiNamespace) { - this.swiftUseApiNamespace = swiftUseApiNamespace; - } - - @Override - public String toEnumValue(String value, String datatype) { - // for string, array of string - if ("String".equals(datatype) || "[String]".equals(datatype) || "[String:String]".equals(datatype)) { - return "\"" + value + "\""; - } else { - return String.valueOf(value); - } - } - - @Override - public String toEnumDefaultValue(String value, String datatype) { - return datatype + "_" + value; - } - - @Override - public String toEnumVarName(String name, String datatype) { - if (name.length() == 0) { - return "empty"; - } - - Pattern startWithNumberPattern = Pattern.compile("^\\d+"); - Matcher startWithNumberMatcher = startWithNumberPattern.matcher(name); - if (startWithNumberMatcher.find()) { - String startingNumbers = startWithNumberMatcher.group(0); - String nameWithoutStartingNumbers = name.substring(startingNumbers.length()); - - return "_" + startingNumbers + camelize(nameWithoutStartingNumbers, true); - } - - // for symbol, e.g. $, # - if (getSymbolName(name) != null) { - return camelize(WordUtils.capitalizeFully(getSymbolName(name).toUpperCase(Locale.ROOT)), true); - } - - // Camelize only when we have a structure defined below - Boolean camelized = false; - if (name.matches("[A-Z][a-z0-9]+[a-zA-Z0-9]*")) { - name = camelize(name, true); - camelized = true; - } - - // Reserved Name - String nameLowercase = StringUtils.lowerCase(name); - if (isReservedWord(nameLowercase)) { - return escapeReservedWord(nameLowercase); - } - - // Check for numerical conversions - if ("Int".equals(datatype) || "Int32".equals(datatype) || "Int64".equals(datatype) - || "Float".equals(datatype) || "Double".equals(datatype)) { - String varName = "number" + camelize(name); - varName = varName.replaceAll("-", "minus"); - varName = varName.replaceAll("\\+", "plus"); - varName = varName.replaceAll("\\.", "dot"); - return varName; - } - - // If we have already camelized the word, don't progress - // any further - if (camelized) { - return name; - } - - char[] separators = {'-', '_', ' ', ':', '(', ')'}; - return camelize(WordUtils.capitalizeFully(StringUtils.lowerCase(name), separators) - .replaceAll("[-_ :\\(\\)]", ""), - true); - } - - @Override - public String toEnumName(CodegenProperty property) { - String enumName = toModelName(property.name); - - // Ensure that the enum type doesn't match a reserved word or - // the variable name doesn't match the generated enum type or the - // Swift compiler will generate an error - if (isReservedWord(property.datatypeWithEnum) - || toVarName(property.name).equals(property.datatypeWithEnum)) { - enumName = property.datatypeWithEnum + "Enum"; - } - - // TODO: toModelName already does something for names starting with number, - // so this code is probably never called - if (enumName.matches("\\d.*")) { // starts with number - return "_" + enumName; - } else { - return enumName; - } - } - - @Override - public Map postProcessModels(Map objs) { - Map postProcessedModelsEnum = postProcessModelsEnum(objs); - - // We iterate through the list of models, and also iterate through each of the - // properties for each model. For each property, if: - // - // CodegenProperty.name != CodegenProperty.baseName - // - // then we set - // - // CodegenProperty.vendorExtensions["x-codegen-escaped-property-name"] = true - // - // Also, if any property in the model has x-codegen-escaped-property-name=true, then we mark: - // - // CodegenModel.vendorExtensions["x-codegen-has-escaped-property-names"] = true - // - List models = (List) postProcessedModelsEnum.get("models"); - for (Object _mo : models) { - Map mo = (Map) _mo; - CodegenModel cm = (CodegenModel) mo.get("model"); - boolean modelHasPropertyWithEscapedName = false; - for (CodegenProperty prop : cm.allVars) { - if (!prop.name.equals(prop.baseName)) { - prop.vendorExtensions.put("x-codegen-escaped-property-name", true); - modelHasPropertyWithEscapedName = true; - } - } - if (modelHasPropertyWithEscapedName) { - cm.vendorExtensions.put("x-codegen-has-escaped-property-names", true); - } - } - - return postProcessedModelsEnum; - } - - @Override - public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { - super.postProcessModelProperty(model, property); - - // The default template code has the following logic for - // assigning a type as Swift Optional: - // - // {{^unwrapRequired}}?{{/unwrapRequired}} - // {{#unwrapRequired}}{{^required}}?{{/required}}{{/unwrapRequired}} - // - // which means: - // - // boolean isSwiftOptional = !unwrapRequired || (unwrapRequired && !property.required); - // - // We can drop the check for unwrapRequired in (unwrapRequired && !property.required) - // due to short-circuit evaluation of the || operator. - boolean isSwiftOptional = !unwrapRequired || !property.required; - boolean isSwiftScalarType = property.isInteger || property.isLong || property.isFloat - || property.isDouble || property.isBoolean; - if (isSwiftOptional && isSwiftScalarType) { - // Optional scalar types like Int?, Int64?, Float?, Double?, and Bool? - // do not translate to Objective-C. So we want to flag those - // properties in case we want to put special code in the templates - // which provide Objective-C compatibility. - property.vendorExtensions.put("x-swift-optional-scalar", true); - } - } - - @Override - public String escapeQuotationMark(String input) { - // remove " to avoid code injection - return input.replace("\"", ""); - } - - @Override - public String escapeUnsafeCharacters(String input) { - return input.replace("*/", "*_/").replace("/*", "/_*"); - } - - @Override - public void postProcessFile(File file, String fileType) { - if (file == null) { - return; - } - String swiftPostProcessFile = System.getenv("SWIFT_POST_PROCESS_FILE"); - if (StringUtils.isEmpty(swiftPostProcessFile)) { - return; // skip if SWIFT_POST_PROCESS_FILE env variable is not defined - } - // only process files with swift extension - if ("swift".equals(FilenameUtils.getExtension(file.toString()))) { - String command = swiftPostProcessFile + " " + file; - try { - Process p = Runtime.getRuntime().exec(command); - int exitValue = p.waitFor(); - if (exitValue != 0) { - LOGGER.error("Error running the command ({}). Exit value: {}", command, exitValue); - } else { - LOGGER.info("Successfully executed: {}", command); - } - } catch (InterruptedException | IOException e) { - LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); - // Restore interrupted state - Thread.currentThread().interrupt(); - } - } - } - - @Override - public Map postProcessOperationsWithModels(Map objs, List allModels) { - Map objectMap = (Map) objs.get("operations"); - - HashMap modelMaps = new HashMap(); - for (Object o : allModels) { - HashMap h = (HashMap) o; - CodegenModel m = (CodegenModel) h.get("model"); - modelMaps.put(m.classname, m); - } - - List operations = (List) objectMap.get("operation"); - for (CodegenOperation operation : operations) { - for (CodegenParameter cp : operation.allParams) { - cp.vendorExtensions.put("x-swift-example", constructExampleCode(cp, modelMaps)); - } - } - return objs; - } - - public String constructExampleCode(CodegenParameter codegenParameter, HashMap modelMaps) { - if (codegenParameter.isArray) { // array - return "[" + constructExampleCode(codegenParameter.items, modelMaps) + "]"; - } else if (codegenParameter.isMap) { // TODO: map, file type - return "\"TODO\""; - } else if (languageSpecificPrimitives.contains(codegenParameter.dataType)) { // primitive type - if ("String".equals(codegenParameter.dataType) || "Character".equals(codegenParameter.dataType)) { - if (StringUtils.isEmpty(codegenParameter.example)) { - return "\"" + codegenParameter.example + "\""; - } else { - return "\"" + codegenParameter.paramName + "_example\""; - } - } else if ("Bool".equals(codegenParameter.dataType)) { // boolean - if (Boolean.parseBoolean(codegenParameter.example)) { - return "true"; - } else { - return "false"; - } - } else if ("URL".equals(codegenParameter.dataType)) { // URL - return "URL(string: \"https://example.com\")!"; - } else if ("Date".equals(codegenParameter.dataType)) { // date - return "Date()"; - } else { // numeric - if (StringUtils.isEmpty(codegenParameter.example)) { - return codegenParameter.example; - } else { - return "987"; - } - } - } else { // model - // look up the model - if (modelMaps.containsKey(codegenParameter.dataType)) { - return constructExampleCode(modelMaps.get(codegenParameter.dataType), modelMaps); - } else { - //LOGGER.error("Error in constructing examples. Failed to look up the model " + codegenParameter.dataType); - return "TODO"; - } - } - } - - public String constructExampleCode(CodegenProperty codegenProperty, HashMap modelMaps) { - if (codegenProperty.isArray) { // array - return "[" + constructExampleCode(codegenProperty.items, modelMaps) + "]"; - } else if (codegenProperty.isMap) { // TODO: map, file type - return "\"TODO\""; - } else if (languageSpecificPrimitives.contains(codegenProperty.dataType)) { // primitive type - if ("String".equals(codegenProperty.dataType) || "Character".equals(codegenProperty.dataType)) { - if (StringUtils.isEmpty(codegenProperty.example)) { - return "\"" + codegenProperty.example + "\""; - } else { - return "\"" + codegenProperty.name + "_example\""; - } - } else if ("Bool".equals(codegenProperty.dataType)) { // boolean - if (Boolean.parseBoolean(codegenProperty.example)) { - return "true"; - } else { - return "false"; - } - } else if ("URL".equals(codegenProperty.dataType)) { // URL - return "URL(string: \"https://example.com\")!"; - } else if ("Date".equals(codegenProperty.dataType)) { // date - return "Date()"; - } else { // numeric - if (StringUtils.isEmpty(codegenProperty.example)) { - return codegenProperty.example; - } else { - return "123"; - } - } - } else { - // look up the model - if (modelMaps.containsKey(codegenProperty.dataType)) { - return constructExampleCode(modelMaps.get(codegenProperty.dataType), modelMaps); - } else { - //LOGGER.error("Error in constructing examples. Failed to look up the model " + codegenProperty.dataType); - return "\"TODO\""; - } - } - } - - public String constructExampleCode(CodegenModel codegenModel, HashMap modelMaps) { - String example; - example = codegenModel.name + "("; - List propertyExamples = new ArrayList<>(); - for (CodegenProperty codegenProperty : codegenModel.vars) { - propertyExamples.add(codegenProperty.name + ": " + constructExampleCode(codegenProperty, modelMaps)); - } - example += StringUtils.join(propertyExamples, ", "); - example += ")"; - return example; - } - - @Override - public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.SWIFT; } -} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 434911baff5d..43071dd2f03b 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -65,6 +65,7 @@ org.openapitools.codegen.languages.JavaPlayFrameworkCodegen org.openapitools.codegen.languages.JavaUndertowServerCodegen org.openapitools.codegen.languages.JavaVertXServerCodegen org.openapitools.codegen.languages.JavaVertXWebServerCodegen +org.openapitools.codegen.languages.JavaCamelServerCodegen org.openapitools.codegen.languages.JavaCXFServerCodegen org.openapitools.codegen.languages.JavaCXFExtServerCodegen org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen @@ -127,7 +128,6 @@ org.openapitools.codegen.languages.SpringCodegen org.openapitools.codegen.languages.StaticDocCodegen org.openapitools.codegen.languages.StaticHtmlGenerator org.openapitools.codegen.languages.StaticHtml2Generator -org.openapitools.codegen.languages.Swift4Codegen org.openapitools.codegen.languages.Swift5ClientCodegen org.openapitools.codegen.languages.TypeScriptClientCodegen org.openapitools.codegen.languages.TypeScriptAngularClientCodegen @@ -142,5 +142,3 @@ org.openapitools.codegen.languages.TypeScriptNodeClientCodegen org.openapitools.codegen.languages.TypeScriptReduxQueryClientCodegen org.openapitools.codegen.languages.TypeScriptRxjsClientCodegen org.openapitools.codegen.languages.WsdlSchemaCodegen - -org.openapitools.codegen.languages.JavaCamelServerCodegen diff --git a/modules/openapi-generator/src/main/resources/swift4/APIHelper.mustache b/modules/openapi-generator/src/main/resources/swift4/APIHelper.mustache deleted file mode 100644 index 8cf57841b7d2..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/APIHelper.mustache +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct APIHelper { - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? Array { - result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? Array { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? Array { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/modules/openapi-generator/src/main/resources/swift4/APIs.mustache b/modules/openapi-generator/src/main/resources/swift4/APIs.mustache deleted file mode 100644 index 0c3f78b057c4..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/APIs.mustache +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class {{projectName}}API { - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var basePath = "{{{basePath}}}" - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var credential: URLCredential? - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var customHeaders: [String:String] = [:] - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var apiResponseQueue: DispatchQueue = .main -} - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class RequestBuilder { - var credential: URLCredential? - var headers: [String:String] - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let parameters: [String:Any]? - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let isBody: Bool - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let method: String - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var onProgressReady: ((Progress) -> ())? - - required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders({{projectName}}API.customHeaders) - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addHeaders(_ aHeaders:[String:String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addCredential() -> Self { - self.credential = {{projectName}}API.credential - return self - } -} - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/modules/openapi-generator/src/main/resources/swift4/AlamofireImplementations.mustache b/modules/openapi-generator/src/main/resources/swift4/AlamofireImplementations.mustache deleted file mode 100644 index d0750a5fd000..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/AlamofireImplementations.mustache +++ /dev/null @@ -1,451 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireRequestBuilder: RequestBuilder { - required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId:String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } - else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: {{projectName}}API.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: {{projectName}}API.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: {{projectName}}API.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: {{projectName}}API.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename : String? = nil - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with:"") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url : URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -fileprivate enum DownloadException : Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: {{projectName}}API.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: {{projectName}}API.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: {{projectName}}API.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: {{projectName}}API.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? = nil - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache deleted file mode 100644 index 230311260231..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache +++ /dev/null @@ -1,3 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0{{#usePromiseKit}} -github "mxcl/PromiseKit" ~> 6.11.0{{/usePromiseKit}}{{#useRxSwift}} -github "ReactiveX/RxSwift" ~> 4.5.0{{/useRxSwift}} diff --git a/modules/openapi-generator/src/main/resources/swift4/CodableHelper.mustache b/modules/openapi-generator/src/main/resources/swift4/CodableHelper.mustache deleted file mode 100644 index b8d29582b2ec..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/CodableHelper.mustache +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} typealias EncodeResult = (data: Data?, error: Error?) - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { - var returnedDecodable: T? = nil - var returnedError: Error? = nil - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encode(_ value: T) -> EncodeResult where T : Encodable { - var returnedData: Data? - var returnedError: Error? = nil - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift4/Configuration.mustache b/modules/openapi-generator/src/main/resources/swift4/Configuration.mustache deleted file mode 100644 index 84e92d2feedf..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/Configuration.mustache +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache deleted file mode 100644 index fa2c51d49643..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache +++ /dev/null @@ -1,188 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation{{#usePromiseKit}} -import PromiseKit{{/usePromiseKit}} - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { - var tmpArray: [T]? = nil - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { - var map: [Self.Key : T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} - -{{#usePromiseKit}}extension RequestBuilder { - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func execute() -> Promise> { - let deferred = Promise>.pending() - self.execute { (response: Response?, error: Error?) in - if let response = response { - deferred.resolver.fulfill(response) - } else { - deferred.resolver.reject(error!) - } - } - return deferred.promise - } -}{{/usePromiseKit}} diff --git a/modules/openapi-generator/src/main/resources/swift4/JSONEncodableEncoding.mustache b/modules/openapi-generator/src/main/resources/swift4/JSONEncodableEncoding.mustache deleted file mode 100644 index 69636d84635c..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/JSONEncodableEncoding.mustache +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? = nil - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache b/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache deleted file mode 100644 index 9ba6d2ae1f52..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class JSONEncodingHelper { - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? = nil - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? = nil - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/modules/openapi-generator/src/main/resources/swift4/Models.mustache b/modules/openapi-generator/src/main/resources/swift4/Models.mustache deleted file mode 100644 index 62b20a27c325..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/Models.mustache +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum ErrorResponse : Error { - case error(Int, Data?, Error) -} - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class Response { - {{#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}} init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String:String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache b/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache deleted file mode 100644 index 3ca1dfcbfa2d..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache +++ /dev/null @@ -1,33 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "{{projectName}}", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "{{projectName}}", - targets: ["{{projectName}}"]), - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), - {{#usePromiseKit}} - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.11.0"), - {{/usePromiseKit}} - {{#useRxSwift}} - .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.5.0"), - {{/useRxSwift}} - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "{{projectName}}", - dependencies: ["Alamofire"{{#usePromiseKit}}, "PromiseKit"{{/usePromiseKit}}{{#useRxSwift}}, "RxSwift"{{/useRxSwift}}], - path: "{{projectName}}/Classes" - ), - ] -) diff --git a/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache deleted file mode 100644 index 2a9dd2703d32..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache +++ /dev/null @@ -1,38 +0,0 @@ -Pod::Spec.new do |s| - s.name = '{{projectName}}'{{#projectDescription}} - s.summary = '{{.}}'{{/projectDescription}} - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '{{podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}}' - s.source = {{#podSource}}{{& podSource}}{{/podSource}}{{^podSource}}{ :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}' }{{/podSource}} - {{#podAuthors}} - s.authors = '{{.}}' - {{/podAuthors}} - {{#podSocialMediaURL}} - s.social_media_url = '{{.}}' - {{/podSocialMediaURL}} - {{#podDocsetURL}} - s.docset_url = '{{.}}' - {{/podDocsetURL}} - s.license = {{#podLicense}}{{& podLicense}}{{/podLicense}}{{^podLicense}}'Proprietary'{{/podLicense}} - s.homepage = '{{podHomepage}}{{^podHomepage}}https://github.com/OpenAPITools/openapi-generator{{/podHomepage}}' - s.summary = '{{podSummary}}{{^podSummary}}{{projectName}} Swift SDK{{/podSummary}}' - {{#podDescription}} - s.description = '{{.}}' - {{/podDescription}} - {{#podScreenshots}} - s.screenshots = {{& podScreenshots}} - {{/podScreenshots}} - {{#podDocumentationURL}} - s.documentation_url = '{{.}}' - {{/podDocumentationURL}} - s.source_files = '{{projectName}}/Classes/**/*.swift' - {{#usePromiseKit}} - s.dependency 'PromiseKit/CorePromise', '~> 6.11.0' - {{/usePromiseKit}} - {{#useRxSwift}} - s.dependency 'RxSwift', '~> 4.5.0' - {{/useRxSwift}} - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/modules/openapi-generator/src/main/resources/swift4/README.mustache b/modules/openapi-generator/src/main/resources/swift4/README.mustache deleted file mode 100644 index 95f4a63ff294..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/README.mustache +++ /dev/null @@ -1,69 +0,0 @@ -# Swift4 API client for {{{projectName}}} - -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: {{appVersion}} -- Package version: {{packageVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} -For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *{{basePath}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - -## Documentation For Models - -{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) -{{/model}}{{/models}} - -## Documentation For Authorization - -{{^authMethods}} All endpoints do not require authorization. -{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} -{{#authMethods}}## {{{name}}} - -{{#isApiKey}}- **Type**: API key -- **API key parameter name**: {{{keyParamName}}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasic}}- **Type**: HTTP basic authentication -{{/isBasic}} -{{#isOAuth}}- **Type**: OAuth -- **Flow**: {{{flow}}} -- **Authorization URL**: {{{authorizationUrl}}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - **{{{scope}}}**: {{{description}}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} - -## Author - -{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} -{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/swift4/Result.mustache b/modules/openapi-generator/src/main/resources/swift4/Result.mustache deleted file mode 100644 index e4216be55098..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/Result.mustache +++ /dev/null @@ -1,17 +0,0 @@ -// -// Result.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -#if swift(<5) - -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum Result { - case success(Value) - case failure(Error) -} - -#endif diff --git a/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache b/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache deleted file mode 100644 index 596193cf856b..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache +++ /dev/null @@ -1,17 +0,0 @@ -name: {{projectName}} -targets: - {{projectName}}: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [{{projectName}}] - info: - path: ./Info.plist - version: {{podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}} - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire{{#useRxSwift}} - - carthage: RxSwift{{/useRxSwift}}{{#usePromiseKit}} - - carthage: PromiseKit{{/usePromiseKit}} diff --git a/modules/openapi-generator/src/main/resources/swift4/_param.mustache b/modules/openapi-generator/src/main/resources/swift4/_param.mustache deleted file mode 100644 index 770458343aa9..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/_param.mustache +++ /dev/null @@ -1 +0,0 @@ -"{{baseName}}": {{paramName}}{{^required}}?{{/required}}.encodeToJSON() \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift4/api.mustache b/modules/openapi-generator/src/main/resources/swift4/api.mustache deleted file mode 100644 index 99c79f9bd579..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/api.mustache +++ /dev/null @@ -1,216 +0,0 @@ -{{#operations}}// -// {{classname}}.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation{{#usePromiseKit}} -import PromiseKit{{/usePromiseKit}}{{#useRxSwift}} -import RxSwift{{/useRxSwift}} - -{{#swiftUseApiNamespace}} -extension {{projectName}}API { -{{/swiftUseApiNamespace}} - -{{#description}} -/** {{.}} */{{/description}} -{{#objcCompatible}}@objc {{/objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class {{classname}}{{#objcCompatible}} : NSObject{{/objcCompatible}} { -{{#operation}} - {{#allParams}} - {{#isEnum}} - /** - * enum for parameter {{paramName}} - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}_{{operationId}}: {{^isContainer}}{{{dataType}}}{{/isContainer}}{{#isContainer}}String{{/isContainer}} { - {{#allowableValues}} - {{#enumVars}} - case {{name}} = {{{value}}} - {{/enumVars}} - {{/allowableValues}} - } - - {{/isEnum}} - {{/allParams}} -{{^usePromiseKit}} -{{^useRxSwift}} - /** - {{#summary}} - {{{.}}} - {{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} - - parameter completion: completion handler to receive the data and the error objects - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping ((_ data: {{{returnType}}}{{^returnType}}Void{{/returnType}}?,_ error: Error?) -> Void)) { - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute { (response, error) -> Void in - {{#returnType}} - completion(response?.body, error) - {{/returnType}} - {{^returnType}} - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - {{/returnType}} - } - } -{{/useRxSwift}} -{{/usePromiseKit}} -{{#usePromiseKit}} - /** - {{#summary}} - {{{.}}} - {{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} - - returns: Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}} {{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { - let deferred = Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}>.pending() - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) -{{#returnType}} - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() -{{/returnType}} -{{^returnType}} - } else { - deferred.resolver.fulfill(()) -{{/returnType}} - } - } - return deferred.promise - } -{{/usePromiseKit}} -{{#useRxSwift}} - /** - {{#summary}} - {{{.}}} - {{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} - - returns: Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { - return Observable.create { observer -> Disposable in - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) -{{#returnType}} - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() -{{/returnType}} -{{^returnType}} - } else { - observer.onNext(()) -{{/returnType}} - } - observer.onCompleted() - } - return Disposables.create() - } - } -{{/useRxSwift}} -{{#useResult}} - /** - {{#summary}} - {{{.}}} - {{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} - - parameter completion: completion handler to receive the result - */ - open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping ((_ result: Result<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error>) -> Void)) { - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - {{#returnType}} - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - {{/returnType}} - {{^returnType}} - } else { - completion(.success(())) - } - {{/returnType}} - } - } -{{/useResult}} - - /** - {{#summary}} - {{{.}}} - {{/summary}} - - {{httpMethod}} {{{path}}}{{#notes}} - - {{{.}}}{{/notes}}{{#subresourceOperation}} - - subresourceOperation: {{.}}{{/subresourceOperation}}{{#defaultResponse}} - - defaultResponse: {{.}}{{/defaultResponse}} - {{#authMethods}} - - {{#isBasic}}BASIC{{/isBasic}}{{#isOAuth}}OAuth{{/isOAuth}}{{#isApiKey}}API Key{{/isApiKey}}: - - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeaer}}(HEADER){{/isKeyInHeaer}}{{/keyParamName}} - - name: {{name}} - {{/authMethods}} - {{#hasResponseHeaders}} - - responseHeaders: [{{#responseHeaders}}{{{baseName}}}({{{dataType}}}){{^-last}}, {{/-last}}{{/responseHeaders}}] - {{/hasResponseHeaders}} - {{#externalDocs}} - - externalDocs: {{.}} - {{/externalDocs}} - {{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/allParams}} - - returns: RequestBuilder<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{description}} - */ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> RequestBuilder<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { - {{^pathParams}}let{{/pathParams}}{{#pathParams}}{{#-first}}var{{/-first}}{{/pathParams}} path = "{{{path}}}"{{#pathParams}} - let {{paramName}}PreEscape = "\({{#isEnum}}{{paramName}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}.rawValue{{/isContainer}}{{/isEnum}}{{^isEnum}}APIHelper.mapValueToPathItem({{paramName}}){{/isEnum}})" - let {{paramName}}PostEscape = {{paramName}}PreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{{=<% %>=}}{<%baseName%>}<%={{ }}=%>", with: {{paramName}}PostEscape, options: .literal, range: nil){{/pathParams}} - let URLString = {{projectName}}API.basePath + path - {{#bodyParam}} - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: {{paramName}}) - {{/bodyParam}} - {{^bodyParam}} - {{#hasFormParams}} - let formParams: [String:Any?] = [ - {{#formParams}} - {{> _param}}{{^-last}},{{/-last}} - {{/formParams}} - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - {{/hasFormParams}} - {{^hasFormParams}} - let parameters: [String:Any]? = nil - {{/hasFormParams}} - {{/bodyParam}}{{#hasQueryParams}} - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([{{^queryParams}}:{{/queryParams}} - {{#queryParams}} - {{> _param}}{{^-last}}, {{/-last}} - {{/queryParams}} - ]){{/hasQueryParams}}{{^hasQueryParams}} - let url = URLComponents(string: URLString){{/hasQueryParams}}{{#headerParams}}{{#-first}} - let nillableHeaders: [String: Any?] = [{{/-first}} - {{> _param}}{{^-last}},{{/-last}}{{#-last}} - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders){{/-last}}{{/headerParams}} - - let requestBuilder: RequestBuilder<{{{returnType}}}{{^returnType}}Void{{/returnType}}>.Type = {{projectName}}API.requestBuilderFactory.{{#returnType}}getBuilder(){{/returnType}}{{^returnType}}getNonDecodableBuilder(){{/returnType}} - - return requestBuilder.init(method: "{{httpMethod}}", URLString: (url?.string ?? URLString), parameters: parameters, isBody: {{hasBodyParam}}{{#headerParams}}{{#-first}}, headers: headerParameters{{/-first}}{{/headerParams}}) - } - -{{/operation}} -} -{{#swiftUseApiNamespace}} -} -{{/swiftUseApiNamespace}} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/swift4/api_doc.mustache b/modules/openapi-generator/src/main/resources/swift4/api_doc.mustache deleted file mode 100644 index c634111c699c..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/api_doc.mustache +++ /dev/null @@ -1,97 +0,0 @@ -# {{classname}}{{#description}} -{{.}}{{/description}} - -All URIs are relative to *{{{basePath}}}* - -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} -# **{{{operationId}}}** -```swift -{{^usePromiseKit}} -{{^useRxSwift}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping (_ data: {{{returnType}}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void) -{{/useRxSwift}} -{{/usePromiseKit}} -{{#usePromiseKit}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}} {{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> -{{/usePromiseKit}} -{{#useRxSwift}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> -{{/useRxSwift}} -``` - -{{{summary}}}{{#notes}} - -{{{.}}}{{/notes}} - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import {{{projectName}}} - -{{#allParams}}let {{paramName}} = {{{vendorExtensions.x-swift-example}}} // {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/allParams}} - -{{^usePromiseKit}} -{{^useRxSwift}} -{{#summary}} -// {{{.}}} -{{/summary}} -{{classname}}.{{{operationId}}}({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -{{/useRxSwift}} -{{/usePromiseKit}} -{{#usePromiseKit}} -{{#summary}} -// {{{.}}} -{{/summary}} -{{classname}}.{{{operationId}}}({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -{{/usePromiseKit}} -{{#useRxSwift}} -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -{{/useRxSwift}} -``` - -### Parameters -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} -{{/allParams}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}Void (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} - -### HTTP request headers - - - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -{{/operation}} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/swift4/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/swift4/git_push.sh.mustache deleted file mode 100755 index 0e3776ae6dd4..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/git_push.sh.mustache +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-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="{{{gitHost}}}" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - 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/modules/openapi-generator/src/main/resources/swift4/gitignore.mustache b/modules/openapi-generator/src/main/resources/swift4/gitignore.mustache deleted file mode 100644 index fc4e330f8fab..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/gitignore.mustache +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/modules/openapi-generator/src/main/resources/swift4/model.mustache b/modules/openapi-generator/src/main/resources/swift4/model.mustache deleted file mode 100644 index a47acfb01ef8..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/model.mustache +++ /dev/null @@ -1,24 +0,0 @@ -{{#models}}{{#model}}// -// {{classname}}.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -{{#description}} -/** {{.}} */{{/description}} -{{#isArray}} -{{> modelArray}} -{{/isArray}} -{{^isArray}} -{{#isEnum}} -{{> modelEnum}} -{{/isEnum}} -{{^isEnum}} -{{> modelObject}} -{{/isEnum}} -{{/isArray}} -{{/model}} -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/swift4/modelArray.mustache b/modules/openapi-generator/src/main/resources/swift4/modelArray.mustache deleted file mode 100644 index 536c5e9eea49..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/modelArray.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} typealias {{classname}} = {{parent}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift4/modelEnum.mustache b/modules/openapi-generator/src/main/resources/swift4/modelEnum.mustache deleted file mode 100644 index 4a28e656e2d6..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/modelEnum.mustache +++ /dev/null @@ -1,7 +0,0 @@ -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{classname}}: {{dataType}}, Codable { -{{#allowableValues}} -{{#enumVars}} - case {{name}} = {{{value}}} -{{/enumVars}} -{{/allowableValues}} -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift4/modelInlineEnumDeclaration.mustache b/modules/openapi-generator/src/main/resources/swift4/modelInlineEnumDeclaration.mustache deleted file mode 100644 index e7fed7d16ea6..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/modelInlineEnumDeclaration.mustache +++ /dev/null @@ -1,7 +0,0 @@ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, Codable { - {{#allowableValues}} - {{#enumVars}} - case {{name}} = {{{value}}} - {{/enumVars}} - {{/allowableValues}} - } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache deleted file mode 100644 index 41c0245ca7ff..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache +++ /dev/null @@ -1,81 +0,0 @@ -{{^objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct {{classname}}: Codable { {{/objcCompatible}} -{{#objcCompatible}}@objc {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class {{classname}}: NSObject, Codable { {{/objcCompatible}} - -{{#allVars}} -{{#isEnum}} -{{> modelInlineEnumDeclaration}} -{{/isEnum}} -{{/allVars}} -{{#allVars}} -{{#isEnum}} - {{#description}}/** {{.}} */ - {{/description}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}: {{{datatypeWithEnum}}}{{#unwrapRequired}}?{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}?{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} -{{/isEnum}} -{{^isEnum}} - {{#description}}/** {{.}} */ - {{/description}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}: {{{datatype}}}{{#unwrapRequired}}?{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}?{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#objcCompatible}}{{#vendorExtensions.x-swift-optional-scalar}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}Num: NSNumber? { - get { - return {{name}} as NSNumber? - } - }{{/vendorExtensions.x-swift-optional-scalar}}{{/objcCompatible}} -{{/isEnum}} -{{/allVars}} - -{{#hasVars}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{#unwrapRequired}}?{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}?{{/required}}{{/unwrapRequired}}{{^-last}}, {{/-last}}{{/allVars}}) { - {{#allVars}} - self.{{name}} = {{name}} - {{/allVars}} - } -{{/hasVars}} -{{#additionalPropertiesType}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var additionalProperties: [String:{{{additionalPropertiesType}}}] = [:] - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} subscript(key: String) -> {{{additionalPropertiesType}}}? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - {{#allVars}} - try container.encode{{#unwrapRequired}}IfPresent{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}IfPresent{{/required}}{{/unwrapRequired}}({{{name}}}, forKey: "{{{baseName}}}") - {{/allVars}} - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}}{{#objcCompatible}} required{{/objcCompatible}} init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - {{#allVars}} - {{name}} = try container.decode{{#unwrapRequired}}IfPresent{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}IfPresent{{/required}}{{/unwrapRequired}}({{{datatypeWithEnum}}}.self, forKey: "{{{baseName}}}") - {{/allVars}} - var nonAdditionalPropertyKeys = Set() - {{#allVars}} - nonAdditionalPropertyKeys.insert("{{{baseName}}}") - {{/allVars}} - additionalProperties = try container.decodeMap({{{additionalPropertiesType}}}.self, excludedKeys: nonAdditionalPropertyKeys) - } - -{{/additionalPropertiesType}} -{{^additionalPropertiesType}}{{#vendorExtensions.x-codegen-has-escaped-property-names}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum CodingKeys: String, CodingKey { {{#allVars}} - case {{name}}{{#vendorExtensions.x-codegen-escaped-property-name}} = "{{{baseName}}}"{{/vendorExtensions.x-codegen-escaped-property-name}}{{/allVars}} - } -{{/vendorExtensions.x-codegen-has-escaped-property-names}}{{/additionalPropertiesType}} -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift4/model_doc.mustache b/modules/openapi-generator/src/main/resources/swift4/model_doc.mustache deleted file mode 100644 index d3e4ecf5c760..000000000000 --- a/modules/openapi-generator/src/main/resources/swift4/model_doc.mustache +++ /dev/null @@ -1,11 +0,0 @@ -{{#models}}{{#model}}# {{classname}} - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isContainer}}[**{{dataType}}**]({{complexType}}.md){{/isContainer}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} -{{/vars}} - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - -{{/model}}{{/models}} From 3ed6343933a27b8069e52f0bdf795b278f37a066 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 30 Jan 2022 15:57:02 +0800 Subject: [PATCH 167/175] remove deprecated options in java client generator (#11456) --- docs/generators/java.md | 6 +- .../codegen/languages/JavaClientCodegen.java | 76 +++---------------- .../libraries/retrofit2/ApiClient.mustache | 6 -- .../Java/libraries/retrofit2/api.mustache | 7 +- .../libraries/retrofit2/build.gradle.mustache | 20 ----- .../libraries/retrofit2/build.sbt.mustache | 12 --- .../libraries/retrofit2/play26/api.mustache | 9 ++- .../Java/libraries/retrofit2/pom.mustache | 39 ---------- .../client/api/AnotherFakeApi.java | 2 - .../org/openapitools/client/api/FakeApi.java | 2 - .../client/api/FakeClassnameTags123Api.java | 2 - .../org/openapitools/client/api/PetApi.java | 2 - .../org/openapitools/client/api/StoreApi.java | 2 - .../org/openapitools/client/api/UserApi.java | 2 - 14 files changed, 21 insertions(+), 166 deletions(-) diff --git a/docs/generators/java.md b/docs/generators/java.md index 4132f755c123..c33081e2df54 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -62,7 +62,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |performBeanValidation|Perform BeanValidation| |false| -|playVersion|Version of Play! Framework (possible values "play24" (Deprecated), "play25" (Deprecated), "play26" (Default))| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| @@ -81,9 +80,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |usePlayWS|Use Play! Async HTTP client (Play WS API)| |false| |useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false| |useRuntimeException|Use RuntimeException instead of Exception| |false| -|useRxJava|Whether to use the RxJava adapter with the retrofit2 library. IMPORTANT: this option has been deprecated and will be removed in the 5.x release.| |false| -|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library.| |false| -|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library.| |false| +|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| |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| ## IMPORT MAPPING 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 22bfafcfdaae..8476e2d88b7b 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 @@ -49,12 +49,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen private final Logger LOGGER = LoggerFactory.getLogger(JavaClientCodegen.class); - public static final String USE_RX_JAVA = "useRxJava"; public static final String USE_RX_JAVA2 = "useRxJava2"; public static final String USE_RX_JAVA3 = "useRxJava3"; public static final String DO_NOT_USE_RX = "doNotUseRx"; public static final String USE_PLAY_WS = "usePlayWS"; - public static final String PLAY_VERSION = "playVersion"; public static final String ASYNC_NATIVE = "asyncNative"; public static final String CONFIG_KEY = "configKey"; public static final String PARCELABLE_MODEL = "parcelableModel"; @@ -69,10 +67,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen public static final String ERROR_OBJECT_TYPE= "errorObjectType"; public static final String ERROR_OBJECT_SUBTYPE= "errorObjectSubtype"; - public static final String PLAY_24 = "play24"; - public static final String PLAY_25 = "play25"; - public static final String PLAY_26 = "play26"; - public static final String MICROPROFILE_DEFAULT = "default"; public static final String MICROPROFILE_KUMULUZEE = "kumuluzee"; @@ -104,7 +98,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen // (mustache does not allow for boolean operators so we need this extra field) protected boolean doNotUseRx = true; protected boolean usePlayWS = false; - protected String playVersion = PLAY_26; protected String microprofileFramework = MICROPROFILE_DEFAULT; protected String configKey = null; @@ -149,12 +142,10 @@ public JavaClientCodegen() { modelTestTemplateFiles.put("model_test.mustache", ".java"); - cliOptions.add(CliOption.newBoolean(USE_RX_JAVA, "Whether to use the RxJava adapter with the retrofit2 library. IMPORTANT: this option has been deprecated and will be removed in the 5.x release.")); - cliOptions.add(CliOption.newBoolean(USE_RX_JAVA2, "Whether to use the RxJava2 adapter with the retrofit2 library.")); - cliOptions.add(CliOption.newBoolean(USE_RX_JAVA3, "Whether to use the RxJava3 adapter with the retrofit2 library.")); + cliOptions.add(CliOption.newBoolean(USE_RX_JAVA2, "Whether to use the RxJava2 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.")); + cliOptions.add(CliOption.newBoolean(USE_RX_JAVA3, "Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.")); cliOptions.add(CliOption.newBoolean(PARCELABLE_MODEL, "Whether to generate models for Android that implement Parcelable with the okhttp-gson library.")); cliOptions.add(CliOption.newBoolean(USE_PLAY_WS, "Use Play! Async HTTP client (Play WS API)")); - cliOptions.add(CliOption.newString(PLAY_VERSION, "Version of Play! Framework (possible values \"play24\" (Deprecated), \"play25\" (Deprecated), \"play26\" (Default))")); cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations")); cliOptions.add(CliOption.newBoolean(PERFORM_BEANVALIDATION, "Perform BeanValidation")); cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE, "Send gzip-encoded requests")); @@ -241,23 +232,14 @@ public void processOpts() { super.processOpts(); // RxJava - if (additionalProperties.containsKey(USE_RX_JAVA) && additionalProperties.containsKey(USE_RX_JAVA2) && additionalProperties.containsKey(USE_RX_JAVA3)) { - LOGGER.warn("You specified all RxJava versions 1, 2 and 3 but they are mutually exclusive. Defaulting to v3."); + if (additionalProperties.containsKey(USE_RX_JAVA2) && additionalProperties.containsKey(USE_RX_JAVA3)) { + LOGGER.warn("You specified all RxJava versions 2 and 3 but they are mutually exclusive. Defaulting to v3."); this.setUseRxJava3(Boolean.parseBoolean(additionalProperties.get(USE_RX_JAVA3).toString())); } else { - if (additionalProperties.containsKey(USE_RX_JAVA) && additionalProperties.containsKey(USE_RX_JAVA2)) { - LOGGER.warn("You specified both RxJava versions 1 and 2 but they are mutually exclusive. Defaulting to v2."); - this.setUseRxJava2(Boolean.parseBoolean(additionalProperties.get(USE_RX_JAVA2).toString())); - } else if (additionalProperties.containsKey(USE_RX_JAVA) && additionalProperties.containsKey(USE_RX_JAVA3)) { - LOGGER.warn("You specified both RxJava versions 1 and 3 but they are mutually exclusive. Defaulting to v3."); - this.setUseRxJava3(Boolean.parseBoolean(additionalProperties.get(USE_RX_JAVA3).toString())); - } else if (additionalProperties.containsKey(USE_RX_JAVA2) && additionalProperties.containsKey(USE_RX_JAVA3)) { + if (additionalProperties.containsKey(USE_RX_JAVA2) && additionalProperties.containsKey(USE_RX_JAVA3)) { LOGGER.warn("You specified both RxJava versions 2 and 3 but they are mutually exclusive. Defaulting to v3."); this.setUseRxJava3(Boolean.parseBoolean(additionalProperties.get(USE_RX_JAVA3).toString())); } else { - if (additionalProperties.containsKey(USE_RX_JAVA)) { - this.setUseRxJava(Boolean.parseBoolean(additionalProperties.get(USE_RX_JAVA).toString())); - } if (additionalProperties.containsKey(USE_RX_JAVA2)) { this.setUseRxJava2(Boolean.parseBoolean(additionalProperties.get(USE_RX_JAVA2).toString())); } @@ -277,11 +259,6 @@ public void processOpts() { } additionalProperties.put(USE_PLAY_WS, usePlayWS); - if (additionalProperties.containsKey(PLAY_VERSION)) { - this.setPlayVersion(additionalProperties.get(PLAY_VERSION).toString()); - } - additionalProperties.put(PLAY_VERSION, playVersion); - // Microprofile framework if (additionalProperties.containsKey(MICROPROFILE_FRAMEWORK)) { if (!MICROPROFILE_KUMULUZEE.equals(microprofileFramework)) { @@ -560,40 +537,13 @@ public void processOpts() { } apiTemplateFiles.remove("api.mustache"); + apiTemplateFiles.put("play26/api.mustache", ".java"); - if (PLAY_24.equals(playVersion)) { - LOGGER.warn("`play24` option has been deprecated and will be removed in the 5.x release. Please use `play26` instead."); - additionalProperties.put(PLAY_24, true); - apiTemplateFiles.put("play24/api.mustache", ".java"); - - supportingFiles.add(new SupportingFile("play24/ApiClient.mustache", invokerFolder, "ApiClient.java")); - supportingFiles.add(new SupportingFile("play24/Play24CallFactory.mustache", invokerFolder, "Play24CallFactory.java")); - supportingFiles.add(new SupportingFile("play24/Play24CallAdapterFactory.mustache", invokerFolder, - "Play24CallAdapterFactory.java")); - } - - if (PLAY_25.equals(playVersion)) { - LOGGER.warn("`play25` option has been deprecated and will be removed in the 5.x release. Please use `play26` instead."); - additionalProperties.put(PLAY_25, true); - apiTemplateFiles.put("play25/api.mustache", ".java"); - - supportingFiles.add(new SupportingFile("play25/ApiClient.mustache", invokerFolder, "ApiClient.java")); - supportingFiles.add(new SupportingFile("play25/Play25CallFactory.mustache", invokerFolder, "Play25CallFactory.java")); - supportingFiles.add(new SupportingFile("play25/Play25CallAdapterFactory.mustache", invokerFolder, - "Play25CallAdapterFactory.java")); - setJava8ModeAndAdditionalProperties(true); - } - - if (PLAY_26.equals(playVersion)) { - additionalProperties.put(PLAY_26, true); - apiTemplateFiles.put("play26/api.mustache", ".java"); - - supportingFiles.add(new SupportingFile("play26/ApiClient.mustache", invokerFolder, "ApiClient.java")); - supportingFiles.add(new SupportingFile("play26/Play26CallFactory.mustache", invokerFolder, "Play26CallFactory.java")); - supportingFiles.add(new SupportingFile("play26/Play26CallAdapterFactory.mustache", invokerFolder, - "Play26CallAdapterFactory.java")); - setJava8ModeAndAdditionalProperties(true); - } + supportingFiles.add(new SupportingFile("play26/ApiClient.mustache", invokerFolder, "ApiClient.java")); + supportingFiles.add(new SupportingFile("play26/Play26CallFactory.mustache", invokerFolder, "Play26CallFactory.java")); + supportingFiles.add(new SupportingFile("play26/Play26CallAdapterFactory.mustache", invokerFolder, + "Play26CallAdapterFactory.java")); + setJava8ModeAndAdditionalProperties(true); supportingFiles.add(new SupportingFile("play-common/auth/ApiKeyAuth.mustache", authFolder, "ApiKeyAuth.java")); supportingFiles.add(new SupportingFile("auth/Authentication.mustache", authFolder, "Authentication.java")); @@ -989,10 +939,6 @@ public void setUsePlayWS(boolean usePlayWS) { this.usePlayWS = usePlayWS; } - public void setPlayVersion(String playVersion) { - this.playVersion = playVersion; - } - public void setAsyncNative(boolean asyncNative) { this.asyncNative = asyncNative; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache index 1196f2c13720..57c977263446 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache @@ -19,9 +19,6 @@ import org.threeten.bp.format.DateTimeFormatter; {{/threetenbp}} import retrofit2.Converter; import retrofit2.Retrofit; -{{#useRxJava}} -import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory; -{{/useRxJava}} {{#useRxJava2}} import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; {{/useRxJava2}} @@ -157,9 +154,6 @@ public class ApiClient { adapterBuilder = new Retrofit .Builder() .baseUrl(baseUrl) - {{#useRxJava}} - .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) - {{/useRxJava}} {{#useRxJava2}} .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) {{/useRxJava2}} 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 dd199a5e108c..82c3fe068c8c 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 @@ -2,9 +2,6 @@ package {{package}}; import {{invokerPackage}}.CollectionFormats.*; -{{#useRxJava}} -import rx.Observable; -{{/useRxJava}} {{#useRxJava2}} import io.reactivex.Observable; {{/useRxJava2}} @@ -47,7 +44,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} + * @return {{^doNotUseRx}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -74,7 +71,7 @@ public interface {{classname}} { {{/prioritizedContentTypes}} {{/formParams}} @{{httpMethod}}("{{{path}}}") - {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{operationId}}({{^allParams}});{{/allParams}} + {{^doNotUseRx}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} );{{/-last}}{{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index 35a63779f646..a5c716b18d6a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -118,21 +118,10 @@ ext { jackson_databind_nullable_version = "0.2.2" {{/openApiNullable}} jakarta_annotation_version = "1.3.5" - {{#play24}} - play_version = "2.4.11" - {{/play24}} - {{#play25}} - play_version = "2.5.14" - {{/play25}} - {{#play26}} play_version = "2.6.7" - {{/play26}} {{/usePlayWS}} swagger_annotations_version = "1.5.22" junit_version = "4.13.1" - {{#useRxJava}} - rx_java_version = "1.3.0" - {{/useRxJava}} {{#useRxJava2}} rx_java_version = "2.1.1" {{/useRxJava2}} @@ -152,10 +141,6 @@ dependencies { implementation "com.squareup.retrofit2:retrofit:$retrofit_version" implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version" implementation "com.squareup.retrofit2:converter-gson:$retrofit_version" - {{#useRxJava}} - implementation "com.squareup.retrofit2:adapter-rxjava:$retrofit_version" - implementation "io.reactivex:rxjava:$rx_java_version" - {{/useRxJava}} {{#useRxJava2}} implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0' implementation "io.reactivex.rxjava2:rxjava:$rx_java_version" @@ -177,13 +162,8 @@ dependencies { implementation "org.threeten:threetenbp:$threetenbp_version" {{/threetenbp}} {{#usePlayWS}} - {{#play26}} implementation "com.typesafe.play:play-ahc-ws_2.12:$play_version" implementation "jakarta.validation:jakarta.validation-api:2.0.2" - {{/play26}} - {{^play26}} - implementation "com.typesafe.play:play-java-ws_2.11:$play_version" - {{/play26}} implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version" 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/retrofit2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache index d859cf83d247..a572f4b93e22 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache @@ -15,25 +15,13 @@ lazy val root = (project in file(".")). "com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile", {{/usePlayWS}} {{#usePlayWS}} - {{#play24}} - "com.typesafe.play" % "play-java-ws_2.11" % "2.4.11" % "compile", - {{/play24}} - {{#play25}} - "com.typesafe.play" % "play-java-ws_2.11" % "2.5.15" % "compile", - {{/play25}} - {{#play26}} "com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile", "jakarta.validation" % "jakarta.validation-api" % "2.0.2" % "compile", - {{/play26}} "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.10.5" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.5" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1" % "compile", {{/usePlayWS}} - {{#useRxJava}} - "com.squareup.retrofit2" % "adapter-rxjava" % "2.3.0" % "compile", - "io.reactivex" % "rxjava" % "1.3.0" % "compile", - {{/useRxJava}} {{#useRxJava2}} "com.squareup.retrofit2" % "adapter-rxjava2" % "2.3.0" % "compile", "io.reactivex.rxjava2" % "rxjava" % "2.1.1" % "compile", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache index d4e97cc347b6..dd3339ff840b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache @@ -2,9 +2,12 @@ package {{package}}; import {{invokerPackage}}.CollectionFormats.*; -{{#useRxJava}}import rx.Observable;{{/useRxJava}} -{{#useRxJava2}}import io.reactivex.Observable;{{/useRxJava2}} -{{#doNotUseRx}}import retrofit2.Call;{{/doNotUseRx}} +{{#useRxJava2}} +import io.reactivex.Observable; +{{/useRxJava2}} +{{#doNotUseRx}} +import retrofit2.Call; +{{/doNotUseRx}} import retrofit2.http.*; import okhttp3.RequestBody; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache index 39da1fd02e8a..5c000617145f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache @@ -273,18 +273,6 @@ ${threetenbp-version} {{/threetenbp}} - {{#useRxJava}} - - io.reactivex - rxjava - ${rxjava-version} - - - com.squareup.retrofit2 - adapter-rxjava - ${retrofit-version} - - {{/useRxJava}} {{#useRxJava2}} io.reactivex.rxjava2 @@ -351,21 +339,6 @@ ${jackson-version} {{/withXml}} - {{#play24}} - - com.typesafe.play - play-java-ws_2.11 - ${play-version} - - {{/play24}} - {{#play25}} - - com.typesafe.play - play-java-ws_2.11 - ${play-version} - - {{/play25}} - {{#play26}} com.typesafe.play play-ahc-ws_2.12 @@ -376,7 +349,6 @@ jakarta.validation-api ${beanvalidation-version} - {{/play26}} {{/usePlayWS}} {{#parcelableModel}} @@ -410,23 +382,12 @@ 1.6.3 {{#usePlayWS}} 2.12.1 - {{#play24}} - 2.4.11 - {{/play24}} - {{#play25}} - 2.5.15 - {{/play25}} - {{#play26}} 2.6.7 - {{/play26}} {{#openApiNullable}} 0.2.2 {{/openApiNullable}} {{/usePlayWS}} 2.5.0 - {{#useRxJava}} - 1.3.0 - {{/useRxJava}} {{#useRxJava2}} 2.1.1 {{/useRxJava2}} diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index b638ac676908..4a546e53849f 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -2,8 +2,6 @@ import org.openapitools.client.CollectionFormats.*; - - import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java index 29c894d56614..e87dcd696da0 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java @@ -2,8 +2,6 @@ import org.openapitools.client.CollectionFormats.*; - - import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index e4f16e34fd72..af53baad6ab2 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -2,8 +2,6 @@ import org.openapitools.client.CollectionFormats.*; - - import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/PetApi.java index 96f8dacd1e09..ecc66db936ae 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/PetApi.java @@ -2,8 +2,6 @@ import org.openapitools.client.CollectionFormats.*; - - import retrofit2.Call; import retrofit2.http.*; 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 798245fd983f..b9ccc8cff464 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 @@ -2,8 +2,6 @@ import org.openapitools.client.CollectionFormats.*; - - import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java index c568e477b92d..2aed903655bc 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java @@ -2,8 +2,6 @@ import org.openapitools.client.CollectionFormats.*; - - import retrofit2.Call; import retrofit2.http.*; From f79ac98bc3ceb2a69ea99d8ba7c92f4d406a68c7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 30 Jan 2022 18:41:52 +0800 Subject: [PATCH 168/175] add C# client generic host author --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b66fcfa6fb93..5be880e493d5 100644 --- a/README.md +++ b/README.md @@ -876,6 +876,7 @@ Here is a list of template creators: * C# (.NET 2.0): @who * C# (.NET Standard 1.3 ): @Gronsak * C# (.NET 4.5 refactored): @jimschubert [:heart:](https://www.patreon.com/jimschubert) + * C# (GenericHost): @devhl-labs * C# (HttpClient): @Blackclaws * Clojure: @xhh * Crystal: @wing328 From ed14ce4decfaeefa9c8793c5efa595bce5c08209 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Sun, 30 Jan 2022 13:06:03 +0100 Subject: [PATCH 169/175] [Kotlin] Use mutable container types when 'modelMutable' is enabled (#11154) * [Kotlin] Use Mutable container types when 'modelMutable' is enabled * Generate sample 'kotlin' project with mutable models * Generate sample 'kotlin-server' project with mutable models * Generate sample 'kotlin-vertx' project with mutable models * Generate sample 'ktorm-schema' project with mutable models Co-authored-by: Bruno Coelho <4brunu@users.noreply.github.com> --- bin/configs/kotlin-modelMutable.yaml | 7 + bin/configs/kotlin-server-modelMutable.yaml | 8 + bin/configs/kotlin-vertx-modelMutable.yaml | 6 + bin/configs/ktorm-schema-modelMutable.yaml | 8 + docs/generators/kotlin-server-deprecated.md | 3 + docs/generators/kotlin-server.md | 3 + docs/generators/kotlin-spring.md | 3 + docs/generators/kotlin-vertx.md | 3 + docs/generators/kotlin.md | 3 + docs/generators/ktorm-schema.md | 3 + .../languages/AbstractKotlinCodegen.java | 20 +- .../languages/KotlinClientCodegen.java | 9 +- .../languages/KotlinServerCodegen.java | 4 + .../languages/KotlinSpringServerCodegen.java | 43 ++ .../codegen/languages/KtormSchemaCodegen.java | 3 + .../kotlin-client/data_class_opt_var.mustache | 2 +- .../kotlin-client/data_class_req_var.mustache | 2 +- .../kotlin-client/interface_opt_var.mustache | 2 +- .../kotlin-client/interface_req_var.mustache | 2 +- .../kotlin/KotlinModelCodegenTest.java | 26 +- ...ue11088-model-mutable-with-containers.yaml | 52 ++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 41 ++ .../.openapi-generator/VERSION | 1 + .../petstore/kotlin-modelMutable/README.md | 90 +++ .../petstore/kotlin-modelMutable/build.gradle | 37 + .../kotlin-modelMutable/docs/ApiResponse.md | 12 + .../kotlin-modelMutable/docs/Category.md | 11 + .../kotlin-modelMutable/docs/Order.md | 22 + .../petstore/kotlin-modelMutable/docs/Pet.md | 22 + .../kotlin-modelMutable/docs/PetApi.md | 405 +++++++++++ .../kotlin-modelMutable/docs/StoreApi.md | 196 ++++++ .../petstore/kotlin-modelMutable/docs/Tag.md | 11 + .../petstore/kotlin-modelMutable/docs/User.md | 17 + .../kotlin-modelMutable/docs/UserApi.md | 376 +++++++++++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + .../petstore/kotlin-modelMutable/gradlew | 185 +++++ .../petstore/kotlin-modelMutable/gradlew.bat | 89 +++ .../kotlin-modelMutable/settings.gradle | 2 + .../org/openapitools/client/apis/PetApi.kt | 638 ++++++++++++++++++ .../org/openapitools/client/apis/StoreApi.kt | 324 +++++++++ .../org/openapitools/client/apis/UserApi.kt | 599 ++++++++++++++++ .../client/infrastructure/ApiAbstractions.kt | 23 + .../client/infrastructure/ApiClient.kt | 264 ++++++++ .../client/infrastructure/ApiResponse.kt | 43 ++ .../infrastructure/BigDecimalAdapter.kt | 17 + .../infrastructure/BigIntegerAdapter.kt | 17 + .../client/infrastructure/ByteArrayAdapter.kt | 12 + .../client/infrastructure/Errors.kt | 18 + .../client/infrastructure/LocalDateAdapter.kt | 19 + .../infrastructure/LocalDateTimeAdapter.kt | 19 + .../infrastructure/OffsetDateTimeAdapter.kt | 19 + .../client/infrastructure/RequestConfig.kt | 17 + .../client/infrastructure/RequestMethod.kt | 8 + .../infrastructure/ResponseExtensions.kt | 24 + .../client/infrastructure/Serializer.kt | 23 + .../client/infrastructure/URIAdapter.kt | 13 + .../client/infrastructure/UUIDAdapter.kt | 13 + .../openapitools/client/models/Category.kt | 42 ++ .../client/models/ModelApiResponse.kt | 46 ++ .../org/openapitools/client/models/Order.kt | 71 ++ .../org/openapitools/client/models/Pet.kt | 73 ++ .../org/openapitools/client/models/Tag.kt | 42 ++ .../org/openapitools/client/models/User.kt | 67 ++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 16 + .../.openapi-generator/VERSION | 1 + .../petstore/ktorm-modelMutable/README.md | 29 + .../petstore/ktorm-modelMutable/build.gradle | 35 + .../ktorm-modelMutable/docs/ApiResponse.md | 15 + .../ktorm-modelMutable/docs/Category.md | 13 + .../petstore/ktorm-modelMutable/docs/Order.md | 21 + .../petstore/ktorm-modelMutable/docs/Pet.md | 41 ++ .../petstore/ktorm-modelMutable/docs/Tag.md | 13 + .../petstore/ktorm-modelMutable/docs/User.md | 25 + .../ktorm-modelMutable/ktorm_schema.sql | 211 ++++++ .../ktorm-modelMutable/settings.gradle | 1 + .../database/models/ApiResponse.kt | 63 ++ .../openapitools/database/models/Category.kt | 59 ++ .../org/openapitools/database/models/Order.kt | 76 +++ .../org/openapitools/database/models/Pet.kt | 105 +++ .../org/openapitools/database/models/Tag.kt | 59 ++ .../org/openapitools/database/models/User.kt | 83 +++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 20 + .../.openapi-generator/VERSION | 1 + .../kotlin-server-modelMutable/Dockerfile | 7 + .../kotlin-server-modelMutable/README.md | 104 +++ .../kotlin-server-modelMutable/build.gradle | 69 ++ .../gradle.properties | 1 + .../settings.gradle | 1 + .../kotlin/org/openapitools/server/AppMain.kt | 74 ++ .../org/openapitools/server/Configuration.kt | 71 ++ .../kotlin/org/openapitools/server/Paths.kt | 164 +++++ .../org/openapitools/server/apis/PetApi.kt | 175 +++++ .../org/openapitools/server/apis/StoreApi.kt | 78 +++ .../org/openapitools/server/apis/UserApi.kt | 78 +++ .../server/infrastructure/ApiKeyAuth.kt | 105 +++ .../openapitools/server/models/Category.kt | 24 + .../server/models/ModelApiResponse.kt | 26 + .../org/openapitools/server/models/Order.kt | 44 ++ .../org/openapitools/server/models/Pet.kt | 46 ++ .../org/openapitools/server/models/Tag.kt | 24 + .../org/openapitools/server/models/User.kt | 37 + .../src/main/resources/application.conf | 23 + .../src/main/resources/logback.xml | 15 + .../main/kotlin/org/openapitools/model/Pet.kt | 4 +- .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 17 + .../.openapi-generator/VERSION | 1 + .../kotlin-vertx-modelMutable/README.md | 81 +++ .../kotlin-vertx-modelMutable/pom.xml | 191 ++++++ .../openapitools/server/api/model/Category.kt | 32 + .../server/api/model/ModelApiResponse.kt | 34 + .../openapitools/server/api/model/Order.kt | 55 ++ .../org/openapitools/server/api/model/Pet.kt | 61 ++ .../org/openapitools/server/api/model/Tag.kt | 32 + .../org/openapitools/server/api/model/User.kt | 45 ++ .../server/api/verticle/PetApi.kt | 70 ++ .../server/api/verticle/PetApiVerticle.kt | 19 + .../api/verticle/PetApiVertxProxyHandler.kt | 214 ++++++ .../server/api/verticle/StoreApi.kt | 57 ++ .../server/api/verticle/StoreApiVerticle.kt | 19 + .../api/verticle/StoreApiVertxProxyHandler.kt | 125 ++++ .../server/api/verticle/UserApi.kt | 69 ++ .../server/api/verticle/UserApiVerticle.kt | 19 + .../api/verticle/UserApiVertxProxyHandler.kt | 202 ++++++ 128 files changed, 7665 insertions(+), 12 deletions(-) create mode 100644 bin/configs/kotlin-modelMutable.yaml create mode 100644 bin/configs/kotlin-server-modelMutable.yaml create mode 100644 bin/configs/kotlin-vertx-modelMutable.yaml create mode 100644 bin/configs/ktorm-schema-modelMutable.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_0/kotlin/issue11088-model-mutable-with-containers.yaml create mode 100644 samples/client/petstore/kotlin-modelMutable/.openapi-generator-ignore create mode 100644 samples/client/petstore/kotlin-modelMutable/.openapi-generator/FILES create mode 100644 samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION create mode 100644 samples/client/petstore/kotlin-modelMutable/README.md create mode 100644 samples/client/petstore/kotlin-modelMutable/build.gradle create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/ApiResponse.md create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/Category.md create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/Order.md create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/Pet.md create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/PetApi.md create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/Tag.md create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/User.md create mode 100644 samples/client/petstore/kotlin-modelMutable/docs/UserApi.md create mode 100644 samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.jar create mode 100644 samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.properties create mode 100755 samples/client/petstore/kotlin-modelMutable/gradlew create mode 100644 samples/client/petstore/kotlin-modelMutable/gradlew.bat create mode 100644 samples/client/petstore/kotlin-modelMutable/settings.gradle create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Category.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/ModelApiResponse.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Pet.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Tag.kt create mode 100644 samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/User.kt create mode 100644 samples/schema/petstore/ktorm-modelMutable/.openapi-generator-ignore create mode 100644 samples/schema/petstore/ktorm-modelMutable/.openapi-generator/FILES create mode 100644 samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION create mode 100644 samples/schema/petstore/ktorm-modelMutable/README.md create mode 100644 samples/schema/petstore/ktorm-modelMutable/build.gradle create mode 100644 samples/schema/petstore/ktorm-modelMutable/docs/ApiResponse.md create mode 100644 samples/schema/petstore/ktorm-modelMutable/docs/Category.md create mode 100644 samples/schema/petstore/ktorm-modelMutable/docs/Order.md create mode 100644 samples/schema/petstore/ktorm-modelMutable/docs/Pet.md create mode 100644 samples/schema/petstore/ktorm-modelMutable/docs/Tag.md create mode 100644 samples/schema/petstore/ktorm-modelMutable/docs/User.md create mode 100644 samples/schema/petstore/ktorm-modelMutable/ktorm_schema.sql create mode 100644 samples/schema/petstore/ktorm-modelMutable/settings.gradle create mode 100644 samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/ApiResponse.kt create mode 100644 samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Category.kt create mode 100644 samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Order.kt create mode 100644 samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Pet.kt create mode 100644 samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Tag.kt create mode 100644 samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/User.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/.openapi-generator-ignore create mode 100644 samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/FILES create mode 100644 samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION create mode 100644 samples/server/petstore/kotlin-server-modelMutable/Dockerfile create mode 100644 samples/server/petstore/kotlin-server-modelMutable/README.md create mode 100644 samples/server/petstore/kotlin-server-modelMutable/build.gradle create mode 100644 samples/server/petstore/kotlin-server-modelMutable/gradle.properties create mode 100644 samples/server/petstore/kotlin-server-modelMutable/settings.gradle create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/AppMain.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Configuration.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Paths.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Category.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Pet.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Tag.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/User.kt create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/resources/application.conf create mode 100644 samples/server/petstore/kotlin-server-modelMutable/src/main/resources/logback.xml create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator-ignore create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/FILES create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/README.md create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/pom.xml create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Category.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Pet.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Tag.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/User.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApi.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApiVerticle.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApiVertxProxyHandler.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApi.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVerticle.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVertxProxyHandler.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApi.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApiVerticle.kt create mode 100644 samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApiVertxProxyHandler.kt diff --git a/bin/configs/kotlin-modelMutable.yaml b/bin/configs/kotlin-modelMutable.yaml new file mode 100644 index 000000000000..584224804edd --- /dev/null +++ b/bin/configs/kotlin-modelMutable.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-modelMutable +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-modelMutable + modelMutable: "true" diff --git a/bin/configs/kotlin-server-modelMutable.yaml b/bin/configs/kotlin-server-modelMutable.yaml new file mode 100644 index 000000000000..1af6d3edb627 --- /dev/null +++ b/bin/configs/kotlin-server-modelMutable.yaml @@ -0,0 +1,8 @@ +generatorName: kotlin-server +outputDir: samples/server/petstore/kotlin-server-modelMutable +library: ktor +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-server +additionalProperties: + hideGenerationTimestamp: "true" + modelMutable: "true" diff --git a/bin/configs/kotlin-vertx-modelMutable.yaml b/bin/configs/kotlin-vertx-modelMutable.yaml new file mode 100644 index 000000000000..2f61ae3ba9a7 --- /dev/null +++ b/bin/configs/kotlin-vertx-modelMutable.yaml @@ -0,0 +1,6 @@ +generatorName: kotlin-vertx +outputDir: samples/server/petstore/kotlin-vertx-modelMutable +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-vertx-server +additionalProperties: + modelMutable: "true" diff --git a/bin/configs/ktorm-schema-modelMutable.yaml b/bin/configs/ktorm-schema-modelMutable.yaml new file mode 100644 index 000000000000..dc63925fbad4 --- /dev/null +++ b/bin/configs/ktorm-schema-modelMutable.yaml @@ -0,0 +1,8 @@ +generatorName: ktorm-schema +outputDir: samples/schema/petstore/ktorm-modelMutable +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/ktorm-schema +additionalProperties: + hideGenerationTimestamp: true + importModelPackageName: org.openapitools.client.models + modelMutable: "true" diff --git a/docs/generators/kotlin-server-deprecated.md b/docs/generators/kotlin-server-deprecated.md index 3e7884c9e66d..f612a372854c 100644 --- a/docs/generators/kotlin-server-deprecated.md +++ b/docs/generators/kotlin-server-deprecated.md @@ -79,6 +79,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • kotlin.String
  • kotlin.collections.List
  • kotlin.collections.Map
  • +
  • kotlin.collections.MutableList
  • +
  • kotlin.collections.MutableMap
  • +
  • kotlin.collections.MutableSet
  • kotlin.collections.Set
  • diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 9fa866983a43..09983e9b2f83 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -85,6 +85,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • kotlin.String
  • kotlin.collections.List
  • kotlin.collections.Map
  • +
  • kotlin.collections.MutableList
  • +
  • kotlin.collections.MutableMap
  • +
  • kotlin.collections.MutableSet
  • kotlin.collections.Set
  • diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 20a0ab7cd696..98d5d0f1bef7 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -89,6 +89,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • kotlin.String
  • kotlin.collections.List
  • kotlin.collections.Map
  • +
  • kotlin.collections.MutableList
  • +
  • kotlin.collections.MutableMap
  • +
  • kotlin.collections.MutableSet
  • kotlin.collections.Set
  • diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 123104743a05..82e4dde5d623 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -73,6 +73,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • kotlin.String
  • kotlin.collections.List
  • kotlin.collections.Map
  • +
  • kotlin.collections.MutableList
  • +
  • kotlin.collections.MutableMap
  • +
  • kotlin.collections.MutableSet
  • kotlin.collections.Set
  • diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 64c36540bea0..532c3273222e 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -85,6 +85,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • kotlin.String
  • kotlin.collections.List
  • kotlin.collections.Map
  • +
  • kotlin.collections.MutableList
  • +
  • kotlin.collections.MutableMap
  • +
  • kotlin.collections.MutableSet
  • kotlin.collections.Set
  • diff --git a/docs/generators/ktorm-schema.md b/docs/generators/ktorm-schema.md index 4ee604175190..a72e9887a988 100644 --- a/docs/generators/ktorm-schema.md +++ b/docs/generators/ktorm-schema.md @@ -74,6 +74,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • kotlin.String
  • kotlin.collections.List
  • kotlin.collections.Map
  • +
  • kotlin.collections.MutableList
  • +
  • kotlin.collections.MutableMap
  • +
  • kotlin.collections.MutableSet
  • kotlin.collections.Set
  • diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index e980427505ef..0c700f116afb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -91,8 +91,11 @@ public AbstractKotlinCodegen() { "kotlin.String", "kotlin.Array", "kotlin.collections.List", + "kotlin.collections.MutableList", "kotlin.collections.Map", - "kotlin.collections.Set" + "kotlin.collections.MutableMap", + "kotlin.collections.Set", + "kotlin.collections.MutableSet" )); // this includes hard reserved words defined by https://github.com/JetBrains/kotlin/blob/master/core/descriptors/src/org/jetbrains/kotlin/renderer/KeywordStringsGenerated.java @@ -184,8 +187,11 @@ public AbstractKotlinCodegen() { "kotlin.Char", "kotlin.Array", "kotlin.collections.List", + "kotlin.collections.MutableList", "kotlin.collections.Set", - "kotlin.collections.Map" + "kotlin.collections.MutableSet", + "kotlin.collections.Map", + "kotlin.collections.MutableMap" )); typeMapping = new HashMap<>(); @@ -503,6 +509,16 @@ public void processOpts() { additionalProperties.put("apiDocPath", apiDocPath); additionalProperties.put("modelDocPath", modelDocPath); + + if (isModelMutable()) { + typeMapping.put("list", "kotlin.collections.MutableList"); + typeMapping.put("set", "kotlin.collections.MutableSet"); + typeMapping.put("map", "kotlin.collections.MutableMap"); + } + } + + protected boolean isModelMutable() { + return Boolean.TRUE.equals(additionalProperties.get(MODEL_MUTABLE)); } public void setArtifactId(String artifactId) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 9ebab55c3f33..097555f3f8a5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -440,8 +440,13 @@ else if (JVM_VOLLEY.equals(getLibrary())){ } if (CollectionType.LIST.value.equals(collectionType)) { - typeMapping.put("array", "kotlin.collections.List"); - typeMapping.put("list", "kotlin.collections.List"); + if (isModelMutable()) { + typeMapping.put("array", "kotlin.collections.MutableList"); + typeMapping.put("list", "kotlin.collections.MutableList"); + } else { + typeMapping.put("array", "kotlin.collections.List"); + typeMapping.put("list", "kotlin.collections.List"); + } additionalProperties.put("isList", true); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java index d1b1d1d57fb6..67a042da6b46 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java @@ -207,6 +207,10 @@ public CodegenType getTag() { public void processOpts() { super.processOpts(); + if (isModelMutable()) { + typeMapping.put("array", "kotlin.collections.MutableList"); + } + if (additionalProperties.containsKey(CodegenConstants.LIBRARY)) { this.setLibrary((String) additionalProperties.get(CodegenConstants.LIBRARY)); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index ebbe0eacca07..f771ab38ab3a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -275,6 +275,13 @@ public String getHelp() { public void processOpts() { super.processOpts(); + if (isModelMutable()) { + typeMapping.put("array", "kotlin.collections.MutableList"); + typeMapping.put("list", "kotlin.collections.MutableList"); + typeMapping.put("set", "kotlin.collections.MutableSet"); + typeMapping.put("map", "kotlin.collections.MutableMap"); + } + // optional jackson mappings for BigDecimal support importMapping.put("ToStringSerializer", "com.fasterxml.jackson.databind.ser.std.ToStringSerializer"); importMapping.put("JsonSerialize", "com.fasterxml.jackson.databind.annotation.JsonSerialize"); @@ -566,6 +573,12 @@ public Map postProcessOperationsWithModels(Map o resp.code = "200"; } + // This is necessary in case 'modelMutable' is enabled, + // to prevent Spring Request handlers from being generated with + // the ApiResponse annotation configured with the Mutable container type. + // See https://github.com/OpenAPITools/openapi-generator/pull/11154#discussion_r793108068 + resp.baseType = getNonMutableContainerTypeIfNeeded(resp.baseType); + doDataTypeAssignment(resp.dataType, new DataTypeAssigner() { @Override public void setReturnType(final String returnType) { @@ -579,6 +592,17 @@ public void setReturnContainer(final String returnContainer) { }); }); } + + final List allParams = operation.allParams; + if (allParams != null) { + allParams.forEach(param -> + // This is necessary in case 'modelMutable' is enabled, + // to prevent Spring Request handlers from being generated with + // parameters using their Mutable container types. + // See https://github.com/OpenAPITools/openapi-generator/pull/11154#discussion_r793094727 + param.dataType = getNonMutableContainerTypeIfNeeded(param.dataType)); + } + doDataTypeAssignment(operation.returnType, new DataTypeAssigner() { @Override @@ -600,6 +624,13 @@ public void setReturnContainer(final String returnContainer) { return objs; } + private String getNonMutableContainerTypeIfNeeded(String type) { + if (type != null && type.contains("kotlin.collections.Mutable")) { + return type.replaceAll("kotlin\\.collections\\.Mutable", "kotlin.collections."); + } + return type; + } + private interface DataTypeAssigner { void setReturnType(String returnType); @@ -619,12 +650,24 @@ private void doDataTypeAssignment(final String returnType, DataTypeAssigner data dataTypeAssigner.setReturnType(returnType.substring("kotlin.collections.List<".length(), end).trim()); dataTypeAssigner.setReturnContainer("List"); } + } else if (returnType.startsWith("kotlin.collections.MutableList")) { + int end = returnType.lastIndexOf(">"); + if (end > 0) { + dataTypeAssigner.setReturnType(returnType.substring("kotlin.collections.MutableList<".length(), end).trim()); + dataTypeAssigner.setReturnContainer("List"); + } } else if (returnType.startsWith("kotlin.collections.Map")) { int end = returnType.lastIndexOf(">"); if (end > 0) { dataTypeAssigner.setReturnType(returnType.substring("kotlin.collections.Map<".length(), end).split(",")[1].trim()); dataTypeAssigner.setReturnContainer("Map"); } + } else if (returnType.startsWith("kotlin.collections.MutableMap")) { + int end = returnType.lastIndexOf(">"); + if (end > 0) { + dataTypeAssigner.setReturnType(returnType.substring("kotlin.collections.MutableMap<".length(), end).split(",")[1].trim()); + dataTypeAssigner.setReturnContainer("Map"); + } } } 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 d69af302d54e..73457440d669 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 @@ -181,8 +181,11 @@ public KtormSchemaCodegen() { sqlTypeMapping.put("kotlin.ByteArray", SqlType.Blob); sqlTypeMapping.put("kotlin.Array", SqlType.Blob); sqlTypeMapping.put("kotlin.collections.List", SqlType.Blob); + sqlTypeMapping.put("kotlin.collections.MutableList", SqlType.Blob); sqlTypeMapping.put("kotlin.collections.Set", SqlType.Blob); + sqlTypeMapping.put("kotlin.collections.MutableSet", SqlType.Blob); sqlTypeMapping.put("kotlin.collections.Map", SqlType.Blob); + sqlTypeMapping.put("kotlin.collections.MutableMap", SqlType.Blob); sqlTypeMapping.put("kotlin.Any", SqlType.Blob); sqlTypeMapping.put("java.io.File", SqlType.Blob); sqlTypeMapping.put("java.math.BigDecimal", SqlType.Decimal); diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache index a86c202f4e68..96b782dbcfa4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache @@ -18,4 +18,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#uniqueItems}}kotlin.collections.Set{{/uniqueItems}}{{^uniqueItems}}kotlin.collections.List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#uniqueItems}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}Set{{/uniqueItems}}{{^uniqueItems}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache index db80e9047f2f..20548d3ac3b6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache @@ -18,4 +18,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#isUniqueItems}}kotlin.collections.Set{{/isUniqueItems}}{{^isUniqueItems}}kotlin.collections.List{{/isUniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#isUniqueItems}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}Set{{/isUniqueItems}}{{^isUniqueItems}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}List{{/isUniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache index fdf34db6da54..344a6c251d8e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache @@ -15,4 +15,4 @@ {{^isEnum}}{{^isArray}}{{^isPrimitiveType}}{{^isModel}}@Contextual {{/isModel}}{{/isPrimitiveType}}{{/isArray}}{{/isEnum}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/kotlinx_serialization}} {{/multiplatform}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache index 9e9a41a21d2d..743069ff554d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache @@ -15,4 +15,4 @@ {{^isEnum}}{{^isArray}}{{^isPrimitiveType}}{{^isModel}}@Contextual {{/isModel}}{{/isPrimitiveType}}{{/isArray}}{{/isEnum}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/kotlinx_serialization}} {{/multiplatform}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.{{#modelMutable}}Mutable{{/modelMutable}}List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java index af675c8913da..5bea9377ce4b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java @@ -106,10 +106,32 @@ public void mutableArrayWithUniqueItems(AbstractKotlinCodegen codegen) throws IO assertFileContains(Paths.get(outputPath + "/src/main/kotlin/models/NonUniqueArray.kt"), codegen instanceof KotlinVertxServerCodegen || codegen instanceof KotlinServerDeprecatedCodegen ? "var array: kotlin.Array" - : "var array: kotlin.collections.List" + : "var array: kotlin.collections.MutableList" ); assertFileContains(Paths.get(outputPath + "/src/main/kotlin/models/UniqueArray.kt"), - "var array: kotlin.collections.Set"); + "var array: kotlin.collections.MutableSet"); + } + + @Test(dataProvider = "generators") + public void mutableContainerTypes(AbstractKotlinCodegen codegen) throws IOException { + final String outputPath = generateModels(codegen, "src/test/resources/3_0/kotlin/issue11088-model-mutable-with-containers.yaml", true); + + assertFileContains(Paths.get(outputPath + "/src/main/kotlin/models/MyModel.kt"), + codegen instanceof KotlinVertxServerCodegen || codegen instanceof KotlinServerDeprecatedCodegen + ? "var myIntArray: kotlin.Array?" + : "var myIntArray: kotlin.collections.MutableList?", + "var myStringSet: kotlin.collections.MutableSet?", + "var myFreeFormObjectWithPrimitiveValues: kotlin.collections.MutableMap?", + "var myFreeFormObjectWithComplexValues: kotlin.collections.MutableMap?", + "var myFreeFormObject: kotlin.collections.MutableMap?" + ); + + assertFileContains(Paths.get(outputPath + "/src/main/kotlin/models/MyModelMyFreeFormObjectWithComplexValues.kt"), + codegen instanceof KotlinVertxServerCodegen || codegen instanceof KotlinServerDeprecatedCodegen + ? "var myArrayOfInts: kotlin.Array?" + : "var myArrayOfInts: kotlin.collections.MutableList?", + "var mySetOfStrings: kotlin.collections.MutableSet?" + ); } } diff --git a/modules/openapi-generator/src/test/resources/3_0/kotlin/issue11088-model-mutable-with-containers.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/issue11088-model-mutable-with-containers.yaml new file mode 100644 index 000000000000..00b2353b11c6 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/issue11088-model-mutable-with-containers.yaml @@ -0,0 +1,52 @@ +openapi: 3.0.3 +info: + title: 'Issue 11088 - modelMutable and Kotlin container types' + version: 0.1.0 +paths: + '/': + get: + operationId: myOperation + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/MyModel' +components: + schemas: + MyModel: + description: Model with properties that should be mutable in Kotlin + properties: + myIntArray: + type: array + items: + type: integer + myStringSet: + type: array + items: + type: string + uniqueItems: true + myFreeFormObjectWithPrimitiveValues: + type: object + additionalProperties: + type: integer + myFreeFormObjectWithComplexValues: + type: object + additionalProperties: + type: object + properties: + myArrayOfInts: + type: array + items: + type: integer + mySetOfStrings: + type: array + items: + type: string + uniqueItems: true + myFreeFormObject: + type: object + additionalProperties: + type: object + diff --git a/samples/client/petstore/kotlin-modelMutable/.openapi-generator-ignore b/samples/client/petstore/kotlin-modelMutable/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/.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/kotlin-modelMutable/.openapi-generator/FILES b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/FILES new file mode 100644 index 000000000000..c7a409ac169e --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/FILES @@ -0,0 +1,41 @@ +README.md +build.gradle +docs/ApiResponse.md +docs/Category.md +docs/Order.md +docs/Pet.md +docs/PetApi.md +docs/StoreApi.md +docs/Tag.md +docs/User.md +docs/UserApi.md +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +settings.gradle +src/main/kotlin/org/openapitools/client/apis/PetApi.kt +src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +src/main/kotlin/org/openapitools/client/apis/UserApi.kt +src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +src/main/kotlin/org/openapitools/client/models/Category.kt +src/main/kotlin/org/openapitools/client/models/ModelApiResponse.kt +src/main/kotlin/org/openapitools/client/models/Order.kt +src/main/kotlin/org/openapitools/client/models/Pet.kt +src/main/kotlin/org/openapitools/client/models/Tag.kt +src/main/kotlin/org/openapitools/client/models/User.kt diff --git a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/README.md b/samples/client/petstore/kotlin-modelMutable/README.md new file mode 100644 index 000000000000..5ecae07a7add --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/README.md @@ -0,0 +1,90 @@ +# org.openapitools.client - Kotlin client library for OpenAPI Petstore + +## Requires + +* Kotlin 1.4.30 +* Gradle 6.8.3 + +## Build + +First, create the gradle wrapper script: + +``` +gradle wrapper +``` + +Then, run: + +``` +./gradlew check assemble +``` + +This runs all tests and packages the library. + +## Features/Implementation Notes + +* Supports JSON inputs/outputs, File inputs, and Form inputs. +* Supports collection formats for query parameters: csv, tsv, ssv, pipes. +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. +* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. + + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + + +## Documentation for Models + + - [org.openapitools.client.models.Category](docs/Category.md) + - [org.openapitools.client.models.ModelApiResponse](docs/ModelApiResponse.md) + - [org.openapitools.client.models.Order](docs/Order.md) + - [org.openapitools.client.models.Pet](docs/Pet.md) + - [org.openapitools.client.models.Tag](docs/Tag.md) + - [org.openapitools.client.models.User](docs/User.md) + + + +## Documentation for Authorization + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +### 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 + diff --git a/samples/client/petstore/kotlin-modelMutable/build.gradle b/samples/client/petstore/kotlin-modelMutable/build.gradle new file mode 100644 index 000000000000..3de8b45b135e --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/build.gradle @@ -0,0 +1,37 @@ +group 'org.openapitools' +version '1.0.0' + +wrapper { + gradleVersion = '6.8.3' + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +buildscript { + ext.kotlin_version = '1.5.10' + + repositories { + maven { url "https://repo1.maven.org/maven2" } + } + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +apply plugin: 'kotlin' + +repositories { + maven { url "https://repo1.maven.org/maven2" } +} + +test { + useJUnitPlatform() +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + implementation "com.squareup.moshi:moshi-kotlin:1.12.0" + implementation "com.squareup.moshi:moshi-adapters:1.12.0" + implementation "com.squareup.okhttp3:okhttp:4.9.1" + testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" +} diff --git a/samples/client/petstore/kotlin-modelMutable/docs/ApiResponse.md b/samples/client/petstore/kotlin-modelMutable/docs/ApiResponse.md new file mode 100644 index 000000000000..12f08d5cdef0 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/ApiResponse.md @@ -0,0 +1,12 @@ + +# ModelApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **kotlin.Int** | | [optional] +**type** | **kotlin.String** | | [optional] +**message** | **kotlin.String** | | [optional] + + + diff --git a/samples/client/petstore/kotlin-modelMutable/docs/Category.md b/samples/client/petstore/kotlin-modelMutable/docs/Category.md new file mode 100644 index 000000000000..2c28a670fc79 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/Category.md @@ -0,0 +1,11 @@ + +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**name** | **kotlin.String** | | [optional] + + + diff --git a/samples/client/petstore/kotlin-modelMutable/docs/Order.md b/samples/client/petstore/kotlin-modelMutable/docs/Order.md new file mode 100644 index 000000000000..94ab0d537e54 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/Order.md @@ -0,0 +1,22 @@ + +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**petId** | **kotlin.Long** | | [optional] +**quantity** | **kotlin.Int** | | [optional] +**shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] +**status** | [**inline**](#Status) | Order Status | [optional] +**complete** | **kotlin.Boolean** | | [optional] + + + +## Enum: status +Name | Value +---- | ----- +status | placed, approved, delivered + + + diff --git a/samples/client/petstore/kotlin-modelMutable/docs/Pet.md b/samples/client/petstore/kotlin-modelMutable/docs/Pet.md new file mode 100644 index 000000000000..1052b7da882a --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/Pet.md @@ -0,0 +1,22 @@ + +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **kotlin.String** | | +**photoUrls** | **kotlin.collections.MutableList<kotlin.String>** | | +**id** | **kotlin.Long** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**tags** | [**kotlin.collections.MutableList<Tag>**](Tag.md) | | [optional] +**status** | [**inline**](#Status) | pet status in the store | [optional] + + + +## Enum: status +Name | Value +---- | ----- +status | available, pending, sold + + + diff --git a/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md b/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md new file mode 100644 index 000000000000..895092d6e0fe --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/PetApi.md @@ -0,0 +1,405 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image + + + +# **addPet** +> addPet(body) + +Add a new pet to the store + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val body : Pet = // Pet | Pet object that needs to be added to the store +try { + apiInstance.addPet(body) +} catch (e: ClientException) { + println("4xx response calling PetApi#addPet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#addPet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | Pet id to delete +val apiKey : kotlin.String = apiKey_example // kotlin.String | +try { + apiInstance.deletePet(petId, apiKey) +} catch (e: ClientException) { + println("4xx response calling PetApi#deletePet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#deletePet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| Pet id to delete | + **apiKey** | **kotlin.String**| | [optional] + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **findPetsByStatus** +> kotlin.collections.MutableList<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val status : kotlin.collections.MutableList = // kotlin.collections.MutableList | Status values that need to be considered for filter +try { + val result : kotlin.collections.MutableList = apiInstance.findPetsByStatus(status) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#findPetsByStatus") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#findPetsByStatus") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**kotlin.collections.MutableList<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] + +### Return type + +[**kotlin.collections.MutableList<Pet>**](Pet.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **findPetsByTags** +> kotlin.collections.MutableList<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val tags : kotlin.collections.MutableList = // kotlin.collections.MutableList | Tags to filter by +try { + val result : kotlin.collections.MutableList = apiInstance.findPetsByTags(tags) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#findPetsByTags") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#findPetsByTags") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**kotlin.collections.MutableList<kotlin.String>**](kotlin.String.md)| Tags to filter by | + +### Return type + +[**kotlin.collections.MutableList<Pet>**](Pet.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to return +try { + val result : Pet = apiInstance.getPetById(petId) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#getPetById") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#getPetById") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + + +Configure api_key: + ApiClient.apiKey["api_key"] = "" + ApiClient.apiKeyPrefix["api_key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updatePet** +> updatePet(body) + +Update an existing pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val body : Pet = // Pet | Pet object that needs to be added to the store +try { + apiInstance.updatePet(body) +} catch (e: ClientException) { + println("4xx response calling PetApi#updatePet") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#updatePet") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be updated +val name : kotlin.String = name_example // kotlin.String | Updated name of the pet +val status : kotlin.String = status_example // kotlin.String | Updated status of the pet +try { + apiInstance.updatePetWithForm(petId, name, status) +} catch (e: ClientException) { + println("4xx response calling PetApi#updatePetWithForm") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#updatePetWithForm") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet that needs to be updated | + **name** | **kotlin.String**| Updated name of the pet | [optional] + **status** | **kotlin.String**| Updated status of the pet | [optional] + +### Return type + +null (empty response body) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + + +# **uploadFile** +> ModelApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = PetApi() +val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to update +val additionalMetadata : kotlin.String = additionalMetadata_example // kotlin.String | Additional data to pass to server +val file : java.io.File = BINARY_DATA_HERE // java.io.File | file to upload +try { + val result : ModelApiResponse = apiInstance.uploadFile(petId, additionalMetadata, file) + println(result) +} catch (e: ClientException) { + println("4xx response calling PetApi#uploadFile") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling PetApi#uploadFile") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **kotlin.Long**| ID of pet to update | + **additionalMetadata** | **kotlin.String**| Additional data to pass to server | [optional] + **file** | **java.io.File**| file to upload | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + + +Configure petstore_auth: + ApiClient.accessToken = "" + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md b/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md new file mode 100644 index 000000000000..0a3793c214b4 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md @@ -0,0 +1,196 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet + + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val orderId : kotlin.String = orderId_example // kotlin.String | ID of the order that needs to be deleted +try { + apiInstance.deleteOrder(orderId) +} catch (e: ClientException) { + println("4xx response calling StoreApi#deleteOrder") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#deleteOrder") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **kotlin.String**| ID of the order that needs to be deleted | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **getInventory** +> kotlin.collections.MutableMap<kotlin.String, kotlin.Int> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +try { + val result : kotlin.collections.MutableMap = apiInstance.getInventory() + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#getInventory") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#getInventory") + e.printStackTrace() +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**kotlin.collections.MutableMap<kotlin.String, kotlin.Int>** + +### Authorization + + +Configure api_key: + ApiClient.apiKey["api_key"] = "" + ApiClient.apiKeyPrefix["api_key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val orderId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be fetched +try { + val result : Order = apiInstance.getOrderById(orderId) + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#getOrderById") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#getOrderById") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **kotlin.Long**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = StoreApi() +val body : Order = // Order | order placed for purchasing the pet +try { + val result : Order = apiInstance.placeOrder(body) + println(result) +} catch (e: ClientException) { + println("4xx response calling StoreApi#placeOrder") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StoreApi#placeOrder") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/samples/client/petstore/kotlin-modelMutable/docs/Tag.md b/samples/client/petstore/kotlin-modelMutable/docs/Tag.md new file mode 100644 index 000000000000..60ce1bcdbad3 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/Tag.md @@ -0,0 +1,11 @@ + +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**name** | **kotlin.String** | | [optional] + + + diff --git a/samples/client/petstore/kotlin-modelMutable/docs/User.md b/samples/client/petstore/kotlin-modelMutable/docs/User.md new file mode 100644 index 000000000000..e801729b5ed1 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/User.md @@ -0,0 +1,17 @@ + +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Long** | | [optional] +**username** | **kotlin.String** | | [optional] +**firstName** | **kotlin.String** | | [optional] +**lastName** | **kotlin.String** | | [optional] +**email** | **kotlin.String** | | [optional] +**password** | **kotlin.String** | | [optional] +**phone** | **kotlin.String** | | [optional] +**userStatus** | **kotlin.Int** | User Status | [optional] + + + diff --git a/samples/client/petstore/kotlin-modelMutable/docs/UserApi.md b/samples/client/petstore/kotlin-modelMutable/docs/UserApi.md new file mode 100644 index 000000000000..60f882a1a210 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/docs/UserApi.md @@ -0,0 +1,376 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + + +# **createUser** +> createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : User = // User | Created user object +try { + apiInstance.createUser(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(body) + +Creates list of users with given input array + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : kotlin.collections.MutableList = // kotlin.collections.MutableList | List of user object +try { + apiInstance.createUsersWithArrayInput(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUsersWithArrayInput") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUsersWithArrayInput") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**kotlin.collections.MutableList<User>**](User.md)| List of user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **createUsersWithListInput** +> createUsersWithListInput(body) + +Creates list of users with given input array + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val body : kotlin.collections.MutableList = // kotlin.collections.MutableList | List of user object +try { + apiInstance.createUsersWithListInput(body) +} catch (e: ClientException) { + println("4xx response calling UserApi#createUsersWithListInput") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#createUsersWithListInput") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**kotlin.collections.MutableList<User>**](User.md)| List of user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The name that needs to be deleted +try { + apiInstance.deleteUser(username) +} catch (e: ClientException) { + println("4xx response calling UserApi#deleteUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#deleteUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The name that needs to be deleted | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The name that needs to be fetched. Use user1 for testing. +try { + val result : User = apiInstance.getUserByName(username) + println(result) +} catch (e: ClientException) { + println("4xx response calling UserApi#getUserByName") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#getUserByName") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **loginUser** +> kotlin.String loginUser(username, password) + +Logs user into the system + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | The user name for login +val password : kotlin.String = password_example // kotlin.String | The password for login in clear text +try { + val result : kotlin.String = apiInstance.loginUser(username, password) + println(result) +} catch (e: ClientException) { + println("4xx response calling UserApi#loginUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#loginUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| The user name for login | + **password** | **kotlin.String**| The password for login in clear text | + +### Return type + +**kotlin.String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +try { + apiInstance.logoutUser() +} catch (e: ClientException) { + println("4xx response calling UserApi#logoutUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#logoutUser") + e.printStackTrace() +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **updateUser** +> updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```kotlin +// Import classes: +//import org.openapitools.client.infrastructure.* +//import org.openapitools.client.models.* + +val apiInstance = UserApi() +val username : kotlin.String = username_example // kotlin.String | name that need to be deleted +val body : User = // User | Updated user object +try { + apiInstance.updateUser(username, body) +} catch (e: ClientException) { + println("4xx response calling UserApi#updateUser") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling UserApi#updateUser") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **kotlin.String**| name that need to be deleted | + **body** | [**User**](User.md)| Updated user object | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e708b1c023ec8b20f512888fe07c5bd3ff77bb8f GIT binary patch literal 59203 zcma&O1CT9Y(k9%tZQHhO+qUh#ZQHhO+qmuS+qP|E@9xZO?0h@l{(r>DQ>P;GjjD{w zH}lENr;dU&FbEU?00aa80D$0M0RRB{U*7-#kbjS|qAG&4l5%47zyJ#WrfA#1$1Ctx zf&Z_d{GW=lf^w2#qRJ|CvSJUi(^E3iv~=^Z(zH}F)3Z%V3`@+rNB7gTVU{Bb~90p|f+0(v;nz01EG7yDMX9@S~__vVgv%rS$+?IH+oZ03D5zYrv|^ zC1J)SruYHmCki$jLBlTaE5&dFG9-kq3!^i>^UQL`%gn6)jz54$WDmeYdsBE9;PqZ_ zoGd=P4+|(-u4U1dbAVQrFWoNgNd;0nrghPFbQrJctO>nwDdI`Q^i0XJDUYm|T|RWc zZ3^Qgo_Qk$%Fvjj-G}1NB#ZJqIkh;kX%V{THPqOyiq)d)0+(r9o(qKlSp*hmK#iIY zA^)Vr$-Hz<#SF=0@tL@;dCQsm`V9s1vYNq}K1B)!XSK?=I1)tX+bUV52$YQu*0%fnWEukW>mxkz+%3-S!oguE8u#MGzST8_Dy^#U?fA@S#K$S@9msUiX!gd_ow>08w5)nX{-KxqMOo7d?k2&?Vf z&diGDtZr(0cwPe9z9FAUSD9KC)7(n^lMWuayCfxzy8EZsns%OEblHFSzP=cL6}?J| z0U$H!4S_TVjj<`6dy^2j`V`)mC;cB%* z8{>_%E1^FH!*{>4a7*C1v>~1*@TMcLK{7nEQ!_igZC}ikJ$*<$yHy>7)oy79A~#xE zWavoJOIOC$5b6*q*F_qN1>2#MY)AXVyr$6x4b=$x^*aqF*L?vmj>Mgv+|ITnw_BoW zO?jwHvNy^prH{9$rrik1#fhyU^MpFqF2fYEt(;4`Q&XWOGDH8k6M=%@fics4ajI;st# zCU^r1CK&|jzUhRMv;+W~6N;u<;#DI6cCw-otsc@IsN3MoSD^O`eNflIoR~l4*&-%RBYk@gb^|-JXs&~KuSEmMxB}xSb z@K76cXD=Y|=I&SNC2E+>Zg?R6E%DGCH5J1nU!A|@eX9oS(WPaMm==k2s_ueCqdZw| z&hqHp)47`c{BgwgvY2{xz%OIkY1xDwkw!<0veB#yF4ZKJyabhyyVS`gZepcFIk%e2 zTcrmt2@-8`7i-@5Nz>oQWFuMC_KlroCl(PLSodswHqJ3fn<;gxg9=}~3x_L3P`9Sn zChIf}8vCHvTriz~T2~FamRi?rh?>3bX1j}%bLH+uFX+p&+^aXbOK7clZxdU~6Uxgy z8R=obwO4dL%pmVo*Ktf=lH6hnlz_5k3cG;m8lgaPp~?eD!Yn2kf)tU6PF{kLyn|oI@eQ`F z3IF7~Blqg8-uwUuWZScRKn%c2_}dXB6Dx_&xR*n9M9LXasJhtZdr$vBY!rP{c@=)& z#!?L$2UrkvClwQO>U*fSMs67oSj2mxiJ$t;E|>q%Kh_GzzWWO&3;ufU%2z%ucBU8H z3WIwr$n)cfCXR&>tyB7BcSInK>=ByZA%;cVEJhcg<#6N{aZC4>K41XF>ZgjG`z_u& zGY?;Ad?-sgiOnI`oppF1o1Gurqbi*;#x2>+SSV6|1^G@ooVy@fg?wyf@0Y!UZ4!}nGuLeC^l)6pwkh|oRY`s1Pm$>zZ3u-83T|9 zGaKJIV3_x+u1>cRibsaJpJqhcm%?0-L;2 zitBrdRxNmb0OO2J%Y&Ym(6*`_P3&&5Bw157{o7LFguvxC$4&zTy#U=W*l&(Q2MNO} zfaUwYm{XtILD$3864IA_nn34oVa_g^FRuHL5wdUd)+W-p-iWCKe8m_cMHk+=? zeKX)M?Dt(|{r5t7IenkAXo%&EXIb-i^w+0CX0D=xApC=|Xy(`xy+QG^UyFe z+#J6h_&T5i#sV)hj3D4WN%z;2+jJcZxcI3*CHXGmOF3^)JD5j&wfX)e?-|V0GPuA+ zQFot%aEqGNJJHn$!_}#PaAvQ^{3-Ye7b}rWwrUmX53(|~i0v{}G_sI9uDch_brX&6 zWl5Ndj-AYg(W9CGfQf<6!YmY>Ey)+uYd_JNXH=>|`OH-CDCmcH(0%iD_aLlNHKH z7bcW-^5+QV$jK?R*)wZ>r9t}loM@XN&M-Pw=F#xn(;u3!(3SXXY^@=aoj70;_=QE9 zGghsG3ekq#N||u{4We_25U=y#T*S{4I{++Ku)> zQ!DZW;pVcn>b;&g2;YE#+V`v*Bl&Y-i@X6D*OpNA{G@JAXho&aOk(_j^weW{#3X5Y z%$q_wpb07EYPdmyH(1^09i$ca{O<}7) zRWncXdSPgBE%BM#by!E>tdnc$8RwUJg1*x($6$}ae$e9Knj8gvVZe#bLi!<+&BkFj zg@nOpDneyc+hU9P-;jmOSMN|*H#>^Ez#?;%C3hg_65leSUm;iz)UkW)jX#p)e&S&M z1|a?wDzV5NVnlhRBCd_;F87wp>6c<&nkgvC+!@KGiIqWY4l}=&1w7|r6{oBN8xyzh zG$b#2=RJp_iq6)#t5%yLkKx(0@D=C3w+oiXtSuaQ%I1WIb-eiE$d~!)b@|4XLy!CZ z9p=t=%3ad@Ep+<9003D2KZ5VyP~_n$=;~r&YUg5UZ0KVD&tR1DHy9x)qWtKJp#Kq# zP*8p#W(8JJ_*h_3W}FlvRam?<4Z+-H77^$Lvi+#vmhL9J zJ<1SV45xi;SrO2f=-OB(7#iNA5)x1uNC-yNxUw|!00vcW2PufRm>e~toH;M0Q85MQLWd?3O{i8H+5VkR@l9Dg-ma ze2fZ%>G(u5(k9EHj2L6!;(KZ8%8|*-1V|B#EagbF(rc+5iL_5;Eu)L4Z-V;0HfK4d z*{utLse_rvHZeQ>V5H=f78M3Ntg1BPxFCVD{HbNA6?9*^YIq;B-DJd{Ca2L#)qWP? zvX^NhFmX?CTWw&Ns}lgs;r3i+Bq@y}Ul+U%pzOS0Fcv9~aB(0!>GT0)NO?p=25LjN z2bh>6RhgqD7bQj#k-KOm@JLgMa6>%-ok1WpOe)FS^XOU{c?d5shG(lIn3GiVBxmg`u%-j=)^v&pX1JecJics3&jvPI)mDut52? z3jEA)DM%}BYbxxKrizVYwq?(P&19EXlwD9^-6J+4!}9{ywR9Gk42jjAURAF&EO|~N z)?s>$Da@ikI4|^z0e{r`J8zIs>SpM~Vn^{3fArRu;?+43>lD+^XtUcY1HidJwnR6+ z!;oG2=B6Z_=M%*{z-RaHc(n|1RTKQdNjjV!Pn9lFt^4w|AeN06*j}ZyhqZ^!-=cyGP_ShV1rGxkx8t zB;8`h!S{LD%ot``700d0@Grql(DTt4Awgmi+Yr0@#jbe=2#UkK%rv=OLqF)9D7D1j z!~McAwMYkeaL$~kI~90)5vBhBzWYc3Cj1WI0RS`z000R8-@ET0dA~*r(gSiCJmQMN&4%1D zyVNf0?}sBH8zNbBLn>~(W{d3%@kL_eQ6jEcR{l>C|JK z(R-fA!z|TTRG40|zv}7E@PqCAXP3n`;%|SCQ|ZS%ym$I{`}t3KPL&^l5`3>yah4*6 zifO#{VNz3)?ZL$be;NEaAk9b#{tV?V7 zP|wf5YA*1;s<)9A4~l3BHzG&HH`1xNr#%){4xZ!jq%o=7nN*wMuXlFV{HaiQLJ`5G zBhDi#D(m`Q1pLh@Tq+L;OwuC52RdW7b8}~60WCOK5iYMUad9}7aWBuILb({5=z~YF zt?*Jr5NG+WadM{mDL>GyiByCuR)hd zA=HM?J6l1Xv0Dl+LW@w$OTcEoOda^nFCw*Sy^I@$sSuneMl{4ys)|RY#9&NxW4S)9 zq|%83IpslTLoz~&vTo!Ga@?rj_kw{|k{nv+w&Ku?fyk4Ki4I?);M|5Axm)t+BaE)D zm(`AQ#k^DWrjbuXoJf2{Aj^KT zFb1zMSqxq|vceV+Mf-)$oPflsO$@*A0n0Z!R{&(xh8s}=;t(lIy zv$S8x>m;vQNHuRzoaOo?eiWFe{0;$s`Bc+Osz~}Van${u;g(su`3lJ^TEfo~nERfP z)?aFzpDgnLYiERsKPu|0tq4l2wT)Atr6Qb%m-AUn6HnCue*yWICp7TjW$@sO zm5rm4aTcPQ(rfi7a`xP7cKCFrJD}*&_~xgLyr^-bmsL}y;A5P|al8J3WUoBSjqu%v zxC;mK!g(7r6RRJ852Z~feoC&sD3(6}^5-uLK8o)9{8L_%%rItZK9C){UxB|;G>JbP zsRRtS4-3B*5c+K2kvmgZK8472%l>3cntWUOVHxB|{Ay~aOg5RN;{PJgeVD*H%ac+y!h#wi%o2bF2Ca8IyMyH{>4#{E_8u^@+l-+n=V}Sq?$O z{091@v%Bd*3pk0^2UtiF9Z+(a@wy6 zUdw8J*ze$K#=$48IBi1U%;hmhO>lu!uU;+RS}p&6@rQila7WftH->*A4=5W|Fmtze z)7E}jh@cbmr9iup^i%*(uF%LG&!+Fyl@LFA-}Ca#bxRfDJAiR2dt6644TaYw1Ma79 zt8&DYj31j^5WPNf5P&{)J?WlCe@<3u^78wnd(Ja4^a>{^Tw}W>|Cjt^If|7l^l)^Q zbz|7~CF(k_9~n|h;ysZ+jHzkXf(*O*@5m zLzUmbHp=x!Q|!9NVXyipZ3)^GuIG$k;D)EK!a5=8MFLI_lpf`HPKl=-Ww%z8H_0$j ztJ||IfFG1lE9nmQ0+jPQy zCBdKkjArH@K7jVcMNz);Q(Q^R{d5G?-kk;Uu_IXSyWB)~KGIizZL(^&qF;|1PI7!E zTP`%l)gpX|OFn&)M%txpQ2F!hdA~hX1Cm5)IrdljqzRg!f{mN%G~H1&oqe`5eJCIF zHdD7O;AX-{XEV(a`gBFJ9ews#CVS2y!&>Cm_dm3C8*n3MA*e67(WC?uP@8TXuMroq z{#w$%z@CBIkRM7?}Xib+>hRjy?%G!fiw8! z8(gB+8J~KOU}yO7UGm&1g_MDJ$IXS!`+*b*QW2x)9>K~Y*E&bYMnjl6h!{17_8d!%&9D`a7r&LKZjC<&XOvTRaKJ1 zUY@hl5^R&kZl3lU3njk`3dPzxj$2foOL26r(9zsVF3n_F#v)s5vv3@dgs|lP#eylq62{<-vczqP!RpVBTgI>@O6&sU>W|do17+#OzQ7o5A$ICH z?GqwqnK^n2%LR;$^oZM;)+>$X3s2n}2jZ7CdWIW0lnGK-b#EG01)P@aU`pg}th&J-TrU`tIpb5t((0eu|!u zQz+3ZiOQ^?RxxK4;zs=l8q!-n7X{@jSwK(iqNFiRColuEOg}!7cyZi`iBX4g1pNBj zAPzL?P^Ljhn;1$r8?bc=#n|Ed7wB&oHcw()&*k#SS#h}jO?ZB246EGItsz*;^&tzp zu^YJ0=lwsi`eP_pU8}6JA7MS;9pfD;DsSsLo~ogzMNP70@@;Fm8f0^;>$Z>~}GWRw!W5J3tNX*^2+1f3hz{~rIzJo z6W%J(H!g-eI_J1>0juX$X4Cl6i+3wbc~k146UIX&G22}WE>0ga#WLsn9tY(&29zBvH1$`iWtTe zG2jYl@P!P)eb<5DsR72BdI7-zP&cZNI{7q3e@?N8IKc4DE#UVr->|-ryuJXk^u^>4 z$3wE~=q390;XuOQP~TNoDR?#|NSPJ%sTMInA6*rJ%go|=YjGe!B>z6u$IhgQSwoV* zjy3F2#I>uK{42{&IqP59)Y(1*Z>>#W8rCf4_eVsH)`v!P#^;BgzKDR`ARGEZzkNX+ zJUQu=*-ol=Xqqt5=`=pA@BIn@6a9G8C{c&`i^(i+BxQO9?YZ3iu%$$da&Kb?2kCCo zo7t$UpSFWqmydXf@l3bVJ=%K?SSw)|?srhJ-1ZdFu*5QhL$~-IQS!K1s@XzAtv6*Y zl8@(5BlWYLt1yAWy?rMD&bwze8bC3-GfNH=p zynNFCdxyX?K&G(ZZ)afguQ2|r;XoV^=^(;Cku#qYn4Lus`UeKt6rAlFo_rU`|Rq z&G?~iWMBio<78of-2X(ZYHx~=U0Vz4btyXkctMKdc9UM!vYr~B-(>)(Hc|D zMzkN4!PBg%tZoh+=Gba!0++d193gbMk2&krfDgcbx0jI92cq?FFESVg0D$>F+bil} zY~$)|>1HZsX=5sAZ2WgPB5P=8X#TI+NQ(M~GqyVB53c6IdX=k>Wu@A0Svf5#?uHaF zsYn|koIi3$(%GZ2+G+7Fv^lHTb#5b8sAHSTnL^qWZLM<(1|9|QFw9pnRU{svj}_Al zL)b9>fN{QiA($8peNEJyy`(a{&uh-T4_kdZFIVsKKVM(?05}76EEz?#W za^fiZOAd14IJ4zLX-n7Lq0qlQ^lW8Cvz4UKkV9~P}>sq0?xD3vg+$4vLm~C(+ zM{-3Z#qnZ09bJ>}j?6ry^h+@PfaD7*jZxBEY4)UG&daWb??6)TP+|3#Z&?GL?1i+280CFsE|vIXQbm| zM}Pk!U`U5NsNbyKzkrul-DzwB{X?n3E6?TUHr{M&+R*2%yOiXdW-_2Yd6?38M9Vy^ z*lE%gA{wwoSR~vN0=no}tP2Ul5Gk5M(Xq`$nw#ndFk`tcpd5A=Idue`XZ!FS>Q zG^0w#>P4pPG+*NC9gLP4x2m=cKP}YuS!l^?sHSFftZy{4CoQrb_ z^20(NnG`wAhMI=eq)SsIE~&Gp9Ne0nD4%Xiu|0Fj1UFk?6avDqjdXz{O1nKao*46y zT8~iA%Exu=G#{x=KD;_C&M+Zx4+n`sHT>^>=-1YM;H<72k>$py1?F3#T1*ef9mLZw z5naLQr?n7K;2l+{_uIw*_1nsTn~I|kkCgrn;|G~##hM;9l7Jy$yJfmk+&}W@JeKcF zx@@Woiz8qdi|D%aH3XTx5*wDlbs?dC1_nrFpm^QbG@wM=i2?Zg;$VK!c^Dp8<}BTI zyRhAq@#%2pGV49*Y5_mV4+OICP|%I(dQ7x=6Ob}>EjnB_-_18*xrY?b%-yEDT(wrO z9RY2QT0`_OpGfMObKHV;QLVnrK%mc?$WAdIT`kJQT^n%GuzE7|9@k3ci5fYOh(287 zuIbg!GB3xLg$YN=n)^pHGB0jH+_iIiC=nUcD;G6LuJsjn2VI1cyZx=a?ShCsF==QK z;q~*m&}L<-cb+mDDXzvvrRsybcgQ;Vg21P(uLv5I+eGc7o7tc6`;OA9{soHFOz zT~2?>Ts}gprIX$wRBb4yE>ot<8+*Bv`qbSDv*VtRi|cyWS>)Fjs>fkNOH-+PX&4(~ z&)T8Zam2L6puQl?;5zg9h<}k4#|yH9czHw;1jw-pwBM*O2hUR6yvHATrI%^mvs9q_ z&ccT0>f#eDG<^WG^q@oVqlJrhxH)dcq2cty@l3~|5#UDdExyXUmLQ}f4#;6fI{f^t zDCsgIJ~0`af%YR%Ma5VQq-p21k`vaBu6WE?66+5=XUd%Ay%D$irN>5LhluRWt7 zov-=f>QbMk*G##&DTQyou$s7UqjjW@k6=!I@!k+S{pP8R(2=e@io;N8E`EOB;OGoI zw6Q+{X1_I{OO0HPpBz!X!@`5YQ2)t{+!?M_iH25X(d~-Zx~cXnS9z>u?+If|iNJbx zyFU2d1!ITX64D|lE0Z{dLRqL1Ajj=CCMfC4lD3&mYR_R_VZ>_7_~|<^o*%_&jevU+ zQ4|qzci=0}Jydw|LXLCrOl1_P6Xf@c0$ieK2^7@A9UbF{@V_0p%lqW|L?5k>bVM8|p5v&2g;~r>B8uo<4N+`B zH{J)h;SYiIVx@#jI&p-v3dwL5QNV1oxPr8J%ooezTnLW>i*3Isb49%5i!&ac_dEXv zvXmVUck^QHmyrF8>CGXijC_R-y(Qr{3Zt~EmW)-nC!tiH`wlw5D*W7Pip;T?&j%kX z6DkZX4&}iw>hE(boLyjOoupf6JpvBG8}jIh!!VhnD0>}KSMMo{1#uU6kiFcA04~|7 zVO8eI&x1`g4CZ<2cYUI(n#wz2MtVFHx47yE5eL~8bot~>EHbevSt}LLMQX?odD{Ux zJMnam{d)W4da{l7&y-JrgiU~qY3$~}_F#G7|MxT)e;G{U`In&?`j<5D->}cb{}{T(4DF0BOk-=1195KB-E*o@c?`>y#4=dMtYtSY=&L{!TAjFVcq0y@AH`vH! z$41+u!Ld&}F^COPgL(EE{0X7LY&%D7-(?!kjFF7=qw<;`V{nwWBq<)1QiGJgUc^Vz ztMUlq1bZqKn17|6x6iAHbWc~l1HcmAxr%$Puv!znW)!JiukwIrqQ00|H$Z)OmGG@= zv%A8*4cq}(?qn4rN6o`$Y))(MyXr8R<2S^J+v(wmFmtac!%VOfN?&(8Nr!T@kV`N; z*Q33V3t`^rN&aBiHet)18wy{*wi1=W!B%B-Q6}SCrUl$~Hl{@!95ydml@FK8P=u4s z4e*7gV2s=YxEvskw2Ju!2%{8h01rx-3`NCPc(O zH&J0VH5etNB2KY6k4R@2Wvl^Ck$MoR3=)|SEclT2ccJ!RI9Nuter7u9@;sWf-%um;GfI!=eEIQ2l2p_YWUd{|6EG ze{yO6;lMc>;2tPrsNdi@&1K6(1;|$xe8vLgiouj%QD%gYk`4p{Ktv9|j+!OF-P?@p z;}SV|oIK)iwlBs+`ROXkhd&NK zzo__r!B>tOXpBJMDcv!Mq54P+n4(@dijL^EpO1wdg~q+!DT3lB<>9AANSe!T1XgC=J^)IP0XEZ()_vpu!!3HQyJhwh?r`Ae%Yr~b% zO*NY9t9#qWa@GCPYOF9aron7thfWT`eujS4`t2uG6)~JRTI;f(ZuoRQwjZjp5Pg34 z)rp$)Kr?R+KdJ;IO;pM{$6|2y=k_siqvp%)2||cHTe|b5Ht8&A{wazGNca zX$Ol?H)E_R@SDi~4{d-|8nGFhZPW;Cts1;08TwUvLLv&_2$O6Vt=M)X;g%HUr$&06 zISZb(6)Q3%?;3r~*3~USIg=HcJhFtHhIV(siOwV&QkQe#J%H9&E21!C*d@ln3E@J* zVqRO^<)V^ky-R|%{(9`l-(JXq9J)1r$`uQ8a}$vr9E^nNiI*thK8=&UZ0dsFN_eSl z(q~lnD?EymWLsNa3|1{CRPW60>DSkY9YQ;$4o3W7Ms&@&lv9eH!tk~N&dhqX&>K@} zi1g~GqglxkZ5pEFkllJ)Ta1I^c&Bt6#r(QLQ02yHTaJB~- zCcE=5tmi`UA>@P=1LBfBiqk)HB4t8D?02;9eXj~kVPwv?m{5&!&TFYhu>3=_ zsGmYZ^mo*-j69-42y&Jj0cBLLEulNRZ9vXE)8~mt9C#;tZs;=#M=1*hebkS;7(aGf zcs7zH(I8Eui9UU4L--))yy`&d&$In&VA2?DAEss4LAPCLd>-$i?lpXvn!gu^JJ$(DoUlc6wE98VLZ*z`QGQov5l4Fm_h?V-;mHLYDVOwKz7>e4+%AzeO>P6v}ndPW| zM>m#6Tnp7K?0mbK=>gV}=@k*0Mr_PVAgGMu$j+pWxzq4MAa&jpCDU&-5eH27Iz>m^ zax1?*HhG%pJ((tkR(V(O(L%7v7L%!_X->IjS3H5kuXQT2!ow(;%FDE>16&3r){!ex zhf==oJ!}YU89C9@mfDq!P3S4yx$aGB?rbtVH?sHpg?J5C->!_FHM%Hl3#D4eplxzQ zRA+<@LD%LKSkTk2NyWCg7u=$%F#;SIL44~S_OGR}JqX}X+=bc@swpiClB`Zbz|f!4 z7Ysah7OkR8liXfI`}IIwtEoL}(URrGe;IM8%{>b1SsqXh)~w}P>yiFRaE>}rEnNkT z!HXZUtxUp1NmFm)Dm@-{FI^aRQqpSkz}ZSyKR%Y}YHNzBk)ZIp} zMtS=aMvkgWKm9&oTcU0?S|L~CDqA+sHpOxwnswF-fEG)cXCzUR?ps@tZa$=O)=L+5 zf%m58cq8g_o}3?Bhh+c!w4(7AjxwQ3>WnVi<{{38g7yFboo>q|+7qs<$8CPXUFAN< zG&}BHbbyQ5n|qqSr?U~GY{@GJ{(Jny{bMaOG{|IkUj7tj^9pa9|FB_<+KHLxSxR;@ zHpS$4V)PP+tx}22fWx(Ku9y+}Ap;VZqD0AZW4gCDTPCG=zgJmF{|x;(rvdM|2|9a}cex6xrMkERnkE;}jvU-kmzd%_J50$M`lIPCKf+^*zL=@LW`1SaEc%=m zQ+lT06Gw+wVwvQ9fZ~#qd430v2HndFsBa9WjD0P}K(rZYdAt^5WQIvb%D^Q|pkVE^ zte$&#~zmULFACGfS#g=2OLOnIf2Of-k!(BIHjs77nr!5Q1*I9 z1%?=~#Oss!rV~?-6Gm~BWJiA4mJ5TY&iPm_$)H1_rTltuU1F3I(qTQ^U$S>%$l z)Wx1}R?ij0idp@8w-p!Oz{&*W;v*IA;JFHA9%nUvVDy7Q8woheC#|8QuDZb-L_5@R zOqHwrh|mVL9b=+$nJxM`3eE{O$sCt$UK^2@L$R(r^-_+z?lOo+me-VW=Zw z-Bn>$4ovfWd%SPY`ab-u9{INc*k2h+yH%toDHIyqQ zO68=u`N}RIIs7lsn1D){)~%>ByF<>i@qFb<-axvu(Z+6t7v<^z&gm9McRB~BIaDn$ z#xSGT!rzgad8o>~kyj#h1?7g96tOcCJniQ+*#=b7wPio>|6a1Z?_(TS{)KrPe}(8j z!#&A=k(&Pj^F;r)CI=Z{LVu>uj!_W1q4b`N1}E(i%;BWjbEcnD=mv$FL$l?zS6bW!{$7j1GR5ocn94P2u{ z70tAAcpqtQo<@cXw~@i-@6B23;317|l~S>CB?hR5qJ%J3EFgyBdJd^fHZu7AzHF(BQ!tyAz^L0`X z23S4Fe{2X$W0$zu9gm%rg~A>ijaE#GlYlrF9$ds^QtaszE#4M(OLVP2O-;XdT(XIC zatwzF*)1c+t~c{L=fMG8Z=k5lv>U0;C{caN1NItnuSMp)6G3mbahu>E#sj&oy94KC zpH}8oEw{G@N3pvHhp{^-YaZeH;K+T_1AUv;IKD<=mv^&Ueegrb!yf`4VlRl$M?wsl zZyFol(2|_QM`e_2lYSABpKR{{NlxlDSYQNkS;J66aT#MSiTx~;tUmvs-b*CrR4w=f z8+0;*th6kfZ3|5!Icx3RV11sp=?`0Jy3Fs0N4GZQMN=8HmT6%x9@{Dza)k}UwL6JT zHRDh;%!XwXr6yuuy`4;Xsn0zlR$k%r%9abS1;_v?`HX_hI|+EibVnlyE@3aL5vhQq zlIG?tN^w@0(v9M*&L+{_+RQZw=o|&BRPGB>e5=ys7H`nc8nx)|-g;s7mRc7hg{GJC zAe^vCIJhajmm7C6g! zL&!WAQ~5d_5)00?w_*|*H>3$loHrvFbitw#WvLB!JASO?#5Ig5$Ys10n>e4|3d;tS zELJ0|R4n3Az(Fl3-r^QiV_C;)lQ1_CW{5bKS15U|E9?ZgLec@%kXr84>5jV2a5v=w z?pB1GPdxD$IQL4)G||B_lI+A=08MUFFR4MxfGOu07vfIm+j=z9tp~5i_6jb`tR>qV z$#`=BQ*jpCjm$F0+F)L%xRlnS%#&gro6PiRfu^l!EVan|r3y}AHJQOORGx4~ z&<)3=K-tx518DZyp%|!EqpU!+X3Et7n2AaC5(AtrkW>_57i}$eqs$rupubg0a1+WO zGHZKLN2L0D;ab%{_S1Plm|hx8R?O14*w*f&2&bB050n!R2by zw!@XOQx$SqZ5I<(Qu$V6g>o#A!JVwErWv#(Pjx=KeS0@hxr4?13zj#oWwPS(7Ro|v z>Mp@Kmxo79q|}!5qtX2-O@U&&@6s~!I&)1WQIl?lTnh6UdKT_1R640S4~f=_xoN3- zI+O)$R@RjV$F=>Ti7BlnG1-cFKCC(t|Qjm{SalS~V-tX#+2ekRhwmN zZr`8{QF6y~Z!D|{=1*2D-JUa<(1Z=;!Ei!KiRNH?o{p5o3crFF=_pX9O-YyJchr$~ zRC`+G+8kx~fD2k*ZIiiIGR<8r&M@3H?%JVOfE>)})7ScOd&?OjgAGT@WVNSCZ8N(p zuQG~76GE3%(%h1*vUXg$vH{ua0b`sQ4f0*y=u~lgyb^!#CcPJa2mkSEHGLsnO^kb$ zru5_l#nu=Y{rSMWiYx?nO{8I!gH+?wEj~UM?IrG}E|bRIBUM>UlY<`T1EHpRr36vv zBi&dG8oxS|J$!zoaq{+JpJy+O^W(nt*|#g32bd&K^w-t>!Vu9N!k9eA8r!Xc{utY> zg9aZ(D2E0gL#W0MdjwES-7~Wa8iubPrd?8-$C4BP?*wok&O8+ykOx{P=Izx+G~hM8 z*9?BYz!T8~dzcZr#ux8kS7u7r@A#DogBH8km8Ry4slyie^n|GrTbO|cLhpqgMdsjX zJ_LdmM#I&4LqqsOUIXK8gW;V0B(7^$y#h3h>J0k^WJfAMeYek%Y-Dcb_+0zPJez!GM zAmJ1u;*rK=FNM0Nf}Y!!P9c4)HIkMnq^b;JFd!S3?_Qi2G#LIQ)TF|iHl~WKK6JmK zbv7rPE6VkYr_%_BT}CK8h=?%pk@3cz(UrZ{@h40%XgThP*-Oeo`T0eq9 zA8BnWZKzCy5e&&_GEsU4*;_k}(8l_&al5K-V*BFM=O~;MgRkYsOs%9eOY6s6AtE*<7GQAR2ulC3RAJrG_P1iQK5Z~&B z&f8X<>yJV6)oDGIlS$Y*D^Rj(cszTy5c81a5IwBr`BtnC6_e`ArI8CaTX_%rx7;cn zR-0?J_LFg*?(#n~G8cXut(1nVF0Oka$A$1FGcERU<^ggx;p@CZc?3UB41RY+wLS`LWFNSs~YP zuw1@DNN3lTd|jDL7gjBsd9}wIw}4xT2+8dBQzI00m<@?c2L%>}QLfK5%r!a-iII`p zX@`VEUH)uj^$;7jVUYdADQ2k*!1O3WdfgF?OMtUXNpQ1}QINamBTKDuv19^{$`8A1 zeq%q*O0mi@(%sZU>Xdb0Ru96CFqk9-L3pzLVsMQ`Xpa~N6CR{9Rm2)A|CI21L(%GW zh&)Y$BNHa=FD+=mBw3{qTgw)j0b!Eahs!rZnpu)z!!E$*eXE~##yaXz`KE5(nQM`s zD!$vW9XH)iMxu9R>r$VlLk9oIR%HxpUiW=BK@4U)|1WNQ=mz9a z^!KkO=>GaJ!GBXm{KJj^;kh-MkUlEQ%lza`-G&}C5y1>La1sR6hT=d*NeCnuK%_LV zOXt$}iP6(YJKc9j-Fxq~*ItVUqljQ8?oaysB-EYtFQp9oxZ|5m0^Hq(qV!S+hq#g( z?|i*H2MIr^Kxgz+3vIljQ*Feejy6S4v~jKEPTF~Qhq!(ms5>NGtRgO5vfPPc4Z^AM zTj!`5xEreIN)vaNxa|q6qWdg>+T`Ol0Uz)ckXBXEGvPNEL3R8hB3=C5`@=SYgAju1 z!)UBr{2~=~xa{b8>x2@C7weRAEuatC)3pkRhT#pMPTpSbA|tan%U7NGMvzmF?c!V8 z=pEWxbdXbTAGtWTyI?Fml%lEr-^AE}w#l(<7OIw;ctw}imYax&vR4UYNJZK6P7ZOd zP87XfhnUHxCUHhM@b*NbTi#(-8|wcv%3BGNs#zRCVV(W?1Qj6^PPQa<{yaBwZ`+<`w|;rqUY_C z&AeyKwwf*q#OW-F()lir=T^<^wjK65Lif$puuU5+tk$;e_EJ;Lu+pH>=-8=PDhkBg z8cWt%@$Sc#C6F$Vd+0507;{OOyT7Hs%nKS88q-W!$f~9*WGBpHGgNp}=C*7!RiZ5s zn1L_DbKF@B8kwhDiLKRB@lsXVVLK|ph=w%_`#owlf@s@V(pa`GY$8h%;-#h@TsO|Y8V=n@*!Rog7<7Cid%apR|x zOjhHCyfbIt%+*PCveTEcuiDi%Wx;O;+K=W?OFUV%)%~6;gl?<0%)?snDDqIvkHF{ zyI02)+lI9ov42^hL>ZRrh*HhjF9B$A@=H94iaBESBF=eC_KT$8A@uB^6$~o?3Wm5t1OIaqF^~><2?4e3c&)@wKn9bD? zoeCs;H>b8DL^F&>Xw-xjZEUFFTv>JD^O#1E#)CMBaG4DX9bD(Wtc8Rzq}9soQ8`jf zeSnHOL}<+WVSKp4kkq&?SbETjq6yr@4%SAqOG=9E(3YeLG9dtV+8vmzq+6PFPk{L; z(&d++iu=^F%b+ea$i2UeTC{R*0Isk;vFK!no<;L+(`y`3&H-~VTdKROkdyowo1iqR zbVW(3`+(PQ2>TKY>N!jGmGo7oeoB8O|P_!Ic@ zZ^;3dnuXo;WJ?S+)%P>{Hcg!Jz#2SI(s&dY4QAy_vRlmOh)QHvs_7c&zkJCmJGVvV zX;Mtb>QE+xp`KyciG$Cn*0?AK%-a|=o!+7x&&yzHQOS>8=B*R=niSnta^Pxp1`=md z#;$pS$4WCT?mbiCYU?FcHGZ#)kHVJTTBt^%XE(Q};aaO=Zik0UgLcc0I(tUpt(>|& zcxB_|fxCF7>&~5eJ=Dpn&5Aj{A^cV^^}(7w#p;HG&Q)EaN~~EqrE1qKrMAc&WXIE;>@<&)5;gD2?={Xf@Mvn@OJKw=8Mgn z!JUFMwD+s==JpjhroT&d{$kQAy%+d`a*XxDEVxy3`NHzmITrE`o!;5ClXNPb4t*8P zzAivdr{j_v!=9!^?T3y?gzmqDWX6mkzhIzJ-3S{T5bcCFMr&RPDryMcdwbBuZbsgN zGrp@^i?rcfN7v0NKGzDPGE#4yszxu=I_`MI%Z|10nFjU-UjQXXA?k8Pk|OE<(?ae) zE%vG#eZAlj*E7_3dx#Zz4kMLj>H^;}33UAankJiDy5ZvEhrjr`!9eMD8COp}U*hP+ zF}KIYx@pkccIgyxFm#LNw~G&`;o&5)2`5aogs`1~7cMZQ7zj!%L4E`2yzlQN6REX20&O<9 zKV6fyr)TScJPPzNTC2gL+0x#=u>(({{D7j)c-%tvqls3#Y?Z1m zV5WUE)zdJ{$p>yX;^P!UcXP?UD~YM;IRa#Rs5~l+*$&nO(;Ers`G=0D!twR(0GF@c zHl9E5DQI}Oz74n zfKP>&$q0($T4y$6w(p=ERAFh+>n%iaeRA%!T%<^+pg?M)@ucY<&59$x9M#n+V&>}=nO9wCV{O~lg&v#+jcUj(tQ z`0u1YH)-`U$15a{pBkGyPL0THv1P|4e@pf@3IBZS4dVJPo#H>pWq%Lr0YS-SeWash z8R7=jb28KPMI|_lo#GEO|5B?N_e``H*23{~a!AmUJ+fb4HX-%QI@lSEUxKlGV7z7Q zSKw@-TR>@1RL%w{x}dW#k1NgW+q4yt2Xf1J62Bx*O^WG8OJ|FqI4&@d3_o8Id@*)4 zYrk=>@!wv~mh7YWv*bZhxqSmFh2Xq)o=m;%n$I?GSz49l1$xRpPu_^N(vZ>*>Z<04 z2+rP70oM=NDysd!@fQdM2OcyT?3T^Eb@lIC-UG=Bw{BjQ&P`KCv$AcJ;?`vdZ4){d z&gkoUK{$!$$K`3*O-jyM1~p-7T*qb)Ys>Myt^;#1&a%O@x8A+E>! zY8=eD`ZG)LVagDLBeHg>=atOG?Kr%h4B%E6m@J^C+U|y)XX@f z8oyJDW|9g=<#f<{JRr{y#~euMnv)`7j=%cHWLc}ngjq~7k**6%4u>Px&W%4D94(r* z+akunK}O0DC2A%Xo9jyF;DobX?!1I(7%}@7F>i%&nk*LMO)bMGg2N+1iqtg+r(70q zF5{Msgsm5GS7DT`kBsjMvOrkx&|EU!{{~gL4d2MWrAT=KBQ-^zQCUq{5PD1orxlIL zq;CvlWx#f1NWvh`hg011I%?T_s!e38l*lWVt|~z-PO4~~1g)SrJ|>*tXh=QfXT)%( z+ex+inPvD&O4Ur;JGz>$sUOnWdpSLcm1X%aQDw4{dB!cnj`^muI$CJ2%p&-kULVCE z>$eMR36kN$wCPR+OFDM3-U(VOrp9k3)lI&YVFqd;Kpz~K)@Fa&FRw}L(SoD z9B4a+hQzZT-BnVltst&=kq6Y(f^S4hIGNKYBgMxGJ^;2yrO}P3;r)(-I-CZ)26Y6? z&rzHI_1GCvGkgy-t1E;r^3Le30|%$ebDRu2+gdLG)r=A~Qz`}~&L@aGJ{}vVs_GE* zVUjFnzHiXfKQbpv&bR&}l2bzIjAooB)=-XNcYmrGmBh(&iu@o!^hn0^#}m2yZZUK8 zufVm7Gq0y`Mj;9b>`c?&PZkU0j4>IL=UL&-Lp3j&47B5pAW4JceG{!XCA)kT<%2nqCxj<)uy6XR_uws~>_MEKPOpAQ!H zkn>FKh)<9DwwS*|Y(q?$^N!6(51O0 z^JM~Ax{AI1Oj$fs-S5d4T7Z_i1?{%0SsIuQ&r8#(JA=2iLcTN+?>wOL532%&dMYkT z*T5xepC+V6zxhS@vNbMoi|i)=rpli@R9~P!39tWbSSb904ekv7D#quKbgFEMTb48P zuq(VJ+&L8aWU(_FCD$3^uD!YM%O^K(dvy~Wm2hUuh6bD|#(I39Xt>N1Y{ZqXL`Fg6 zKQ?T2htHN!(Bx;tV2bfTtIj7e)liN-29s1kew>v(D^@)#v;}C4-G=7x#;-dM4yRWm zyY`cS21ulzMK{PoaQ6xChEZ}o_#}X-o}<&0)$1#3we?+QeLt;aVCjeA)hn!}UaKt< zat1fHEx13y-rXNMvpUUmCVzocPmN~-Y4(YJvQ#db)4|%B!rBsgAe+*yor~}FrNH08 z3V!97S}D7d$zbSD{$z;@IYMxM6aHdypIuS*pr_U6;#Y!_?0i|&yU*@16l z*dcMqDQgfNBf}?quiu4e>H)yTVfsp#f+Du0@=Kc41QockXkCkvu>FBd6Q+@FL!(Yx z2`YuX#eMEiLEDhp+9uFqME_E^faV&~9qjBHJkIp~%$x^bN=N)K@kvSVEMdDuzA0sn z88CBG?`RX1@#hQNd`o^V{37)!w|nA)QfiYBE^m=yQKv-fQF+UCMcuEe1d4BH7$?>b zJl-r9@0^Ie=)guO1vOd=i$_4sz>y3x^R7n4ED!5oXL3@5**h(xr%Hv)_gILarO46q+MaDOF%ChaymKoI6JU5Pg;7#2n9-18|S1;AK+ zgsn6;k6-%!QD>D?cFy}8F;r@z8H9xN1jsOBw2vQONVqBVEbkiNUqgw~*!^##ht>w0 zUOykwH=$LwX2j&nLy=@{hr)2O&-wm-NyjW7n~Zs9UlH;P7iP3 zI}S(r0YFVYacnKH(+{*)Tbw)@;6>%=&Th=+Z6NHo_tR|JCI8TJiXv2N7ei7M^Q+RM z?9o`meH$5Yi;@9XaNR#jIK^&{N|DYNNbtdb)XW1Lv2k{E>;?F`#Pq|&_;gm~&~Zc9 zf+6ZE%{x4|{YdtE?a^gKyzr}dA>OxQv+pq|@IXL%WS0CiX!V zm$fCePA%lU{%pTKD7|5NJHeXg=I0jL@$tOF@K*MI$)f?om)D63K*M|r`gb9edD1~Y zc|w7N)Y%do7=0{RC|AziW7#am$)9jciRJ?IWl9PE{G3U+$%FcyKs_0Cgq`=K3@ttV z9g;M!3z~f_?P%y3-ph%vBMeS@p7P&Ea8M@97+%XEj*(1E6vHj==d zjsoviB>j^$_^OI_DEPvFkVo(BGRo%cJeD){6Uckei=~1}>sp299|IRjhXe)%?uP0I zF5+>?0#Ye}T^Y$u_rc4=lPcq4K^D(TZG-w30-YiEM=dcK+4#o*>lJ8&JLi+3UcpZk z!^?95S^C0ja^jwP`|{<+3cBVog$(mRdQmadS+Vh~z zS@|P}=|z3P6uS+&@QsMp0no9Od&27O&14zHXGAOEy zh~OKpymK5C%;LLb467@KgIiVwYbYd6wFxI{0-~MOGfTq$nBTB!{SrWmL9Hs}C&l&l#m?s*{tA?BHS4mVKHAVMqm63H<|c5n0~k)-kbg zXidai&9ZUy0~WFYYKT;oe~rytRk?)r8bptITsWj(@HLI;@=v5|XUnSls7$uaxFRL+ zRVMGuL3w}NbV1`^=Pw*0?>bm8+xfeY(1PikW*PB>>Tq(FR`91N0c2&>lL2sZo5=VD zQY{>7dh_TX98L2)n{2OV=T10~*YzX27i2Q7W86M4$?gZIXZaBq#sA*{PH8){|GUi;oM>e?ua7eF4WFuFYZSG| zze?srg|5Ti8Og{O zeFxuw9!U+zhyk?@w zjsA6(oKD=Ka;A>Ca)oPORxK+kxH#O@zhC!!XS4@=swnuMk>t+JmLmFiE^1aX3f<)D@`%K0FGK^gg1a1j>zi z2KhV>sjU7AX3F$SEqrXSC}fRx64GDoc%!u2Yag68Lw@w9v;xOONf@o)Lc|Uh3<21ctTYu-mFZuHk*+R{GjXHIGq3p)tFtQp%TYqD=j1&y)>@zxoxUJ!G@ zgI0XKmP6MNzw>nRxK$-Gbzs}dyfFzt>#5;f6oR27ql!%+{tr+(`(>%51|k`ML} zY4eE)Lxq|JMas(;JibNQds1bUB&r}ydMQXBY4x(^&fY_&LlQC)3hylc$~8&~|06-D z#T+%66rYbHX%^KuqJED_wuGB+=h`nWA!>1n0)3wZrBG3%`b^Ozv6__dNa@%V14|!D zQ?o$z5u0^8`giv%qE!BzZ!3j;BlDlJDk)h@9{nSQeEk!z9RGW) z${RSF3phEM*ce*>Xdp}585vj$|40=&S{S-GTiE?Op*vY&Lvr9}BO$XWy80IF+6@%n z5*2ueT_g@ofP#u5pxb7n*fv^Xtt7&?SRc{*2Ka-*!BuOpf}neHGCiHy$@Ka1^Dint z;DkmIL$-e)rj4o2WQV%Gy;Xg(_Bh#qeOsTM2f@KEe~4kJ8kNLQ+;(!j^bgJMcNhvklP5Z6I+9Fq@c&D~8Fb-4rmDT!MB5QC{Dsb;BharP*O;SF4& zc$wj-7Oep7#$WZN!1nznc@Vb<_Dn%ga-O#J(l=OGB`dy=Sy&$(5-n3zzu%d7E#^8`T@}V+5B;PP8J14#4cCPw-SQTdGa2gWL0*zKM z#DfSXs_iWOMt)0*+Y>Lkd=LlyoHjublNLefhKBv@JoC>P7N1_#> zv=mLWe96%EY;!ZGSQDbZWb#;tzqAGgx~uk+-$+2_8U`!ypbwXl z^2E-FkM1?lY@yt8=J3%QK+xaZ6ok=-y%=KXCD^0r!5vUneW>95PzCkOPO*t}p$;-> ze5j-BLT_;)cZQzR2CEsm@rU7GZfFtdp*a|g4wDr%8?2QkIGasRfDWT-Dvy*U{?IHT z*}wGnzdlSptl#ZF^sf)KT|BJs&kLG91^A6ls{CzFprZ6-Y!V0Xysh%9p%iMd7HLsS zN+^Un$tDV)T@i!v?3o0Fsx2qI(AX_$dDkBzQ@fRM%n zRXk6hb9Py#JXUs+7)w@eo;g%QQ95Yq!K_d=z{0dGS+pToEI6=Bo8+{k$7&Z zo4>PH(`ce8E-Ps&uv`NQ;U$%t;w~|@E3WVOCi~R4oj5wP?%<*1C%}Jq%a^q~T7u>K zML5AKfQDv6>PuT`{SrKHRAF+^&edg6+5R_#H?Lz3iGoWo#PCEd0DS;)2U({{X#zU^ zw_xv{4x7|t!S)>44J;KfA|DC?;uQ($l+5Vp7oeqf7{GBF9356nx|&B~gs+@N^gSdd zvb*>&W)|u#F{Z_b`f#GVtQ`pYv3#||N{xj1NgB<#=Odt6{eB%#9RLt5v zIi|0u70`#ai}9fJjKv7dE!9ZrOIX!3{$z_K5FBd-Kp-&e4(J$LD-)NMTp^_pB`RT; zftVVlK2g@+1Ahv2$D){@Y#cL#dUj9*&%#6 zd2m9{1NYp>)6=oAvqdCn5#cx{AJ%S8skUgMglu2*IAtd+z1>B&`MuEAS(D(<6X#Lj z?f4CFx$)M&$=7*>9v1ER4b6!SIz-m0e{o0BfkySREchp?WdVPpQCh!q$t>?rL!&Jg zd#heM;&~A}VEm8Dvy&P|J*eAV&w!&Nx6HFV&B8jJFVTmgLaswn!cx$&%JbTsloz!3 zMEz1d`k==`Ueub_JAy_&`!ogbwx27^ZXgFNAbx=g_I~5nO^r)}&myw~+yY*cJl4$I znNJ32M&K=0(2Dj_>@39`3=FX!v3nZHno_@q^!y}%(yw0PqOo=);6Y@&ylVe>nMOZ~ zd>j#QQSBn3oaWd;qy$&5(5H$Ayi)0haAYO6TH>FR?rhqHmNOO+(})NB zLI@B@v0)eq!ug`>G<@htRlp3n!EpU|n+G+AvXFrWSUsLMBfL*ZB`CRsIVHNTR&b?K zxBgsN0BjfB>UVcJ|x%=-zb%OV7lmZc& zxiupadZVF7)6QuhoY;;FK2b*qL0J-Rn-8!X4ZY$-ZSUXV5DFd7`T41c(#lAeLMoeT z4%g655v@7AqT!i@)Edt5JMbN(=Q-6{=L4iG8RA%}w;&pKmtWvI4?G9pVRp|RTw`g0 zD5c12B&A2&P6Ng~8WM2eIW=wxd?r7A*N+&!Be7PX3s|7~z=APxm=A?5 zt>xB4WG|*Td@VX{Rs)PV0|yK`oI3^xn(4c_j&vgxk_Y3o(-`_5o`V zRTghg6%l@(qodXN;dB#+OKJEEvhfcnc#BeO2|E(5df-!fKDZ!%9!^BJ_4)9P+9Dq5 zK1=(v?KmIp34r?z{NEWnLB3Px{XYwy-akun4F7xTRr2^zeYW{gcK9)>aJDdU5;w5@ zak=<+-PLH-|04pelTb%ULpuuuJC7DgyT@D|p{!V!0v3KpDnRjANN12q6SUR3mb9<- z>2r~IApQGhstZ!3*?5V z8#)hJ0TdZg0M-BK#nGFP>$i=qk82DO z7h;Ft!D5E15OgW)&%lej*?^1~2=*Z5$2VX>V{x8SC+{i10BbtUk9@I#Vi&hX)q
    Q!LwySI{Bnv%Sm)yh{^sSVJ8&h_D-BJ_YZe5eCaAWU9b$O2c z$T|{vWVRtOL!xC0DTc(Qbe`ItNtt5hr<)VijD0{U;T#bUEp381_y`%ZIav?kuYG{iyYdEBPW=*xNSc;Rlt6~F4M`5G+VtOjc z*0qGzCb@gME5udTjJA-9O<&TWd~}ysBd(eVT1-H82-doyH9RST)|+Pb{o*;$j9Tjs zhU!IlsPsj8=(x3bAKJTopW3^6AKROHR^7wZ185wJGVhA~hEc|LP;k7NEz-@4p5o}F z`AD6naG3(n=NF9HTH81=F+Q|JOz$7wm9I<+#BSmB@o_cLt2GkW9|?7mM;r!JZp89l zbo!Hp8=n!XH1{GwaDU+k)pGp`C|cXkCU5%vcH)+v@0eK>%7gWxmuMu9YLlChA|_D@ zi#5zovN_!a-0?~pUV-Rj*1P)KwdU-LguR>YM&*Nen+ln8Q$?WFCJg%DY%K}2!!1FE zDv-A%Cbwo^p(lzac&_TZ-l#9kq`mhLcY3h9ZTUVCM(Ad&=EriQY5{jJv<5K&g|*Lk zgV%ILnf1%8V2B0E&;Sp4sYbYOvvMebLwYwzkRQ#F8GpTQq#uv=J`uaSJ34OWITeSGo6+-8Xw znCk*n{kdDEi)Hi&u^)~cs@iyCkFWB2SWZU|Uc%^43ZIZQ-vWNExCCtDWjqHs;;tWf$v{}0{p0Rvxkq``)*>+Akq%|Na zA`@~-Vfe|+(AIlqru+7Ceh4nsVmO9p9jc8}HX^W&ViBDXT+uXbT#R#idPn&L>+#b6 zflC-4C5-X;kUnR~L>PSLh*gvL68}RBsu#2l`s_9KjUWRhiqF`j)`y`2`YU(>3bdBj z?>iyjEhe-~$^I5!nn%B6Wh+I`FvLNvauve~eX<+Ipl&04 zT}};W&1a3%W?dJ2=N#0t?e+aK+%t}5q%jSLvp3jZ%?&F}nOOWr>+{GFIa%wO_2`et z=JzoRR~}iKuuR+azPI8;Gf9)z3kyA4EIOSl!sRR$DlW}0>&?GbgPojmjmnln;cTqCt=ADbE zZ8GAnoM+S1(5$i8^O4t`ue;vO4i}z0wz-QEIVe5_u03;}-!G1NyY8;h^}y;tzY}i5 zqQr#Ur3Fy8sSa$Q0ys+f`!`+>9WbvU_I`Sj;$4{S>O3?#inLHCrtLy~!s#WXV=oVP zeE93*Nc`PBi4q@%Ao$x4lw9vLHM!6mn3-b_cebF|n-2vt-zYVF_&sDE--J-P;2WHo z+@n2areE0o$LjvjlV2X7ZU@j+`{*8zq`JR3gKF#EW|#+{nMyo-a>nFFTg&vhyT=b} zDa8+v0(Dgx0yRL@ZXOYIlVSZ0|MFizy0VPW8;AfA5|pe!#j zX}Py^8fl5SyS4g1WSKKtnyP+_PoOwMMwu`(i@Z)diJp~U54*-miOchy7Z35eL>^M z4p<-aIxH4VUZgS783@H%M7P9hX>t{|RU7$n4T(brCG#h9e9p! z+o`i;EGGq3&pF;~5V~eBD}lC)>if$w%Vf}AFxGqO88|ApfHf&Bvu+xdG)@vuF}Yvk z)o;~k-%+0K0g+L`Wala!$=ZV|z$e%>f0%XoLib%)!R^RoS+{!#X?h-6uu zF&&KxORdZU&EwQFITIRLo(7TA3W}y6X{?Y%y2j0It!ekU#<)$qghZtpcS>L3uh`Uj z7GY;6f$9qKynP#oS3$$a{p^{D+0oJQ71`1?OAn_m8)UGZmj3l*ZI)`V-a>MKGGFG< z&^jg#Ok%(hhm>hSrZ5;Qga4u(?^i>GiW_j9%_7M>j(^|Om$#{k+^*ULnEgzW_1gCICtAD^WpC`A z{9&DXkG#01Xo)U$OC(L5Y$DQ|Q4C6CjUKk1UkPj$nXH##J{c8e#K|&{mA*;b$r0E4 zUNo0jthwA(c&N1l=PEe8Rw_8cEl|-eya9z&H3#n`B$t#+aJ03RFMzrV@gowbe8v(c zIFM60^0&lCFO10NU4w@|61xiZ4CVXeaKjd;d?sv52XM*lS8XiVjgWpRB;&U_C0g+`6B5V&w|O6B*_q zsATxL!M}+$He)1eOWECce#eS@2n^xhlB4<_Nn?yCVEQWDs(r`|@2GqLe<#(|&P0U? z$7V5IgpWf09uIf_RazRwC?qEqRaHyL?iiS05UiGesJy%^>-C{{ypTBI&B0-iUYhk> zIk<5xpsuV@g|z(AZD+C-;A!fTG=df1=<%nxy(a(IS+U{ME4ZbDEBtcD_3V=icT6*_ z)>|J?>&6%nvHhZERBtjK+s4xnut*@>GAmA5m*OTp$!^CHTr}vM4n(X1Q*;{e-Rd2BCF-u@1ZGm z!S8hJ6L=Gl4T_SDa7Xx|-{4mxveJg=ctf`BJ*fy!yF6Dz&?w(Q_6B}WQVtNI!BVBC zKfX<>7vd6C96}XAQmF-Jd?1Q4eTfRB3q7hCh0f!(JkdWT5<{iAE#dKy*Jxq&3a1@~ z8C||Dn2mFNyrUV|<-)C^_y7@8c2Fz+2jrae9deBDu;U}tJ{^xAdxCD248(k;dCJ%o z`y3sADe>U%suxwwv~8A1+R$VB=Q?%U?4joI$um;aH+eCrBqpn- z%79D_7rb;R-;-9RTrwi9dPlg8&@tfWhhZ(Vx&1PQ+6(huX`;M9x~LrW~~#3{j0Bh2kDU$}@!fFQej4VGkJv?M4rU^x!RU zEwhu$!CA_iDjFjrJa`aocySDX16?~;+wgav;}Zut6Mg%C4>}8FL?8)Kgwc(Qlj{@#2Pt0?G`$h7P#M+qoXtlV@d}%c&OzO+QYKK`kyXaK{U(O^2DyIXCZlNQjt0^8~8JzNGrIxhj}}M z&~QZlbx%t;MJ(Vux;2tgNKGlAqphLq%pd}JG9uoVHUo?|hN{pLQ6Em%r*+7t^<);X zm~6=qChlNAVXNN*Sow->*4;}T;l;D1I-5T{Bif@4_}=>l`tK;qqDdt5zvisCKhMAH z#r}`)7VW?LZqfdmXQ%zo5bJ00{Xb9^YKrk0Nf|oIW*K@(=`o2Vndz}ZDyk{!u}PVx zzd--+_WC*U{~DH3{?GI64IB+@On&@9X>EUAo&L+G{L^dozaI4C3G#2wr~hseW@K&g zKWs{uHu-9Je!3;4pE>eBltKUXb^*hG8I&413)$J&{D4N%7PcloU6bn%jPxJyQL?g* z9g+YFFEDiE`8rW^laCNzQmi7CTnPfwyg3VDHRAl>h=In6jeaVOP@!-CP60j3+#vpL zEYmh_oP0{-gTe7Or`L6x)6w?77QVi~jD8lWN@3RHcm80iV%M1A!+Y6iHM)05iC64tb$X2lV_%Txk@0l^hZqi^%Z?#- zE;LE0uFx)R08_S-#(wC=dS&}vj6P4>5ZWjhthP=*Hht&TdLtKDR;rXEX4*z0h74FA zMCINqrh3Vq;s%3MC1YL`{WjIAPkVL#3rj^9Pj9Ss7>7duy!9H0vYF%>1jh)EPqvlr6h%R%CxDsk| z!BACz7E%j?bm=pH6Eaw{+suniuY7C9Ut~1cWfOX9KW9=H><&kQlinPV3h9R>3nJvK z4L9(DRM=x;R&d#a@oFY7mB|m8h4692U5eYfcw|QKwqRsshN(q^v$4$)HgPpAJDJ`I zkqjq(8Cd!K!+wCd=d@w%~e$=gdUgD&wj$LQ1r>-E=O@c ze+Z$x{>6(JA-fNVr)X;*)40Eym1TtUZI1Pwwx1hUi+G1Jlk~vCYeXMNYtr)1?qwyg zsX_e*$h?380O00ou?0R@7-Fc59o$UvyVs4cUbujHUA>sH!}L54>`e` zHUx#Q+Hn&Og#YVOuo*niy*GU3rH;%f``nk#NN5-xrZ34NeH$l`4@t);4(+0|Z#I>Y z)~Kzs#exIAaf--65L0UHT_SvV8O2WYeD>Mq^Y6L!Xu8%vnpofG@w!}R7M28?i1*T&zp3X4^OMCY6(Dg<-! zXmcGQrRgHXGYre7GfTJ)rhl|rs%abKT_Nt24_Q``XH{88NVPW+`x4ZdrMuO0iZ0g` z%p}y};~T5gbb9SeL8BSc`SO#ixC$@QhXxZ=B}L`tP}&k?1oSPS=4%{UOHe0<_XWln zwbl5cn(j-qK`)vGHY5B5C|QZd5)W7c@{bNVXqJ!!n$^ufc?N9C-BF2QK1(kv++h!>$QbAjq)_b$$PcJdV+F7hz0Hu@ zqj+}m0qn{t^tD3DfBb~0B36|Q`bs*xs|$i^G4uNUEBl4g;op-;Wl~iThgga?+dL7s zUP(8lMO?g{GcYpDS{NM!UA8Hco?#}eNEioRBHy4`mq!Pd-9@-97|k$hpEX>xoX+dY zDr$wfm^P&}Wu{!%?)U_(%Mn79$(ywvu*kJ9r4u|MyYLI_67U7%6Gd_vb##Nerf@>& z8W11z$$~xEZt$dPG}+*IZky+os5Ju2eRi;1=rUEeIn>t-AzC_IGM-IXWK3^6QNU+2pe=MBn4I*R@A%-iLDCOHTE-O^wo$sL_h{dcPl=^muAQb`_BRm};=cy{qSkui;`WSsj9%c^+bIDQ z0`_?KX0<-=o!t{u(Ln)v>%VGL z0pC=GB7*AQ?N7N{ut*a%MH-tdtNmNC+Yf$|KS)BW(gQJ*z$d{+{j?(e&hgTy^2|AR9vx1Xre2fagGv0YXWqtNkg*v%40v?BJBt|f9wX5 z{QTlCM}b-0{mV?IG>TW_BdviUKhtosrBqdfq&Frdz>cF~yK{P@(w{Vr7z2qKFwLhc zQuogKO@~YwyS9%+d-zD7mJG~@?EFJLSn!a&mhE5$_4xBl&6QHMzL?CdzEnC~C3$X@ zvY!{_GR06ep5;<#cKCSJ%srxX=+pn?ywDwtJ2{TV;0DKBO2t++B(tIO4)Wh`rD13P z4fE$#%zkd=UzOB74gi=-*CuID&Z3zI^-`4U^S?dHxK8fP*;fE|a(KYMgMUo`THIS1f!*6dOI2 zFjC3O=-AL`6=9pp;`CYPTdVX z8(*?V&%QoipuH0>WKlL8A*zTKckD!paN@~hh zmXzm~qZhMGVdQGd=AG8&20HW0RGV8X{$9LldFZYm zE?}`Q3i?xJRz43S?VFMmqRyvWaS#(~Lempg9nTM$EFDP(Gzx#$r)W&lpFKqcAoJh-AxEw$-bjW>`_+gEi z2w`99#UbFZGiQjS8kj~@PGqpsPX`T{YOj`CaEqTFag;$jY z8_{Wzz>HXx&G*Dx<5skhpETxIdhKH?DtY@b9l8$l?UkM#J-Snmts7bd7xayKTFJ(u zyAT&@6cAYcs{PBfpqZa%sxhJ5nSZBPji?Zlf&}#L?t)vC4X5VLp%~fz2Sx<*oN<7` z?ge=k<=X7r<~F7Tvp9#HB{!mA!QWBOf%EiSJ6KIF8QZNjg&x~-%e*tflL(ji_S^sO ztmib1rp09uon}RcsFi#k)oLs@$?vs(i>5k3YN%$T(5Or(TZ5JW9mA6mIMD08=749$ z!d+l*iu{Il7^Yu}H;lgw=En1sJpCKPSqTCHy4(f&NPelr31^*l%KHq^QE>z>Ks_bH zjbD?({~8Din7IvZeJ>8Ey=e;I?thpzD=zE5UHeO|neioJwG;IyLk?xOz(yO&0DTU~ z^#)xcs|s>Flgmp;SmYJ4g(|HMu3v7#;c*Aa8iF#UZo7CvDq4>8#qLJ|YdZ!AsH%^_7N1IQjCro

    K7UpUK$>l@ zw`1S}(D?mUXu_C{wupRS-jiX~w=Uqqhf|Vb3Cm9L=T+w91Cu^ z*&Ty%sN?x*h~mJc4g~k{xD4ZmF%FXZNC;oVDwLZ_WvrnzY|{v8hc1nmx4^}Z;yriXsAf+Lp+OFLbR!&Ox?xABwl zu8w&|5pCxmu#$?Cv2_-Vghl2LZ6m7}VLEfR5o2Ou$x02uA-%QB2$c(c1rH3R9hesc zfpn#oqpbKuVsdfV#cv@5pV4^f_!WS+F>SV6N0JQ9E!T90EX((_{bSSFv9ld%I0&}9 zH&Jd4MEX1e0iqDtq~h?DBrxQX1iI0lIs<|kB$Yrh&cpeK0-^K%=FBsCBT46@h#yi!AyDq1V(#V}^;{{V*@T4WJ&U-NTq43w=|K>z8%pr_nC>%C(Wa_l78Ufib$r8Od)IIN=u>417 z`Hl{9A$mI5A(;+-Q&$F&h-@;NR>Z<2U;Y21>>Z;s@0V@SbkMQQj%_;~+qTuQ?c|AV zcWm3XZQHhP&R%QWarS%mJ!9R^&!_)*s(v+VR@I#QrAT}`17Y+l<`b-nvmDNW`De%y zrwTZ9EJrj1AFA>B`1jYDow}~*dfPs}IZMO3=a{Fy#IOILc8F0;JS4x(k-NSpbN@qM z`@aE_e}5{!$v3+qVs7u?sOV(y@1Os*Fgu`fCW9=G@F_#VQ%xf$hj0~wnnP0$hFI+@ zkQj~v#V>xn)u??YutKsX>pxKCl^p!C-o?+9;!Nug^ z{rP!|+KsP5%uF;ZCa5F;O^9TGac=M|=V z_H(PfkV1rz4jl?gJ(ArXMyWT4y(86d3`$iI4^l9`vLdZkzpznSd5Ikfrs8qcSy&>z zTIZgWZGXw0n9ibQxYWE@gI0(3#KA-dAdPcsL_|hg2@~C!VZDM}5;v_Nykfq!*@*Zf zE_wVgx82GMDryKO{U{D>vSzSc%B~|cjDQrt5BN=Ugpsf8H8f1lR4SGo#hCuXPL;QQ z#~b?C4MoepT3X`qdW2dNn& zo8)K}%Lpu>0tQei+{>*VGErz|qjbK#9 zvtd8rcHplw%YyQCKR{kyo6fgg!)6tHUYT(L>B7er5)41iG`j$qe*kSh$fY!PehLcD zWeKZHn<492B34*JUQh=CY1R~jT9Jt=k=jCU2=SL&&y5QI2uAG2?L8qd2U(^AW#{(x zThSy=C#>k+QMo^7caQcpU?Qn}j-`s?1vXuzG#j8(A+RUAY})F@=r&F(8nI&HspAy4 z4>(M>hI9c7?DCW8rw6|23?qQMSq?*Vx?v30U%luBo)B-k2mkL)Ljk5xUha3pK>EEj z@(;tH|M@xkuN?gsz;*bygizwYR!6=(Xgcg^>WlGtRYCozY<rFX2E>kaZo)O<^J7a`MX8Pf`gBd4vrtD|qKn&B)C&wp0O-x*@-|m*0egT=-t@%dD zgP2D+#WPptnc;_ugD6%zN}Z+X4=c61XNLb7L1gWd8;NHrBXwJ7s0ce#lWnnFUMTR& z1_R9Fin4!d17d4jpKcfh?MKRxxQk$@)*hradH2$3)nyXep5Z;B z?yX+-Bd=TqO2!11?MDtG0n(*T^!CIiF@ZQymqq1wPM_X$Iu9-P=^}v7npvvPBu!d$ z7K?@CsA8H38+zjA@{;{kG)#AHME>Ix<711_iQ@WWMObXyVO)a&^qE1GqpP47Q|_AG zP`(AD&r!V^MXQ^e+*n5~Lp9!B+#y3#f8J^5!iC@3Y@P`;FoUH{G*pj*q7MVV)29+j z>BC`a|1@U_v%%o9VH_HsSnM`jZ-&CDvbiqDg)tQEnV>b%Ptm)T|1?TrpIl)Y$LnG_ zzKi5j2Fx^K^PG1=*?GhK;$(UCF-tM~^=Z*+Wp{FSuy7iHt9#4n(sUuHK??@v+6*|10Csdnyg9hAsC5_OrSL;jVkLlf zHXIPukLqbhs~-*oa^gqgvtpgTk_7GypwH><53riYYL*M=Q@F-yEPLqQ&1Sc zZB%w}T~RO|#jFjMWcKMZccxm-SL)s_ig?OC?y_~gLFj{n8D$J_Kw%{r0oB8?@dWzn zB528d-wUBQzrrSSLq?fR!K%59Zv9J4yCQhhDGwhptpA5O5U?Hjqt>8nOD zi{)0CI|&Gu%zunGI*XFZh(ix)q${jT8wnnzbBMPYVJc4HX*9d^mz|21$=R$J$(y7V zo0dxdbX3N#=F$zjstTf*t8vL)2*{XH!+<2IJ1VVFa67|{?LP&P41h$2i2;?N~RA30LV`BsUcj zfO9#Pg1$t}7zpv#&)8`mis3~o+P(DxOMgz-V*(?wWaxi?R=NhtW}<#^Z?(BhSwyar zG|A#Q7wh4OfK<|DAcl9THc-W4*>J4nTevsD%dkj`U~wSUCh15?_N@uMdF^Kw+{agk zJ`im^wDqj`Ev)W3k3stasP`88-M0ZBs7;B6{-tSm3>I@_e-QfT?7|n0D~0RRqDb^G zyHb=is;IwuQ&ITzL4KsP@Z`b$d%B0Wuhioo1CWttW8yhsER1ZUZzA{F*K=wmi-sb#Ju+j z-l@In^IKnb{bQG}Ps>+Vu_W#grNKNGto+yjA)?>0?~X`4I3T@5G1)RqGUZuP^NJCq&^HykuYtMDD8qq+l8RcZNJsvN(10{ zQ1$XcGt}QH-U^WU!-wRR1d--{B$%vY{JLWIV%P4-KQuxxDeJaF#{eu&&r!3Qu{w}0f--8^H|KwE>)ORrcR+2Qf zb})DRcH>k0zWK8@{RX}NYvTF;E~phK{+F;MkIP$)T$93Ba2R2TvKc>`D??#mv9wg$ zd~|-`Qx5LwwsZ2hb*Rt4S9dsF%Cny5<1fscy~)d;0m2r$f=83<->c~!GNyb!U)PA; zq^!`@@)UaG)Ew(9V?5ZBq#c%dCWZrplmuM`o~TyHjAIMh0*#1{B>K4po-dx$Tk-Cq z=WZDkP5x2W&Os`N8KiYHRH#UY*n|nvd(U>yO=MFI-2BEp?x@=N<~CbLJBf6P)}vLS?xJXYJ2^<3KJUdrwKnJnTp{ zjIi|R=L7rn9b*D#Xxr4*R<3T5AuOS+#U8hNlfo&^9JO{VbH!v9^JbK=TCGR-5EWR@ zN8T-_I|&@A}(hKeL4_*eb!1G8p~&_Im8|wc>Cdir+gg90n1dw?QaXcx6Op_W1r=axRw>4;rM*UOpT#Eb9xU1IiWo@h?|5uP zka>-XW0Ikp@dIe;MN8B01a7+5V@h3WN{J=HJ*pe0uwQ3S&MyWFni47X32Q7SyCTNQ z+sR!_9IZa5!>f&V$`q!%H8ci!a|RMx5}5MA_kr+bhtQy{-^)(hCVa@I!^TV4RBi zAFa!Nsi3y37I5EK;0cqu|9MRj<^r&h1lF}u0KpKQD^5Y+LvFEwM zLU@@v4_Na#Axy6tn3P%sD^5P#<7F;sd$f4a7LBMk zGU^RZHBcxSA%kCx*eH&wgA?Qwazm8>9SCSz_!;MqY-QX<1@p$*T8lc?@`ikEqJ>#w zcG``^CoFMAhdEXT9qt47g0IZkaU)4R7wkGs^Ax}usqJ5HfDYAV$!=6?>J6+Ha1I<5 z|6=9soU4>E))tW$<#>F ziZ$6>KJf0bPfbx_)7-}tMINlc=}|H+$uX)mhC6-Hz+XZxsKd^b?RFB6et}O#+>Wmw9Ec9) z{q}XFWp{3@qmyK*Jvzpyqv57LIR;hPXKsrh{G?&dRjF%Zt5&m20Ll?OyfUYC3WRn{cgQ?^V~UAv+5 z&_m#&nIwffgX1*Z2#5^Kl4DbE#NrD&Hi4|7SPqZ}(>_+JMz=s|k77aEL}<=0Zfb)a z%F(*L3zCA<=xO)2U3B|pcTqDbBoFp>QyAEU(jMu8(jLA61-H!ucI804+B!$E^cQQa z)_ERrW3g!B9iLb3nn3dlkvD7KsY?sRvls3QC0qPi>o<)GHx%4Xb$5a3GBTJ(k@`e@ z$RUa^%S15^1oLEmA=sayrP5;9qtf!Z1*?e$ORVPsXpL{jL<6E)0sj&swP3}NPmR%FM?O>SQgN5XfHE< zo(4#Cv11(%Nnw_{_Ro}r6=gKd{k?NebJ~<~Kv0r(r0qe4n3LFx$5%x(BKvrz$m?LG zjLIc;hbj0FMdb9aH9Lpsof#yG$(0sG2%RL;d(n>;#jb!R_+dad+K;Ccw!|RY?uS(a zj~?=&M!4C(5LnlH6k%aYvz@7?xRa^2gml%vn&eKl$R_lJ+e|xsNfXzr#xuh(>`}9g zLHSyiFwK^-p!;p$yt7$F|3*IfO3Mlu9e>Dpx8O`37?fA`cj`C0B-m9uRhJjs^mRp# zWB;Aj6|G^1V6`jg7#7V9UFvnB4((nIwG?k%c7h`?0tS8J3Bn0t#pb#SA}N-|45$-j z$R>%7cc2ebAClXc(&0UtHX<>pd)akR3Kx_cK+n<}FhzmTx!8e9^u2e4%x{>T6pQ`6 zO182bh$-W5A3^wos0SV_TgPmF4WUP-+D25KjbC{y_6W_9I2_vNKwU(^qSdn&>^=*t z&uvp*@c8#2*paD!ZMCi3;K{Na;I4Q35zw$YrW5U@Kk~)&rw;G?d7Q&c9|x<Hg|CNMsxovmfth*|E*GHezPTWa^Hd^F4!B3sF;)? z(NaPyAhocu1jUe(!5Cy|dh|W2=!@fNmuNOzxi^tE_jAtzNJ0JR-avc_H|ve#KO}#S z#a(8secu|^Tx553d4r@3#6^MHbH)vmiBpn0X^29xEv!Vuh1n(Sr5I0V&`jA2;WS|Y zbf0e}X|)wA-Pf5gBZ>r4YX3Mav1kKY(ulAJ0Q*jB)YhviHK)w!TJsi3^dMa$L@^{` z_De`fF4;M87vM3Ph9SzCoCi$#Fsd38u!^0#*sPful^p5oI(xGU?yeYjn;Hq1!wzFk zG&2w}W3`AX4bxoVm03y>ts{KaDf!}b&7$(P4KAMP=vK5?1In^-YYNtx1f#}+2QK@h zeSeAI@E6Z8a?)>sZ`fbq9_snl6LCu6g>o)rO;ijp3|$vig+4t} zylEo7$SEW<_U+qgVcaVhk+4k+C9THI5V10qV*dOV6pPtAI$)QN{!JRBKh-D zk2^{j@bZ}yqW?<#VVuI_27*cI-V~sJiqQv&m07+10XF+#ZnIJdr8t`9s_EE;T2V;B z4UnQUH9EdX%zwh-5&wflY#ve!IWt0UE-My3?L#^Bh%kcgP1q{&26eXLn zTkjJ*w+(|_>Pq0v8{%nX$QZbf)tbJaLY$03;MO=Ic-uqYUmUCuXD>J>o6BCRF=xa% z3R4SK9#t1!K4I_d>tZgE>&+kZ?Q}1qo4&h%U$GfY058s%*=!kac{0Z+4Hwm!)pFLR zJ+5*OpgWUrm0FPI2ib4NPJ+Sk07j(`diti^i#kh&f}i>P4~|d?RFb#!JN)~D@)beox}bw?4VCf^y*`2{4`-@%SFTry2h z>9VBc9#JxEs1+0i2^LR@B1J`B9Ac=#FW=(?2;5;#U$0E0UNag_!jY$&2diQk_n)bT zl5Me_SUvqUjwCqmVcyb`igygB_4YUB*m$h5oeKv3uIF0sk}~es!{D>4r%PC*F~FN3owq5e0|YeUTSG#Vq%&Gk7uwW z0lDo#_wvflqHeRm*}l?}o;EILszBt|EW*zNPmq#?4A+&i0xx^?9obLyY4xx=Y9&^G;xYXYPxG)DOpPg!i_Ccl#3L}6xAAZzNhPK1XaC_~ z!A|mlo?Be*8Nn=a+FhgpOj@G7yYs(Qk(8&|h@_>w8Y^r&5nCqe0V60rRz?b5%J;GYeBqSAjo|K692GxD4` zRZyM2FdI+-jK2}WAZTZ()w_)V{n5tEb@>+JYluDozCb$fA4H)$bzg(Ux{*hXurjO^ zwAxc+UXu=&JV*E59}h3kzQPG4M)X8E*}#_&}w*KEgtX)cU{vm9b$atHa;s>| z+L6&cn8xUL*OSjx4YGjf6{Eq+Q3{!ZyhrL&^6Vz@jGbI%cAM9GkmFlamTbcQGvOlL zmJ?(FI)c86=JEs|*;?h~o)88>12nXlpMR4@yh%qdwFNpct;vMlc=;{FSo*apJ;p}! zAX~t;3tb~VuP|ZW;z$=IHf->F@Ml)&-&Bnb{iQyE#;GZ@C$PzEf6~q}4D>9jic@mTO5x76ulDz@+XAcm35!VSu zT*Gs>;f0b2TNpjU_BjHZ&S6Sqk6V1370+!eppV2H+FY!q*n=GHQ!9Rn6MjY!Jc77A zG7Y!lFp8?TIHN!LXO?gCnsYM-gQxsm=Ek**VmZu7vnuufD7K~GIxfxbsQ@qv2T zPa`tvHB$fFCyZl>3oYg?_wW)C>^_iDOc^B7klnTOoytQH18WkOk)L2BSD0r%xgRSW zQS9elF^?O=_@|58zKLK;(f77l-Zzu}4{fXed2saq!5k#UZAoDBqYQS{sn@j@Vtp|$ zG%gnZ$U|9@u#w1@11Sjl8ze^Co=)7yS(}=;68a3~g;NDe_X^}yJj;~s8xq9ahQ5_r zxAlTMnep*)w1e(TG%tWsjo3RR;yVGPEO4V{Zp?=a_0R#=V^ioQu4YL=BO4r0$$XTX zZfnw#_$V}sDAIDrezGQ+h?q24St0QNug_?{s-pI(^jg`#JRxM1YBV;a@@JQvH8*>> zIJvku74E0NlXkYe_624>znU0J@L<-c=G#F3k4A_)*;ky!C(^uZfj%WB3-*{*B$?9+ zDm$WFp=0(xnt6`vDQV3Jl5f&R(Mp};;q8d3I%Kn>Kx=^;uSVCw0L=gw53%Bp==8Sw zxtx=cs!^-_+i{2OK`Q;913+AXc_&Z5$@z3<)So0CU3;JAv=H?@Zpi~riQ{z-zLtVL z!oF<}@IgJp)Iyz1zVJ42!SPHSkjYNS4%ulVVIXdRuiZ@5Mx8LJS}J#qD^Zi_xQ@>DKDr-_e#>5h3dtje*NcwH_h;i{Sx7}dkdpuW z(yUCjckQsagv*QGMSi9u1`Z|V^}Wjf7B@q%j2DQXyd0nOyqg%m{CK_lAoKlJ7#8M} z%IvR?Vh$6aDWK2W!=i?*<77q&B8O&3?zP(Cs@kapc)&p7En?J;t-TX9abGT#H?TW? ztO5(lPKRuC7fs}zwcUKbRh=7E8wzTsa#Z{a`WR}?UZ%!HohN}d&xJ=JQhpO1PI#>X zHkb>pW04pU%Bj_mf~U}1F1=wxdBZu1790>3Dm44bQ#F=T4V3&HlOLsGH)+AK$cHk6 zia$=$kog?)07HCL*PI6}DRhpM^*%I*kHM<#1Se+AQ!!xyhcy6j7`iDX7Z-2i73_n# zas*?7LkxS-XSqv;YBa zW_n*32D(HTYQ0$feV_Fru1ZxW0g&iwqixPX3=9t4o)o|kOo79V$?$uh?#8Q8e>4e)V6;_(x&ViUVxma+i25qea;d-oK7ouuDsB^ab{ zu1qjQ%`n56VtxBE#0qAzb7lph`Eb-}TYpXB!H-}3Ykqyp`otprp7{VEuW*^IR2n$Fb99*nAtqT&oOFIf z@w*6>YvOGw@Ja?Pp1=whZqydzx@9X4n^2!n83C5{C?G@|E?&$?p*g68)kNvUTJ)I6 z1Q|(#UuP6pj78GUxq11m-GSszc+)X{C2eo-?8ud9sB=3(D47v?`JAa{V(IF zPZQ_0AY*9M97>Jf<o%#O_%Wq}8>YM=q0|tGY+hlXcpE=Z4Od z`NT7Hu2hnvRoqOw@g1f=bv`+nba{GwA$Ak0INlqI1k<9!x_!sL()h?hEWoWrdU3w` zZ%%)VR+Bc@_v!C#koM1p-3v_^L6)_Ktj4HE>aUh%2XZE@JFMOn)J~c`_7VWNb9c-N z2b|SZMR4Z@E7j&q&9(6H3yjEu6HV7{2!1t0lgizD;mZ9$r(r7W5G$ky@w(T_dFnOD z*p#+z$@pKE+>o@%eT(2-p_C}wbQ5s(%Sn_{$HDN@MB+Ev?t@3dPy`%TZ!z}AThZSu zN<1i$siJhXFdjV zP*y|V<`V8t=h#XTRUR~5`c`Z9^-`*BZf?WAehGdg)E2Je)hqFa!k{V(u+(hTf^Yq& zoruUh2(^3pe)2{bvt4&4Y9CY3js)PUHtd4rVG57}uFJL)D(JfSIo^{P=7liFXG zq5yqgof0V8paQcP!gy+;^pp-DA5pj=gbMN0eW=-eY+N8~y+G>t+x}oa!5r>tW$xhI zPQSv=pi;~653Gvf6~*JcQ%t1xOrH2l3Zy@8AoJ+wz@daW@m7?%LXkr!bw9GY@ns3e zSfuWF_gkWnesv?s3I`@}NgE2xwgs&rj?kH-FEy82=O8`+szN ziHch`vvS`zNfap14!&#i9H@wF7}yIPm=UB%(o(}F{wsZ(wA0nJ2aD^@B41>>o-_U6 zUqD~vdo48S8~FTb^+%#zcbQiiYoDKYcj&$#^;Smmb+Ljp(L=1Kt_J!;0s%1|JK}Wi z;={~oL!foo5n8=}rs6MmUW~R&;SIJO3TL4Ky?kh+b2rT9B1Jl4>#Uh-Bec z`Hsp<==#UEW6pGPhNk8H!!DUQR~#F9jEMI6T*OWfN^Ze&X(4nV$wa8QUJ>oTkruH# zm~O<`J7Wxseo@FqaZMl#Y(mrFW9AHM9Kb|XBMqaZ2a)DvJgYipkDD_VUF_PKd~dT7 z#02}bBfPn9a!X!O#83=lbJSK#E}K&yx-HI#T6ua)6o0{|={*HFusCkHzs|Fn&|C3H zBck1cmfcWVUN&i>X$YU^Sn6k2H;r3zuXbJFz)r5~3$d$tUj(l1?o={MM){kjgqXRO zc5R*#{;V7AQh|G|)jLM@wGAK&rm2~@{Pewv#06pHbKn#wL0P6F1!^qw9g&cW3Z=9} zj)POhOlwsh@eF=>z?#sIs*C-Nl(yU!#DaiaxhEs#iJqQ8w%(?+6lU02MYSeDkr!B- zPjMv+on6OLXgGnAtl(ao>|X2Y8*Hb}GRW5}-IzXnoo-d0!m4Vy$GS!XOLy>3_+UGs z2D|YcQx@M#M|}TDOetGi{9lGo9m-=0-^+nKE^*?$^uHkxZh}I{#UTQd;X!L+W@jm( zDg@N4+lUqI92o_rNk{3P>1gxAL=&O;x)ZT=q1mk0kLlE$WeWuY_$0`0jY-Kkt zP*|m3AF}Ubd=`<>(Xg0har*_@x2YH}bn0Wk*OZz3*e5;Zc;2uBdnl8?&XjupbkOeNZsNh6pvsq_ydmJI+*z**{I{0K)-;p1~k8cpJXL$^t!-`E}=*4G^-E8>H!LjTPxSx zcF+cS`ommfKMhNSbas^@YbTpH1*RFrBuATUR zt{oFWSk^$xU&kbFQ;MCX22RAN5F6eq9UfR$ut`Jw--p2YX)A*J69m^!oYfj2y7NYcH6&r+0~_sH^c^nzeN1AU4Ga7=FlR{S|Mm~MpzY0$Z+p2W(a={b-pR9EO1Rs zB%KY|@wLcAA@)KXi!d2_BxrkhDn`DT1=Dec}V!okd{$+wK z4E{n8R*xKyci1(CnNdhf$Dp2(Jpof0-0%-38X=Dd9PQgT+w%Lshx9+loPS~MOm%ZT zt%2B2iL_KU_ita%N>xjB!#71_3=3c}o zgeW~^U_ZTJQ2!PqXulQd=3b=XOQhwATK$y(9$#1jOQ4}4?~l#&nek)H(04f(Sr=s| zWv7Lu1=%WGk4FSw^;;!8&YPM)pQDCY9DhU`hMty1@sq1=Tj7bFsOOBZOFlpR`W>-J$-(kezWJj;`?x-v>ev{*8V z8p|KXJPV$HyQr1A(9LVrM47u-XpcrIyO`yWvx1pVYc&?154aneRpLqgx)EMvRaa#|9?Wwqs2+W8n5~79G z(}iCiLk;?enn}ew`HzhG+tu+Ru@T+K5juvZN)wY;x6HjvqD!&!)$$;1VAh~7fg0K| zEha#aN=Yv|3^~YFH}cc38ovVb%L|g@9W6fo(JtT6$fa?zf@Ct88e}m?i)b*Jgc{fl zExfdvw-BYDmH6>(4QMt#p0;FUIQqkhD}aH?a7)_%JtA~soqj{ppP_82yi9kaxuK>~ ze_)Zt>1?q=ZH*kF{1iq9sr*tVuy=u>Zev}!gEZx@O6-fjyu9X00gpIl-fS_pzjpqJ z1yqBmf9NF!jaF<+YxgH6oXBdK)sH(>VZ)1siyA$P<#KDt;8NT*l_0{xit~5j1P)FN zI8hhYKhQ)i z37^aP13B~u65?sg+_@2Kr^iWHN=U;EDSZ@2W2!5ALhGNWXnFBY%7W?1 z=HI9JzQ-pLKZDYTv<0-lt|6c-RwhxZ)mU2Os{bsX_i^@*fKUj8*aDO5pks=qn3Dv6 zwggpKLuyRCTVPwmw1r}B#AS}?X7b837UlXwp~E2|PJw2SGVueL7){Y&z!jL!XN=0i zU^Eig`S2`{+gU$68aRdWx?BZ{sU_f=8sn~>s~M?GU~`fH5kCc; z8ICp+INM3(3{#k32RZdv6b9MQYdZXNuk7ed8;G?S2nT+NZBG=Tar^KFl2SvhW$bGW#kdWL-I)s_IqVnCDDM9fm8g;P;8 z7t4yZn3^*NQfx7SwmkzP$=fwdC}bafQSEF@pd&P8@H#`swGy_rz;Z?Ty5mkS%>m#% zp_!m9e<()sfKiY(nF<1zBz&&`ZlJf6QLvLhl`_``%RW&{+O>Xhp;lwSsyRqGf=RWd zpftiR`={2(siiPAS|p}@q=NhVc0ELprt%=fMXO3B)4ryC2LT(o=sLM7hJC!}T1@)E zA3^J$3&1*M6Xq>03FX`R&w*NkrZE?FwU+Muut;>qNhj@bX17ZJxnOlPSZ=Zeiz~T_ zOu#yc3t6ONHB;?|r4w+pI)~KGN;HOGC)txxiUN8#mexj+W(cz%9a4sx|IRG=}ia zuEBuba3AHsV2feqw-3MvuL`I+2|`Ud4~7ZkN=JZ;L20|Oxna5vx1qbIh#k2O4$RQF zo`tL()zxaqibg^GbB+BS5#U{@K;WWQj~GcB1zb}zJkPwH|5hZ9iH2308!>_;%msji zJHSL~s)YHBR=Koa1mLEOHos*`gp=s8KA-C zu0aE+W!#iJ*0xqKm3A`fUGy#O+X+5W36myS>Uh2!R*s$aCU^`K&KKLCCDkejX2p=5 z%o7-fl03x`gaSNyr?3_JLv?2RLS3F*8ub>Jd@^Cc17)v8vYEK4aqo?OS@W9mt%ITJ z9=S2%R8M){CugT@k~~0x`}Vl!svYqX=E)c_oU6o}#Hb^%G1l3BudxA{F*tbjG;W_>=xV73pKY53v%>I)@D36I_@&p$h|Aw zonQS`07z_F#@T-%@-Tb|)7;;anoD_WH>9ewFy(ZcEOM$#Y)8>qi7rCnsH9GO-_7zF zu*C87{Df1P4TEOsnzZ@H%&lvV(3V@;Q!%+OYRp`g05PjY^gL$^$-t0Y>H*CDDs?FZly*oZ&dxvsxaUWF!{em4{A>n@vpXg$dwvt@_rgmHF z-MER`ABa8R-t_H*kv>}CzOpz;!>p^^9ztHMsHL|SRnS<-y5Z*r(_}c4=fXF`l^-i}>e7v!qs_jv zqvWhX^F=2sDNWA9c@P0?lUlr6ecrTKM%pNQ^?*Lq?p-0~?_j50xV%^(+H>sMul#Tw zeciF*1=?a7cI(}352%>LO96pD+?9!fNyl^9v3^v&Y4L)mNGK0FN43&Xf8jUlxW1Bw zyiu2;qW-aGNhs=zbuoxnxiwZ3{PFZM#Kw)9H@(hgX23h(`Wm~m4&TvoZoYp{plb^> z_#?vXcxd>r7K+1HKJvhed>gtK`TAbJUazUWQY6T~t2af%#<+Veyr%7-#*A#@&*;@g58{i|E%6yC_InGXCOd{L0;$)z#?n7M`re zh!kO{6=>7I?*}czyF7_frt#)s1CFJ_XE&VrDA?Dp3XbvF{qsEJgb&OLSNz_5g?HpK z9)8rsr4JN!Af3G9!#Qn(6zaUDqLN(g2g8*M)Djap?WMK9NKlkC)E2|-g|#-rp%!Gz zAHd%`iq|81efi93m3yTBw3g0j#;Yb2X{mhRAI?&KDmbGqou(2xiRNb^sV}%%Wu0?< z?($L>(#BO*)^)rSgyNRni$i`R4v;GhlCZ8$@e^ROX(p=2_v6Y!%^As zu022)fHdv_-~Yu_H6WVPLpHQx!W%^6j)cBhS`O3QBW#x(eX54d&I22op(N59b*&$v zFiSRY6rOc^(dgSV1>a7-5C;(5S5MvKcM2Jm-LD9TGqDpP097%52V+0>Xqq!! zq4e3vj53SE6i8J`XcQB|MZPP8j;PAOnpGnllH6#Ku~vS42xP*Nz@~y%db7Xi8s09P z1)e%8ys6&M8D=Dt6&t`iKG_4X=!kgRQoh%Z`dc&mlOUqXk-k`jKv9@(a^2-Upw>?< zt5*^DV~6Zedbec4NVl($2T{&b)zA@b#dUyd>`2JC0=xa_fIm8{5um zr-!ApXZhC8@=vC2WyxO|!@0Km)h8ep*`^he92$@YwP>VcdoS5OC^s38e#7RPsg4j+ zbVGG}WRSET&ZfrcR(x~k8n1rTP%CnfUNKUonD$P?FtNFF#cn!wEIab-;jU=B1dHK@ z(;(yAQJ`O$sMn>h;pf^8{JISW%d+@v6@CnXh9n5TXGC}?FI9i-D0OMaIg&mAg=0Kn zNJ7oz5*ReJukD55fUsMuaP+H4tDN&V9zfqF@ zr=#ecUk9wu{0;!+gl;3Bw=Vn^)z$ahVhhw)io!na&9}LmWurLb0zubxK=UEnU*{5P z+SP}&*(iBKSO4{alBHaY^)5Q=mZ+2OwIooJ7*Q5XJ+2|q`9#f?6myq!&oz?klihLq z4C)$XP!BNS0G_Z1&TM>?Jk{S~{F3n83ioli=IO6f%wkvCl(RFFw~j0tb{GvXTx>*sB0McY0s&SNvj4+^h`9nJ_wM>F!Uc>X}9PifQekn0sKI2SAJP!a4h z5cyGTuCj3ZBM^&{dRelIlT^9zcfaAuL5Y~bl!ppSf`wZbK$z#6U~rdclk``e+!qhe z6Qspo*%<)eu6?C;Bp<^VuW6JI|Ncvyn+LlSl;Mp22Bl7ARQ0Xc24%29(ZrdsIPw&-=yHQ7_Vle|5h>AST0 zUGX2Zk34vp?U~IHT|;$U86T+UUHl_NE4m|}>E~6q``7hccCaT^#y+?wD##Q%HwPd8 zV3x4L4|qqu`B$4(LXqDJngNy-{&@aFBvVsywt@X^}iH7P%>bR?ciC$I^U-4Foa`YKI^qDyGK7k%E%c_P=yzAi`YnxGA%DeNd++j3*h^ z=rn>oBd0|~lZ<6YvmkKY*ZJlJ;Im0tqgWu&E92eqt;+NYdxx`eS(4Hw_Jb5|yVvBg z*tbdY^!AN;luEyN4VRhS@-_DC{({ziH{&Z}iGElSV~qvT>L-8G%+yEL zX#MFOhj{InyKG=mvW-<1B@c-}x$vA(nU?>S>0*eN#!SLzQ)Ex7fvQ)S4D<8|I#N$3 zT5Ei`Z?cxBODHX8(Xp73v`IsAYC@9b;t}z0wxVuQSY1J^GRwDPN@qbM-ZF48T$GZ< z8WU+;Pqo?{ghI-KZ-i*ydXu`Ep0Xw^McH_KE9J0S7G;x8Fe`DVG?j3Pv=0YzJ}yZR z%2=oqHiUjvuk0~Ca>Kol4CFi0_xQT~;_F?=u+!kIDl-9g`#ZNZ9HCy17Ga1v^Jv9# z{T4Kb1-AzUxq*MutfOWWZgD*HnFfyYg0&e9f(5tZ>krPF6{VikNeHoc{linPPt#Si z&*g>(c54V8rT_AX!J&bNm-!umPvOR}vDai#`CX___J#=zeB*{4<&2WpaDncZsOkp* zsg<%@@rbrMkR_ux9?LsQxzoBa1s%$BBn6vk#{&&zUwcfzeCBJUwFYSF$08qDsB;gWQN*g!p8pxjofWbqNSZOEKOaTx@+* zwdt5*Q47@EOZ~EZL9s?1o?A%9TJT=Ob_13yyugvPg*e&ZU(r6^k4=2+D-@n=Hv5vu zSXG|hM(>h9^zn=eQ=$6`JO&70&2|%V5Lsx>)(%#;pcOfu>*nk_3HB_BNaH$`jM<^S zcSftDU1?nL;jy)+sfonQN}(}gUW?d_ikr*3=^{G)=tjBtEPe>TO|0ddVB zTklrSHiW+!#26frPXQQ(YN8DG$PZo?(po(QUCCf_OJC`pw*uey00%gmH!`WJkrKXj2!#6?`T25mTu9OJp2L8z3! z=arrL$ZqxuE{%yV)14Kd>k}j7pxZ6#$Dz8$@WV5p8kTqN<-7W)Q7Gt2{KoOPK_tZ| zf2WG~O5@{qPI+W<4f_;reuFVdO^5`ADC1!JQE|N`s3cq@(0WB!n0uh@*c{=LAd;~} zyGK@hbF-Oo+!nN)@i*O(`@FA#u?o=~e{`4O#5}z&=UkU*50fOrzi11D^&FOqe>wii z?*k+2|EcUs;Gx{!@KBT~>PAwLrIDT7Th=Utu?~?np@t^gFs?zgX=D${RwOY^WGh-+ z+#4$066ISh8eYW#FXWp~S`<*%O^ZuItL1Tyqt8#tZ zY120E;^VG`!lZn&3sPd$RkdHpU#|w+bYV)pJC|SH9g%|5IkxVTQcBA4CL0}$&}ef@ zW^Vtj%M;;_1xxP9x#ex17&4N*{ksO*_4O}xYu(p*JkL#yr}@7b)t5X?%CY<+s5_MJ zuiqt+N_;A(_)%lumoyRFixWa-M7qK_9s6<1X?JDa9fP!+_6u~~M$5L=ipB=7(j#f< zZ34J%=bs549%~_mA(|={uZNs_0?o7;-LBP(ZRnkd{-^|2|=4vUTmtByHL8 zEph`(LSEzQj68a+`d$V<45J7cyv^#|^|%fD#si1Nx!4NW*`l*{->HEWNh6-|g>-=r zXmQ|-i}Ku$ndUeHQ^&ieT!Lf}vf6GaqW9$DJ2NWrqwPY%%4nip$@vK$nRp*_C-v<| zuKz~ZyN&<%!NS26&x?jhy+@awJipMQ-8(X4#Ae5??U<1QMt1l9R=w9fAnEF}NYu$2 z>6}Vkc zIb*A?G*z8^IvibmBKn_u^5&T_1oey0gZS2~obf(#xk=erZGTEdQnt3DMGM+0oPwss zj5zXD;(oWhB_T@~Ig#9@v)AKtXu3>Inmgf@A|-lD-1U>cNyl3h?ADD9)GG4}zUGPk zZzaXe!~Kf?<~@$G?Uql3t8jy9{2!doq4=J}j9ktTxss{p6!9UdjyDERlA*xZ!=Q)KDs5O)phz>Vq3BNGoM(H|=1*Q4$^2fTZw z(%nq1P|5Rt81}SYJpEEzMPl5VJsV5&4e)ZWKDyoZ>1EwpkHx-AQVQc8%JMz;{H~p{=FXV>jIxvm4X*qv52e?Y-f%DJ zxEA165GikEASQ^fH6K#d!Tpu2HP{sFs%E=e$gYd$aj$+xue6N+Wc(rAz~wUsk2`(b z8Kvmyz%bKQxpP}~baG-rwYcYCvkHOi zlkR<=>ZBTU*8RF_d#Bl@zZsRIhx<%~Z@Z=ik z>adw3!DK(8R|q$vy{FTxw%#xliD~6qXmY^7_9kthVPTF~Xy1CfBqbU~?1QmxmU=+k z(ggxvEuA;0e&+ci-zQR{-f7aO{O(Pz_OsEjLh_K>MbvoZ4nxtk5u{g@nPv)cgW_R} z9}EA4K4@z0?7ue}Z(o~R(X&FjejUI2g~08PH1E4w>9o{)S(?1>Z0XMvTb|;&EuyOE zGvWNpYX)Nv<8|a^;1>bh#&znEcl-r!T#pn= z4$?Yudha6F%4b>*8@=BdtXXY4N+`U4Dmx$}>HeVJk-QdTG@t!tVT#0(LeV0gvqyyw z2sEp^9eY0N`u10Tm4n8No&A=)IeEC|gnmEXoNSzu!1<4R<%-9kY_8~5Ej?zRegMn78wuMs#;i&eUA0Zk_RXQ3b&TT} z;SCI=7-FUB@*&;8|n>(_g^HGf3@QODE3LpmX~ELnymQm{Sx9xrKS zK29p~?v@R$0=v6Dr5aW>-!{+h@?Q58|Kz8{{W`%J+lDAdb&M5VHrX_mDY;1-JLnf)ezmPau$)1;=`-FU=-r-83tX=C`S#}GZufju zQ>sXNT0Ny=k@nc%cFnvA_i4SC)?_ORXHq8B4D%el1uPX`c~uG#S1M7C+*MMqLw78E zhY2dI8@+N^qrMI1+;TUda(vGqGSRyU{Fnm`aqrr7bz42c5xsOO-~oZpkzorD1g}Y<6rk&3>PsSGy}W?MtqFky@A(X# zIuNZK0cK?^=;PUAu>j0#HtjbHCV*6?jzA&OoE$*Jlga*}LF`SF?WLhv1O|zqC<>*> zYB;#lsYKx0&kH@BFpW8n*yDcc6?;_zaJs<-jPSkCsSX-!aV=P5kUgF@Nu<{a%#K*F z134Q{9|YX7X(v$62_cY3^G%t~rD>Q0z@)1|zs)vjJ6Jq9;7#Ki`w+eS**En?7;n&7 zu==V3T&eFboN3ZiMx3D8qYc;VjFUk_H-WWCau(VFXSQf~viH0L$gwD$UfFHqNcgN`x}M+YQ6RnN<+@t>JUp#)9YOkqst-Ga?{FsDpEeX0(5v{0J~SEbWiL zXC2}M4?UH@u&|;%0y`eb33ldo4~z-x8zY!oVmV=c+f$m?RfDC35mdQ2E>Pze7KWP- z>!Bh<&57I+O_^s}9Tg^k)h7{xx@0a0IA~GAOt2yy!X%Q$1rt~LbTB6@Du!_0%HV>N zlf)QI1&gvERKwso23mJ!Ou6ZS#zCS5W`gxE5T>C#E|{i<1D35C222I33?Njaz`On7 zi<+VWFP6D{e-{yiN#M|Jgk<44u1TiMI78S5W`Sdb5f+{zu34s{CfWN7a3Cf^@L%!& zN$?|!!9j2c)j$~+R6n#891w-z8(!oBpL2K=+%a$r2|~8-(vQj5_XT`<0Ksf;oP+tz z9CObS!0m)Tgg`K#xBM8B(|Z)Wb&DYL{WTYv`;A=q6~Nnx2+!lTIXtj8J7dZE!P_{z z#f8w6F}^!?^KE#+ZDv+xd5O&3EmomZzsv?>E-~ygGum45fk!SBN&|eo1rKw^?aZJ4 E2O(~oYXATM literal 0 HcmV?d00001 diff --git a/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000000..8cf6eb5ad222 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/petstore/kotlin-modelMutable/gradlew b/samples/client/petstore/kotlin-modelMutable/gradlew new file mode 100755 index 000000000000..4f906e0c811f --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/samples/client/petstore/kotlin-modelMutable/gradlew.bat b/samples/client/petstore/kotlin-modelMutable/gradlew.bat new file mode 100644 index 000000000000..107acd32c4e6 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/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="-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/petstore/kotlin-modelMutable/settings.gradle b/samples/client/petstore/kotlin-modelMutable/settings.gradle new file mode 100644 index 000000000000..e33677f0d709 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/settings.gradle @@ -0,0 +1,2 @@ + +rootProject.name = 'kotlin-modelMutable' \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt new file mode 100644 index 000000000000..24c2ccc75bdd --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -0,0 +1,638 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.apis + +import java.io.IOException + +import org.openapitools.client.models.ModelApiResponse +import org.openapitools.client.models.Pet + +import com.squareup.moshi.Json + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ApiResponse +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + System.getProperties().getProperty(ApiClient.baseUrlKey, "http://petstore.swagger.io/v2") + } + } + + /** + * Add a new pet to the store + * + * @param body Pet object that needs to be added to the store + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun addPet(body: Pet) : Unit { + val localVarResponse = addPetWithHttpInfo(body = body) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Add a new pet to the store + * + * @param body Pet object that needs to be added to the store + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun addPetWithHttpInfo(body: Pet) : ApiResponse { + val localVariableConfig = addPetRequestConfig(body = body) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { + val localVarResponse = deletePetWithHttpInfo(petId = petId, apiKey = apiKey) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun deletePetWithHttpInfo(petId: kotlin.Long, apiKey: kotlin.String?) : ApiResponse { + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + return RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * enum for parameter status + */ + enum class Status_findPetsByStatus(val value: kotlin.String) { + @Json(name = "available") available("available"), + @Json(name = "pending") pending("pending"), + @Json(name = "sold") sold("sold"), + ; + } + + /** + * 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 + * @return kotlin.collections.MutableList + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.MutableList { + val localVarResponse = findPetsByStatusWithHttpInfo(status = status) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.MutableList + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * 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 + * @return ApiResponse?> + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun findPetsByStatusWithHttpInfo(status: kotlin.collections.List) : ApiResponse?> { + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + + return request>( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * 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 + * @return kotlin.collections.MutableList + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTags(tags: kotlin.collections.MutableList) : kotlin.collections.MutableList { + @Suppress("DEPRECATION") + val localVarResponse = findPetsByTagsWithHttpInfo(tags = tags) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.MutableList + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * 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 + * @return ApiResponse?> + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsWithHttpInfo(tags: kotlin.collections.MutableList) : ApiResponse?> { + @Suppress("DEPRECATION") + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + + return request>( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.MutableList) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return + * @return Pet + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getPetById(petId: kotlin.Long) : Pet { + val localVarResponse = getPetByIdWithHttpInfo(petId = petId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as Pet + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getPetByIdWithHttpInfo(petId: kotlin.Long) : ApiResponse { + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Update an existing pet + * + * @param body Pet object that needs to be added to the store + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun updatePet(body: Pet) : Unit { + val localVarResponse = updatePetWithHttpInfo(body = body) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Update an existing pet + * + * @param body Pet object that needs to be added to the store + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun updatePetWithHttpInfo(body: Pet) : ApiResponse { + val localVariableConfig = updatePetRequestConfig(body = body) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + + return RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * 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 (optional) + * @param status Updated status of the pet (optional) + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { + val localVarResponse = updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * 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 (optional) + * @param status Updated status of the pet (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun updatePetWithFormWithHttpInfo(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : ApiResponse { + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + + return request, Unit>( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig> { + val localVariableBody = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + return RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * uploads an image + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return ModelApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ModelApiResponse { + val localVarResponse = uploadFileWithHttpInfo(petId = petId, additionalMetadata = additionalMetadata, file = file) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as ModelApiResponse + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * uploads an image + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun uploadFileWithHttpInfo(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + + return request, ModelApiResponse>( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig> { + val localVariableBody = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + +} 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 new file mode 100644 index 000000000000..7a773bb79ef1 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -0,0 +1,324 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.apis + +import java.io.IOException + +import org.openapitools.client.models.Order + +import com.squareup.moshi.Json + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ApiResponse +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + System.getProperties().getProperty(ApiClient.baseUrlKey, "http://petstore.swagger.io/v2") + } + } + + /** + * 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 + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun deleteOrder(orderId: kotlin.String) : Unit { + val localVarResponse = deleteOrderWithHttpInfo(orderId = orderId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * 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 + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun deleteOrderWithHttpInfo(orderId: kotlin.String) : ApiResponse { + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + return RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @return kotlin.collections.MutableMap + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getInventory() : kotlin.collections.MutableMap { + val localVarResponse = getInventoryWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.MutableMap + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @return ApiResponse?> + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getInventoryWithHttpInfo() : ApiResponse?> { + val localVariableConfig = getInventoryRequestConfig() + + return request>( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @param orderId ID of pet that needs to be fetched + * @return Order + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getOrderById(orderId: kotlin.Long) : Order { + val localVarResponse = getOrderByIdWithHttpInfo(orderId = orderId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as Order + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @param orderId ID of pet that needs to be fetched + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getOrderByIdWithHttpInfo(orderId: kotlin.Long) : ApiResponse { + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Place an order for a pet + * + * @param body order placed for purchasing the pet + * @return Order + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun placeOrder(body: Order) : Order { + val localVarResponse = placeOrderWithHttpInfo(body = body) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as Order + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Place an order for a pet + * + * @param body order placed for purchasing the pet + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun placeOrderWithHttpInfo(body: Order) : ApiResponse { + val localVariableConfig = placeOrderRequestConfig(body = body) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt new file mode 100644 index 000000000000..eac1ec32436e --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -0,0 +1,599 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.apis + +import java.io.IOException + +import org.openapitools.client.models.User + +import com.squareup.moshi.Json + +import org.openapitools.client.infrastructure.ApiClient +import org.openapitools.client.infrastructure.ApiResponse +import org.openapitools.client.infrastructure.ClientException +import org.openapitools.client.infrastructure.ClientError +import org.openapitools.client.infrastructure.ServerException +import org.openapitools.client.infrastructure.ServerError +import org.openapitools.client.infrastructure.MultiValueMap +import org.openapitools.client.infrastructure.RequestConfig +import org.openapitools.client.infrastructure.RequestMethod +import org.openapitools.client.infrastructure.ResponseType +import org.openapitools.client.infrastructure.Success +import org.openapitools.client.infrastructure.toMultiValue + +class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + System.getProperties().getProperty(ApiClient.baseUrlKey, "http://petstore.swagger.io/v2") + } + } + + /** + * Create user + * This can only be done by the logged in user. + * @param body Created user object + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun createUser(body: User) : Unit { + val localVarResponse = createUserWithHttpInfo(body = body) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Create user + * This can only be done by the logged in user. + * @param body Created user object + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun createUserWithHttpInfo(body: User) : ApiResponse { + val localVariableConfig = createUserRequestConfig(body = body) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + return RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Creates list of users with given input array + * + * @param body List of user object + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun createUsersWithArrayInput(body: kotlin.collections.MutableList) : Unit { + val localVarResponse = createUsersWithArrayInputWithHttpInfo(body = body) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Creates list of users with given input array + * + * @param body List of user object + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun createUsersWithArrayInputWithHttpInfo(body: kotlin.collections.MutableList) : ApiResponse { + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + + return request, Unit>( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.MutableList) : RequestConfig> { + val localVariableBody = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + return RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Creates list of users with given input array + * + * @param body List of user object + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun createUsersWithListInput(body: kotlin.collections.MutableList) : Unit { + val localVarResponse = createUsersWithListInputWithHttpInfo(body = body) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Creates list of users with given input array + * + * @param body List of user object + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun createUsersWithListInputWithHttpInfo(body: kotlin.collections.MutableList) : ApiResponse { + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + + return request, Unit>( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.MutableList) : RequestConfig> { + val localVariableBody = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + return RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun deleteUser(username: kotlin.String) : Unit { + val localVarResponse = deleteUserWithHttpInfo(username = username) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun deleteUserWithHttpInfo(username: kotlin.String) : ApiResponse { + val localVariableConfig = deleteUserRequestConfig(username = username) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + return RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return User + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getUserByName(username: kotlin.String) : User { + val localVarResponse = getUserByNameWithHttpInfo(username = username) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as User + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getUserByNameWithHttpInfo(username: kotlin.String) : ApiResponse { + val localVariableConfig = getUserByNameRequestConfig(username = username) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Logs user into the system + * + * @param username The user name for login + * @param password The password for login in clear text + * @return kotlin.String + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { + val localVarResponse = loginUserWithHttpInfo(username = username, password = password) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Logs user into the system + * + * @param username The user name for login + * @param password The password for login in clear text + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun loginUserWithHttpInfo(username: kotlin.String, password: kotlin.String) : ApiResponse { + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Logs out current logged in user session + * + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun logoutUser() : Unit { + val localVarResponse = logoutUserWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Logs out current logged in user session + * + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun logoutUserWithHttpInfo() : ApiResponse { + val localVariableConfig = logoutUserRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + return RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + + /** + * Updated user + * This can only be done by the logged in user. + * @param username name that need to be deleted + * @param body Updated user object + * @return void + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun updateUser(username: kotlin.String, body: User) : Unit { + val localVarResponse = updateUserWithHttpInfo(username = username, body = body) + + return when (localVarResponse.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Updated user + * This can only be done by the logged in user. + * @param username name that need to be deleted + * @param body Updated user object + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Throws(IllegalStateException::class, IOException::class) + fun updateUserWithHttpInfo(username: kotlin.String, body: User) : ApiResponse { + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + return RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + } + +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt new file mode 100644 index 000000000000..ef7a8f1e1a62 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -0,0 +1,23 @@ +package org.openapitools.client.infrastructure + +typealias MultiValueMap = MutableMap> + +fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { + "csv" -> "," + "tsv" -> "\t" + "pipe" -> "|" + "space" -> " " + else -> "" +} + +val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } + +fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) + = toMultiValue(items.asIterable(), collectionFormat, map) + +fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { + return when(collectionFormat) { + "multi" -> items.map(map) + else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt new file mode 100644 index 000000000000..2abf02f23b42 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -0,0 +1,264 @@ +package org.openapitools.client.infrastructure + +import okhttp3.OkHttpClient +import okhttp3.RequestBody +import okhttp3.RequestBody.Companion.asRequestBody +import okhttp3.RequestBody.Companion.toRequestBody +import okhttp3.FormBody +import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.ResponseBody +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.Request +import okhttp3.Headers +import okhttp3.MultipartBody +import okhttp3.Call +import okhttp3.Callback +import okhttp3.Response +import okhttp3.internal.EMPTY_REQUEST +import java.io.BufferedWriter +import java.io.File +import java.io.FileWriter +import java.io.IOException +import java.net.URLConnection +import java.time.LocalDate +import java.time.LocalDateTime +import java.time.LocalTime +import java.time.OffsetDateTime +import java.time.OffsetTime +import java.util.Locale +import com.squareup.moshi.adapter + +open class ApiClient(val baseUrl: String) { + companion object { + protected const val ContentType = "Content-Type" + protected const val Accept = "Accept" + protected const val Authorization = "Authorization" + protected const val JsonMediaType = "application/json" + protected const val FormDataMediaType = "multipart/form-data" + protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" + protected const val XmlMediaType = "application/xml" + + val apiKey: MutableMap = mutableMapOf() + val apiKeyPrefix: MutableMap = mutableMapOf() + var username: String? = null + var password: String? = null + var accessToken: String? = null + const val baseUrlKey = "org.openapitools.client.baseUrl" + + @JvmStatic + val client: OkHttpClient by lazy { + builder.build() + } + + @JvmStatic + val builder: OkHttpClient.Builder = OkHttpClient.Builder() + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + protected fun guessContentTypeFromFile(file: File): String { + val contentType = URLConnection.guessContentTypeFromName(file.name) + return contentType ?: "application/octet-stream" + } + + protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = + when { + content is File -> content.asRequestBody(mediaType.toMediaTypeOrNull()) + mediaType == FormDataMediaType -> { + MultipartBody.Builder() + .setType(MultipartBody.FORM) + .apply { + // content's type *must* be Map + @Suppress("UNCHECKED_CAST") + (content as Map).forEach { (key, value) -> + if (value is File) { + val partHeaders = Headers.headersOf( + "Content-Disposition", + "form-data; name=\"$key\"; filename=\"${value.name}\"" + ) + val fileMediaType = guessContentTypeFromFile(value).toMediaTypeOrNull() + addPart(partHeaders, value.asRequestBody(fileMediaType)) + } else { + val partHeaders = Headers.headersOf( + "Content-Disposition", + "form-data; name=\"$key\"" + ) + addPart( + partHeaders, + parameterToString(value).toRequestBody(null) + ) + } + } + }.build() + } + mediaType == FormUrlEncMediaType -> { + FormBody.Builder().apply { + // content's type *must* be Map + @Suppress("UNCHECKED_CAST") + (content as Map).forEach { (key, value) -> + add(key, parameterToString(value)) + } + }.build() + } + mediaType.startsWith("application/") && mediaType.endsWith("json") -> + if (content == null) { + EMPTY_REQUEST + } else { + Serializer.moshi.adapter(T::class.java).toJson(content) + .toRequestBody( + mediaType.toMediaTypeOrNull() + ) + } + mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") + // TODO: this should be extended with other serializers + else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") + } + + @OptIn(ExperimentalStdlibApi::class) + protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { + if(body == null) { + return null + } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } + if (T::class.java == File::class.java) { + // return tempfile + val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() + f.deleteOnExit() + val out = BufferedWriter(FileWriter(f)) + out.write(bodyContent) + out.close() + return f as T + } + return when { + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + Serializer.moshi.adapter().fromJson(bodyContent) + else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") + } + } + + protected fun updateAuthParams(requestConfig: RequestConfig) { + if (requestConfig.headers["api_key"].isNullOrEmpty()) { + if (apiKey["api_key"] != null) { + if (apiKeyPrefix["api_key"] != null) { + requestConfig.headers["api_key"] = apiKeyPrefix["api_key"]!! + " " + apiKey["api_key"]!! + } else { + requestConfig.headers["api_key"] = apiKey["api_key"]!! + } + } + } + if (requestConfig.headers[Authorization].isNullOrEmpty()) { + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer $accessToken " + } + } + } + + protected inline fun request(requestConfig: RequestConfig): ApiResponse { + val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") + + // take authMethod from operation + updateAuthParams(requestConfig) + + val url = httpUrl.newBuilder() + .addPathSegments(requestConfig.path.trimStart('/')) + .apply { + requestConfig.query.forEach { query -> + query.value.forEach { queryValue -> + addQueryParameter(query.key, queryValue) + } + } + }.build() + + // take content-type/accept from spec or set to default (application/json) if not defined + if (requestConfig.headers[ContentType].isNullOrEmpty()) { + requestConfig.headers[ContentType] = JsonMediaType + } + if (requestConfig.headers[Accept].isNullOrEmpty()) { + requestConfig.headers[Accept] = JsonMediaType + } + val headers = requestConfig.headers + + if(headers[ContentType].isNullOrEmpty()) { + throw kotlin.IllegalStateException("Missing Content-Type header. This is required.") + } + + if(headers[Accept].isNullOrEmpty()) { + throw kotlin.IllegalStateException("Missing Accept header. This is required.") + } + + // TODO: support multiple contentType options here. + val contentType = (headers[ContentType] as String).substringBefore(";").lowercase(Locale.getDefault()) + + val request = when (requestConfig.method) { + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) + RequestMethod.GET -> Request.Builder().url(url) + RequestMethod.HEAD -> Request.Builder().url(url).head() + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) + RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) + }.apply { + headers.forEach { header -> addHeader(header.key, header.value) } + }.build() + + val response = client.newCall(request).execute() + + val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.getDefault()) + + // TODO: handle specific mapping types. e.g. Map> + return when { + response.isRedirect -> Redirection( + response.code, + response.headers.toMultimap() + ) + response.isInformational -> Informational( + response.message, + response.code, + response.headers.toMultimap() + ) + response.isSuccessful -> Success( + responseBody(response.body, accept), + response.code, + response.headers.toMultimap() + ) + response.isClientError -> ClientError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + else -> ServerError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + } + } + + protected fun parameterToString(value: Any?): String = when (value) { + null -> "" + is Array<*> -> toMultiValue(value, "csv").toString() + is Iterable<*> -> toMultiValue(value, "csv").toString() + is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> + parseDateToQueryString(value) + else -> value.toString() + } + + protected inline fun parseDateToQueryString(value : T): String { + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + } +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt new file mode 100644 index 000000000000..cf2cfaa95d91 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt @@ -0,0 +1,43 @@ +package org.openapitools.client.infrastructure + +enum class ResponseType { + Success, Informational, Redirection, ClientError, ServerError +} + +interface Response + +abstract class ApiResponse(val responseType: ResponseType): Response { + abstract val statusCode: Int + abstract val headers: Map> +} + +class Success( + val data: T, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +): ApiResponse(ResponseType.Success) + +class Informational( + val statusText: String, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Informational) + +class Redirection( + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Redirection) + +class ClientError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.ClientError) + +class ServerError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> +): ApiResponse(ResponseType.ServerError) diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt new file mode 100644 index 000000000000..fb2c972cf8d4 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt @@ -0,0 +1,17 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigDecimal + +class BigDecimalAdapter { + @ToJson + fun toJson(value: BigDecimal): String { + return value.toPlainString() + } + + @FromJson + fun fromJson(value: String): BigDecimal { + return BigDecimal(value) + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt new file mode 100644 index 000000000000..4b6963110c9e --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt @@ -0,0 +1,17 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigInteger + +class BigIntegerAdapter { + @ToJson + fun toJson(value: BigInteger): String { + return value.toString() + } + + @FromJson + fun fromJson(value: String): BigInteger { + return BigInteger(value) + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt new file mode 100644 index 000000000000..ff5e2a81ee8c --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt @@ -0,0 +1,12 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson + +class ByteArrayAdapter { + @ToJson + fun toJson(data: ByteArray): String = String(data) + + @FromJson + fun fromJson(data: String): ByteArray = data.toByteArray() +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt new file mode 100644 index 000000000000..b5310e71f13c --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt @@ -0,0 +1,18 @@ +@file:Suppress("unused") +package org.openapitools.client.infrastructure + +import java.lang.RuntimeException + +open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 123L + } +} + +open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 456L + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt new file mode 100644 index 000000000000..b2e1654479a0 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class LocalDateAdapter { + @ToJson + fun toJson(value: LocalDate): String { + return DateTimeFormatter.ISO_LOCAL_DATE.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDate { + return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) + } + +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt new file mode 100644 index 000000000000..e082db94811d --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +class LocalDateTimeAdapter { + @ToJson + fun toJson(value: LocalDateTime): String { + return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDateTime { + return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } + +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt new file mode 100644 index 000000000000..87437871a31e --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.OffsetDateTime +import java.time.format.DateTimeFormatter + +class OffsetDateTimeAdapter { + @ToJson + fun toJson(value: OffsetDateTime): String { + return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): OffsetDateTime { + return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) + } + +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt new file mode 100644 index 000000000000..7e948e1dd071 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -0,0 +1,17 @@ +package org.openapitools.client.infrastructure + +/** + * Defines a config object for a given request. + * NOTE: This object doesn't include 'body' because it + * allows for caching of the constructed object + * for many request definitions. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class RequestConfig( + val method: RequestMethod, + val path: String, + val headers: MutableMap = mutableMapOf(), + val query: MutableMap> = mutableMapOf(), + val body: T? = null +) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt new file mode 100644 index 000000000000..931b12b8bd7a --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt @@ -0,0 +1,8 @@ +package org.openapitools.client.infrastructure + +/** + * Provides enumerated HTTP verbs + */ +enum class RequestMethod { + GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt new file mode 100644 index 000000000000..9bd2790dc144 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -0,0 +1,24 @@ +package org.openapitools.client.infrastructure + +import okhttp3.Response + +/** + * Provides an extension to evaluation whether the response is a 1xx code + */ +val Response.isInformational : Boolean get() = this.code in 100..199 + +/** + * Provides an extension to evaluation whether the response is a 3xx code + */ +@Suppress("EXTENSION_SHADOWED_BY_MEMBER") +val Response.isRedirect : Boolean get() = this.code in 300..399 + +/** + * Provides an extension to evaluation whether the response is a 4xx code + */ +val Response.isClientError : Boolean get() = this.code in 400..499 + +/** + * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code + */ +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt new file mode 100644 index 000000000000..e22592e47d74 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -0,0 +1,23 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.Moshi +import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory + +object Serializer { + @JvmStatic + val moshiBuilder: Moshi.Builder = Moshi.Builder() + .add(OffsetDateTimeAdapter()) + .add(LocalDateTimeAdapter()) + .add(LocalDateAdapter()) + .add(UUIDAdapter()) + .add(ByteArrayAdapter()) + .add(URIAdapter()) + .add(KotlinJsonAdapterFactory()) + .add(BigDecimalAdapter()) + .add(BigIntegerAdapter()) + + @JvmStatic + val moshi: Moshi by lazy { + moshiBuilder.build() + } +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt new file mode 100644 index 000000000000..927522757da9 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt @@ -0,0 +1,13 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.net.URI + +class URIAdapter { + @ToJson + fun toJson(uri: URI) = uri.toString() + + @FromJson + fun fromJson(s: String): URI = URI.create(s) +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt new file mode 100644 index 000000000000..7ccf7dc25d2d --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt @@ -0,0 +1,13 @@ +package org.openapitools.client.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.util.UUID + +class UUIDAdapter { + @ToJson + fun toJson(uuid: UUID) = uuid.toString() + + @FromJson + fun fromJson(s: String): UUID = UUID.fromString(s) +} diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Category.kt new file mode 100644 index 000000000000..d523c462f5e5 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -0,0 +1,42 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json + +/** + * A category for a pet + * + * @param id + * @param name + */ + +data class Category ( + + @Json(name = "id") + var id: kotlin.Long? = null, + + @Json(name = "name") + var name: kotlin.String? = null + +) + diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/ModelApiResponse.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/ModelApiResponse.kt new file mode 100644 index 000000000000..217f50ea51eb --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/ModelApiResponse.kt @@ -0,0 +1,46 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json + +/** + * Describes the result of uploading an image resource + * + * @param code + * @param type + * @param message + */ + +data class ModelApiResponse ( + + @Json(name = "code") + var code: kotlin.Int? = null, + + @Json(name = "type") + var type: kotlin.String? = null, + + @Json(name = "message") + var message: kotlin.String? = null + +) + diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt new file mode 100644 index 000000000000..8a909313ac75 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -0,0 +1,71 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json + +/** + * An order for a pets from the pet store + * + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ + +data class Order ( + + @Json(name = "id") + var id: kotlin.Long? = null, + + @Json(name = "petId") + var petId: kotlin.Long? = null, + + @Json(name = "quantity") + var quantity: kotlin.Int? = null, + + @Json(name = "shipDate") + var shipDate: java.time.OffsetDateTime? = null, + + /* Order Status */ + @Json(name = "status") + var status: Order.Status? = null, + + @Json(name = "complete") + var complete: kotlin.Boolean? = false + +) { + + /** + * Order Status + * + * Values: placed,approved,delivered + */ + enum class Status(val value: kotlin.String) { + @Json(name = "placed") placed("placed"), + @Json(name = "approved") approved("approved"), + @Json(name = "delivered") delivered("delivered"); + } +} + diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Pet.kt new file mode 100644 index 000000000000..680acc7c0f44 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -0,0 +1,73 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.Category +import org.openapitools.client.models.Tag + +import com.squareup.moshi.Json + +/** + * A pet for sale in the pet store + * + * @param name + * @param photoUrls + * @param id + * @param category + * @param tags + * @param status pet status in the store + */ + +data class Pet ( + + @Json(name = "name") + var name: kotlin.String, + + @Json(name = "photoUrls") + var photoUrls: kotlin.collections.MutableList, + + @Json(name = "id") + var id: kotlin.Long? = null, + + @Json(name = "category") + var category: Category? = null, + + @Json(name = "tags") + var tags: kotlin.collections.MutableList? = null, + + /* pet status in the store */ + @Json(name = "status") + var status: Pet.Status? = null + +) { + + /** + * pet status in the store + * + * Values: available,pending,sold + */ + enum class Status(val value: kotlin.String) { + @Json(name = "available") available("available"), + @Json(name = "pending") pending("pending"), + @Json(name = "sold") sold("sold"); + } +} + diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Tag.kt new file mode 100644 index 000000000000..fb38d2667188 --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -0,0 +1,42 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json + +/** + * A tag for a pet + * + * @param id + * @param name + */ + +data class Tag ( + + @Json(name = "id") + var id: kotlin.Long? = null, + + @Json(name = "name") + var name: kotlin.String? = null + +) + diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/User.kt new file mode 100644 index 000000000000..983c8f75f3fe --- /dev/null +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/models/User.kt @@ -0,0 +1,67 @@ +/** + * 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 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json + +/** + * A User who is purchasing from the pet store + * + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ + +data class User ( + + @Json(name = "id") + var id: kotlin.Long? = null, + + @Json(name = "username") + var username: kotlin.String? = null, + + @Json(name = "firstName") + var firstName: kotlin.String? = null, + + @Json(name = "lastName") + var lastName: kotlin.String? = null, + + @Json(name = "email") + var email: kotlin.String? = null, + + @Json(name = "password") + var password: kotlin.String? = null, + + @Json(name = "phone") + var phone: kotlin.String? = null, + + /* User Status */ + @Json(name = "userStatus") + var userStatus: kotlin.Int? = null + +) + diff --git a/samples/schema/petstore/ktorm-modelMutable/.openapi-generator-ignore b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/.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/schema/petstore/ktorm-modelMutable/.openapi-generator/FILES b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/FILES new file mode 100644 index 000000000000..a0e918f1301c --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/FILES @@ -0,0 +1,16 @@ +README.md +build.gradle +docs/ApiResponse.md +docs/Category.md +docs/Order.md +docs/Pet.md +docs/Tag.md +docs/User.md +ktorm_schema.sql +settings.gradle +src/main/kotlin/org/openapitools/database/models/ApiResponse.kt +src/main/kotlin/org/openapitools/database/models/Category.kt +src/main/kotlin/org/openapitools/database/models/Order.kt +src/main/kotlin/org/openapitools/database/models/Pet.kt +src/main/kotlin/org/openapitools/database/models/Tag.kt +src/main/kotlin/org/openapitools/database/models/User.kt diff --git a/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/ktorm-modelMutable/README.md b/samples/schema/petstore/ktorm-modelMutable/README.md new file mode 100644 index 000000000000..252a12e56d7e --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/README.md @@ -0,0 +1,29 @@ +# org.openapitools.database - Kotlin database library for OpenAPI Petstore + +## Requires + + +## Build + +``` +./gradlew check assemble +``` + +This runs all tests and packages the library. + +## Features/Implementation Notes + +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. +* Supports Mapper using API model classes. +* Supports SQLite types. + + +## Documentation for Models + + - [org.openapitools.database.models.ApiResponse](docs/ApiResponse.md) + - [org.openapitools.database.models.Category](docs/Category.md) + - [org.openapitools.database.models.Order](docs/Order.md) + - [org.openapitools.database.models.Pet](docs/Pet.md) + - [org.openapitools.database.models.Tag](docs/Tag.md) + - [org.openapitools.database.models.User](docs/User.md) + diff --git a/samples/schema/petstore/ktorm-modelMutable/build.gradle b/samples/schema/petstore/ktorm-modelMutable/build.gradle new file mode 100644 index 000000000000..00bc14285658 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/build.gradle @@ -0,0 +1,35 @@ +group 'org.openapitools' +version '1.0.0' + +wrapper { + gradleVersion = '4.9' + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +buildscript { + ext.kotlin_version = '1.3.72' + ext.ktorm_version = '3.2.0' + + repositories { + maven { url "https://repo1.maven.org/maven2" } + } + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +apply plugin: 'kotlin' + +repositories { + maven { url "https://repo1.maven.org/maven2" } +} + +test { + useJUnitPlatform() +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" + implementation "org.ktorm:ktorm-core:$ktorm_version" + testImplementation "io.kotlintest:kotlintest-runner-junit5:3.1.0" +} diff --git a/samples/schema/petstore/ktorm-modelMutable/docs/ApiResponse.md b/samples/schema/petstore/ktorm-modelMutable/docs/ApiResponse.md new file mode 100644 index 000000000000..33b451cae906 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/docs/ApiResponse.md @@ -0,0 +1,15 @@ + +# Table `ApiResponse` +(mapped from: ApiResponse) + +## Properties +Name | Mapping | SQL Type | Default | Type | Description | Notes +---- | ------- | -------- | ------- | ---- | ----------- | ----- +**code** | code | int | | **kotlin.Int** | | [optional] +**type** | type | text | | **kotlin.String** | | [optional] +**message** | message | text | | **kotlin.String** | | [optional] + + + + + diff --git a/samples/schema/petstore/ktorm-modelMutable/docs/Category.md b/samples/schema/petstore/ktorm-modelMutable/docs/Category.md new file mode 100644 index 000000000000..2e83eb88012f --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/docs/Category.md @@ -0,0 +1,13 @@ + +# Table `Category` +(mapped from: Category) + +## Properties +Name | Mapping | SQL Type | Default | Type | Description | Notes +---- | ------- | -------- | ------- | ---- | ----------- | ----- +**id** | id | long PRIMARY KEY AUTOINCREMENT | | **kotlin.Long** | | [optional] +**name** | name | text | | **kotlin.String** | | [optional] + + + + diff --git a/samples/schema/petstore/ktorm-modelMutable/docs/Order.md b/samples/schema/petstore/ktorm-modelMutable/docs/Order.md new file mode 100644 index 000000000000..102962a706fe --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/docs/Order.md @@ -0,0 +1,21 @@ + +# Table `Order` +(mapped from: Order) + +## Properties +Name | Mapping | SQL Type | Default | Type | Description | Notes +---- | ------- | -------- | ------- | ---- | ----------- | ----- +**id** | id | long PRIMARY KEY AUTOINCREMENT | | **kotlin.Long** | | [optional] +**petId** | petId | long | | **kotlin.Long** | | [optional] +**quantity** | quantity | int | | **kotlin.Int** | | [optional] +**shipDate** | shipDate | datetime | | [**java.time.LocalDateTime**](java.time.LocalDateTime.md) | | [optional] +**status** | status | text | | [**status**](#Status) | Order Status | [optional] +**complete** | complete | boolean | | **kotlin.Boolean** | | [optional] + + + + + + + + diff --git a/samples/schema/petstore/ktorm-modelMutable/docs/Pet.md b/samples/schema/petstore/ktorm-modelMutable/docs/Pet.md new file mode 100644 index 000000000000..646fe4d17231 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/docs/Pet.md @@ -0,0 +1,41 @@ + +# Table `Pet` +(mapped from: Pet) + +## Properties +Name | Mapping | SQL Type | Default | Type | Description | Notes +---- | ------- | -------- | ------- | ---- | ----------- | ----- +**name** | name | text NOT NULL | | **kotlin.String** | | +**photoUrls** | `One-To-Many` | `----` | `----` | **kotlin.Array<kotlin.String>** | | +**id** | id | long PRIMARY KEY AUTOINCREMENT | | **kotlin.Long** | | [optional] +**category** | category | long | | [**Category**](Category.md) | | [optional] [foreignkey] +**tags** | `One-To-Many` | `----` | `----` | [**kotlin.Array<Tag>**](Tag.md) | | [optional] +**status** | status | text | | [**status**](#Status) | pet status in the store | [optional] + + + +# **Table `PetPhotoUrls`** +(mapped from: PetPhotoUrls) + +## Properties +Name | Mapping | SQL Type | Default | Type | Description | Notes +---- | ------- | -------- | ------- | ---- | ----------- | ----- +pet | pet | long | | kotlin.Long | Primary Key | *one* +photoUrls | photoUrls | text | | kotlin.String | Foreign Key | *many* + + + + + +# **Table `PetTag`** +(mapped from: PetTag) + +## Properties +Name | Mapping | SQL Type | Default | Type | Description | Notes +---- | ------- | -------- | ------- | ---- | ----------- | ----- +pet | pet | long | | kotlin.Long | Primary Key | *one* +tag | tag | long | | kotlin.Long | Foreign Key | *many* + + + + diff --git a/samples/schema/petstore/ktorm-modelMutable/docs/Tag.md b/samples/schema/petstore/ktorm-modelMutable/docs/Tag.md new file mode 100644 index 000000000000..51a1da4a1434 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/docs/Tag.md @@ -0,0 +1,13 @@ + +# Table `Tag` +(mapped from: Tag) + +## Properties +Name | Mapping | SQL Type | Default | Type | Description | Notes +---- | ------- | -------- | ------- | ---- | ----------- | ----- +**id** | id | long PRIMARY KEY AUTOINCREMENT | | **kotlin.Long** | | [optional] +**name** | name | text | | **kotlin.String** | | [optional] + + + + diff --git a/samples/schema/petstore/ktorm-modelMutable/docs/User.md b/samples/schema/petstore/ktorm-modelMutable/docs/User.md new file mode 100644 index 000000000000..943792b9657f --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/docs/User.md @@ -0,0 +1,25 @@ + +# Table `User` +(mapped from: User) + +## Properties +Name | Mapping | SQL Type | Default | Type | Description | Notes +---- | ------- | -------- | ------- | ---- | ----------- | ----- +**id** | id | long PRIMARY KEY AUTOINCREMENT | | **kotlin.Long** | | [optional] +**username** | username | text | | **kotlin.String** | | [optional] +**firstName** | firstName | text | | **kotlin.String** | | [optional] +**lastName** | lastName | text | | **kotlin.String** | | [optional] +**email** | email | text | | **kotlin.String** | | [optional] +**password** | password | text | | **kotlin.String** | | [optional] +**phone** | phone | text | | **kotlin.String** | | [optional] +**userStatus** | userStatus | int | | **kotlin.Int** | User Status | [optional] + + + + + + + + + + diff --git a/samples/schema/petstore/ktorm-modelMutable/ktorm_schema.sql b/samples/schema/petstore/ktorm-modelMutable/ktorm_schema.sql new file mode 100644 index 000000000000..0f7fcf7eceec --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/ktorm_schema.sql @@ -0,0 +1,211 @@ + + +-- -------------------------------------------------------------------------- +-- Table structure for table `ApiResponse` generated from model 'apiResponse' +-- Describes the result of uploading an image resource +-- + +CREATE TABLE IF NOT EXISTS `ApiResponse` ( + `code` int, + `type` text, + `message` text +); /*Describes the result of uploading an image resource*/ + + +-- -------------------------------------------------------------------------- +-- Table structure for table `Category` generated from model 'category' +-- A category for a pet +-- + +CREATE TABLE IF NOT EXISTS `Category` ( + `id` long PRIMARY KEY AUTOINCREMENT, + `name` text +); /*A category for a pet*/ + + +-- -------------------------------------------------------------------------- +-- Table structure for table `Order` generated from model 'order' +-- An order for a pets from the pet store +-- + +CREATE TABLE IF NOT EXISTS `Order` ( + `id` long PRIMARY KEY AUTOINCREMENT, + `petId` long, + `quantity` int, + `shipDate` datetime, + `status` text /*Order Status*/, + `complete` boolean +); /*An order for a pets from the pet store*/ + + +-- -------------------------------------------------------------------------- +-- Table structure for table `Pet` generated from model 'pet' +-- A pet for sale in the pet store +-- + +CREATE TABLE IF NOT EXISTS `Pet` ( + `name` text NOT NULL, + `id` long PRIMARY KEY AUTOINCREMENT, + `category` long, + `status` text /*pet status in the store*/ +); /*A pet for sale in the pet store*/ + +-- -------------------------------------------------------------------------- +-- Table structure for table `PetPhotoUrls` generated from model 'PetPhotoUrls' + +CREATE TABLE IF NOT EXISTS `PetPhotoUrls` ( + `pet` long NOT NULL + `photoUrls` text NOT NULL +); + +-- -------------------------------------------------------------------------- +-- Table structure for table `PetTag` generated from model 'PetTag' + +CREATE TABLE IF NOT EXISTS `PetTag` ( + `pet` long NOT NULL + `tag` long NOT NULL +); + + +-- -------------------------------------------------------------------------- +-- Table structure for table `Tag` generated from model 'tag' +-- A tag for a pet +-- + +CREATE TABLE IF NOT EXISTS `Tag` ( + `id` long PRIMARY KEY AUTOINCREMENT, + `name` text +); /*A tag for a pet*/ + + +-- -------------------------------------------------------------------------- +-- Table structure for table `User` generated from model 'user' +-- A User who is purchasing from the pet store +-- + +CREATE TABLE IF NOT EXISTS `User` ( + `id` long PRIMARY KEY AUTOINCREMENT, + `username` text, + `firstName` text, + `lastName` text, + `email` text, + `password` text, + `phone` text, + `userStatus` int /*User Status*/ +); /*A User who is purchasing from the pet store*/ + + +-- +-- OAuth2 framework tables +-- Thanks to https://github.com/dsquier/oauth2-server-php-mysql repo +-- + +-- +-- Table structure for table `oauth_clients` +-- +CREATE TABLE IF NOT EXISTS `oauth_clients` ( + `client_id` VARCHAR(80) NOT NULL, + `client_secret` VARCHAR(80) DEFAULT NULL, + `redirect_uri` VARCHAR(2000) DEFAULT NULL, + `grant_types` VARCHAR(80) DEFAULT NULL, + `scope` VARCHAR(4000) DEFAULT NULL, + `user_id` VARCHAR(80) DEFAULT NULL, + PRIMARY KEY (`client_id`) +); + +-- +-- Table structure for table `oauth_access_tokens` +-- +CREATE TABLE IF NOT EXISTS `oauth_access_tokens` ( + `access_token` VARCHAR(40) NOT NULL, + `client_id` VARCHAR(80) DEFAULT NULL, + `user_id` VARCHAR(80) DEFAULT NULL, + `expires` TIMESTAMP NOT NULL, + `scope` VARCHAR(4000) DEFAULT NULL, + PRIMARY KEY (`access_token`) +); + +-- +-- Table structure for table `oauth_authorization_codes` +-- +CREATE TABLE IF NOT EXISTS `oauth_authorization_codes` ( + `authorization_code` VARCHAR(40) NOT NULL, + `client_id` VARCHAR(80) DEFAULT NULL, + `user_id` VARCHAR(80) DEFAULT NULL, + `redirect_uri` VARCHAR(2000) NOT NULL, + `expires` TIMESTAMP NOT NULL, + `scope` VARCHAR(4000) DEFAULT NULL, + `id_token` VARCHAR(1000) DEFAULT NULL, + PRIMARY KEY (`authorization_code`) +); + +-- +-- Table structure for table `oauth_refresh_tokens` +-- +CREATE TABLE IF NOT EXISTS `oauth_refresh_tokens` ( + `refresh_token` VARCHAR(40) NOT NULL, + `client_id` VARCHAR(80) DEFAULT NULL, + `user_id` VARCHAR(80) DEFAULT NULL, + `expires` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + `scope` VARCHAR(4000) DEFAULT NULL, + PRIMARY KEY (`refresh_token`) +); + +-- +-- Table structure for table `oauth_users` +-- +CREATE TABLE IF NOT EXISTS `oauth_users` ( + `username` VARCHAR(80) DEFAULT NULL, + `password` VARCHAR(255) DEFAULT NULL, + `first_name` VARCHAR(80) DEFAULT NULL, + `last_name` VARCHAR(80) DEFAULT NULL, + `email` VARCHAR(2000) DEFAULT NULL, + `email_verified` TINYINT(1) DEFAULT NULL, + `scope` VARCHAR(4000) DEFAULT NULL +); + +-- +-- Table structure for table `oauth_scopes` +-- +CREATE TABLE IF NOT EXISTS `oauth_scopes` ( + `scope` VARCHAR(80) NOT NULL, + `is_default` TINYINT(1) DEFAULT NULL, + PRIMARY KEY (`scope`) +); + +-- +-- Table structure for table `oauth_jwt` +-- +CREATE TABLE IF NOT EXISTS `oauth_jwt` ( + `client_id` VARCHAR(80) NOT NULL, + `subject` VARCHAR(80) DEFAULT NULL, + `public_key` VARCHAR(2000) NOT NULL +); + +-- +-- Table structure for table `oauth_jti` +-- +CREATE TABLE IF NOT EXISTS `oauth_jti` ( + `issuer` VARCHAR(80) NOT NULL, + `subject` VARCHAR(80) DEFAULT NULL, + `audience` VARCHAR(80) DEFAULT NULL, + `expires` TIMESTAMP NOT NULL, + `jti` VARCHAR(2000) NOT NULL +); + +-- +-- Table structure for table `oauth_public_keys` +-- +CREATE TABLE IF NOT EXISTS `oauth_public_keys` ( + `client_id` VARCHAR(80) DEFAULT NULL, + `public_key` VARCHAR(2000) DEFAULT NULL, + `private_key` VARCHAR(2000) DEFAULT NULL, + `encryption_algorithm` VARCHAR(100) DEFAULT 'RS256' +); + +-- +-- Table structure for table `_db_version` +-- +CREATE TABLE IF NOT EXISTS `_db_version` ( + `version` LONG DEFAULT 1 +); diff --git a/samples/schema/petstore/ktorm-modelMutable/settings.gradle b/samples/schema/petstore/ktorm-modelMutable/settings.gradle new file mode 100644 index 000000000000..10cb73142be1 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'ktorm' \ No newline at end of file diff --git a/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/ApiResponse.kt b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/ApiResponse.kt new file mode 100644 index 000000000000..055682fab68f --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/ApiResponse.kt @@ -0,0 +1,63 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.database.models + +import org.ktorm.dsl.* +import org.ktorm.schema.* +import org.ktorm.database.Database +import org.openapitools.client.models.* + + +/** + * Describes the result of uploading an image resource + * @param code + * @param type + * @param message + */ +object ApiResponses : BaseTable("ApiResponse") { + val code = int("code") /* null */ + val type = text("type") /* null */ + val message = text("message") /* null */ + + /** + * Create an entity of type ApiResponse from the model + */ + override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean) = ApiResponse( + code = row[code] /* kotlin.Int? */, + type = row[type] /* kotlin.String? */, + message = row[message] /* kotlin.String? */ + ) + + /** + * Assign all the columns from the entity of type ApiResponse to the DML expression. + * + * Usage: + * + * ```kotlin + * let entity = ApiResponse() + * database.update(ApiResponses, { + * assignFrom(entity) + * }) + * ``` + * @return the builder with the columns for the update or insert. + */ + fun AssignmentsBuilder.assignFrom(entity: ApiResponse) { + this.apply { + set(ApiResponses.code, entity.code) + set(ApiResponses.type, entity.type) + set(ApiResponses.message, entity.message) + } + } + +} + + diff --git a/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Category.kt b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Category.kt new file mode 100644 index 000000000000..efe6d748f38b --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Category.kt @@ -0,0 +1,59 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.database.models + +import org.ktorm.dsl.* +import org.ktorm.schema.* +import org.ktorm.database.Database +import org.openapitools.client.models.* + + +/** + * A category for a pet + * @param id + * @param name + */ +object Categorys : BaseTable("Category") { + val id = long("id") /* null */ + val name = text("name") /* null */ + + /** + * Create an entity of type Category from the model + */ + override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean) = Category( + id = row[id] /* kotlin.Long? */, + name = row[name] /* kotlin.String? */ + ) + + /** + * Assign all the columns from the entity of type Category to the DML expression. + * + * Usage: + * + * ```kotlin + * let entity = Category() + * database.update(Categorys, { + * assignFrom(entity) + * }) + * ``` + * @return the builder with the columns for the update or insert. + */ + fun AssignmentsBuilder.assignFrom(entity: Category) { + this.apply { + set(Categorys.id, entity.id) + set(Categorys.name, entity.name) + } + } + +} + + diff --git a/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Order.kt b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Order.kt new file mode 100644 index 000000000000..40b7b6cc5376 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Order.kt @@ -0,0 +1,76 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.database.models + +import org.ktorm.dsl.* +import org.ktorm.schema.* +import org.ktorm.database.Database +import org.openapitools.client.models.* + + +/** + * An order for a pets from the pet store + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ +object Orders : BaseTable("Order") { + val id = long("id") /* null */ + val petId = long("petId") /* null */ + val quantity = int("quantity") /* null */ + val shipDate = datetime("shipDate") /* null */ + val status = text("status").transform({ Order.Status.valueOf(it ?: "placed") }, { it.value }) /* null */ /* Order Status */ + + val complete = boolean("complete") /* null */ + + /** + * Create an entity of type Order from the model + */ + override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean) = Order( + id = row[id] /* kotlin.Long? */, + petId = row[petId] /* kotlin.Long? */, + quantity = row[quantity] /* kotlin.Int? */, + shipDate = row[shipDate] /* java.time.LocalDateTime? */, + status = row[status] /* kotlin.String? */ /* Order Status */, + complete = row[complete] ?: false /* kotlin.Boolean? */ + ) + + /** + * Assign all the columns from the entity of type Order to the DML expression. + * + * Usage: + * + * ```kotlin + * let entity = Order() + * database.update(Orders, { + * assignFrom(entity) + * }) + * ``` + * @return the builder with the columns for the update or insert. + */ + fun AssignmentsBuilder.assignFrom(entity: Order) { + this.apply { + set(Orders.id, entity.id) + set(Orders.petId, entity.petId) + set(Orders.quantity, entity.quantity) + set(Orders.shipDate, entity.shipDate) + set(Orders.status, entity.status) + set(Orders.complete, entity.complete) + } + } + +} + + diff --git a/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Pet.kt b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Pet.kt new file mode 100644 index 000000000000..c95e111c3d41 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Pet.kt @@ -0,0 +1,105 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.database.models + +import org.ktorm.dsl.* +import org.ktorm.schema.* +import org.ktorm.database.Database +import org.openapitools.client.models.* + + +/** + * A pet for sale in the pet store + * @param name + * @param photoUrls + * @param id + * @param category + * @param tags + * @param status pet status in the store + */ +object Pets : BaseTable("Pet") { + val name = text("name") + val id = long("id") /* null */ + val category = long("category") /* null */ + @Deprecated(message = "This property is deprecated.") + val status = text("status").transform({ Pet.Status.valueOf(it ?: "available") }, { it.value }) /* null */ /* pet status in the store */ + + + /** + * Create an entity of type Pet from the model + */ + override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean) = Pet( + name = row[name] ?: "" /* kotlin.String */, + photoUrls = emptyList() /* kotlin.Array */, + id = row[id] /* kotlin.Long? */, + category = Categorys.createEntity(row, withReferences) /* Category? */, + tags = emptyList() /* kotlin.Array? */, + status = row[status] /* kotlin.String? */ /* pet status in the store */ + ) + + /** + * Assign all the columns from the entity of type Pet to the DML expression. + * + * Usage: + * + * ```kotlin + * let entity = Pet() + * database.update(Pets, { + * assignFrom(entity) + * }) + * ``` + * @return the builder with the columns for the update or insert. + */ + fun AssignmentsBuilder.assignFrom(entity: Pet) { + this.apply { + set(Pets.name, entity.name) + set(Pets.id, entity.id) + set(Pets.category, entity.category) + set(Pets.status, entity.status) + } + } + +} + + +object PetPhotoUrls : BaseTable>("PetPhotoUrls") { + val pet = long("pet") + val photoUrls = text("photoUrls") + + override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean): Pair = + Pair(row[pet] ?: 0, row[photoUrls] ?: "") + + fun AssignmentsBuilder.assignFrom(entity: Pair) { + this.apply { + set(PetPhotoUrls.pet, entity.first) + set(PetPhotoUrls.photoUrls, entity.second) + } + } + +} + +object PetTag : BaseTable>("PetTag") { + val pet = long("pet") + val tag = long("tag") + + override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean): Pair = + Pair(row[pet] ?: 0, row[tag] ?: 0) + + fun AssignmentsBuilder.assignFrom(entity: Pair) { + this.apply { + set(PetTag.pet, entity.first) + set(PetTag.tag, entity.second) + } + } + +} + diff --git a/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Tag.kt b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Tag.kt new file mode 100644 index 000000000000..1f6148728986 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/Tag.kt @@ -0,0 +1,59 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.database.models + +import org.ktorm.dsl.* +import org.ktorm.schema.* +import org.ktorm.database.Database +import org.openapitools.client.models.* + + +/** + * A tag for a pet + * @param id + * @param name + */ +object Tags : BaseTable("Tag") { + val id = long("id") /* null */ + val name = text("name") /* null */ + + /** + * Create an entity of type Tag from the model + */ + override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean) = Tag( + id = row[id] /* kotlin.Long? */, + name = row[name] /* kotlin.String? */ + ) + + /** + * Assign all the columns from the entity of type Tag to the DML expression. + * + * Usage: + * + * ```kotlin + * let entity = Tag() + * database.update(Tags, { + * assignFrom(entity) + * }) + * ``` + * @return the builder with the columns for the update or insert. + */ + fun AssignmentsBuilder.assignFrom(entity: Tag) { + this.apply { + set(Tags.id, entity.id) + set(Tags.name, entity.name) + } + } + +} + + diff --git a/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/User.kt b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/User.kt new file mode 100644 index 000000000000..98c31bf1be53 --- /dev/null +++ b/samples/schema/petstore/ktorm-modelMutable/src/main/kotlin/org/openapitools/database/models/User.kt @@ -0,0 +1,83 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.database.models + +import org.ktorm.dsl.* +import org.ktorm.schema.* +import org.ktorm.database.Database +import org.openapitools.client.models.* + + +/** + * A User who is purchasing from the pet store + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ +object Users : BaseTable("User") { + val id = long("id") /* null */ + val username = text("username") /* null */ + val firstName = text("firstName") /* null */ + val lastName = text("lastName") /* null */ + val email = text("email") /* null */ + val password = text("password") /* null */ + val phone = text("phone") /* null */ + val userStatus = int("userStatus") /* null */ /* User Status */ + + /** + * Create an entity of type User from the model + */ + override fun doCreateEntity(row: QueryRowSet, withReferences: Boolean) = User( + id = row[id] /* kotlin.Long? */, + username = row[username] /* kotlin.String? */, + firstName = row[firstName] /* kotlin.String? */, + lastName = row[lastName] /* kotlin.String? */, + email = row[email] /* kotlin.String? */, + password = row[password] /* kotlin.String? */, + phone = row[phone] /* kotlin.String? */, + userStatus = row[userStatus] /* kotlin.Int? */ /* User Status */ + ) + + /** + * Assign all the columns from the entity of type User to the DML expression. + * + * Usage: + * + * ```kotlin + * let entity = User() + * database.update(Users, { + * assignFrom(entity) + * }) + * ``` + * @return the builder with the columns for the update or insert. + */ + fun AssignmentsBuilder.assignFrom(entity: User) { + this.apply { + set(Users.id, entity.id) + set(Users.username, entity.username) + set(Users.firstName, entity.firstName) + set(Users.lastName, entity.lastName) + set(Users.email, entity.email) + set(Users.password, entity.password) + set(Users.phone, entity.phone) + set(Users.userStatus, entity.userStatus) + } + } + +} + + diff --git a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator-ignore b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/.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/server/petstore/kotlin-server-modelMutable/.openapi-generator/FILES b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/FILES new file mode 100644 index 000000000000..79943171ff21 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/FILES @@ -0,0 +1,20 @@ +Dockerfile +README.md +build.gradle +gradle.properties +settings.gradle +src/main/kotlin/org/openapitools/server/AppMain.kt +src/main/kotlin/org/openapitools/server/Configuration.kt +src/main/kotlin/org/openapitools/server/Paths.kt +src/main/kotlin/org/openapitools/server/apis/PetApi.kt +src/main/kotlin/org/openapitools/server/apis/StoreApi.kt +src/main/kotlin/org/openapitools/server/apis/UserApi.kt +src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt +src/main/kotlin/org/openapitools/server/models/Category.kt +src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt +src/main/kotlin/org/openapitools/server/models/Order.kt +src/main/kotlin/org/openapitools/server/models/Pet.kt +src/main/kotlin/org/openapitools/server/models/Tag.kt +src/main/kotlin/org/openapitools/server/models/User.kt +src/main/resources/application.conf +src/main/resources/logback.xml diff --git a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/Dockerfile b/samples/server/petstore/kotlin-server-modelMutable/Dockerfile new file mode 100644 index 000000000000..0c1f942d32ae --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/Dockerfile @@ -0,0 +1,7 @@ +FROM openjdk:8-jre-alpine + +COPY ./build/libs/kotlin-server.jar /root/kotlin-server.jar + +WORKDIR /root + +CMD ["java", "-server", "-Xms4g", "-Xmx4g", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "kotlin-server.jar"] \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/README.md b/samples/server/petstore/kotlin-server-modelMutable/README.md new file mode 100644 index 000000000000..ad9008bc0dd1 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/README.md @@ -0,0 +1,104 @@ +# org.openapitools.server - Kotlin Server library for 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. + +Generated by OpenAPI Generator 5.4.0-SNAPSHOT. + +## Requires + +* Kotlin 1.4.32 +* Gradle 6.9 + +## Build + +First, create the gradle wrapper script: + +``` +gradle wrapper +``` + +Then, run: + +``` +./gradlew check assemble +``` + +This runs all tests and packages the library. + +## Running + +The server builds as a fat jar with a main entrypoint. To start the service, run `java -jar ./build/libs/kotlin-server.jar`. + +You may also run in docker: + +``` +docker build -t kotlin-server . +docker run -p 8080:8080 kotlin-server +``` + +## Features/Implementation Notes + +* Supports JSON inputs/outputs, File inputs, and Form inputs (see ktor documentation for more info). +* ~Supports collection formats for query parameters: csv, tsv, ssv, pipes.~ +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. + + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + + +## Documentation for Models + + - [org.openapitools.server.models.Category](docs/Category.md) + - [org.openapitools.server.models.ModelApiResponse](docs/ModelApiResponse.md) + - [org.openapitools.server.models.Order](docs/Order.md) + - [org.openapitools.server.models.Pet](docs/Pet.md) + - [org.openapitools.server.models.Tag](docs/Tag.md) + - [org.openapitools.server.models.User](docs/User.md) + + + +## Documentation for Authorization + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +### 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 + diff --git a/samples/server/petstore/kotlin-server-modelMutable/build.gradle b/samples/server/petstore/kotlin-server-modelMutable/build.gradle new file mode 100644 index 000000000000..ebf0c9880680 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/build.gradle @@ -0,0 +1,69 @@ +group "org.openapitools" +version "1.0.0" + +wrapper { + gradleVersion = "6.9" + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +buildscript { + ext.kotlin_version = "1.4.32" + ext.ktor_version = "1.5.4" + ext.shadow_version = "6.1.0" + + repositories { + maven { url "https://repo1.maven.org/maven2" } + maven { url "https://plugins.gradle.org/m2/" } + } + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + classpath("com.github.jengelman.gradle.plugins:shadow:$shadow_version") + } +} + +apply plugin: "java" +apply plugin: "kotlin" +apply plugin: "application" + +mainClassName = "io.ktor.server.netty.DevelopmentEngine" + +// Initialization order with shadow 2.0.1 and Gradle 6.9 is weird. +// See https://github.com/johnrengelman/shadow/issues/336#issuecomment-355402508 +apply plugin: "com.github.johnrengelman.shadow" + +sourceCompatibility = 1.8 + +compileKotlin { + kotlinOptions.jvmTarget = "1.8" +} + +compileTestKotlin { + kotlinOptions.jvmTarget = "1.8" +} + +shadowJar { + baseName = "kotlin-server" + classifier = null + version = null +} + +repositories { + maven { setUrl("https://repo1.maven.org/maven2") } + maven { setUrl("https://dl.bintray.com/kotlin/ktor") } + maven { setUrl("https://dl.bintray.com/kotlin/kotlinx") } +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") + implementation("ch.qos.logback:logback-classic:1.2.1") + implementation("com.typesafe:config:1.4.1") + implementation("io.ktor:ktor-auth:$ktor_version") + implementation("io.ktor:ktor-client-apache:$ktor_version") + implementation("io.ktor:ktor-gson:$ktor_version") + implementation("io.ktor:ktor-locations:$ktor_version") + implementation("io.dropwizard.metrics:metrics-core:4.1.18") + implementation("io.ktor:ktor-metrics:$ktor_version") + implementation("io.ktor:ktor-server-netty:$ktor_version") + + testImplementation("junit:junit:4.13.2") +} diff --git a/samples/server/petstore/kotlin-server-modelMutable/gradle.properties b/samples/server/petstore/kotlin-server-modelMutable/gradle.properties new file mode 100644 index 000000000000..5f1ed7bbe024 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/gradle.properties @@ -0,0 +1 @@ +org.gradle.caching=true \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/settings.gradle b/samples/server/petstore/kotlin-server-modelMutable/settings.gradle new file mode 100644 index 000000000000..a09a58efab11 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'kotlin-server' \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/AppMain.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/AppMain.kt new file mode 100644 index 000000000000..9b0468fb5684 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/AppMain.kt @@ -0,0 +1,74 @@ +package org.openapitools.server + +import com.codahale.metrics.Slf4jReporter +import io.ktor.application.* +import io.ktor.features.* +import io.ktor.gson.* +import io.ktor.http.* +import io.ktor.locations.* +import io.ktor.metrics.dropwizard.* +import java.util.concurrent.TimeUnit +import io.ktor.routing.* +import io.ktor.util.* +import com.typesafe.config.ConfigFactory +import io.ktor.auth.* +import io.ktor.client.HttpClient +import io.ktor.client.engine.apache.Apache +import io.ktor.config.HoconApplicationConfig +import org.openapitools.server.infrastructure.* +import org.openapitools.server.apis.PetApi +import org.openapitools.server.apis.StoreApi +import org.openapitools.server.apis.UserApi + + +internal val settings = HoconApplicationConfig(ConfigFactory.defaultApplication(HTTP::class.java.classLoader)) + +object HTTP { + val client = HttpClient(Apache) +} + +@KtorExperimentalAPI +@KtorExperimentalLocationsAPI +fun Application.main() { + install(DefaultHeaders) + install(DropwizardMetrics) { + val reporter = Slf4jReporter.forRegistry(registry) + .outputTo(log) + .convertRatesTo(TimeUnit.SECONDS) + .convertDurationsTo(TimeUnit.MILLISECONDS) + .build() + reporter.start(10, TimeUnit.SECONDS) + } + install(ContentNegotiation) { + register(ContentType.Application.Json, GsonConverter()) + } + install(AutoHeadResponse) // see https://ktor.io/docs/autoheadresponse.html + install(Compression, ApplicationCompressionConfiguration()) // see https://ktor.io/docs/compression.html + install(HSTS, ApplicationHstsConfiguration()) // see https://ktor.io/docs/hsts.html + install(Locations) // see https://ktor.io/docs/features-locations.html + install(Authentication) { + // "Implement API key auth (api_key) for parameter name 'api_key'." + apiKeyAuth("api_key") { + validate { apikeyCredential: ApiKeyCredential -> + when { + apikeyCredential.value == "keyboardcat" -> ApiPrincipal(apikeyCredential) + else -> null + } + } + } + oauth("petstore_auth") { + client = HttpClient(Apache) + providerLookup = { ApplicationAuthProviders["petstore_auth"] } + urlProvider = { _ -> + // TODO: define a callback url here. + "/" + } + } + } + install(Routing) { + PetApi() + StoreApi() + UserApi() + } + +} diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Configuration.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Configuration.kt new file mode 100644 index 000000000000..93aa1c728227 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Configuration.kt @@ -0,0 +1,71 @@ +package org.openapitools.server + +// Use this file to hold package-level internal functions that return receiver object passed to the `install` method. +import io.ktor.auth.* +import io.ktor.features.* +import io.ktor.http.* +import io.ktor.util.* +import java.time.Duration +import java.util.concurrent.TimeUnit + +/** + * Application block for [HSTS] configuration. + * + * This file may be excluded in .openapi-generator-ignore, + * and application specific configuration can be applied in this function. + * + * See http://ktor.io/features/hsts.html + */ +internal fun ApplicationHstsConfiguration(): HSTS.Configuration.() -> Unit { + return { + maxAgeInSeconds = TimeUnit.DAYS.toSeconds(365) + includeSubDomains = true + preload = false + + // You may also apply any custom directives supported by specific user-agent. For example: + // customDirectives.put("redirectHttpToHttps", "false") + } +} + +/** + * Application block for [Compression] configuration. + * + * This file may be excluded in .openapi-generator-ignore, + * and application specific configuration can be applied in this function. + * + * See http://ktor.io/features/compression.html + */ +internal fun ApplicationCompressionConfiguration(): Compression.Configuration.() -> Unit { + return { + gzip { + priority = 1.0 + } + deflate { + priority = 10.0 + minimumSize(1024) // condition + } + } +} + +// Defines authentication mechanisms used throughout the application. +val ApplicationAuthProviders: Map = listOf( + OAuthServerSettings.OAuth2ServerSettings( + name = "petstore_auth", + authorizeUrl = "http://petstore.swagger.io/api/oauth/dialog", + accessTokenUrl = "", + requestMethod = HttpMethod.Get, + clientId = settings.property("auth.oauth.petstore_auth.clientId").getString(), + clientSecret = settings.property("auth.oauth.petstore_auth.clientSecret").getString(), + defaultScopes = listOf("write:pets", "read:pets") + ) +// OAuthServerSettings.OAuth2ServerSettings( +// name = "facebook", +// authorizeUrl = "https://graph.facebook.com/oauth/authorize", +// accessTokenUrl = "https://graph.facebook.com/oauth/access_token", +// requestMethod = HttpMethod.Post, +// +// clientId = settings.property("auth.oauth.facebook.clientId").getString(), +// clientSecret = settings.property("auth.oauth.facebook.clientSecret").getString(), +// defaultScopes = listOf("public_profile") +// ) +).associateBy { it.name } 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 new file mode 100644 index 000000000000..3c3d343ceb75 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Paths.kt @@ -0,0 +1,164 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server + +import io.ktor.locations.* +import org.openapitools.server.models.* + +@KtorExperimentalLocationsAPI +object Paths { + /** + * Add a new pet to the store + * + * @param body Pet object that needs to be added to the store + */ + @Location("/pet") class addPet(val body: Pet) + + /** + * Deletes a pet + * + * @param petId Pet id to delete + * @param apiKey (optional) + */ + @Location("/pet/{petId}") class deletePet(val petId: kotlin.Long, val apiKey: kotlin.String? = null) + + /** + * 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 + */ + @Location("/pet/findByStatus") class findPetsByStatus(val status: kotlin.collections.MutableList) + + /** + * 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 + */ + @Location("/pet/findByTags") class findPetsByTags(val tags: kotlin.collections.MutableList) + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return + */ + @Location("/pet/{petId}") class getPetById(val petId: kotlin.Long) + + /** + * Update an existing pet + * + * @param body Pet object that needs to be added to the store + */ + @Location("/pet") class updatePet(val body: Pet) + + /** + * 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 (optional) + * @param status Updated status of the pet (optional) + */ + @Location("/pet/{petId}") class updatePetWithForm(val petId: kotlin.Long, val name: kotlin.String? = null, val status: kotlin.String? = null) + + /** + * uploads an image + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + */ + @Location("/pet/{petId}/uploadImage") class uploadFile(val petId: kotlin.Long, val additionalMetadata: kotlin.String? = null, val file: java.io.File? = null) + + /** + * 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 + */ + @Location("/store/order/{orderId}") class deleteOrder(val orderId: kotlin.String) + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + */ + @Location("/store/inventory") object getInventory + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @param orderId ID of pet that needs to be fetched + */ + @Location("/store/order/{orderId}") class getOrderById(val orderId: kotlin.Long) + + /** + * Place an order for a pet + * + * @param body order placed for purchasing the pet + */ + @Location("/store/order") class placeOrder(val body: Order) + + /** + * Create user + * This can only be done by the logged in user. + * @param body Created user object + */ + @Location("/user") class createUser(val body: User) + + /** + * Creates list of users with given input array + * + * @param body List of user object + */ + @Location("/user/createWithArray") class createUsersWithArrayInput(val body: kotlin.collections.MutableList) + + /** + * Creates list of users with given input array + * + * @param body List of user object + */ + @Location("/user/createWithList") class createUsersWithListInput(val body: kotlin.collections.MutableList) + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted + */ + @Location("/user/{username}") class deleteUser(val username: kotlin.String) + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. + */ + @Location("/user/{username}") class getUserByName(val username: kotlin.String) + + /** + * Logs user into the system + * + * @param username The user name for login + * @param password The password for login in clear text + */ + @Location("/user/login") class loginUser(val username: kotlin.String, val password: kotlin.String) + + /** + * Logs out current logged in user session + * + */ + @Location("/user/logout") object logoutUser + + /** + * Updated user + * This can only be done by the logged in user. + * @param username name that need to be deleted + * @param body Updated user object + */ + @Location("/user/{username}") class updateUser(val username: kotlin.String, val body: User) + +} diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt new file mode 100644 index 000000000000..0a4b29e2cabb --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/PetApi.kt @@ -0,0 +1,175 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.apis + +import com.google.gson.Gson +import io.ktor.application.* +import io.ktor.auth.* +import io.ktor.http.* +import io.ktor.response.* +import org.openapitools.server.Paths +import io.ktor.locations.* +import io.ktor.routing.* +import org.openapitools.server.infrastructure.ApiPrincipal +import org.openapitools.server.models.ModelApiResponse +import org.openapitools.server.models.Pet + +@KtorExperimentalLocationsAPI +fun Route.PetApi() { + val gson = Gson() + val empty = mutableMapOf() + + authenticate("petstore_auth") { + post { + val principal = call.authentication.principal()!! + + call.respond(HttpStatusCode.NotImplemented) + } + } + + authenticate("petstore_auth") { + delete { + val principal = call.authentication.principal()!! + + call.respond(HttpStatusCode.NotImplemented) + } + } + + authenticate("petstore_auth") { + get { + val principal = call.authentication.principal()!! + + val exampleContentType = "application/json" + val exampleContentString = """{ + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }""" + + when (exampleContentType) { + "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java)) + "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml) + else -> call.respondText(exampleContentString) + } + } + } + + authenticate("petstore_auth") { + get { + val principal = call.authentication.principal()!! + + val exampleContentType = "application/json" + val exampleContentString = """{ + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }""" + + when (exampleContentType) { + "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java)) + "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml) + else -> call.respondText(exampleContentString) + } + } + } + + authenticate("api_key") { + get { + val principal = call.authentication.principal()!! + + val exampleContentType = "application/json" + val exampleContentString = """{ + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }""" + + when (exampleContentType) { + "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java)) + "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml) + else -> call.respondText(exampleContentString) + } + } + } + + authenticate("petstore_auth") { + put { + val principal = call.authentication.principal()!! + + call.respond(HttpStatusCode.NotImplemented) + } + } + + authenticate("petstore_auth") { + post { + val principal = call.authentication.principal()!! + + call.respond(HttpStatusCode.NotImplemented) + } + } + + authenticate("petstore_auth") { + post { + val principal = call.authentication.principal()!! + + val exampleContentType = "application/json" + val exampleContentString = """{ + "code" : 0, + "type" : "type", + "message" : "message" + }""" + + when (exampleContentType) { + "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java)) + "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml) + else -> call.respondText(exampleContentString) + } + } + } + +} diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt new file mode 100644 index 000000000000..b195797a0203 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt @@ -0,0 +1,78 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.apis + +import com.google.gson.Gson +import io.ktor.application.* +import io.ktor.auth.* +import io.ktor.http.* +import io.ktor.response.* +import org.openapitools.server.Paths +import io.ktor.locations.* +import io.ktor.routing.* +import org.openapitools.server.infrastructure.ApiPrincipal +import org.openapitools.server.models.Order + +@KtorExperimentalLocationsAPI +fun Route.StoreApi() { + val gson = Gson() + val empty = mutableMapOf() + + delete { + call.respond(HttpStatusCode.NotImplemented) + } + + authenticate("api_key") { + get { + val principal = call.authentication.principal()!! + + call.respond(HttpStatusCode.NotImplemented) + } + } + + get { + val exampleContentType = "application/json" + val exampleContentString = """{ + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }""" + + when (exampleContentType) { + "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java)) + "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml) + else -> call.respondText(exampleContentString) + } + } + + post { + val exampleContentType = "application/json" + val exampleContentString = """{ + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }""" + + when (exampleContentType) { + "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java)) + "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml) + else -> call.respondText(exampleContentString) + } + } + +} diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt new file mode 100644 index 000000000000..1871c4b30975 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/apis/UserApi.kt @@ -0,0 +1,78 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.apis + +import com.google.gson.Gson +import io.ktor.application.* +import io.ktor.auth.* +import io.ktor.http.* +import io.ktor.response.* +import org.openapitools.server.Paths +import io.ktor.locations.* +import io.ktor.routing.* +import org.openapitools.server.infrastructure.ApiPrincipal +import org.openapitools.server.models.User + +@KtorExperimentalLocationsAPI +fun Route.UserApi() { + val gson = Gson() + val empty = mutableMapOf() + + post { + call.respond(HttpStatusCode.NotImplemented) + } + + post { + call.respond(HttpStatusCode.NotImplemented) + } + + post { + call.respond(HttpStatusCode.NotImplemented) + } + + delete { + call.respond(HttpStatusCode.NotImplemented) + } + + get { + val exampleContentType = "application/json" + val exampleContentString = """{ + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }""" + + when (exampleContentType) { + "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java)) + "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml) + else -> call.respondText(exampleContentString) + } + } + + get { + call.respond(HttpStatusCode.NotImplemented) + } + + get { + call.respond(HttpStatusCode.NotImplemented) + } + + put { + call.respond(HttpStatusCode.NotImplemented) + } + +} diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt new file mode 100644 index 000000000000..de09ba8b6b62 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt @@ -0,0 +1,105 @@ +package org.openapitools.server.infrastructure + +import io.ktor.application.* +import io.ktor.auth.* +import io.ktor.http.auth.* +import io.ktor.request.* +import io.ktor.response.* + +enum class ApiKeyLocation(val location: String) { + QUERY("query"), + HEADER("header") +} + +data class ApiKeyCredential(val value: String) : Credential +data class ApiPrincipal(val apiKeyCredential: ApiKeyCredential?) : Principal + +/** +* Represents a Api Key authentication provider +* @param name is the name of the provider, or `null` for a default provider +*/ +class ApiKeyAuthenticationProvider(configuration: Configuration) : AuthenticationProvider(configuration) { + + private val authenticationFunction = configuration.authenticationFunction + + private val apiKeyName: String = configuration.apiKeyName + + private val apiKeyLocation: ApiKeyLocation = configuration.apiKeyLocation + + internal fun install() { + pipeline.intercept(AuthenticationPipeline.RequestAuthentication) { context -> + val credentials = call.request.apiKeyAuthenticationCredentials(apiKeyName, apiKeyLocation) + val principal = credentials?.let { authenticationFunction(call, it) } + + val cause = when { + credentials == null -> AuthenticationFailedCause.NoCredentials + principal == null -> AuthenticationFailedCause.InvalidCredentials + else -> null + } + + if (cause != null) { + context.challenge(apiKeyName, cause) { + call.respond( + UnauthorizedResponse( + HttpAuthHeader.Parameterized( + "API_KEY", + mapOf("key" to apiKeyName), + HeaderValueEncoding.QUOTED_ALWAYS + ) + ) + ) + it.complete() + } + } + + if (principal != null) { + context.principal(principal) + } + } + } + + class Configuration internal constructor(name: String?) : AuthenticationProvider.Configuration(name) { + + internal var authenticationFunction: suspend ApplicationCall.(ApiKeyCredential) -> Principal? = { + throw NotImplementedError( + "Api Key auth validate function is not specified. Use apiKeyAuth { validate { ... } } to fix." + ) + } + + var apiKeyName: String = "" + + var apiKeyLocation: ApiKeyLocation = ApiKeyLocation.QUERY + + /** + * Sets a validation function that will check given [ApiKeyCredential] instance and return [Principal], + * or null if credential does not correspond to an authenticated principal + */ + fun validate(body: suspend ApplicationCall.(ApiKeyCredential) -> Principal?) { + authenticationFunction = body + } + } +} + +fun Authentication.Configuration.apiKeyAuth( + name: String? = null, + configure: ApiKeyAuthenticationProvider.Configuration.() -> Unit +) { + val configuration = ApiKeyAuthenticationProvider.Configuration(name).apply(configure) + val provider = ApiKeyAuthenticationProvider(configuration) + provider.install() + register(provider) +} + +fun ApplicationRequest.apiKeyAuthenticationCredentials( + apiKeyName: String, + apiKeyLocation: ApiKeyLocation +): ApiKeyCredential? { + val value: String? = when (apiKeyLocation) { + ApiKeyLocation.QUERY -> this.queryParameters[apiKeyName] + ApiKeyLocation.HEADER -> this.headers[apiKeyName] + } + return when (value) { + null -> null + else -> ApiKeyCredential(value) + } +} diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Category.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Category.kt new file mode 100644 index 000000000000..949cf3a7a5a0 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Category.kt @@ -0,0 +1,24 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.models + + +/** + * A category for a pet + * @param id + * @param name + */ +data class Category( + var id: kotlin.Long? = null, + var name: kotlin.String? = null +) + diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt new file mode 100644 index 000000000000..7a0ac1f246df --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt @@ -0,0 +1,26 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.models + + +/** + * Describes the result of uploading an image resource + * @param code + * @param type + * @param message + */ +data class ModelApiResponse( + var code: kotlin.Int? = null, + var type: kotlin.String? = null, + var message: kotlin.String? = null +) + diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt new file mode 100644 index 000000000000..c691b645c43d --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -0,0 +1,44 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.models + + +/** + * An order for a pets from the pet store + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ +data class Order( + var id: kotlin.Long? = null, + var petId: kotlin.Long? = null, + var quantity: kotlin.Int? = null, + var shipDate: java.time.OffsetDateTime? = null, + /* Order Status */ + var status: Order.Status? = null, + var complete: kotlin.Boolean? = false +) +{ + /** + * Order Status + * Values: placed,approved,delivered + */ + enum class Status(val value: kotlin.String){ + placed("placed"), + approved("approved"), + delivered("delivered"); + } +} + diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Pet.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Pet.kt new file mode 100644 index 000000000000..e12a818c1b57 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Pet.kt @@ -0,0 +1,46 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.models + +import org.openapitools.server.models.Category +import org.openapitools.server.models.Tag + +/** + * A pet for sale in the pet store + * @param name + * @param photoUrls + * @param id + * @param category + * @param tags + * @param status pet status in the store + */ +data class Pet( + var name: kotlin.String, + var photoUrls: kotlin.collections.MutableList, + var id: kotlin.Long? = null, + var category: Category? = null, + var tags: kotlin.collections.MutableList? = null, + /* pet status in the store */ + var status: Pet.Status? = null +) +{ + /** + * pet status in the store + * Values: available,pending,sold + */ + enum class Status(val value: kotlin.String){ + available("available"), + pending("pending"), + sold("sold"); + } +} + diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Tag.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Tag.kt new file mode 100644 index 000000000000..99e770cd7b9f --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/Tag.kt @@ -0,0 +1,24 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.models + + +/** + * A tag for a pet + * @param id + * @param name + */ +data class Tag( + var id: kotlin.Long? = null, + var name: kotlin.String? = null +) + diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/User.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/User.kt new file mode 100644 index 000000000000..e63e2596d4bf --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/models/User.kt @@ -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. +*/ +package org.openapitools.server.models + + +/** + * A User who is purchasing from the pet store + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ +data class User( + var id: kotlin.Long? = null, + var username: kotlin.String? = null, + var firstName: kotlin.String? = null, + var lastName: kotlin.String? = null, + var email: kotlin.String? = null, + var password: kotlin.String? = null, + var phone: kotlin.String? = null, + /* User Status */ + var userStatus: kotlin.Int? = null +) + diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/resources/application.conf b/samples/server/petstore/kotlin-server-modelMutable/src/main/resources/application.conf new file mode 100644 index 000000000000..d33fe93f9937 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/resources/application.conf @@ -0,0 +1,23 @@ +ktor { + deployment { + environment = development + port = 8080 + autoreload = true + watch = [ org.openapitools.server ] + } + + application { + modules = [ org.openapitools.server.AppMainKt.main ] + } +} + +# Typesafe config allows multiple ways to provide configuration values without hard-coding them here. +# Please see https://github.com/lightbend/config for details. +auth { + oauth { + petstore_auth { + clientId = "" + clientSecret = "" + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/resources/logback.xml b/samples/server/petstore/kotlin-server-modelMutable/src/main/resources/logback.xml new file mode 100644 index 000000000000..d0eaba8debd6 --- /dev/null +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/resources/logback.xml @@ -0,0 +1,15 @@ + + + + %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt index 88d1eb64f41b..a1943cde3f3d 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt @@ -30,7 +30,7 @@ data class Pet( @field:JsonProperty("name", required = true) var name: kotlin.String, @ApiModelProperty(example = "null", required = true, value = "") - @field:JsonProperty("photoUrls", required = true) var photoUrls: kotlin.collections.List, + @field:JsonProperty("photoUrls", required = true) var photoUrls: kotlin.collections.MutableList, @ApiModelProperty(example = "null", value = "") @field:JsonProperty("id") var id: kotlin.Long? = null, @@ -41,7 +41,7 @@ data class Pet( @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("tags") var tags: kotlin.collections.List? = null, + @field:JsonProperty("tags") var tags: kotlin.collections.MutableList? = null, @ApiModelProperty(example = "null", value = "pet status in the store") @field:JsonProperty("status") var status: Pet.Status? = null diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator-ignore b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/.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/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/FILES b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/FILES new file mode 100644 index 000000000000..bfa6fd2a60ca --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/FILES @@ -0,0 +1,17 @@ +README.md +pom.xml +src/main/kotlin/org/openapitools/server/api/model/Category.kt +src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt +src/main/kotlin/org/openapitools/server/api/model/Order.kt +src/main/kotlin/org/openapitools/server/api/model/Pet.kt +src/main/kotlin/org/openapitools/server/api/model/Tag.kt +src/main/kotlin/org/openapitools/server/api/model/User.kt +src/main/kotlin/org/openapitools/server/api/verticle/PetApi.kt +src/main/kotlin/org/openapitools/server/api/verticle/PetApiVerticle.kt +src/main/kotlin/org/openapitools/server/api/verticle/PetApiVertxProxyHandler.kt +src/main/kotlin/org/openapitools/server/api/verticle/StoreApi.kt +src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVerticle.kt +src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVertxProxyHandler.kt +src/main/kotlin/org/openapitools/server/api/verticle/UserApi.kt +src/main/kotlin/org/openapitools/server/api/verticle/UserApiVerticle.kt +src/main/kotlin/org/openapitools/server/api/verticle/UserApiVertxProxyHandler.kt diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/README.md b/samples/server/petstore/kotlin-vertx-modelMutable/README.md new file mode 100644 index 000000000000..47e035f66db9 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/README.md @@ -0,0 +1,81 @@ +# org.openapitools - Kotlin Server library for OpenAPI Petstore + +## Requires + +* Kotlin 1.3.10 +* Maven 3.3 + +## Build + +``` +mvn clean package +``` + +This runs all tests and packages the library. + +## Features/Implementation Notes + +* Supports JSON inputs/outputs and Form inputs. +* Supports collection formats for query parameters: csv, tsv, ssv, pipes. +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. + + + ## Documentation for API Endpoints + + All URIs are relative to *http://petstore.swagger.io/v2* + + Class | Method | HTTP request | Description + ------------ | ------------- | ------------- | ------------- + *PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store + *PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet + *PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status + *PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags + *PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID + *PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet + *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data + *PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image + *StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID + *StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status + *StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID + *StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet + *UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user + *UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array + *UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array + *UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user + *UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name + *UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system + *UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session + *UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + + + ## Documentation for Models + + - [org.openapitools.server.api.model.Category](docs/Category.md) + - [org.openapitools.server.api.model.ModelApiResponse](docs/ModelApiResponse.md) + - [org.openapitools.server.api.model.Order](docs/Order.md) + - [org.openapitools.server.api.model.Pet](docs/Pet.md) + - [org.openapitools.server.api.model.Tag](docs/Tag.md) + - [org.openapitools.server.api.model.User](docs/User.md) + + + +## Documentation for Authorization + + + ### api_key + + - **Type**: API key + - **API key parameter name**: api_key + - **Location**: HTTP header + + + ### 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 + diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/pom.xml b/samples/server/petstore/kotlin-vertx-modelMutable/pom.xml new file mode 100644 index 000000000000..f7dce917e48f --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/pom.xml @@ -0,0 +1,191 @@ + + 4.0.0 + + org.openapitools + openapi-kotlin-vertx-server + 1.0.0-SNAPSHOT + jar + + OpenAPI Petstore + + + UTF-8 + 1.8 + 1.3.10 + true + 1.3.5 + 4.13 + 3.4.1 + 3.8.1 + 1.0.2 + 2.3 + 2.7.4 + 3.6.0 + + + + + junit + junit + ${junit.version} + test + + + + io.vertx + vertx-unit + ${vertx.version} + test + + + + com.github.wooyme + vertx-openapi-router + ${vertx-openapi-router.version} + + + + com.google.code.gson + gson + 2.8.5 + + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version} + + + org.jetbrains.kotlinx + kotlinx-coroutines-core + RELEASE + + + + io.vertx + vertx-core + ${vertx.version} + + + io.vertx + vertx-web + ${vertx.version} + + + + io.vertx + vertx-lang-kotlin + ${vertx.version} + + + + io.vertx + vertx-lang-kotlin-coroutines + ${vertx.version} + + + + io.swagger.parser.v3 + swagger-parser + 2.0.5 + + + + io.vertx + vertx-web-api-contract + ${vertx.version} + + + + io.vertx + vertx-service-proxy + ${vertx.version} + + + + io.vertx + vertx-web-api-service + ${vertx.version} + + + + + + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${kotlin.version} + + + compile + + compile + + + + ${project.basedir}/src/main/kotlin + ${project.basedir}/src/main/java + + 1.8 + + + + test-compile + + test-compile + + + + ${project.basedir}/src/test/kotlin + ${project.basedir}/src/test/java + + 1.8 + + + + + + + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${java.version} + ${java.version} + + + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + package + + shade + + + + + + org.openapitools.server.api.verticle.DefaultApiVerticleKt + + + + + ${project.build.directory}/${project.artifactId}-${project.version}-fat.jar + + + + + + + \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Category.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Category.kt new file mode 100644 index 000000000000..29aaa19c2c2f --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Category.kt @@ -0,0 +1,32 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.api.model + + + +import com.google.gson.annotations.SerializedName +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonInclude +/** + * A category for a pet + * @param id + * @param name + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +data class Category ( + var id: kotlin.Long? = null, + var name: kotlin.String? = null +) { + +} + diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt new file mode 100644 index 000000000000..ce8326960332 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/ModelApiResponse.kt @@ -0,0 +1,34 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.api.model + + + +import com.google.gson.annotations.SerializedName +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonInclude +/** + * Describes the result of uploading an image resource + * @param code + * @param type + * @param message + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +data class ModelApiResponse ( + var code: kotlin.Int? = null, + var type: kotlin.String? = null, + var message: kotlin.String? = null +) { + +} + diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt new file mode 100644 index 000000000000..a25f7e74bc7f --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Order.kt @@ -0,0 +1,55 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.api.model + + + +import com.google.gson.annotations.SerializedName +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonInclude +/** + * An order for a pets from the pet store + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +data class Order ( + var id: kotlin.Long? = null, + var petId: kotlin.Long? = null, + var quantity: kotlin.Int? = null, + var shipDate: java.time.OffsetDateTime? = null, + /* Order Status */ + var status: Order.Status? = null, + var complete: kotlin.Boolean? = false +) { + + /** + * Order Status + * Values: placed,approved,delivered + */ + enum class Status(val value: kotlin.String){ + + placed("placed"), + + approved("approved"), + + delivered("delivered"); + + } + +} + diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Pet.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Pet.kt new file mode 100644 index 000000000000..e80d49fc3f5f --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Pet.kt @@ -0,0 +1,61 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.api.model + +import org.openapitools.server.api.model.Category +import org.openapitools.server.api.model.Tag + + +import com.google.gson.annotations.SerializedName +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonInclude +/** + * A pet for sale in the pet store + * @param name + * @param photoUrls + * @param id + * @param category + * @param tags + * @param status pet status in the store + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +data class Pet ( + @SerializedName("name") private var _name: kotlin.String?, + @SerializedName("photoUrls") private var _photoUrls: kotlin.Array?, + var id: kotlin.Long? = null, + var category: Category? = null, + var tags: kotlin.Array? = null, + /* pet status in the store */ + var status: Pet.Status? = null +) { + + /** + * pet status in the store + * Values: available,pending,sold + */ + enum class Status(val value: kotlin.String){ + + available("available"), + + pending("pending"), + + sold("sold"); + + } + + var name get() = _name ?: throw IllegalArgumentException("name is required") + set(value){ _name = value } + var photoUrls get() = _photoUrls ?: throw IllegalArgumentException("photoUrls is required") + set(value){ _photoUrls = value } +} + diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Tag.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Tag.kt new file mode 100644 index 000000000000..359a53af6091 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/Tag.kt @@ -0,0 +1,32 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.api.model + + + +import com.google.gson.annotations.SerializedName +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonInclude +/** + * A tag for a pet + * @param id + * @param name + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +data class Tag ( + var id: kotlin.Long? = null, + var name: kotlin.String? = null +) { + +} + diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/User.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/User.kt new file mode 100644 index 000000000000..791d0b882333 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/model/User.kt @@ -0,0 +1,45 @@ +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.server.api.model + + + +import com.google.gson.annotations.SerializedName +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonInclude +/** + * A User who is purchasing from the pet store + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +data class User ( + var id: kotlin.Long? = null, + var username: kotlin.String? = null, + var firstName: kotlin.String? = null, + var lastName: kotlin.String? = null, + var email: kotlin.String? = null, + var password: kotlin.String? = null, + var phone: kotlin.String? = null, + /* User Status */ + var userStatus: kotlin.Int? = null +) { + +} + diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApi.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApi.kt new file mode 100644 index 000000000000..5968aa12cac2 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApi.kt @@ -0,0 +1,70 @@ +package org.openapitools.server.api.verticle + +import org.openapitools.server.api.model.ModelApiResponse +import org.openapitools.server.api.model.Pet +import io.vertx.core.Vertx +import io.vertx.core.json.JsonObject +import io.vertx.core.json.JsonArray +import com.github.wooyme.openapi.Response +import io.vertx.ext.web.api.OperationRequest +import io.vertx.kotlin.ext.web.api.contract.openapi3.OpenAPI3RouterFactory +import io.vertx.serviceproxy.ServiceBinder +import io.vertx.ext.web.handler.CookieHandler +import io.vertx.ext.web.handler.SessionHandler +import io.vertx.ext.web.sstore.LocalSessionStore +import java.util.List +import java.util.Map + + +interface PetApi { + fun init(vertx:Vertx,config:JsonObject) + /* addPet + * Add a new pet to the store */ + suspend fun addPet(body:Pet?,context:OperationRequest):Response + /* deletePet + * Deletes a pet */ + suspend fun deletePet(petId:kotlin.Long?,apiKey:kotlin.String?,context:OperationRequest):Response + /* findPetsByStatus + * Finds Pets by status */ + suspend fun findPetsByStatus(status:kotlin.Array?,context:OperationRequest):Response> + /* findPetsByTags + * Finds Pets by tags */ + suspend fun findPetsByTags(tags:kotlin.Array?,context:OperationRequest):Response> + /* getPetById + * Find pet by ID */ + suspend fun getPetById(petId:kotlin.Long?,context:OperationRequest):Response + /* updatePet + * Update an existing pet */ + suspend fun updatePet(body:Pet?,context:OperationRequest):Response + /* updatePetWithForm + * Updates a pet in the store with form data */ + suspend fun updatePetWithForm(petId:kotlin.Long?,name:kotlin.String?,status:kotlin.String?,context:OperationRequest):Response + /* uploadFile + * uploads an image */ + suspend fun uploadFile(petId:kotlin.Long?,additionalMetadata:kotlin.String?,file:kotlin.collections.List?,context:OperationRequest):Response + companion object { + const val address = "PetApi-service" + suspend fun createRouterFactory(vertx: Vertx,path:String): io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory { + val routerFactory = OpenAPI3RouterFactory.createAwait(vertx,path) + routerFactory.addGlobalHandler(CookieHandler.create()) + routerFactory.addGlobalHandler(SessionHandler.create(LocalSessionStore.create(vertx))) + routerFactory.setExtraOperationContextPayloadMapper{ + JsonObject().put("files",JsonArray(it.fileUploads().map { it.uploadedFileName() })) + } + val opf = routerFactory::class.java.getDeclaredField("operations") + opf.isAccessible = true + val operations = opf.get(routerFactory) as Map + for (m in PetApi::class.java.methods) { + val methodName = m.name + val op = operations[methodName] + if (op != null) { + val method = op::class.java.getDeclaredMethod("mountRouteToService",String::class.java,String::class.java) + method.isAccessible = true + method.invoke(op,address,methodName) + } + } + routerFactory.mountServiceInterface(PetApi::class.java, address) + return routerFactory + } + } +} diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApiVerticle.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApiVerticle.kt new file mode 100644 index 000000000000..ea5e7b5f4f1e --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApiVerticle.kt @@ -0,0 +1,19 @@ +package org.openapitools.server.api.verticle +import io.vertx.core.Vertx +import io.vertx.core.AbstractVerticle +import io.vertx.serviceproxy.ServiceBinder + +fun main(){ + Vertx.vertx().deployVerticle(PetApiVerticle()) +} + +class PetApiVerticle:AbstractVerticle() { + + override fun start() { + val instance = (javaClass.classLoader.loadClass("org.openapitools.server.api.verticle.PetApiImpl").newInstance() as PetApi) + instance.init(vertx,config()) + ServiceBinder(vertx) + .setAddress(PetApi.address) + .register(PetApi::class.java,instance) + } +} \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApiVertxProxyHandler.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApiVertxProxyHandler.kt new file mode 100644 index 000000000000..644fc1cee83a --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/PetApiVertxProxyHandler.kt @@ -0,0 +1,214 @@ +package org.openapitools.server.api.verticle + +import io.vertx.core.Vertx +import io.vertx.core.eventbus.Message +import io.vertx.core.json.JsonObject +import io.vertx.ext.web.api.OperationRequest +import io.vertx.ext.web.api.OperationResponse +import io.vertx.ext.web.api.generator.ApiHandlerUtils +import io.vertx.serviceproxy.ProxyHandler +import io.vertx.serviceproxy.ServiceException +import io.vertx.serviceproxy.ServiceExceptionMessageCodec +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.vertx.kotlin.coroutines.dispatcher +import io.vertx.core.json.Json +import io.vertx.core.json.JsonArray +import com.google.gson.reflect.TypeToken +import com.google.gson.Gson +import org.openapitools.server.api.model.ModelApiResponse +import org.openapitools.server.api.model.Pet + +class PetApiVertxProxyHandler(private val vertx: Vertx, private val service: PetApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { + private val timerID: Long + private var lastAccessed: Long = 0 + init { + try { + this.vertx.eventBus().registerDefaultCodec(ServiceException::class.java, + ServiceExceptionMessageCodec()) + } catch (ex: IllegalStateException) {} + + if (timeoutSeconds != (-1).toLong() && !topLevel) { + var period = timeoutSeconds * 1000 / 2 + if (period > 10000) { + period = 10000 + } + this.timerID = vertx.setPeriodic(period) { this.checkTimedOut(it) } + } else { + this.timerID = -1 + } + accessed() + } + private fun checkTimedOut(id: Long) { + val now = System.nanoTime() + if (now - lastAccessed > timeoutSeconds * 1000000000) { + close() + } + } + + override fun close() { + if (timerID != (-1).toLong()) { + vertx.cancelTimer(timerID) + } + super.close() + } + + private fun accessed() { + this.lastAccessed = System.nanoTime() + } + override fun handle(msg: Message) { + try { + val json = msg.body() + val action = msg.headers().get("action") ?: throw IllegalStateException("action not specified") + accessed() + val contextSerialized = json.getJsonObject("context") ?: throw IllegalStateException("Received action $action without OperationRequest \"context\"") + val context = OperationRequest(contextSerialized) + when (action) { + + "addPet" -> { + val params = context.params + val bodyParam = ApiHandlerUtils.searchJsonObjectInJson(params,"body") + if (bodyParam == null) { + throw IllegalArgumentException("body is required") + } + val body = Gson().fromJson(bodyParam.encode(), Pet::class.java) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.addPet(body,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "deletePet" -> { + val params = context.params + val petId = ApiHandlerUtils.searchLongInJson(params,"petId") + if(petId == null){ + throw IllegalArgumentException("petId is required") + } + val apiKey = ApiHandlerUtils.searchStringInJson(params,"api_key") + GlobalScope.launch(vertx.dispatcher()){ + val result = service.deletePet(petId,apiKey,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "findPetsByStatus" -> { + val params = context.params + val statusParam = ApiHandlerUtils.searchJsonArrayInJson(params,"status") + if(statusParam == null){ + throw IllegalArgumentException("status is required") + } + val status:kotlin.Array = Gson().fromJson(statusParam.encode() + , object : TypeToken>(){}.type) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.findPetsByStatus(status,context) + val payload = JsonArray(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "findPetsByTags" -> { + val params = context.params + val tagsParam = ApiHandlerUtils.searchJsonArrayInJson(params,"tags") + if(tagsParam == null){ + throw IllegalArgumentException("tags is required") + } + val tags:kotlin.Array = Gson().fromJson(tagsParam.encode() + , object : TypeToken>(){}.type) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.findPetsByTags(tags,context) + val payload = JsonArray(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "getPetById" -> { + val params = context.params + val petId = ApiHandlerUtils.searchLongInJson(params,"petId") + if(petId == null){ + throw IllegalArgumentException("petId is required") + } + GlobalScope.launch(vertx.dispatcher()){ + val result = service.getPetById(petId,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "updatePet" -> { + val params = context.params + val bodyParam = ApiHandlerUtils.searchJsonObjectInJson(params,"body") + if (bodyParam == null) { + throw IllegalArgumentException("body is required") + } + val body = Gson().fromJson(bodyParam.encode(), Pet::class.java) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.updatePet(body,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "updatePetWithForm" -> { + val params = context.params + val petId = ApiHandlerUtils.searchLongInJson(params,"petId") + if(petId == null){ + throw IllegalArgumentException("petId is required") + } + val name = ApiHandlerUtils.searchStringInJson(params,"name") + val status = ApiHandlerUtils.searchStringInJson(params,"status") + GlobalScope.launch(vertx.dispatcher()){ + val result = service.updatePetWithForm(petId,name,status,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "uploadFile" -> { + val params = context.params + val petId = ApiHandlerUtils.searchLongInJson(params,"petId") + if(petId == null){ + throw IllegalArgumentException("petId is required") + } + val additionalMetadata = ApiHandlerUtils.searchStringInJson(params,"additionalMetadata") + val fileParam = context.extra.getJsonArray("files") + val file = fileParam?.map{ java.io.File(it as String) } + GlobalScope.launch(vertx.dispatcher()){ + val result = service.uploadFile(petId,additionalMetadata,file,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + } + }catch (t: Throwable) { + msg.reply(ServiceException(500, t.message)) + throw t + } + } +} diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApi.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApi.kt new file mode 100644 index 000000000000..9861b736c140 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApi.kt @@ -0,0 +1,57 @@ +package org.openapitools.server.api.verticle + +import org.openapitools.server.api.model.Order +import io.vertx.core.Vertx +import io.vertx.core.json.JsonObject +import io.vertx.core.json.JsonArray +import com.github.wooyme.openapi.Response +import io.vertx.ext.web.api.OperationRequest +import io.vertx.kotlin.ext.web.api.contract.openapi3.OpenAPI3RouterFactory +import io.vertx.serviceproxy.ServiceBinder +import io.vertx.ext.web.handler.CookieHandler +import io.vertx.ext.web.handler.SessionHandler +import io.vertx.ext.web.sstore.LocalSessionStore +import java.util.List +import java.util.Map + + +interface StoreApi { + fun init(vertx:Vertx,config:JsonObject) + /* deleteOrder + * Delete purchase order by ID */ + suspend fun deleteOrder(orderId:kotlin.String?,context:OperationRequest):Response + /* getInventory + * Returns pet inventories by status */ + suspend fun getInventory(context:OperationRequest):Response> + /* getOrderById + * Find purchase order by ID */ + suspend fun getOrderById(orderId:kotlin.Long?,context:OperationRequest):Response + /* placeOrder + * Place an order for a pet */ + suspend fun placeOrder(body:Order?,context:OperationRequest):Response + companion object { + const val address = "StoreApi-service" + suspend fun createRouterFactory(vertx: Vertx,path:String): io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory { + val routerFactory = OpenAPI3RouterFactory.createAwait(vertx,path) + routerFactory.addGlobalHandler(CookieHandler.create()) + routerFactory.addGlobalHandler(SessionHandler.create(LocalSessionStore.create(vertx))) + routerFactory.setExtraOperationContextPayloadMapper{ + JsonObject().put("files",JsonArray(it.fileUploads().map { it.uploadedFileName() })) + } + val opf = routerFactory::class.java.getDeclaredField("operations") + opf.isAccessible = true + val operations = opf.get(routerFactory) as Map + for (m in StoreApi::class.java.methods) { + val methodName = m.name + val op = operations[methodName] + if (op != null) { + val method = op::class.java.getDeclaredMethod("mountRouteToService",String::class.java,String::class.java) + method.isAccessible = true + method.invoke(op,address,methodName) + } + } + routerFactory.mountServiceInterface(StoreApi::class.java, address) + return routerFactory + } + } +} diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVerticle.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVerticle.kt new file mode 100644 index 000000000000..dd885532237f --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVerticle.kt @@ -0,0 +1,19 @@ +package org.openapitools.server.api.verticle +import io.vertx.core.Vertx +import io.vertx.core.AbstractVerticle +import io.vertx.serviceproxy.ServiceBinder + +fun main(){ + Vertx.vertx().deployVerticle(StoreApiVerticle()) +} + +class StoreApiVerticle:AbstractVerticle() { + + override fun start() { + val instance = (javaClass.classLoader.loadClass("org.openapitools.server.api.verticle.StoreApiImpl").newInstance() as StoreApi) + instance.init(vertx,config()) + ServiceBinder(vertx) + .setAddress(StoreApi.address) + .register(StoreApi::class.java,instance) + } +} \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVertxProxyHandler.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVertxProxyHandler.kt new file mode 100644 index 000000000000..985b9249f56d --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/StoreApiVertxProxyHandler.kt @@ -0,0 +1,125 @@ +package org.openapitools.server.api.verticle + +import io.vertx.core.Vertx +import io.vertx.core.eventbus.Message +import io.vertx.core.json.JsonObject +import io.vertx.ext.web.api.OperationRequest +import io.vertx.ext.web.api.OperationResponse +import io.vertx.ext.web.api.generator.ApiHandlerUtils +import io.vertx.serviceproxy.ProxyHandler +import io.vertx.serviceproxy.ServiceException +import io.vertx.serviceproxy.ServiceExceptionMessageCodec +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.vertx.kotlin.coroutines.dispatcher +import io.vertx.core.json.Json +import io.vertx.core.json.JsonArray +import com.google.gson.reflect.TypeToken +import com.google.gson.Gson +import org.openapitools.server.api.model.Order + +class StoreApiVertxProxyHandler(private val vertx: Vertx, private val service: StoreApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { + private val timerID: Long + private var lastAccessed: Long = 0 + init { + try { + this.vertx.eventBus().registerDefaultCodec(ServiceException::class.java, + ServiceExceptionMessageCodec()) + } catch (ex: IllegalStateException) {} + + if (timeoutSeconds != (-1).toLong() && !topLevel) { + var period = timeoutSeconds * 1000 / 2 + if (period > 10000) { + period = 10000 + } + this.timerID = vertx.setPeriodic(period) { this.checkTimedOut(it) } + } else { + this.timerID = -1 + } + accessed() + } + private fun checkTimedOut(id: Long) { + val now = System.nanoTime() + if (now - lastAccessed > timeoutSeconds * 1000000000) { + close() + } + } + + override fun close() { + if (timerID != (-1).toLong()) { + vertx.cancelTimer(timerID) + } + super.close() + } + + private fun accessed() { + this.lastAccessed = System.nanoTime() + } + override fun handle(msg: Message) { + try { + val json = msg.body() + val action = msg.headers().get("action") ?: throw IllegalStateException("action not specified") + accessed() + val contextSerialized = json.getJsonObject("context") ?: throw IllegalStateException("Received action $action without OperationRequest \"context\"") + val context = OperationRequest(contextSerialized) + when (action) { + + "deleteOrder" -> { + val params = context.params + val orderId = ApiHandlerUtils.searchStringInJson(params,"orderId") + if(orderId == null){ + throw IllegalArgumentException("orderId is required") + } + GlobalScope.launch(vertx.dispatcher()){ + val result = service.deleteOrder(orderId,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "getInventory" -> { + } + + "getOrderById" -> { + val params = context.params + val orderId = ApiHandlerUtils.searchLongInJson(params,"orderId") + if(orderId == null){ + throw IllegalArgumentException("orderId is required") + } + GlobalScope.launch(vertx.dispatcher()){ + val result = service.getOrderById(orderId,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "placeOrder" -> { + val params = context.params + val bodyParam = ApiHandlerUtils.searchJsonObjectInJson(params,"body") + if (bodyParam == null) { + throw IllegalArgumentException("body is required") + } + val body = Gson().fromJson(bodyParam.encode(), Order::class.java) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.placeOrder(body,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + } + }catch (t: Throwable) { + msg.reply(ServiceException(500, t.message)) + throw t + } + } +} diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApi.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApi.kt new file mode 100644 index 000000000000..e48a7273b2a8 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApi.kt @@ -0,0 +1,69 @@ +package org.openapitools.server.api.verticle + +import org.openapitools.server.api.model.User +import io.vertx.core.Vertx +import io.vertx.core.json.JsonObject +import io.vertx.core.json.JsonArray +import com.github.wooyme.openapi.Response +import io.vertx.ext.web.api.OperationRequest +import io.vertx.kotlin.ext.web.api.contract.openapi3.OpenAPI3RouterFactory +import io.vertx.serviceproxy.ServiceBinder +import io.vertx.ext.web.handler.CookieHandler +import io.vertx.ext.web.handler.SessionHandler +import io.vertx.ext.web.sstore.LocalSessionStore +import java.util.List +import java.util.Map + + +interface UserApi { + fun init(vertx:Vertx,config:JsonObject) + /* createUser + * Create user */ + suspend fun createUser(body:User?,context:OperationRequest):Response + /* createUsersWithArrayInput + * Creates list of users with given input array */ + suspend fun createUsersWithArrayInput(body:kotlin.Array?,context:OperationRequest):Response + /* createUsersWithListInput + * Creates list of users with given input array */ + suspend fun createUsersWithListInput(body:kotlin.Array?,context:OperationRequest):Response + /* deleteUser + * Delete user */ + suspend fun deleteUser(username:kotlin.String?,context:OperationRequest):Response + /* getUserByName + * Get user by user name */ + suspend fun getUserByName(username:kotlin.String?,context:OperationRequest):Response + /* loginUser + * Logs user into the system */ + suspend fun loginUser(username:kotlin.String?,password:kotlin.String?,context:OperationRequest):Response + /* logoutUser + * Logs out current logged in user session */ + suspend fun logoutUser(context:OperationRequest):Response + /* updateUser + * Updated user */ + suspend fun updateUser(username:kotlin.String?,body:User?,context:OperationRequest):Response + companion object { + const val address = "UserApi-service" + suspend fun createRouterFactory(vertx: Vertx,path:String): io.vertx.ext.web.api.contract.openapi3.OpenAPI3RouterFactory { + val routerFactory = OpenAPI3RouterFactory.createAwait(vertx,path) + routerFactory.addGlobalHandler(CookieHandler.create()) + routerFactory.addGlobalHandler(SessionHandler.create(LocalSessionStore.create(vertx))) + routerFactory.setExtraOperationContextPayloadMapper{ + JsonObject().put("files",JsonArray(it.fileUploads().map { it.uploadedFileName() })) + } + val opf = routerFactory::class.java.getDeclaredField("operations") + opf.isAccessible = true + val operations = opf.get(routerFactory) as Map + for (m in UserApi::class.java.methods) { + val methodName = m.name + val op = operations[methodName] + if (op != null) { + val method = op::class.java.getDeclaredMethod("mountRouteToService",String::class.java,String::class.java) + method.isAccessible = true + method.invoke(op,address,methodName) + } + } + routerFactory.mountServiceInterface(UserApi::class.java, address) + return routerFactory + } + } +} diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApiVerticle.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApiVerticle.kt new file mode 100644 index 000000000000..2b121c28bb18 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApiVerticle.kt @@ -0,0 +1,19 @@ +package org.openapitools.server.api.verticle +import io.vertx.core.Vertx +import io.vertx.core.AbstractVerticle +import io.vertx.serviceproxy.ServiceBinder + +fun main(){ + Vertx.vertx().deployVerticle(UserApiVerticle()) +} + +class UserApiVerticle:AbstractVerticle() { + + override fun start() { + val instance = (javaClass.classLoader.loadClass("org.openapitools.server.api.verticle.UserApiImpl").newInstance() as UserApi) + instance.init(vertx,config()) + ServiceBinder(vertx) + .setAddress(UserApi.address) + .register(UserApi::class.java,instance) + } +} \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApiVertxProxyHandler.kt b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApiVertxProxyHandler.kt new file mode 100644 index 000000000000..beee4405bee1 --- /dev/null +++ b/samples/server/petstore/kotlin-vertx-modelMutable/src/main/kotlin/org/openapitools/server/api/verticle/UserApiVertxProxyHandler.kt @@ -0,0 +1,202 @@ +package org.openapitools.server.api.verticle + +import io.vertx.core.Vertx +import io.vertx.core.eventbus.Message +import io.vertx.core.json.JsonObject +import io.vertx.ext.web.api.OperationRequest +import io.vertx.ext.web.api.OperationResponse +import io.vertx.ext.web.api.generator.ApiHandlerUtils +import io.vertx.serviceproxy.ProxyHandler +import io.vertx.serviceproxy.ServiceException +import io.vertx.serviceproxy.ServiceExceptionMessageCodec +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import io.vertx.kotlin.coroutines.dispatcher +import io.vertx.core.json.Json +import io.vertx.core.json.JsonArray +import com.google.gson.reflect.TypeToken +import com.google.gson.Gson +import org.openapitools.server.api.model.User + +class UserApiVertxProxyHandler(private val vertx: Vertx, private val service: UserApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { + private val timerID: Long + private var lastAccessed: Long = 0 + init { + try { + this.vertx.eventBus().registerDefaultCodec(ServiceException::class.java, + ServiceExceptionMessageCodec()) + } catch (ex: IllegalStateException) {} + + if (timeoutSeconds != (-1).toLong() && !topLevel) { + var period = timeoutSeconds * 1000 / 2 + if (period > 10000) { + period = 10000 + } + this.timerID = vertx.setPeriodic(period) { this.checkTimedOut(it) } + } else { + this.timerID = -1 + } + accessed() + } + private fun checkTimedOut(id: Long) { + val now = System.nanoTime() + if (now - lastAccessed > timeoutSeconds * 1000000000) { + close() + } + } + + override fun close() { + if (timerID != (-1).toLong()) { + vertx.cancelTimer(timerID) + } + super.close() + } + + private fun accessed() { + this.lastAccessed = System.nanoTime() + } + override fun handle(msg: Message) { + try { + val json = msg.body() + val action = msg.headers().get("action") ?: throw IllegalStateException("action not specified") + accessed() + val contextSerialized = json.getJsonObject("context") ?: throw IllegalStateException("Received action $action without OperationRequest \"context\"") + val context = OperationRequest(contextSerialized) + when (action) { + + "createUser" -> { + val params = context.params + val bodyParam = ApiHandlerUtils.searchJsonObjectInJson(params,"body") + if (bodyParam == null) { + throw IllegalArgumentException("body is required") + } + val body = Gson().fromJson(bodyParam.encode(), User::class.java) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.createUser(body,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "createUsersWithArrayInput" -> { + val params = context.params + val bodyParam = ApiHandlerUtils.searchJsonArrayInJson(params,"body") + if(bodyParam == null){ + throw IllegalArgumentException("body is required") + } + val body:kotlin.Array = Gson().fromJson(bodyParam.encode() + , object : TypeToken>(){}.type) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.createUsersWithArrayInput(body,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "createUsersWithListInput" -> { + val params = context.params + val bodyParam = ApiHandlerUtils.searchJsonArrayInJson(params,"body") + if(bodyParam == null){ + throw IllegalArgumentException("body is required") + } + val body:kotlin.Array = Gson().fromJson(bodyParam.encode() + , object : TypeToken>(){}.type) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.createUsersWithListInput(body,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "deleteUser" -> { + val params = context.params + val username = ApiHandlerUtils.searchStringInJson(params,"username") + if(username == null){ + throw IllegalArgumentException("username is required") + } + GlobalScope.launch(vertx.dispatcher()){ + val result = service.deleteUser(username,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "getUserByName" -> { + val params = context.params + val username = ApiHandlerUtils.searchStringInJson(params,"username") + if(username == null){ + throw IllegalArgumentException("username is required") + } + GlobalScope.launch(vertx.dispatcher()){ + val result = service.getUserByName(username,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "loginUser" -> { + val params = context.params + val username = ApiHandlerUtils.searchStringInJson(params,"username") + if(username == null){ + throw IllegalArgumentException("username is required") + } + val password = ApiHandlerUtils.searchStringInJson(params,"password") + if(password == null){ + throw IllegalArgumentException("password is required") + } + GlobalScope.launch(vertx.dispatcher()){ + val result = service.loginUser(username,password,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + "logoutUser" -> { + } + + "updateUser" -> { + val params = context.params + val username = ApiHandlerUtils.searchStringInJson(params,"username") + if(username == null){ + throw IllegalArgumentException("username is required") + } + val bodyParam = ApiHandlerUtils.searchJsonObjectInJson(params,"body") + if (bodyParam == null) { + throw IllegalArgumentException("body is required") + } + val body = Gson().fromJson(bodyParam.encode(), User::class.java) + GlobalScope.launch(vertx.dispatcher()){ + val result = service.updateUser(username,body,context) + val payload = JsonObject(Json.encode(result.payload)).toBuffer() + val res = OperationResponse(result.statusCode,result.statusMessage,payload,result.headers) + msg.reply(res.toJson()) + }.invokeOnCompletion{ + it?.let{ throw it } + } + } + + } + }catch (t: Throwable) { + msg.reply(ServiceException(500, t.message)) + throw t + } + } +} From b261b29efba60819f6b4d6d2d377c04520bd5779 Mon Sep 17 00:00:00 2001 From: cachescrubber <5127753+cachescrubber@users.noreply.github.com> Date: Mon, 31 Jan 2022 04:14:34 +0100 Subject: [PATCH 170/175] [Java/Spring] Revert to fully qualified import for org.springframework.core.io.Resource (#11461) * Revert to fully qualified import for org.springframework.core.io.Resource * Generate Samples --- .../openapitools/codegen/languages/SpringCodegen.java | 4 ++-- .../codegen/java/spring/SpringCodegenTest.java | 4 ++-- .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../java/org/openapitools/api/FakeApiController.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiController.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../main/java/org/openapitools/api/FakeApiDelegate.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiDelegate.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../main/java/org/openapitools/api/FakeApiDelegate.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiDelegate.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../java/org/openapitools/api/FakeApiController.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiController.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../main/java/org/openapitools/api/FakeApiDelegate.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiDelegate.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../main/java/org/openapitools/api/FakeApiDelegate.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiDelegate.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../main/java/org/openapitools/api/FakeApiDelegate.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiDelegate.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../java/org/openapitools/api/FakeApiController.java | 1 - .../main/java/org/openapitools/api/FakeApiDelegate.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiController.java | 1 - .../main/java/org/openapitools/api/PetApiDelegate.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../main/java/org/openapitools/api/FakeApiDelegate.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiDelegate.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../java/org/openapitools/api/FakeApiController.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../main/java/org/openapitools/api/PetApiController.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- .../java/org/openapitools/virtualan/api/FakeApi.java | 1 - .../main/java/org/openapitools/virtualan/api/PetApi.java | 1 - .../org/openapitools/virtualan/model/FormatTest.java | 9 ++++----- .../src/main/java/org/openapitools/api/FakeApi.java | 1 - .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/model/FormatTest.java | 9 ++++----- 106 files changed, 100 insertions(+), 204 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index ec8853e4a969..412e6c9bbbfe 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -404,8 +404,8 @@ public void processOpts() { } additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException()); - typeMapping.put("file", "Resource"); - importMapping.put("Resource", "org.springframework.core.io.Resource"); + typeMapping.put("file", "org.springframework.core.io.Resource"); + importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource"); importMapping.put("Pageable", "org.springframework.data.domain.Pageable"); importMapping.put("DateTimeFormat", "org.springframework.format.annotation.DateTimeFormat"); importMapping.put("ApiIgnore", "springfox.documentation.annotations.ApiIgnore"); 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 456dea2f4001..7c086c50a60f 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 @@ -792,14 +792,14 @@ public void testConfigFileGeneration() { public void testTypeMappings() { final SpringCodegen codegen = new SpringCodegen(); codegen.processOpts(); - Assert.assertEquals(codegen.typeMapping().get("file"), "Resource"); + Assert.assertEquals(codegen.typeMapping().get("file"), "org.springframework.core.io.Resource"); } @Test public void testImportMappings() { final SpringCodegen codegen = new SpringCodegen(); codegen.processOpts(); - Assert.assertEquals(codegen.importMapping().get("Resource"), "org.springframework.core.io.Resource"); + Assert.assertEquals(codegen.importMapping().get("org.springframework.core.io.Resource"), "org.springframework.core.io.Resource"); Assert.assertEquals(codegen.importMapping().get("Pageable"), "org.springframework.data.domain.Pageable"); Assert.assertEquals(codegen.importMapping().get("DateTimeFormat"), "org.springframework.format.annotation.DateTimeFormat"); Assert.assertEquals(codegen.importMapping().get("ApiIgnore"), "springfox.documentation.annotations.ApiIgnore"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index d5f991221430..05f29fd34777 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 9967f902fbf0..988fa83dbdc7 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 5bb72a8db6d2..4fa012be898e 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index ea38051f7a9f..4b326d6d4900 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; 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 7e87d57e371f..a0345aa87189 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; 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 f6b8fb74feb1..723e662e99be 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 @@ -13,7 +13,6 @@ import java.util.Map; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; 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 b5d40e07435a..72312ea96f92 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java index 0c14e2c93c1b..6790fc82a0ba 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java @@ -9,7 +9,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -53,7 +52,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -234,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -245,11 +244,11 @@ public FormatTest binary(Resource binary) { */ @Valid @Schema(name = "binary", required = false) - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 1a58d97ea6ca..f5558f9fd117 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 @@ -9,7 +9,6 @@ import org.springframework.data.domain.Pageable; import org.springdoc.api.annotations.ParameterObject; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; 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 9f82a4385212..14599fd0eac4 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; 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 a8206198c4a8..75bca1aa3b94 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; 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 f27571c387be..8c14b51dbf81 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; 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 02ebe80dc983..b2f6f8a6e4d2 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 7081ba1a4304..b4f24ba29edf 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; 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 28441b7e8515..b9a9da62ae53 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 97a3ec705b7b..197fca8ae629 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,7 +2,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index a82f33264d64..708a8b392c57 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -7,7 +7,6 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; @@ -51,7 +50,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -232,7 +231,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -243,11 +242,11 @@ public FormatTest binary(Resource binary) { */ @Valid @Schema(name = "binary", required = false) - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 8f17228b6a26..4506c9592dd1 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; 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 3796fc00ce58..03f67c302ce9 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 @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; 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 ccc4a0d30157..a77caa14f045 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index 9c616c14aaa8..8ecf827b36ce 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,7 +2,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 0c14e2c93c1b..6790fc82a0ba 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -9,7 +9,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -53,7 +52,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -234,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -245,11 +244,11 @@ public FormatTest binary(Resource binary) { */ @Valid @Schema(name = "binary", required = false) - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 9bc3c924c700..d734154ae6c1 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; 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 b44b240e3c38..9784647575d3 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 0c14e2c93c1b..6790fc82a0ba 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -9,7 +9,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -53,7 +52,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -234,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -245,11 +244,11 @@ public FormatTest binary(Resource binary) { */ @Valid @Schema(name = "binary", required = false) - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 e0ac539a024c..cf5567df8fa5 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; 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 0193067433b9..8a91326998aa 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 @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; 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 09c88088125d..e53687474afd 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index b4c51ede9184..7d702440d739 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,7 +2,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 0c14e2c93c1b..6790fc82a0ba 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -9,7 +9,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -53,7 +52,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -234,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -245,11 +244,11 @@ public FormatTest binary(Resource binary) { */ @Valid @Schema(name = "binary", required = false) - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 f34a5b0d2b79..9dd992bfe39d 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; 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 5f049169a647..2d9139f575bf 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 0c14e2c93c1b..6790fc82a0ba 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -9,7 +9,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -53,7 +52,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -234,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -245,11 +244,11 @@ public FormatTest binary(Resource binary) { */ @Valid @Schema(name = "binary", required = false) - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 f27571c387be..8c14b51dbf81 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 @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 8b5f909ae5ce..8c1fb519b30a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 053fc844b0d1..8e1bc13822a4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index 8c4c84d27003..f9a5fa7b8b7d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -14,7 +14,6 @@ import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 90ce18382beb..b01403490d02 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java index 63af72a20e4c..5091a8fa01f3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index f63a9141189c..ee9b968c0ff1 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 90ce18382beb..b01403490d02 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index e37ca0109135..45f1d105c802 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -53,7 +52,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -234,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -245,11 +244,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 2bc50f00c65b..635d55b3812c 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 294576ae0454..16933925815c 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index f63a9141189c..ee9b968c0ff1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 90ce18382beb..b01403490d02 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java index 0964a16e87c9..d9b412be1a2a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -56,7 +55,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -237,7 +236,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -248,11 +247,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 b14b9f6fecad..dd66ee2cc569 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 4bac5c6a4d42..af7c65420e5e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index c32bead44069..31cb57385b77 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 8c66ba7d8b56..8b859e266f70 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,7 +2,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 063aed84e30d..5d6a57b69a1c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -9,7 +9,6 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; @@ -52,7 +51,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -233,7 +232,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -244,11 +243,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 f63a9141189c..ee9b968c0ff1 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 90ce18382beb..b01403490d02 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 960fdd4fbb22..88dc22636c8b 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; 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 3796fc00ce58..03f67c302ce9 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 @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 289e898a6831..75abe3ff422f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 9c616c14aaa8..8ecf827b36ce 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,7 +2,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 960fdd4fbb22..88dc22636c8b 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; 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 3796fc00ce58..03f67c302ce9 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 @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 289e898a6831..75abe3ff422f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index 9c616c14aaa8..8ecf827b36ce 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,7 +2,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 037a13dee307..8fb68265f627 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 19270de6e6e6..ef28d4cf910b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 61bd43b6a67f..efbce89bf305 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 @@ -15,7 +15,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; 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 f6d86d18abc0..9571f3da3eb7 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 @@ -10,7 +10,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 21c34a69aea3..81fdd3e842c8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -8,7 +8,6 @@ import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index abdf3efc6215..6a256a8fb48f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -3,7 +3,6 @@ import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 df8e22923773..3c0d3aa6623a 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index a9830bcc6483..72efadd118c2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; 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 717b8a75310b..a7da41b192be 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 @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 9cf42e2e281c..0b800e906bbb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 78913cd2534a..5e95ed20be2d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -4,7 +4,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 2537ce30da04..7047f8a6a5ac 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -4,7 +4,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java index d44579f78f94..a8afa8fc0946 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -9,7 +9,6 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; @@ -53,7 +52,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -234,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -245,11 +244,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 7dee6868f6e4..166af3a8ed25 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; 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 b8e9dd88d450..397c677c9949 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 @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 84d8d7bb47b2..2532e3d6823b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java index 2fa88df6b0cf..daf113aec6c5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -4,7 +4,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 df8e22923773..3c0d3aa6623a 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 848fe0e982f8..b20266d1f871 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 9cf42e2e281c..0b800e906bbb 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 8e3fd4cebffc..7c7fc3eb66a7 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -4,7 +4,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java index d44579f78f94..a8afa8fc0946 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -9,7 +9,6 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; @@ -53,7 +52,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -234,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -245,11 +244,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 2bc50f00c65b..635d55b3812c 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 294576ae0454..16933925815c 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -9,7 +9,6 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 b558d892cbb1..a15bc59fdcab 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 559dc219a4fe..81c7b3337c3a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 3c59680b33c8..ffc492b9aa8c 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 @@ -14,7 +14,6 @@ import org.openapitools.virtualan.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.virtualan.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.virtualan.model.User; import org.openapitools.virtualan.model.XmlItem; import io.swagger.annotations.*; 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 ed063f0a8b72..1851af5207d4 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 @@ -7,7 +7,6 @@ import org.openapitools.virtualan.model.ModelApiResponse; import org.openapitools.virtualan.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import io.virtualan.annotation.ApiVirtual; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index 7495eb4765bc..2baa6041b19d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } 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 f63a9141189c..ee9b968c0ff1 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 @@ -14,7 +14,6 @@ import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; -import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 90ce18382beb..b01403490d02 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java index 91d370eeb058..c38fd7cc1104 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java @@ -11,7 +11,6 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; -import org.springframework.core.io.Resource; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -54,7 +53,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private Resource binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @@ -235,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(Resource binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -246,11 +245,11 @@ public FormatTest binary(Resource binary) { */ @Valid @ApiModelProperty(value = "") - public Resource getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(Resource binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } From 4a36be70025e9c0d3ff61731618b7fc2d942c4b6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 31 Jan 2022 13:04:25 +0800 Subject: [PATCH 171/175] Prepare 5.4.0 release (#11457) * prepare 5.4.0 release * update gradle tests --- .github/workflows/openapi-generator.yaml | 1 + modules/openapi-generator-cli/pom.xml | 2 +- modules/openapi-generator-core/pom.xml | 2 +- modules/openapi-generator-gradle-plugin/gradle.properties | 2 +- modules/openapi-generator-gradle-plugin/pom.xml | 2 +- .../samples/local-spec/gradle.properties | 2 +- modules/openapi-generator-maven-plugin/examples/java-client.xml | 2 +- modules/openapi-generator-maven-plugin/examples/kotlin.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/non-java-invalid-spec.xml | 2 +- modules/openapi-generator-maven-plugin/examples/non-java.xml | 2 +- modules/openapi-generator-maven-plugin/examples/spring.xml | 2 +- modules/openapi-generator-maven-plugin/pom.xml | 2 +- modules/openapi-generator-online/pom.xml | 2 +- modules/openapi-generator/pom.xml | 2 +- pom.xml | 2 +- .../csharp-netcore-complex-files/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-streaming/.openapi-generator/VERSION | 2 +- samples/client/petstore/R/.openapi-generator/VERSION | 2 +- samples/client/petstore/apex/.openapi-generator/VERSION | 2 +- samples/client/petstore/bash/.openapi-generator/VERSION | 2 +- samples/client/petstore/c/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-qt/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restsdk/client/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-restsdk/client/ApiClient.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiClient.h | 2 +- samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h | 2 +- samples/client/petstore/cpp-restsdk/client/ApiException.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiException.h | 2 +- samples/client/petstore/cpp-restsdk/client/HttpContent.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/HttpContent.h | 2 +- samples/client/petstore/cpp-restsdk/client/IHttpBody.h | 2 +- samples/client/petstore/cpp-restsdk/client/JsonBody.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/JsonBody.h | 2 +- samples/client/petstore/cpp-restsdk/client/ModelBase.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ModelBase.h | 2 +- .../client/petstore/cpp-restsdk/client/MultipartFormData.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/MultipartFormData.h | 2 +- samples/client/petstore/cpp-restsdk/client/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/Object.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/PetApi.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/StoreApi.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/UserApi.h | 2 +- .../client/petstore/cpp-restsdk/client/model/ApiResponse.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Category.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Category.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Order.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Order.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Pet.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Pet.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Tag.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Tag.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/User.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/User.h | 2 +- samples/client/petstore/cpp-tiny/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-ue4/.openapi-generator/VERSION | 2 +- samples/client/petstore/crystal/.openapi-generator/VERSION | 2 +- samples/client/petstore/crystal/.travis.yml | 2 +- samples/client/petstore/crystal/spec/spec_helper.cr | 2 +- samples/client/petstore/crystal/src/petstore.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/pet_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/store_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/user_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api_client.cr | 2 +- samples/client/petstore/crystal/src/petstore/api_error.cr | 2 +- samples/client/petstore/crystal/src/petstore/configuration.cr | 2 +- .../client/petstore/crystal/src/petstore/models/api_response.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/category.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/order.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/pet.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/tag.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/user.cr | 2 +- .../.openapi-generator/VERSION | 2 +- .../OpenAPIClient-httpclient/.openapi-generator/VERSION | 2 +- .../OpenAPIClient-net47/.openapi-generator/VERSION | 2 +- .../OpenAPIClient-net5.0/.openapi-generator/VERSION | 2 +- .../csharp-netcore/OpenAPIClient/.openapi-generator/VERSION | 2 +- .../csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION | 2 +- .../OpenAPIClientCoreAndNet47/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/.openapi-generator/VERSION | 2 +- samples/client/petstore/elixir/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/groovy/.openapi-generator/VERSION | 2 +- .../petstore/haskell-http-client/.openapi-generator/VERSION | 2 +- .../petstore/java-micronaut-client/.openapi-generator/VERSION | 2 +- .../petstore/java/apache-httpclient/.openapi-generator/VERSION | 2 +- .../petstore/java/feign-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/feign/.openapi-generator/VERSION | 2 +- .../petstore/java/google-api-client/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/jersey1/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8-localdatetime/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../java/microprofile-rest-client/.openapi-generator/VERSION | 2 +- .../petstore/java/native-async/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/native/.openapi-generator/VERSION | 2 +- .../okhttp-gson-dynamicOperations/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-nextgen/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-parcelableModel/.openapi-generator/VERSION | 2 +- .../client/petstore/java/okhttp-gson/.openapi-generator/VERSION | 2 +- .../java/rest-assured-jackson/.openapi-generator/VERSION | 2 +- .../petstore/java/rest-assured/.openapi-generator/VERSION | 2 +- .../client/petstore/java/resteasy/.openapi-generator/VERSION | 2 +- .../java/resttemplate-withXml/.openapi-generator/VERSION | 2 +- .../petstore/java/resttemplate/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2-play26/.openapi-generator/VERSION | 2 +- .../client/petstore/java/retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx3/.openapi-generator/VERSION | 2 +- .../petstore/java/vertx-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/vertx/.openapi-generator/VERSION | 2 +- .../java/webclient-nulable-arrays/.openapi-generator/VERSION | 2 +- .../client/petstore/java/webclient/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise-es6/.openapi-generator/VERSION | 2 +- samples/client/petstore/k6/.openapi-generator/VERSION | 2 +- samples/client/petstore/k6/script.js | 2 +- .../kotlin-array-simple-string/.openapi-generator/VERSION | 2 +- .../kotlin-enum-default-value/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-gson/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-jackson/.openapi-generator/VERSION | 2 +- .../kotlin-json-request-string/.openapi-generator/VERSION | 2 +- .../kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-volley/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-modelMutable/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-multiplatform/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-uppercase-enum/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin/.openapi-generator/VERSION | 2 +- samples/client/petstore/lua/.openapi-generator/VERSION | 2 +- samples/client/petstore/nim/.openapi-generator/VERSION | 2 +- .../client/petstore/objc/core-data/.openapi-generator/VERSION | 2 +- samples/client/petstore/objc/default/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/.openapi-generator/VERSION | 2 +- .../client/petstore/php-dt-modern/.openapi-generator/VERSION | 2 +- samples/client/petstore/php-dt/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/ApiException.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Configuration.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- .../php/OpenAPIClient-php/lib/Model/DeprecatedObject.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php | 2 +- .../lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/powershell/.openapi-generator/VERSION | 2 +- .../client/petstore/python-asyncio/.openapi-generator/VERSION | 2 +- .../client/petstore/python-legacy/.openapi-generator/VERSION | 2 +- .../client/petstore/python-tornado/.openapi-generator/VERSION | 2 +- samples/client/petstore/python/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-faraday/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-faraday/lib/petstore.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/default_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb | 2 +- .../ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/store_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/configuration.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/animal.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/api_response.rb | 2 +- .../lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/array_test.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/category.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/class_model.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/client.rb | 2 +- .../ruby-faraday/lib/petstore/models/deprecated_object.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_test.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/file.rb | 2 +- .../ruby-faraday/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/format_test.rb | 2 +- .../ruby-faraday/lib/petstore/models/has_only_read_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/health_check_result.rb | 2 +- .../ruby-faraday/lib/petstore/models/inline_response_default.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/list.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../ruby-faraday/lib/petstore/models/model200_response.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/model_return.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/name.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/nullable_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/number_only.rb | 2 +- .../lib/petstore/models/object_with_deprecated_fields.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/order.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/outer_enum.rb | 2 +- .../lib/petstore/models/outer_enum_default_value.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- .../lib/petstore/models/outer_object_with_enum_property.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb | 2 +- .../ruby-faraday/lib/petstore/models/read_only_first.rb | 2 +- .../ruby-faraday/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby-faraday/petstore.gemspec | 2 +- samples/client/petstore/ruby-faraday/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/spec_helper.rb | 2 +- samples/client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/another_fake_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/default_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/store_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_error.rb | 2 +- samples/client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/animal.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/api_response.rb | 2 +- .../ruby/lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/array_of_number_only.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/category.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/class_model.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/client.rb | 2 +- .../petstore/ruby/lib/petstore/models/deprecated_object.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/file.rb | 2 +- .../petstore/ruby/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/foo.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/format_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/health_check_result.rb | 2 +- .../ruby/lib/petstore/models/inline_response_default.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/list.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/model200_response.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/model_return.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/name.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/nullable_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/number_only.rb | 2 +- .../ruby/lib/petstore/models/object_with_deprecated_fields.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/order.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb | 2 +- .../ruby/lib/petstore/models/outer_enum_default_value.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- .../ruby/lib/petstore/models/outer_object_with_enum_property.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/read_only_first.rb | 2 +- .../petstore/ruby/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- samples/client/petstore/ruby/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby/spec/spec_helper.rb | 2 +- .../petstore/rust/hyper/petstore/.openapi-generator/VERSION | 2 +- .../rust/reqwest/petstore-async/.openapi-generator/VERSION | 2 +- .../petstore/rust/reqwest/petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-akka/.openapi-generator/VERSION | 2 +- .../scala-httpclient-deprecated/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-sttp/.openapi-generator/VERSION | 2 +- .../petstore/spring-cloud-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-cloud-date-time/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/DefaultApi.java | 2 +- .../spring-cloud-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/client/petstore/spring-stubs/.openapi-generator/VERSION | 2 +- .../spring-stubs/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/swift5/alamofireLibrary/.openapi-generator/VERSION | 2 +- .../swift5/asyncAwaitLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/combineLibrary/.openapi-generator/VERSION | 2 +- .../client/petstore/swift5/default/.openapi-generator/VERSION | 2 +- .../petstore/swift5/deprecated/.openapi-generator/VERSION | 2 +- .../petstore/swift5/frozenEnums/.openapi-generator/VERSION | 2 +- .../petstore/swift5/nonPublicApi/.openapi-generator/VERSION | 2 +- .../petstore/swift5/objcCompatible/.openapi-generator/VERSION | 2 +- samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION | 2 +- .../swift5/promisekitLibrary/.openapi-generator/VERSION | 2 +- .../swift5/readonlyProperties/.openapi-generator/VERSION | 2 +- .../petstore/swift5/resultLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION | 2 +- .../swift5/urlsessionLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/vaporLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/x-swift-hashable/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/single-request-parameter/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/with-prefixed-module-name/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../typescript-aurelia/default/.openapi-generator/VERSION | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../typescript-axios/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/test-petstore/.openapi-generator/VERSION | 2 +- .../builds/with-complex-headers/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-node-imports/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../with-single-request-parameters/.openapi-generator/VERSION | 2 +- .../builds/with-string-enums/.openapi-generator/VERSION | 2 +- .../builds/default-v3.0/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/default/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/enum/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/multiple-parameters/.openapi-generator/VERSION | 2 +- .../prefix-parameter-interfaces/.openapi-generator/VERSION | 2 +- .../builds/sagas-and-records/.openapi-generator/VERSION | 2 +- .../builds/typescript-three-plus/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/without-runtime-checks/.openapi-generator/VERSION | 2 +- .../petstore/typescript-inversify/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-jquery/npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/npm/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../typescript-rxjs/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/with-progress-subscriber/.openapi-generator/VERSION | 2 +- .../config/petstore/protobuf-schema/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- samples/meta-codegen/usage/.openapi-generator/VERSION | 2 +- samples/openapi3/client/elm/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/go-experimental/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/python/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/ruby-client/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api/usage_api.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api_client.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api_error.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/configuration.rb | 2 +- .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/api_client_spec.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/configuration_spec.rb | 2 +- .../extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb | 2 +- .../x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec | 2 +- .../features/dynamic-servers/python/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/dynamic_servers.gemspec | 2 +- .../client/features/dynamic-servers/ruby/lib/dynamic_servers.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_client.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/configuration.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/version.rb | 2 +- .../features/dynamic-servers/ruby/spec/api_client_spec.rb | 2 +- .../features/dynamic-servers/ruby/spec/configuration_spec.rb | 2 +- .../client/features/dynamic-servers/ruby/spec/spec_helper.rb | 2 +- .../ruby-client/.openapi-generator/VERSION | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore.rb | 2 +- .../ruby-client/lib/petstore/api/usage_api.rb | 2 +- .../ruby-client/lib/petstore/api_client.rb | 2 +- .../ruby-client/lib/petstore/api_error.rb | 2 +- .../ruby-client/lib/petstore/configuration.rb | 2 +- .../ruby-client/lib/petstore/models/array_alias.rb | 2 +- .../ruby-client/lib/petstore/models/map_alias.rb | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore/version.rb | 2 +- .../generate-alias-as-model/ruby-client/petstore.gemspec | 2 +- .../generate-alias-as-model/ruby-client/spec/api_client_spec.rb | 2 +- .../ruby-client/spec/configuration_spec.rb | 2 +- .../generate-alias-as-model/ruby-client/spec/spec_helper.rb | 2 +- .../petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../dart-dio/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- .../jersey2-java8-special-characters/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../petstore/python-experimental/.openapi-generator/VERSION | 2 +- .../client/petstore/python-legacy/.openapi-generator/VERSION | 2 +- .../openapi3/client/petstore/python/.openapi-generator/VERSION | 2 +- .../petstore/spring-cloud-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-cloud-date-time/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/DefaultApi.java | 2 +- .../spring-cloud-oas3-fakeapi/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTags123Api.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../client/petstore/spring-stubs/.openapi-generator/VERSION | 2 +- .../spring-stubs/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../typescript/builds/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript/builds/deno/.openapi-generator/VERSION | 2 +- .../typescript/builds/inversify/.openapi-generator/VERSION | 2 +- .../typescript/builds/jquery/.openapi-generator/VERSION | 2 +- .../typescript/builds/object_params/.openapi-generator/VERSION | 2 +- .../schema/petstore/avro-schema/.openapi-generator/VERSION | 2 +- .../petstore/spring-boot-springdoc/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-reactive/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-useoptional/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../springboot/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/ktorm-modelMutable/.openapi-generator/VERSION | 2 +- samples/schema/petstore/ktorm/.openapi-generator/VERSION | 2 +- samples/schema/petstore/mysql/.openapi-generator/VERSION | 2 +- samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.0/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.1/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-5.0/.openapi-generator/VERSION | 2 +- samples/server/petstore/aspnetcore/.openapi-generator/VERSION | 2 +- samples/server/petstore/cpp-pistache/.openapi-generator/VERSION | 2 +- .../cpp-qt-qhttpengine-server/.openapi-generator/VERSION | 2 +- .../server/petstore/erlang-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-api-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-chi-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-echo-server/.openapi-generator/VERSION | 2 +- .../petstore/go-gin-api-server/.openapi-generator/VERSION | 2 +- .../petstore/go-server-required/.openapi-generator/VERSION | 2 +- .../server/petstore/haskell-servant/.openapi-generator/VERSION | 2 +- .../server/petstore/haskell-yesod/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-camel/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-camel/pom.xml | 2 +- .../src/main/java/org/openapitools/RestConfiguration.java | 2 +- .../main/java/org/openapitools/ValidationErrorProcessor.java | 2 +- .../java-camel/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApiRoutesImpl.java | 2 +- .../src/main/java/org/openapitools/api/PetApiValidator.java | 2 +- .../java-camel/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApiRoutesImpl.java | 2 +- .../src/main/java/org/openapitools/api/StoreApiValidator.java | 2 +- .../java-camel/src/main/java/org/openapitools/api/UserApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApiRoutesImpl.java | 2 +- .../src/main/java/org/openapitools/api/UserApiValidator.java | 2 +- .../java-camel/src/main/resources/application.properties | 2 +- .../petstore/java-micronaut-server/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-msf4j/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-async/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-no-interface/.openapi-generator/VERSION | 2 +- .../java-play-framework-no-nullable/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/java-play-framework/.openapi-generator/VERSION | 2 +- .../server/petstore/java-undertow/.openapi-generator/VERSION | 2 +- .../server/petstore/java-vertx-web/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-non-spring-app/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/default-value/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/default/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap-java8/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-spec-interface/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey1/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey2/.openapi-generator/VERSION | 2 +- .../kotlin-server-modelMutable/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server-modelMutable/README.md | 2 +- .../kotlin-server/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server/ktor/README.md | 2 +- .../kotlin-springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/kotlin/org/openapitools/api/PetApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/UserApi.kt | 2 +- .../kotlin-springboot-modelMutable/.openapi-generator/VERSION | 2 +- .../kotlin-springboot-reactive/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 2 +- .../kotlin-vertx-modelMutable/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-laravel/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-lumen/.openapi-generator/VERSION | 2 +- .../petstore/php-mezzio-ph-modern/.openapi-generator/VERSION | 2 +- .../server/petstore/php-mezzio-ph/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-slim4/.openapi-generator/VERSION | 2 +- .../php-symfony/SymfonyBundle-php/.openapi-generator/VERSION | 2 +- .../python-aiohttp-srclayout/.openapi-generator/VERSION | 2 +- .../server/petstore/python-aiohttp/.openapi-generator/VERSION | 2 +- .../petstore/python-blueplanet/.openapi-generator/VERSION | 2 +- .../server/petstore/python-fastapi/.openapi-generator/VERSION | 2 +- samples/server/petstore/python-flask/.openapi-generator/VERSION | 2 +- .../rust-server/output/multipart-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/no-example-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/openapi-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/ops-v3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../output/ping-bearer-auth/.openapi-generator/VERSION | 2 +- .../output/rust-server-test/.openapi-generator/VERSION | 2 +- .../spring-mvc-default-value/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/TestHeadersApi.java | 2 +- .../src/main/java/org/openapitools/api/TestQueryParamsApi.java | 2 +- .../petstore/spring-mvc-j8-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-j8-localdatetime/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-mvc-no-nullable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/server/petstore/spring-mvc/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-beanvalidation/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate-j8/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-reactive/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-useoptional/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-virtualan/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/virtualan/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/FakeApi.java | 2 +- .../org/openapitools/virtualan/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/UserApi.java | 2 +- samples/server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/UserApi.java | 2 +- 795 files changed, 795 insertions(+), 794 deletions(-) diff --git a/.github/workflows/openapi-generator.yaml b/.github/workflows/openapi-generator.yaml index b7d6f0fedb9b..56958aa515b1 100644 --- a/.github/workflows/openapi-generator.yaml +++ b/.github/workflows/openapi-generator.yaml @@ -216,5 +216,6 @@ jobs: ${{ runner.os }}-test-gradle-plugin- - name: Run tests run: | + mvn --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate) diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index 88111767922f..9fbea46fac56 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.4.0-SNAPSHOT + 5.4.0 ../.. diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index bfd0c5908319..475a367e5630 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -6,7 +6,7 @@ openapi-generator-project org.openapitools - 5.4.0-SNAPSHOT + 5.4.0 ../.. diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 73b87d76810a..ecebe5a44cd5 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,5 +1,5 @@ # RELEASE_VERSION -openApiGeneratorVersion=5.4.0-SNAPSHOT +openApiGeneratorVersion=5.4.0 # /RELEASE_VERSION # BEGIN placeholders diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index fdc1d34c6c2c..1a06b8ea4079 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.4.0-SNAPSHOT + 5.4.0 ../.. diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index 08301dcb0b06..57f49db2d3b5 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1,3 +1,3 @@ # RELEASE_VERSION -openApiGeneratorVersion=5.3.1 +openApiGeneratorVersion=5.4.0 # /RELEASE_VERSION diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index aceecdeaecbc..4aff956dba9c 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.4.0-SNAPSHOT + 5.4.0 diff --git a/modules/openapi-generator-maven-plugin/examples/kotlin.xml b/modules/openapi-generator-maven-plugin/examples/kotlin.xml index c7681971d90d..c057233bd1ed 100644 --- a/modules/openapi-generator-maven-plugin/examples/kotlin.xml +++ b/modules/openapi-generator-maven-plugin/examples/kotlin.xml @@ -15,7 +15,7 @@ org.openapitools openapi-generator-maven-plugin - 5.4.0-SNAPSHOT + 5.4.0 diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index d0edba77ea50..e1f49c694575 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -19,7 +19,7 @@ org.openapitools openapi-generator-maven-plugin - 5.4.0-SNAPSHOT + 5.4.0 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 72559b55c7ab..7f1c7656455b 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.4.0-SNAPSHOT + 5.4.0 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 842e549e797e..6a89de73dd8c 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.4.0-SNAPSHOT + 5.4.0 diff --git a/modules/openapi-generator-maven-plugin/examples/spring.xml b/modules/openapi-generator-maven-plugin/examples/spring.xml index e5ea3463f94b..d4338d0d9467 100644 --- a/modules/openapi-generator-maven-plugin/examples/spring.xml +++ b/modules/openapi-generator-maven-plugin/examples/spring.xml @@ -20,7 +20,7 @@ org.openapitools openapi-generator-maven-plugin - 5.4.0-SNAPSHOT + 5.4.0 diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 2589de28155a..8383f001d2e5 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.openapitools openapi-generator-project - 5.4.0-SNAPSHOT + 5.4.0 ../.. diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index be81d01ee265..12ca1e1dbd44 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.4.0-SNAPSHOT + 5.4.0 ../.. diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index e7fd2c138e98..0a6c94cda8eb 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.4.0-SNAPSHOT + 5.4.0 ../.. diff --git a/pom.xml b/pom.xml index 9618190ac097..7e8045b7ad6a 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ pom openapi-generator-project - 5.4.0-SNAPSHOT + 5.4.0 https://github.com/openapitools/openapi-generator diff --git a/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION b/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION +++ b/samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION b/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION +++ b/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/c/.openapi-generator/VERSION b/samples/client/petstore/c/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/c/.openapi-generator/VERSION +++ b/samples/client/petstore/c/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/cpp-qt/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp index b5c500a0fa14..cee02ee89468 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h index 7a13f219f4eb..985d1fa64189 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp index 67e66b708cdf..5679a7bec9d3 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h index 046dfd9ea533..72f2b3bd4441 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp index 8f981150270a..a272404f2207 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h index 5d1d82b9a8ed..bd5409a3ca94 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp index be68ba1c7fad..ea2445ff6813 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h index d8bd333dad15..54b4b6b73f5b 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h index 7661536b930b..9a070396bca5 100644 --- a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp index 85dbe17686e7..dc5a30373570 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h index 99344661cb8c..11d32955e8d2 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp index 752b93f70596..51280400ad3c 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h index c300ecb5af79..ba2c617e79c2 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp index 075f7867be7b..7b21d446ef12 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h index a7e8a87f5ad5..fa1c9d6b5b4b 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp index 2c2f65d4ed85..b8dc3d942c15 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h index ba2a3bdb8c75..c523d9da6d19 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.h +++ b/samples/client/petstore/cpp-restsdk/client/Object.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp index 5bf94b7ce257..fb8a63ee1f06 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h index 7881387800fe..966d88cc4a10 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp index e415ebeffc53..7d8db9639cbf 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h index 10bf58494212..fe4c3ad19936 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp index a291d4f0c4a2..03ecec009cfc 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h index 942da254f2a4..fb7c8abeea1c 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp index 4157079156d6..17ea515042bf 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h index fcb15887683e..2df11c199d0c 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp index 2fcec2bcaab4..67ee55dc152d 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h index 777e5baf3b6a..4ab645799ef9 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp index f8618ce03551..0955a63ddacf 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h index 893c367dc6cf..cadd70d7f458 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp index 12c9dfa8b8ff..5a9b43860d9a 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h index e6ade6784258..51c315d98e33 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp index 14bce27318e4..f3288fcf79e8 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h index 2a7a3d005cc8..8030f4d07883 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp index 38aebe66ad09..08d608103ef5 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h index 3e44d4750ce5..e5faa66dd535 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.h +++ b/samples/client/petstore/cpp-restsdk/client/model/User.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION b/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/crystal/.openapi-generator/VERSION b/samples/client/petstore/crystal/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/crystal/.openapi-generator/VERSION +++ b/samples/client/petstore/crystal/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/crystal/.travis.yml b/samples/client/petstore/crystal/.travis.yml index 59de24cd459b..582ef54af965 100644 --- a/samples/client/petstore/crystal/.travis.yml +++ b/samples/client/petstore/crystal/.travis.yml @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # language: crystal diff --git a/samples/client/petstore/crystal/spec/spec_helper.cr b/samples/client/petstore/crystal/spec/spec_helper.cr index 7349161df1e2..1bf18165daf1 100644 --- a/samples/client/petstore/crystal/spec/spec_helper.cr +++ b/samples/client/petstore/crystal/spec/spec_helper.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # # load modules diff --git a/samples/client/petstore/crystal/src/petstore.cr b/samples/client/petstore/crystal/src/petstore.cr index bfa9806eea98..cd15f42208f9 100644 --- a/samples/client/petstore/crystal/src/petstore.cr +++ b/samples/client/petstore/crystal/src/petstore.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # # Dependencies diff --git a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr index e4c825e67953..9a1a77c22f98 100644 --- a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "uri" 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 c653a8714a38..123d1f4d97da 100644 --- a/samples/client/petstore/crystal/src/petstore/api/store_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/store_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api/user_api.cr b/samples/client/petstore/crystal/src/petstore/api/user_api.cr index e40ed1611723..4de640c00e9d 100644 --- a/samples/client/petstore/crystal/src/petstore/api/user_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/user_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api_client.cr b/samples/client/petstore/crystal/src/petstore/api_client.cr index 5a15ff6f6f3b..695e64c12329 100644 --- a/samples/client/petstore/crystal/src/petstore/api_client.cr +++ b/samples/client/petstore/crystal/src/petstore/api_client.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/api_error.cr b/samples/client/petstore/crystal/src/petstore/api_error.cr index c99be8e41f81..6c9529dadd13 100644 --- a/samples/client/petstore/crystal/src/petstore/api_error.cr +++ b/samples/client/petstore/crystal/src/petstore/api_error.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # module Petstore diff --git a/samples/client/petstore/crystal/src/petstore/configuration.cr b/samples/client/petstore/crystal/src/petstore/configuration.cr index cc46c380f1fa..7acefb403b78 100644 --- a/samples/client/petstore/crystal/src/petstore/configuration.cr +++ b/samples/client/petstore/crystal/src/petstore/configuration.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "log" diff --git a/samples/client/petstore/crystal/src/petstore/models/api_response.cr b/samples/client/petstore/crystal/src/petstore/models/api_response.cr index 7a0719b6615f..96185da98565 100644 --- a/samples/client/petstore/crystal/src/petstore/models/api_response.cr +++ b/samples/client/petstore/crystal/src/petstore/models/api_response.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/category.cr b/samples/client/petstore/crystal/src/petstore/models/category.cr index 65dd3f8cdd07..3f45604d9130 100644 --- a/samples/client/petstore/crystal/src/petstore/models/category.cr +++ b/samples/client/petstore/crystal/src/petstore/models/category.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/order.cr b/samples/client/petstore/crystal/src/petstore/models/order.cr index 0536a0c3de66..5ada810b30ed 100644 --- a/samples/client/petstore/crystal/src/petstore/models/order.cr +++ b/samples/client/petstore/crystal/src/petstore/models/order.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/pet.cr b/samples/client/petstore/crystal/src/petstore/models/pet.cr index 8edf5789c9a5..2778863c817f 100644 --- a/samples/client/petstore/crystal/src/petstore/models/pet.cr +++ b/samples/client/petstore/crystal/src/petstore/models/pet.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/tag.cr b/samples/client/petstore/crystal/src/petstore/models/tag.cr index cd5e7ed2989f..03c488a94fd1 100644 --- a/samples/client/petstore/crystal/src/petstore/models/tag.cr +++ b/samples/client/petstore/crystal/src/petstore/models/tag.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/models/user.cr b/samples/client/petstore/crystal/src/petstore/models/user.cr index a80b2574d2cf..5c42e843f89e 100644 --- a/samples/client/petstore/crystal/src/petstore/models/user.cr +++ b/samples/client/petstore/crystal/src/petstore/models/user.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.4.0-SNAPSHOT +#OpenAPI Generator version: 5.4.0 # require "json" diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION b/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION b/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/native-async/.openapi-generator/VERSION b/samples/client/petstore/java/native-async/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/native-async/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/native/.openapi-generator/VERSION b/samples/client/petstore/java/native/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-nextgen/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION b/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/java/webclient/.openapi-generator/VERSION b/samples/client/petstore/java/webclient/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/k6/.openapi-generator/VERSION b/samples/client/petstore/k6/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/k6/.openapi-generator/VERSION +++ b/samples/client/petstore/k6/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/k6/script.js b/samples/client/petstore/k6/script.js index 67f187fa9b14..ead277277233 100644 --- a/samples/client/petstore/k6/script.js +++ b/samples/client/petstore/k6/script.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator. * https://github.com/OpenAPITools/openapi-generator * - * OpenAPI generator version: 5.4.0-SNAPSHOT + * OpenAPI generator version: 5.4.0 */ diff --git a/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/nim/.openapi-generator/VERSION b/samples/client/petstore/nim/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/nim/.openapi-generator/VERSION +++ b/samples/client/petstore/nim/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION b/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION +++ b/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/php-dt/.openapi-generator/VERSION b/samples/client/petstore/php-dt/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/php-dt/.openapi-generator/VERSION +++ b/samples/client/petstore/php-dt/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index b069070fd138..96bd0494a6a8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index def9fc158005..fc09895c87b5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 6feaff883342..e92da084c5aa 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index cf271105c8bb..f1bd981ea064 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 399cec4b7744..ab1a968345ab 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 7fb733e79536..c7451c263935 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index d54e6cfaef49..a5ec54a894ff 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index 01f8b03d59a8..3cd26910d13f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index cd182e99fcb1..c26c3eb5ce58 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index c44fe4784d23..e8fe8240c317 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 813a7583db51..be76eda74124 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 3f8820c97896..6ca1a5e157c1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 b64c2a8772a6..7e018be512f3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 af16be5b4a09..5cc5dec1a19a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 c932439bb400..c4c4f124d29b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 341366e541c0..44001a74517a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 b1a0bd652c69..6e053b1cd42d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 75bc5fe9da99..8e929f8d3f23 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 ef088f7fd99b..516106e41448 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 f61f944a48d1..e891c397d1cf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 26293327c28c..e25745654c78 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 fabf7edb56cc..0323bd21161a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 3d2727154a25..83566159c306 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 9f2f6b76f101..3da4bf5b3539 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 8dc34950ced9..c9305c1b161f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 20bdbe900e06..908da0cc7f35 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 61c123dfe406..d6f4515dfb98 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 61663693efa3..65493a08812a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 2fbc4e79331b..fa6b6185146a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 7f6d4895ae5f..f4e1449eaa5a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 5f3dd7183232..c65be036029b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 65a211e15813..589f2de430d3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 3aaae75260f3..b558dcc31019 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 71f11616f9ec..c6d3670b69fa 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index 1b70b356259c..293aec7dab8d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 7359bf0da86c..ee10158c3be3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 546996e9c752..4e901842f983 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 e6db4af8c7d2..a5ecc6e0e45d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index 26d5c4988fdc..d4934e01fa2f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 13195d272566..eeeb6f45d9e2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 4fb179c4de98..07271dc6f19a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 d576c3d69fc8..737d2a286e5d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 1cc4acb16168..fc82cff73876 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 82f4e7c5c733..c58e73fdc098 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 aaff2f3c3c6a..c78c0e8eada7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 36e32464b249..6687ffc2e0fc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 73660c6e4634..1c92ac176d6f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 1b5bdf7693c4..de0ea97bdb53 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php index 8bcebde39893..281c1f3d088e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php index 7575c418afb2..64a567d7b563 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php index 65234ea6e1db..fc7606e3e306 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 d370aadf39b9..30a585d9d145 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 e22f00ae162c..158d98103564 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 cedd0e73d971..f3dd9166b5c7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 d77bea39df27..ec5a72c3ea64 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 d4284492ed9d..5e9a069c4c4e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** 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 262613842907..320e774794bd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 093c15794ed4..1550a27a5f9b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0-SNAPSHOT + * OpenAPI Generator version: 5.4.0 */ /** diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/client/petstore/python-legacy/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index d9d54916247a..04a265e554b0 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb index 9535fd15de5a..b64f7b4f2e14 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb index 84d666312ebc..d2c2f3babf81 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index d7acddef01e2..d8dacbcb9540 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb index 9eb20c278b93..1fbe17e48ffe 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb index fd4d73299e13..246f6ab6f06c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end 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 9ebd82ddc89f..93068a7f2188 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb index 9f6cd55be746..cbf2f5ffa711 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end 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 f14d04a5b741..8311b7de5bd8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =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 ebf166152c76..a1bbc7690f15 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index 09143381bc03..81dc3ab36ef7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index 6137b4905f42..01b74e7eb9bb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index c1d80a23d3ff..4f55ef5cfaf8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb index 0b9e281f3313..87d8762d47ea 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb index 0987e392a59c..c7c0df39ec33 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb index 6e40954d60cf..d09dd667286f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index eba93689e7bd..d8683cf32b4c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb index a04322c900d3..535bdaebdf51 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb index 7107968d387d..1ca525bafbee 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb index 7a2a2ad5f777..7451aa019b52 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb index cf5d1e36c33a..51ad6dc814a1 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb index 546e54a41fa7..36437ed306db 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb index 792ea88c609f..8280ae9a4777 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb index 7304906159f1..0260ac362e0e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb index 7db02e1cab4f..03364e5e5080 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb index 1fb42b5a03d6..c294bfbb3425 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb index 0ffa7fb0f80b..3a248adeb859 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb index 2afb2753c4f2..aaab179c94fd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb index bd1304ccf378..df1543ee80ba 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb index 2d0680fa72ce..769b662370ca 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb index 1a2146a9c692..a9f56d9a8809 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb index 3ab566051390..a972f24d9fbb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index 6a658e35bf0a..ad841ff6c7f7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb index 54d25a6f5b7c..a8f22dbd8e3b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb index cd53646b938c..5b687eb24054 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb index ccd578a95210..a56d73e54d1d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb index f2c5ec1619d8..d7d6b515ea73 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb index ffa79e40fea2..2f8e7a61ec15 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 543cc1ce5bd4..f5047bb55dbd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb index 83b38460ee64..3529604e1bce 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb index 4ad971483d43..a23e55337717 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb index c313f795169a..ac49dd2d3efa 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb index b8a5a96fad67..d21c1ede052f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb index dba180351b68..24e23b127ff3 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb index da6017f8e464..80466099452e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb index e305739da95a..6a03a2f9738a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb index 059f08912424..2759ae6db1d9 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb index d3ae94e1d5cf..a34604942f66 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb index 003c7217c31b..b042108ab26b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb index d4a4fed26d5e..9b8606bbb442 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb index d6079135cfdd..e4a8fda201ea 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end 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 6f4aec9f4a60..841346d8b8d6 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index e73b65c3c517..768910a4703c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb index 4197a2ec616b..30db5f792535 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb index 001d3b3a0b1d..98fec175cfca 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb index cba58e1df627..c27c9de7bb0f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb index 167953675a36..c9fc5d23682c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb index fe6cd38e7ccf..b03a434f06af 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index eb8fa27ef089..b7f68960acc2 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb index d47987c12a6b..556f4679a860 100644 --- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb index f7eceea4ec30..ad56e25a247f 100644 --- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb index d90940c63b52..2832f40d5d49 100644 --- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index d9d54916247a..04a265e554b0 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 9535fd15de5a..b64f7b4f2e14 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb index 84d666312ebc..d2c2f3babf81 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index d7acddef01e2..d8dacbcb9540 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 9eb20c278b93..1fbe17e48ffe 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 0014c5b78a0d..83004e17f9f7 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index becfae6e1b7c..5d865937effb 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 5a550ce47ee3..9bd77db1fdd7 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 7cf4a5d85ebb..181fc952976f 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index ebf166152c76..a1bbc7690f15 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 6c934e35bff3..18283876b8a6 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index 6137b4905f42..01b74e7eb9bb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index c1d80a23d3ff..4f55ef5cfaf8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 0b9e281f3313..87d8762d47ea 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 0987e392a59c..c7c0df39ec33 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 6e40954d60cf..d09dd667286f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index eba93689e7bd..d8683cf32b4c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index a04322c900d3..535bdaebdf51 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 7107968d387d..1ca525bafbee 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index 7a2a2ad5f777..7451aa019b52 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index cf5d1e36c33a..51ad6dc814a1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index 546e54a41fa7..36437ed306db 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index 792ea88c609f..8280ae9a4777 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb index 7304906159f1..0260ac362e0e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 7db02e1cab4f..03364e5e5080 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index 1fb42b5a03d6..c294bfbb3425 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index 0ffa7fb0f80b..3a248adeb859 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 2afb2753c4f2..aaab179c94fd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index bd1304ccf378..df1543ee80ba 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index 2d0680fa72ce..769b662370ca 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index 1a2146a9c692..a9f56d9a8809 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb index 3ab566051390..a972f24d9fbb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index 6a658e35bf0a..ad841ff6c7f7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 54d25a6f5b7c..a8f22dbd8e3b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb index cd53646b938c..5b687eb24054 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb index ccd578a95210..a56d73e54d1d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index f2c5ec1619d8..d7d6b515ea73 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index ffa79e40fea2..2f8e7a61ec15 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 543cc1ce5bd4..f5047bb55dbd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index 83b38460ee64..3529604e1bce 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 4ad971483d43..a23e55337717 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index c313f795169a..ac49dd2d3efa 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb index b8a5a96fad67..d21c1ede052f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index dba180351b68..24e23b127ff3 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb index da6017f8e464..80466099452e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index e305739da95a..6a03a2f9738a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index 059f08912424..2759ae6db1d9 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index d3ae94e1d5cf..a34604942f66 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb index 003c7217c31b..b042108ab26b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb index d4a4fed26d5e..9b8606bbb442 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb index d6079135cfdd..e4a8fda201ea 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end 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 6f4aec9f4a60..841346d8b8d6 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index e73b65c3c517..768910a4703c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index 4197a2ec616b..30db5f792535 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index 001d3b3a0b1d..98fec175cfca 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index cba58e1df627..c27c9de7bb0f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 167953675a36..c9fc5d23682c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index fe6cd38e7ccf..b03a434f06af 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 869a27cff67a..5da904802251 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index 48ef4c890a00..08833b4d0f8e 100644 --- a/samples/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index f7eceea4ec30..ad56e25a247f 100644 --- a/samples/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index d90940c63b52..2832f40d5d49 100644 --- a/samples/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/client/petstore/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION b/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-httpclient-deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 05f29fd34777..27bafadc3353 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 8967afe8802d..2d491eca419e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 746cc2472d69..c6c2c36a5d07 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 7e8e91235940..bb42b3ec1e28 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 988fa83dbdc7..1755e6df4a51 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 94e33923fb3d..a65c73ca39ea 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 5dd5dabb68d0..70662bf19908 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 4fa012be898e..9d71cba9918d 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 cc5a4ab5f125..aafe0e1117fd 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index cf4bf1833965..11331a09730f 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 4b326d6d4900..2d2dbf616859 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 49e3a394772d..5610f0d00570 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 1eaf80c61555..81d05afa13bf 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION b/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION +++ b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index b078605c904e..89f2c4bec3a5 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,7 @@ UTF-8 - 5.4.0-SNAPSHOT + 5.4.0 1.0.0 4.13.2 diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/elm/.openapi-generator/VERSION b/samples/openapi3/client/elm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/elm/.openapi-generator/VERSION +++ b/samples/openapi3/client/elm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb index 2b3dbe10fe7d..6031bc71e1d3 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb index 3ca038ad1133..ce8c0333d166 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb index abc3d3c2674f..8c30a9e346a6 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =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 7b029fc31b73..7cb5adf4a7d8 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb index 03a6b4505c3b..00c4b481e79b 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb index 0af9e59105aa..58e635a87bc3 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb index 24fc7dbeb5fe..2d1379cbd137 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb index 9ed65352f5b1..4e7afa028c8d 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb index cd0ab1c5441d..989d2726dba7 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end 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 7405c95a614b..da4955b049f0 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 @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 386e9241fe10..29d527ac348c 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec +++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb index 6e40dcf063f8..3e592b7a5fa3 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb index daba92a4fa57..4fb4a27003e5 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb index 60e56673b997..eee542b2e6a0 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =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 17ff6f501b18..65d8be5dbc79 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb index 533f65efb56a..cf447f6eb72c 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb index fdae30f5c103..e4aa32beb117 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb index 11c36c4a2923..9a211e72255b 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb index 7e20d8a8e045..b2e2b5e6bf75 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb index c408531cca12..e2275aca2049 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb index dfeb3986439e..67f85e3b6957 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb index 6b74413ec0f8..a2116debfb8f 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb index 650088fca01c..150baa1f1240 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =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 7464a5ae6ca1..f5aac8f02fd1 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 @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb index 9a122b5a22b4..6457c549ce07 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb index ba89078942eb..81778de5f86d 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb index 26dd99dc1aa0..f28021e6b98e 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb index b2685e70c63c..5dc7d2b7d970 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end 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 44f179dbf3c5..5d276bf6cf95 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 @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb index e8c82e7bcc2b..0956e189ef2f 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb index 97934083eeb1..34a4590a52a6 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb index 5face65cf285..adc351664ee6 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0-SNAPSHOT +OpenAPI Generator version: 5.4.0 =end diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100755 --- a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 a0345aa87189..4d0bfeb23b95 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 e58b40e6494d..07c7c8657d4d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 7c13a46234c3..7cff04114e55 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 7eb240e1ccce..8b4c1b02ef65 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 a257403c1053..b84ec6eb7e4c 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 723e662e99be..fe4caf5c384e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 4be02096d7bc..a38999c85492 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 72312ea96f92..c47980913f82 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 f660e0a976d3..528e8680f91d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 de834ecc2330..25696206d64a 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 f5558f9fd117..291361cf34fd 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 680489f3b4a1..c08e2f1607c9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d51556186fe0..c9adde7ab7f6 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 14599fd0eac4..2543ceb2a58f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a8bab9da996a..37e10898444f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 6181c9579ead..f8432b0dbd67 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 75bca1aa3b94..1e68b4076785 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a0f582be8e25..fb7bf0cb4210 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ea95ba18f55c..16321d028df1 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION +++ b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 8c14b51dbf81..67d689bc8a01 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 04b786a8ba48..27d68e666cdb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3268f2475c06..fc833e0c3c53 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 e6cdc38fc69e..7edfb98f8039 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 b2f6f8a6e4d2..8e41c3c8f37c 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 bbfe6492b97a..ad37382de1b4 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 b9a9da62ae53..79f970604310 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 46a9931877bc..168f7164f545 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 62d52cbcebf3..d0c4f722b99e 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 65e395479d43..1ce97500d732 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 4506c9592dd1..6d20cda3e0c4 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 e13856e59a2e..7e2ab67912fc 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a77caa14f045..d17a723bfce9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 2c5d36169608..3a096c8ae8be 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 c348d32b8c17..a411f0b0274f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 5b0b00add83c..215bab5737c1 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 d734154ae6c1..d50b6923e148 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ada59fbd2be1..4c443ab864d0 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 9784647575d3..202099bfe7f5 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3f7578b7e96b..02aea76cd4f9 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 6312c5190a15..c757eddb48fd 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 847cc88474b8..89fdca2b80b2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 cf5567df8fa5..37a9b1f0f54b 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 17dfd1cca127..585e5ba7297f 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 e53687474afd..7533f731a2ec 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 776ecce29b0a..45f0805e7d33 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 14d69223a9cc..fbdb91d67445 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 26879041d82e..ac4d998ec9d4 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 9dd992bfe39d..311750198de1 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ff42c358bc41..10ef22104a1d 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 2d9139f575bf..f36e5b9162ba 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 2709d5b98b60..870ea23358ba 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 9c87066a553a..a45798229b36 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 8c14b51dbf81..67d689bc8a01 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 04b786a8ba48..27d68e666cdb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3268f2475c06..fc833e0c3c53 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION +++ b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/schema/petstore/ktorm/.openapi-generator/VERSION b/samples/schema/petstore/ktorm/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/schema/petstore/ktorm/.openapi-generator/VERSION +++ b/samples/schema/petstore/ktorm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION b/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION +++ b/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION b/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/erlang-server/.openapi-generator/VERSION b/samples/server/petstore/erlang-server/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/erlang-server/.openapi-generator/VERSION +++ b/samples/server/petstore/erlang-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/go-chi-server/.openapi-generator/VERSION b/samples/server/petstore/go-chi-server/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/go-chi-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-chi-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/go-server-required/.openapi-generator/VERSION b/samples/server/petstore/go-server-required/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/go-server-required/.openapi-generator/VERSION +++ b/samples/server/petstore/go-server-required/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION b/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-camel/.openapi-generator/VERSION b/samples/server/petstore/java-camel/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-camel/.openapi-generator/VERSION +++ b/samples/server/petstore/java-camel/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-camel/pom.xml b/samples/server/petstore/java-camel/pom.xml index 8391657c52fc..39559a91c0dd 100644 --- a/samples/server/petstore/java-camel/pom.xml +++ b/samples/server/petstore/java-camel/pom.xml @@ -1,6 +1,6 @@ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java index f9273736a2f3..e7231b3b29a4 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java index d74fcf78d216..7a6f56ed35bc 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java index 01d874fca95f..8f1dcd815cea 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java index 65de1c7c3d5b..8c6538a6b7d2 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java index f32d4c7d2d85..e83bdd9b99ae 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java index 55d8651439e3..53ac70bd6194 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java index c9fd610e3f2f..e0aa0fc125b7 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java index ce6ad8207104..7010688a4c15 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java index 3babbf719cc2..1edf787a51b4 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java index b2fd13058a0a..b5d9c3067946 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java index da259ae0c537..dc2933b63a85 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/resources/application.properties b/samples/server/petstore/java-camel/src/main/resources/application.properties index 36cdb9894176..a00c8424db96 100644 --- a/samples/server/petstore/java-camel/src/main/resources/application.properties +++ b/samples/server/petstore/java-camel/src/main/resources/application.properties @@ -1,4 +1,4 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). # https://openapi-generator.tech # Do not edit the class manually. diff --git a/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION b/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION +++ b/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-undertow/.openapi-generator/VERSION b/samples/server/petstore/java-undertow/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/java-undertow/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/README.md b/samples/server/petstore/kotlin-server-modelMutable/README.md index ad9008bc0dd1..795ac348b9ad 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/README.md +++ b/samples/server/petstore/kotlin-server-modelMutable/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 5.4.0-SNAPSHOT. +Generated by OpenAPI Generator 5.4.0. ## Requires diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index ad9008bc0dd1..795ac348b9ad 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 5.4.0-SNAPSHOT. +Generated by OpenAPI Generator 5.4.0. ## Requires diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 6ddbe5583e49..67760cfc551b 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 8bb9e405c31f..fcf3c24c36b2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index d1be9a9efed7..a3e1fb673c64 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/php-laravel/.openapi-generator/VERSION b/samples/server/petstore/php-laravel/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/VERSION +++ b/samples/server/petstore/php-laravel/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/php-slim4/.openapi-generator/VERSION b/samples/server/petstore/php-slim4/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION +++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/python-fastapi/.openapi-generator/VERSION b/samples/server/petstore/python-fastapi/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/python-fastapi/.openapi-generator/VERSION +++ b/samples/server/petstore/python-fastapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/VERSION +++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java index cf414337bbc0..b019542e3403 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java index e585fe05b84f..1af9417b7160 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 82d201bd766e..0abe9d7aa504 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 8c1fb519b30a..25c02e5ed6dd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 05159a4c14f9..6f57efc9b4b0 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 8e1bc13822a4..295d97a8f0a0 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index 00a99bf54ba8..31b3780b4b97 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index e8b247455d18..896102dab757 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1883d899779a..2c0268077e76 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index f9a5fa7b8b7d..0b5dbcd4b022 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 138c4a9bf953..95aa72575f76 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index b01403490d02..31df031b6327 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index bc6e370299dc..b7e0937447d2 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index acaf496cde75..1c46541b1749 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1883d899779a..2c0268077e76 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index ee9b968c0ff1..3beeb7faaf80 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 138c4a9bf953..95aa72575f76 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index b01403490d02..31df031b6327 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index bc6e370299dc..b7e0937447d2 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index c4a0e46979fa..f9439179aaa6 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1883d899779a..2c0268077e76 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 635d55b3812c..b135fcf93892 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 138c4a9bf953..95aa72575f76 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 16933925815c..d9e8378815df 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index bc6e370299dc..b7e0937447d2 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index c4a0e46979fa..f9439179aaa6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1883d899779a..2c0268077e76 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index ee9b968c0ff1..3beeb7faaf80 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 138c4a9bf953..95aa72575f76 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index b01403490d02..31df031b6327 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index bc6e370299dc..b7e0937447d2 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index c4a0e46979fa..f9439179aaa6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 5a4e5b8c884b..208be20ea96e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 dd66ee2cc569..b946f3183db4 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ccd8d276dc65..6167cf48dc4d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 31cb57385b77..83ab95850f92 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 5dce0416efbc..b574ae5627f4 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 07fe60cce885..18a0f6e93948 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1883d899779a..2c0268077e76 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ee9b968c0ff1..3beeb7faaf80 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 138c4a9bf953..95aa72575f76 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index b01403490d02..31df031b6327 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 bc6e370299dc..b7e0937447d2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index c4a0e46979fa..f9439179aaa6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 25aa61f48d66..5dc142031b48 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 88dc22636c8b..494b85b44ce5 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a1b0656bc43b..8b825e5eaacc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 75abe3ff422f..5a448b643c4b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 0f4dda3730fd..69db21444928 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index e7aa6f28b61b..4ad6a2a1b112 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 25aa61f48d66..5dc142031b48 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 88dc22636c8b..494b85b44ce5 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a1b0656bc43b..8b825e5eaacc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 75abe3ff422f..5a448b643c4b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 0f4dda3730fd..69db21444928 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index e7aa6f28b61b..4ad6a2a1b112 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index f32b3ca03b66..caa2205c83ef 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 8fb68265f627..a97a7c40a3f0 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index b52a218dd3ee..712480e94847 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index ef28d4cf910b..4075cddf7bef 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 565feb9ad1ca..1d5d24c7259a 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index fa813d7e9465..e4680b633af5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index de9aadfd5708..1f1f74721fa3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 efbce89bf305..6923404cfffe 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a693af64814d..ad09c435091a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 81fdd3e842c8..64973d426f26 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 c3aef13167ed..defebec4b315 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index d2efdab90238..7b8a4c0e1073 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 5a4e5b8c884b..208be20ea96e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3c0d3aa6623a..c78792b407fd 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ccd8d276dc65..6167cf48dc4d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 0b800e906bbb..5e1fcb67fdfc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 5dce0416efbc..b574ae5627f4 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 07fe60cce885..18a0f6e93948 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 25aa61f48d66..5dc142031b48 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 166af3a8ed25..a13bfb757620 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a1b0656bc43b..8b825e5eaacc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 2532e3d6823b..a2d01a7cff1f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 0f4dda3730fd..69db21444928 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index e7aa6f28b61b..4ad6a2a1b112 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 5a4e5b8c884b..208be20ea96e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3c0d3aa6623a..c78792b407fd 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ccd8d276dc65..6167cf48dc4d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 0b800e906bbb..5e1fcb67fdfc 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 5dce0416efbc..b574ae5627f4 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 07fe60cce885..18a0f6e93948 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1883d899779a..2c0268077e76 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 635d55b3812c..b135fcf93892 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 138c4a9bf953..95aa72575f76 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 16933925815c..d9e8378815df 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 bc6e370299dc..b7e0937447d2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index c4a0e46979fa..f9439179aaa6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1883d899779a..2c0268077e76 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 a15bc59fdcab..98dcc85a8d85 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 138c4a9bf953..95aa72575f76 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 81c7b3337c3a..0d31c5dd3cdb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 bc6e370299dc..b7e0937447d2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index c4a0e46979fa..f9439179aaa6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file 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 244f5f910bde..0c24394bd8c0 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ffc492b9aa8c..5884ce9ce595 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 4278ca712647..8d392e0379fb 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 1851af5207d4..971da53c8043 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 2f5b01082fbb..526e3c9011e5 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 3d8032a80bce..7fb019b6b875 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index 0984c4c1ad21..1e20ec35c642 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1883d899779a..2c0268077e76 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 ee9b968c0ff1..3beeb7faaf80 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 138c4a9bf953..95aa72575f76 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index b01403490d02..31df031b6327 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ 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 bc6e370299dc..b7e0937447d2 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index c4a0e46979fa..f9439179aaa6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0). * https://openapi-generator.tech * Do not edit the class manually. */ From f77d34b2f283edd4971d652fe0bac95cfbda83ae Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 31 Jan 2022 14:29:00 +0800 Subject: [PATCH 172/175] update readme --- README.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5be880e493d5..c23ac4132c32 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,6 @@ [![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67) [![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/openapitools/openapi-generator/Check%20Supported%20Java%20Versions/master?label=Check%20Supported%20Java%20Versions&logo=github&logoColor=green)](https://github.com/OpenAPITools/openapi-generator/actions?query=workflow%3A%22Check+Supported+Java+Versions%22) -[6.0.x](https://github.com/OpenAPITools/openapi-generator/tree/6.0.x) (`6.0.x`): -[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/6.0.x.svg?label=Integration%20Test)](https://travis-ci.com/OpenAPITools/openapi-generator) -[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/6.0.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) -[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=6.0.x&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator) -[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/6.0.x)](https://cloud.drone.io/OpenAPITools/openapi-generator) -[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/6.0.x?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67) -

    @@ -110,9 +103,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20 | OpenAPI Generator Version | Release Date | Notes | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- | -| 6.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/) | Jan/Feb 2022 | Minor release with breaking changes (no fallback) | -| 5.4.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.4.0-SNAPSHOT/) | Dec 2021 | Minor release with breaking changes (with fallback) | -| [5.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.3.1) (latest stable release) | 21.12.2021 | Patch release (enhancements, bug fixes, etc) | +| 6.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/) | Feb/Mar 2022 | Major release with breaking changes (no fallback) | +| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) (latest stable release) | 31.01.2021 | Minor release with breaking changes (with fallback) | | [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) | OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 @@ -169,16 +161,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.1/openapi-generator-cli-5.3.1.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.4.0/openapi-generator-cli-5.4.0.jar` For **Mac/Linux** users: ```sh -wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.1/openapi-generator-cli-5.3.1.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.4.0/openapi-generator-cli-5.4.0.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.1/openapi-generator-cli-5.3.1.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.4.0/openapi-generator-cli-5.4.0.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -403,7 +395,7 @@ openapi-generator-cli version To use a specific version of "openapi-generator-cli" ```sh -openapi-generator-cli version-manager set 5.3.1 +openapi-generator-cli version-manager set 5.4.0 ``` Or install it as dev-dependency: @@ -427,7 +419,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat (if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`) -You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.1/openapi-generator-cli-5.3.1.jar) +You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.4.0/openapi-generator-cli-5.4.0.jar) To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` From 95c996f8666237a58838a72813e18185d116a756 Mon Sep 17 00:00:00 2001 From: cghislai Date: Mon, 31 Jan 2022 07:53:07 +0100 Subject: [PATCH 173/175] Revert supports for delete body in typescript-angular client (#10976) * Update generated angular 12 client version * Revert "Delete body angular (#10751)" This reverts commit edb88d919381d56a4ff885030f9b0e6f43b2898c. * Update generated files --- ...script-angular-v12-provided-in-root-with-npm.yaml | 2 +- .../typescript-angular-v12-provided-in-root.yaml | 2 +- .../org/openapitools/codegen/CodegenOperation.java | 10 +--------- .../languages/TypeScriptAngularClientCodegen.java | 7 ------- .../Java/libraries/google-api-client/api.mustache | 4 ++-- .../src/main/resources/erlang-proper/api.mustache | 12 ++++++------ .../typescript-angular/api.service.mustache | 6 ------ .../resources/typescript-nestjs/api.service.mustache | 4 ++-- .../builds/with-npm/package.json | 12 ++++++------ .../builds/default/api/pet.service.ts | 1 - .../builds/default/api/store.service.ts | 1 - .../builds/default/api/user.service.ts | 1 - .../builds/with-npm/api/pet.service.ts | 1 - .../builds/with-npm/api/store.service.ts | 1 - .../builds/with-npm/api/user.service.ts | 1 - samples/yaml/pet.yml | 2 +- 16 files changed, 20 insertions(+), 47 deletions(-) diff --git a/bin/configs/typescript-angular-v12-provided-in-root-with-npm.yaml b/bin/configs/typescript-angular-v12-provided-in-root-with-npm.yaml index 85973a9a5df2..35ae77b6f825 100644 --- a/bin/configs/typescript-angular-v12-provided-in-root-with-npm.yaml +++ b/bin/configs/typescript-angular-v12-provided-in-root-with-npm.yaml @@ -3,7 +3,7 @@ outputDir: samples/client/petstore/typescript-angular-v12-provided-in-root/build inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/typescript-angular additionalProperties: - ngVersion: 12.0.0 + ngVersion: 12.2.0 npmVersion: 1.0.0 npmName: '@openapitools/typescript-angular-petstore' npmRepository: https://skimdb.npmjs.com/registry diff --git a/bin/configs/typescript-angular-v12-provided-in-root.yaml b/bin/configs/typescript-angular-v12-provided-in-root.yaml index 466282bf228b..746de9795ece 100644 --- a/bin/configs/typescript-angular-v12-provided-in-root.yaml +++ b/bin/configs/typescript-angular-v12-provided-in-root.yaml @@ -3,4 +3,4 @@ outputDir: samples/client/petstore/typescript-angular-v12-provided-in-root/build inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/typescript-angular additionalProperties: - ngVersion: 12.0.0 + ngVersion: 12.2.0 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 ca0cca500cd3..9067d55dfd1f 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 @@ -239,17 +239,9 @@ public boolean isRestfulUpdate() { /** * Check if body param is allowed for the request method * - * @return true request method is DELETE, PUT, PATCH or POST; false otherwise - */ - public boolean isBodyAllowed() { - return Arrays.asList("DELETE","PUT", "PATCH", "POST").contains(httpMethod.toUpperCase(Locale.ROOT)); - } - /** - * Check if the request method is PUT or PATCH or POST - * * @return true request method is PUT, PATCH or POST; false otherwise */ - public boolean isMethodPutOrPatchOrPost() { + public boolean isBodyAllowed() { return Arrays.asList("PUT", "PATCH", "POST").contains(httpMethod.toUpperCase(Locale.ROOT)); } 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 d2ab116ab1eb..d26ae4747372 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 @@ -55,7 +55,6 @@ public static enum PROVIDED_IN_LEVEL {none, root, any, platform} public static final String PROVIDED_IN = "providedIn"; public static final String ENFORCE_GENERIC_MODULE_WITH_PROVIDERS = "enforceGenericModuleWithProviders"; public static final String HTTP_CONTEXT_IN_OPTIONS = "httpContextInOptions"; - public static final String DELETE_ACCEPTS_BODY = "deleteAcceptsBody"; public static final String API_MODULE_PREFIX = "apiModulePrefix"; public static final String CONFIGURATION_PREFIX = "configurationPrefix"; public static final String SERVICE_SUFFIX = "serviceSuffix"; @@ -238,12 +237,6 @@ public void processOpts() { additionalProperties.put(HTTP_CONTEXT_IN_OPTIONS, false); } - if (ngVersion.atLeast("12.1.0")) { - additionalProperties.put(DELETE_ACCEPTS_BODY, true); - } else { - additionalProperties.put(DELETE_ACCEPTS_BODY, false); - } - additionalProperties.put(NG_VERSION, ngVersion); if (additionalProperties.containsKey(API_MODULE_PREFIX)) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache index 97b1dd6885c9..f9af1a4a9bb6 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache @@ -121,7 +121,7 @@ public class {{classname}} { String localVarUrl = uriBuilder{{#hasPathParams}}.buildFromMap(uriVariables).toString();{{/hasPathParams}}{{^hasPathParams}}.build().toString();{{/hasPathParams}} GenericUrl genericUrl = new GenericUrl(localVarUrl); - HttpContent content = {{#isMethodPutOrPatchOrPost}}{{#bodyParam}}apiClient.new JacksonJsonHttpContent({{paramName}}){{/bodyParam}}{{^bodyParam}}new EmptyContent(){{/bodyParam}}{{/isMethodPutOrPatchOrPost}}{{^isMethodPutOrPatchOrPost}}null{{/isMethodPutOrPatchOrPost}}; + HttpContent content = {{#isBodyAllowed}}{{#bodyParam}}apiClient.new JacksonJsonHttpContent({{paramName}}){{/bodyParam}}{{^bodyParam}}new EmptyContent(){{/bodyParam}}{{/isBodyAllowed}}{{^isBodyAllowed}}null{{/isBodyAllowed}}; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); }{{#bodyParam}} @@ -199,7 +199,7 @@ public class {{classname}} { String localVarUrl = uriBuilder{{#hasPathParams}}.buildFromMap(uriVariables).toString();{{/hasPathParams}}{{^hasPathParams}}.build().toString();{{/hasPathParams}} GenericUrl genericUrl = new GenericUrl(localVarUrl); - HttpContent content = {{#isMethodPutOrPatchOrPost}}{{#bodyParam}}apiClient.new JacksonJsonHttpContent({{paramName}}){{/bodyParam}}{{^bodyParam}}new EmptyContent(){{/bodyParam}}{{/isMethodPutOrPatchOrPost}}{{^isMethodPutOrPatchOrPost}}null{{/isMethodPutOrPatchOrPost}}; + HttpContent content = {{#isBodyAllowed}}{{#bodyParam}}apiClient.new JacksonJsonHttpContent({{paramName}}){{/bodyParam}}{{^bodyParam}}new EmptyContent(){{/bodyParam}}{{/isBodyAllowed}}{{^isBodyAllowed}}null{{/isBodyAllowed}}; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); } diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/api.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/api.mustache index 2ee4b7eafa88..30d2b92d236c 100644 --- a/modules/openapi-generator/src/main/resources/erlang-proper/api.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-proper/api.mustache @@ -18,20 +18,20 @@ Method = {{httpMethod}}, Host = application:get_env({{packageName}}, host, "http://localhost:8080"), Path = ["{{{replacedPathName}}}"], - {{#isMethodPutOrPatchOrPost}} + {{#isBodyAllowed}} Body = {{^formParams.isEmpty}}{form, [{{#formParams}}{{#required}}{{^-first}}, {{/-first}}{<<"{{{baseName}}}">>, {{paramName}}{{/required}}{{/formParams}}]++{{packageName}}_utils:optional_params([{{#formParams}}{{^required}}{{^-first}}, {{/-first}}'{{{baseName}}}'{{/required}}{{/formParams}}], _OptionalParams)}{{/formParams.isEmpty}}{{#formParams.isEmpty}}{{#bodyParams.isEmpty}}[]{{/bodyParams.isEmpty}}{{^bodyParams.isEmpty}}{{#bodyParams}}{{paramName}}{{/bodyParams}}{{/bodyParams.isEmpty}}{{/formParams.isEmpty}}, ContentType = {{#hasConsumes}}hd([{{#consumes}}{{^-first}}, {{/-first}}"{{mediaType}}"{{/consumes}}]){{/hasConsumes}}{{^hasConsumes}}"text/plain"{{/hasConsumes}}, - {{/isMethodPutOrPatchOrPost}} + {{/isBodyAllowed}} {{^queryParams.isEmpty}} QueryString = [{{#queryParams}}{{^-first}}, {{/-first}}<<"{{{baseName}}}=">>, {{{paramName}}}, <<"&">>{{/queryParams}}], {{/queryParams.isEmpty}} - {{#isMethodPutOrPatchOrPost}} + {{#isBodyAllowed}} {{packageName}}_utils:request(Method, [Host, ?BASE_URL, Path{{^queryParams.isEmpty}}, <<"?">>, QueryString{{/queryParams.isEmpty}}], jsx:encode(Body), ContentType). - {{/isMethodPutOrPatchOrPost}} - {{^isMethodPutOrPatchOrPost}} + {{/isBodyAllowed}} + {{^isBodyAllowed}} {{packageName}}_utils:request(Method, [Host, ?BASE_URL, Path{{^queryParams.isEmpty}}, <<"?">>, QueryString{{/queryParams.isEmpty}}]). - {{/isMethodPutOrPatchOrPost}} + {{/isBodyAllowed}} {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache index 3f5bb626a411..dee0ffaf3a4c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache @@ -361,14 +361,8 @@ export class {{classname}} { } {{/isResponseFile}} - {{#deleteAcceptsBody}} return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.configuration.basePath}{{{path}}}`,{{#isBodyAllowed}} {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isBodyAllowed}} - {{/deleteAcceptsBody}} - {{^deleteAcceptsBody}} - return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.configuration.basePath}{{{path}}}`,{{#isMethodPutOrPatchOrPost}} - {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isMethodPutOrPatchOrPost}} - {{/deleteAcceptsBody}} { {{#httpContextInOptions}} context: localVarHttpContext, 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 ddea339cf179..1d3703f50d73 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 @@ -208,8 +208,8 @@ export class {{classname}} { {{/formParams}} {{/hasFormParams}} - return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.basePath}{{{path}}}`,{{#isMethodPutOrPatchOrPost}} - {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}convertFormParamsToString ? formParams.toString() : formParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isMethodPutOrPatchOrPost}} + return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.basePath}{{{path}}}`,{{#isBodyAllowed}} + {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}convertFormParamsToString ? formParams.toString() : formParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isBodyAllowed}} { {{#hasQueryParams}} params: queryParameters, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json index 69a4fcbf2b38..3c3b12435686 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json @@ -12,15 +12,15 @@ "build": "ng-packagr -p ng-package.json" }, "peerDependencies": { - "@angular/core": "^12.0.0", + "@angular/core": "^12.2.0", "rxjs": "^6.6.0" }, "devDependencies": { - "@angular/common": "^12.0.0", - "@angular/compiler": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", - "@angular/core": "^12.0.0", - "@angular/platform-browser": "^12.0.0", + "@angular/common": "^12.2.0", + "@angular/compiler": "^12.2.0", + "@angular/compiler-cli": "^12.2.0", + "@angular/core": "^12.2.0", + "@angular/platform-browser": "^12.2.0", "ng-packagr": "^12.2.1", "reflect-metadata": "^0.1.3", "rxjs": "^6.6.0", diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts index c68d5a82d524..dcc8df3f3c82 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts @@ -232,7 +232,6 @@ export class PetService { } return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, - null, { context: localVarHttpContext, responseType: responseType_, 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 b63e9dbea89a..06d4df352ea0 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 @@ -133,7 +133,6 @@ export class StoreService { } return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, - null, { context: localVarHttpContext, responseType: responseType_, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts index a2e40fa8a185..a820ab296317 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts @@ -329,7 +329,6 @@ export class UserService { } return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, - null, { context: localVarHttpContext, responseType: responseType_, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts index c68d5a82d524..dcc8df3f3c82 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts @@ -232,7 +232,6 @@ export class PetService { } return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, - null, { context: localVarHttpContext, responseType: responseType_, 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 b63e9dbea89a..06d4df352ea0 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 @@ -133,7 +133,6 @@ export class StoreService { } return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, - null, { context: localVarHttpContext, responseType: responseType_, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts index a2e40fa8a185..a820ab296317 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts @@ -329,7 +329,6 @@ export class UserService { } return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, - null, { context: localVarHttpContext, responseType: responseType_, diff --git a/samples/yaml/pet.yml b/samples/yaml/pet.yml index 4b3420c99c81..ab33f8aab1de 100644 --- a/samples/yaml/pet.yml +++ b/samples/yaml/pet.yml @@ -178,4 +178,4 @@ models: type: string id: type: integer - format: int64 \ No newline at end of file + format: int64 From 81adc3cf8ce84e870c5977d0ffda557b48cad8be Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 31 Jan 2022 15:00:37 +0800 Subject: [PATCH 174/175] update readme with blog posts related to openapi-generator --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c23ac4132c32..64cf6037011a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@
    -[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.4.x`): +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`6.0.x`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.com/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator) @@ -832,6 +832,9 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2021-10-17 - [Generate a TypeScript HTTP Client From An OpenAPI Spec In DotNET 5](https://richardwillis.info/blog/generate-a-type-script-http-client-from-an-open-api-spec-in-dot-net-5) by [Richard Willis](https://github.com/badsyntax) - 2021-11-06 - [スタートアップの開発で意識したこと](https://zenn.dev/woo_noo/articles/5cb09f8e2899ae782ad1) by [woo-noo](https://zenn.dev/woo_noo) - 2021-11-09 - [Effective Software Development using OpenAPI Generator](https://apexlabs.ai/post/effective-software-development-using-openapi-generator) by Ajil Oomme +- 2021-12-07 - [An Introduction to OpenAPI](https://betterprogramming.pub/4-use-cases-of-openapi-which-are-good-to-know-1a041f4ad71e) by [Na'aman Hirschfeld](https://naamanhirschfeld.medium.com/) +- 2021-01-02 - [Towards a secure API client generator for IoT devices](https://arxiv.org/abs/2201.00270) by Anders Aaen Springborg, Martin Kaldahl Andersen, Kaare Holland Hattel, Michele Albano + ## [6 - About Us](#table-of-contents) From 8a2131f25fa2186a3ba00d3079ba1bd0984acc59 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 1 Feb 2022 01:28:57 +0800 Subject: [PATCH 175/175] update slack url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64cf6037011a..adf3fa9c4058 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
    -[![Stable releaases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) [![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator) +[![Stable releaases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) [![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)